mirror of
https://git.soft.fish/val/MicroCorruption.git
synced 2024-11-21 19:35:58 +00:00
246 lines
8.7 KiB
Plaintext
246 lines
8.7 KiB
Plaintext
|
0010 <__trap_interrupt>
|
||
|
0010: 3041 ret
|
||
|
4400 <__watchdog_support>
|
||
|
4400: 5542 5c01 mov.b &0x015c, r5
|
||
|
4404: 35d0 085a bis #0x5a08, r5
|
||
|
4408: 8245 2024 mov r5, &0x2420
|
||
|
440c <__init_stack>
|
||
|
440c: 3140 0044 mov #0x4400, sp
|
||
|
4410 <__do_copy_data>
|
||
|
4410: 3f40 2000 mov #0x20, r15
|
||
|
4414: 0f93 tst r15
|
||
|
4416: 0824 jz $+0x12 <__do_clear_bss+0x0>
|
||
|
4418: 9242 2024 5c01 mov &0x2420, &0x015c
|
||
|
441e: 2f83 decd r15
|
||
|
4420: 9f4f 8047 0024 mov 0x4780(r15), 0x2400(r15)
|
||
|
4426: f823 jnz $-0xe <__do_copy_data+0x8>
|
||
|
4428 <__do_clear_bss>
|
||
|
4428: 3f40 0000 clr r15
|
||
|
442c: 0f93 tst r15
|
||
|
442e: 0724 jz $+0x10 <main+0x0>
|
||
|
4430: 9242 2024 5c01 mov &0x2420, &0x015c
|
||
|
4436: 1f83 dec r15
|
||
|
4438: cf43 2024 mov.b #0x0, 0x2420(r15)
|
||
|
443c: f923 jnz $-0xc <__do_clear_bss+0x8>
|
||
|
443e <main>
|
||
|
443e: 3150 bcfe add #0xfebc, sp
|
||
|
4442: 3f40 5646 mov #0x4656 "Welcome to the secure program loader.", r15
|
||
|
4446: b012 ba45 call #0x45ba <puts>
|
||
|
444a: 8143 0000 clr 0x0(sp)
|
||
|
444e: 3f40 7c46 mov #0x467c "Please enter second stage load address.", r15
|
||
|
4452: b012 ba45 call #0x45ba <puts>
|
||
|
4456: 2e43 mov #0x2, r14
|
||
|
4458: 0f41 mov sp, r15
|
||
|
445a: b012 9c45 call #0x459c <getsn>
|
||
|
445e: 3f40 a446 mov #0x46a4 "Please enter the second stage program.", r15
|
||
|
4462: b012 ba45 call #0x45ba <puts>
|
||
|
4466: 3d40 0101 mov #0x101, r13
|
||
|
446a: 0e43 clr r14
|
||
|
446c: 0f41 mov sp, r15
|
||
|
446e: 3f50 4300 add #0x43, r15
|
||
|
4472: b012 ea45 call #0x45ea <memset>
|
||
|
4476: 3e40 0001 mov #0x100, r14
|
||
|
447a: 0f41 mov sp, r15
|
||
|
447c: 3f50 4300 add #0x43, r15
|
||
|
4480: b012 9c45 call #0x459c <getsn>
|
||
|
4484: 3f40 cb46 mov #0x46cb "Please enter program signature.", r15
|
||
|
4488: b012 ba45 call #0x45ba <puts>
|
||
|
448c: 3d40 4100 mov #0x41, r13
|
||
|
4490: 0e43 clr r14
|
||
|
4492: 0f41 mov sp, r15
|
||
|
4494: 2f53 incd r15
|
||
|
4496: b012 ea45 call #0x45ea <memset>
|
||
|
449a: 3e40 4000 mov #0x40, r14
|
||
|
449e: 0f41 mov sp, r15
|
||
|
44a0: 2f53 incd r15
|
||
|
44a2: b012 9c45 call #0x459c <getsn>
|
||
|
44a6: 2f41 mov @sp, r15
|
||
|
44a8: 0f93 tst r15
|
||
|
44aa: 0334 jge $+0x8 <main+0x74>
|
||
|
44ac: 3f90 01f0 cmp #0xf001, r15
|
||
|
44b0: 0528 jnc $+0xc <main+0x7e>
|
||
|
44b2: 3f40 eb46 mov #0x46eb "Load address outside allowed range of 0x8000-0xF000", r15
|
||
|
44b6: b012 ba45 call #0x45ba <puts>
|
||
|
44ba: c73f jmp $-0x70 <main+0xc>
|
||
|
44bc: 3d40 0001 mov #0x100, r13
|
||
|
44c0: 0e41 mov sp, r14
|
||
|
44c2: 3e50 4300 add #0x43, r14
|
||
|
44c6: b012 d845 call #0x45d8 <memcpy>
|
||
|
44ca: 0c41 mov sp, r12
|
||
|
44cc: 2c53 incd r12
|
||
|
44ce: 3d40 0001 mov #0x100, r13
|
||
|
44d2: 2e41 mov @sp, r14
|
||
|
44d4: 3f40 0024 mov #0x2400, r15
|
||
|
44d8: b012 6845 call #0x4568 <verify_ed25519>
|
||
|
44dc: 1f93 cmp #0x1, r15
|
||
|
44de: 0524 jz $+0xc <main+0xac>
|
||
|
44e0: 3f40 1f47 mov #0x471f "Incorrect signature, continuing", r15
|
||
|
44e4: b012 ba45 call #0x45ba <puts>
|
||
|
44e8: b03f jmp $-0x9e <main+0xc>
|
||
|
44ea: 3f40 3f47 mov #0x473f "Signature valid, executing payload", r15
|
||
|
44ee: b012 ba45 call #0x45ba <puts>
|
||
|
44f2: 9112 0200 call 0x2(sp)
|
||
|
44f6: 0f93 tst r15
|
||
|
44f8: 0f24 jz $+0x20 <main+0xda>
|
||
|
44fa: 3f40 6247 mov #0x4762 "ACCESS GRANTED", r15
|
||
|
44fe: b012 ba45 call #0x45ba <puts>
|
||
|
4502: 0312 push #0x0
|
||
|
4504: 0312 push #0x0
|
||
|
4506: 3012 7f00 push #0x7f
|
||
|
450a: b012 2c45 call #0x452c <INT>
|
||
|
450e: 0f43 clr r15
|
||
|
4510: 3150 4a01 add #0x14a, sp
|
||
|
4514: 3040 2245 br #0x4522 <__stop_progExec__>
|
||
|
4518: 3f40 7147 mov #0x4771 "ACCESS DENIED", r15
|
||
|
451c: b012 ba45 call #0x45ba <puts>
|
||
|
4520: 943f jmp $-0xd6 <main+0xc>
|
||
|
4522 <__stop_progExec__>
|
||
|
4522: 32d0 f000 bis #0xf0, sr
|
||
|
4526: fd3f jmp $-0x4 <__stop_progExec__+0x0>
|
||
|
4528 <__ctors_end>
|
||
|
4528: 3040 5446 br #0x4654 <_unexpected_>
|
||
|
452c <INT>
|
||
|
452c: 1f41 0200 mov 0x2(sp), r15
|
||
|
4530: 0212 push sr
|
||
|
4532: 4f4f mov.b r15, r15
|
||
|
4534: 8f10 swpb r15
|
||
|
4536: 3fd0 0080 bis #0x8000, r15
|
||
|
453a: 024f mov r15, sr
|
||
|
453c: b012 1000 call #0x10
|
||
|
4540: 3241 pop sr
|
||
|
4542: 3041 ret
|
||
|
4544 <sha1>
|
||
|
4544: 0d12 push r13
|
||
|
4546: 0e12 push r14
|
||
|
4548: 0f12 push r15
|
||
|
454a: 3012 3000 push #0x30
|
||
|
454e: b012 2c45 call #0x452c <INT>
|
||
|
4552: 3152 add #0x8, sp
|
||
|
4554: 3041 ret
|
||
|
4556 <sha256>
|
||
|
4556: 0d12 push r13
|
||
|
4558: 0e12 push r14
|
||
|
455a: 0f12 push r15
|
||
|
455c: 3012 3100 push #0x31
|
||
|
4560: b012 2c45 call #0x452c <INT>
|
||
|
4564: 3152 add #0x8, sp
|
||
|
4566: 3041 ret
|
||
|
4568 <verify_ed25519>
|
||
|
4568: 0b12 push r11
|
||
|
456a: 0412 push r4
|
||
|
456c: 0441 mov sp, r4
|
||
|
456e: 2452 add #0x4, r4
|
||
|
4570: 2183 decd sp
|
||
|
4572: 8443 faff clr -0x6(r4)
|
||
|
4576: 3b40 faff mov #0xfffa, r11
|
||
|
457a: 0b54 add r4, r11
|
||
|
457c: 0b12 push r11
|
||
|
457e: 0c12 push r12
|
||
|
4580: 0d12 push r13
|
||
|
4582: 0e12 push r14
|
||
|
4584: 0f12 push r15
|
||
|
4586: 3012 3300 push #0x33
|
||
|
458a: b012 2c45 call #0x452c <INT>
|
||
|
458e: 1f44 faff mov -0x6(r4), r15
|
||
|
4592: 3150 0e00 add #0xe, sp
|
||
|
4596: 3441 pop r4
|
||
|
4598: 3b41 pop r11
|
||
|
459a: 3041 ret
|
||
|
459c <getsn>
|
||
|
459c: 0e12 push r14
|
||
|
459e: 0f12 push r15
|
||
|
45a0: 2312 push #0x2
|
||
|
45a2: b012 2c45 call #0x452c <INT>
|
||
|
45a6: 3150 0600 add #0x6, sp
|
||
|
45aa: 3041 ret
|
||
|
45ac <putchar>
|
||
|
45ac: 8f11 sxt r15
|
||
|
45ae: 0f12 push r15
|
||
|
45b0: 0312 push #0x0
|
||
|
45b2: b012 2c45 call #0x452c <INT>
|
||
|
45b6: 2152 add #0x4, sp
|
||
|
45b8: 3041 ret
|
||
|
45ba <puts>
|
||
|
45ba: 0b12 push r11
|
||
|
45bc: 0b4f mov r15, r11
|
||
|
45be: 033c jmp $+0x8 <puts+0xc>
|
||
|
45c0: 1b53 inc r11
|
||
|
45c2: b012 ac45 call #0x45ac <putchar>
|
||
|
45c6: 6f4b mov.b @r11, r15
|
||
|
45c8: 4f93 tst.b r15
|
||
|
45ca: fa23 jnz $-0xa <puts+0x6>
|
||
|
45cc: 7f40 0a00 mov.b #0xa, r15
|
||
|
45d0: b012 ac45 call #0x45ac <putchar>
|
||
|
45d4: 3b41 pop r11
|
||
|
45d6: 3041 ret
|
||
|
45d8 <memcpy>
|
||
|
45d8: 0c4f mov r15, r12
|
||
|
45da: 043c jmp $+0xa <memcpy+0xc>
|
||
|
45dc: fc4e 0000 mov.b @r14+, 0x0(r12)
|
||
|
45e0: 1c53 inc r12
|
||
|
45e2: 3d53 add #-0x1, r13
|
||
|
45e4: 0d93 tst r13
|
||
|
45e6: fa23 jnz $-0xa <memcpy+0x4>
|
||
|
45e8: 3041 ret
|
||
|
45ea <memset>
|
||
|
45ea: 0b12 push r11
|
||
|
45ec: 0a12 push r10
|
||
|
45ee: 0912 push r9
|
||
|
45f0: 0812 push r8
|
||
|
45f2: 3d90 0600 cmp #0x6, r13
|
||
|
45f6: 092c jc $+0x14 <memset+0x20>
|
||
|
45f8: 0c4f mov r15, r12
|
||
|
45fa: 043c jmp $+0xa <memset+0x1a>
|
||
|
45fc: cc4e 0000 mov.b r14, 0x0(r12)
|
||
|
4600: 1c53 inc r12
|
||
|
4602: 3d53 add #-0x1, r13
|
||
|
4604: 0d93 tst r13
|
||
|
4606: fa23 jnz $-0xa <memset+0x12>
|
||
|
4608: 203c jmp $+0x42 <memset+0x60>
|
||
|
460a: 4e4e mov.b r14, r14
|
||
|
460c: 4b4e mov.b r14, r11
|
||
|
460e: 0b93 tst r11
|
||
|
4610: 0324 jz $+0x8 <memset+0x2e>
|
||
|
4612: 0c4b mov r11, r12
|
||
|
4614: 8c10 swpb r12
|
||
|
4616: 0bdc bis r12, r11
|
||
|
4618: 1fb3 bit #0x1, r15
|
||
|
461a: 0624 jz $+0xe <memset+0x3e>
|
||
|
461c: 3d53 add #-0x1, r13
|
||
|
461e: cf4e 0000 mov.b r14, 0x0(r15)
|
||
|
4622: 094f mov r15, r9
|
||
|
4624: 1953 inc r9
|
||
|
4626: 013c jmp $+0x4 <memset+0x40>
|
||
|
4628: 094f mov r15, r9
|
||
|
462a: 0c4d mov r13, r12
|
||
|
462c: 12c3 clrc
|
||
|
462e: 0c10 rrc r12
|
||
|
4630: 0a49 mov r9, r10
|
||
|
4632: 084c mov r12, r8
|
||
|
4634: 8a4b 0000 mov r11, 0x0(r10)
|
||
|
4638: 2a53 incd r10
|
||
|
463a: 3853 add #-0x1, r8
|
||
|
463c: fb23 jnz $-0x8 <memset+0x4a>
|
||
|
463e: 0c5c add r12, r12
|
||
|
4640: 0c59 add r9, r12
|
||
|
4642: 1df3 and #0x1, r13
|
||
|
4644: 0224 jz $+0x6 <memset+0x60>
|
||
|
4646: cc4e 0000 mov.b r14, 0x0(r12)
|
||
|
464a: 3841 pop r8
|
||
|
464c: 3941 pop r9
|
||
|
464e: 3a41 pop r10
|
||
|
4650: 3b41 pop r11
|
||
|
4652: 3041 ret
|
||
|
4654 <_unexpected_>
|
||
|
4654: 0013 reti pc
|
||
|
4656 .strings:
|
||
|
4656: "Welcome to the secure program loader."
|
||
|
467c: "Please enter second stage load address."
|
||
|
46a4: "Please enter the second stage program."
|
||
|
46cb: "Please enter program signature."
|
||
|
46eb: "Load address outside allowed range of 0x8000-0xF000"
|
||
|
471f: "Incorrect signature, continuing"
|
||
|
473f: "Signature valid, executing payload"
|
||
|
4762: "ACCESS GRANTED"
|
||
|
4771: "ACCESS DENIED"
|