; ; input : ; r0 <- 0x248 ; r1 <- 0 ; r2 <- 0 ; r3 <- 0` ; fp <- 0 ; sp <- 0x203b4780 ; ;Fill up structure starting from address 0x203B4708 ; ; [0] <- 0x116c start memory clean up reg definition ; [1] <- 0x1184 end .... ; [2] <- 0x0874 function call ; [3] <- 0x0d28 function call memset ; [4] <- 0x0ae8 function call ; [5] <- 0 *((int *)r0+4) ; [6] <- 0x11a0 *((int *)r0+3) ; [7] <- 0 *((int *)r0+5) ; [8] <- 0x116c ; [9] <- 0x0d28 function call ; [10] <- 0x0874 function call ; [11] <- 0x11c0 ; [12] <- 0x203B475C pointer to [21] ; [13] <- 0x1140 ; [14] <- 0x1144 ; [15] <- 0x1144 ; [16] <- 0x1184 ; [17] <- 0x119c ; [18] <- r3 ; [19] <- r2 ; [20] <- r1 ;--------------- ; [21] <- 0 ; [22] <- 0 0x1cc - *((int*)r0+1) ; [23] <- 0 0 - *((int*)r0+2) ; [24] <- 0 0x11a0 - *((int*)r0+3) ; ; 00000500 : 500: e1a0c00d mov ip, sp ; sp=0x203B4780 504: e92ddc00 stmdb sp!, {sl, fp, ip, lr, pc} ;sp=0x203B476C 508: e24cb004 sub fp, ip, #4 ; 0x4 50c: e24dd064 sub sp, sp, #100 ; 0x64 ;sp=0x203B4708 510: e58d1050 str r1, [sp, #80] 514: e58d204c str r2, [sp, #76] 518: e58d3048 str r3, [sp, #72] 51c: e59f8314 ldr r8, [pc, #788] ; 838 (0xc18) 520: e088800f add r8, r8, pc ; r8<- 0x1140 (0x11c0) 524: e58d8034 str r8, [sp, #52] 528: e59f830c ldr r8, [pc, #780] ; 83c (0xc10) 52c: e088800f add r8, r8, pc ; r8<- 0x1144 (0xb1) 530: e58d8038 str r8, [sp, #56] 534: e59f8304 ldr r8, [pc, #772] ; 840 (0xc04) 538: e088800f add r8, r8, pc ; r8<- 0x1144 (0xb1) 53c: e58d803c str r8, [sp, #60] 540: e59f82fc ldr r8, [pc, #764] ; 844 (0x328) 544: e088800f add r8, r8, pc ; r8 <- 0x874 function call 548: e58d8008 str r8, [sp, #8] 54c: e59f82f4 ldr r8, [pc, #756] ; 848 (0x590) 550: e088800f add r8, r8, pc ; r8 <- 0xae8 function call 554: e58d8010 str r8, [sp, #16] 558: e59f82ec ldr r8, [pc, #748] ; 84c (0xc08) 55c: e088800f add r8, r8, pc ; r8 <- 0x116c (0x11a0) 560: e58d8020 str r8, [sp, #32] 564: e59f92e4 ldr r9, [pc, #740] ; 850 (0x7b8) 568: e089900f add r9, r9, pc ; r9 <- 0xd28 function call 56c: e58d900c str r9, [sp, #12] 570: e58d9024 str r9, [sp, #36] 574: e59d9008 ldr r9, [sp, #8] ; r9 <- 0x874 578: e3a0a000 mov sl, #0 ; 0x0 57c: e58d9028 str r9, [sp, #40] 580: e590c000 ldr ip, [r0] ; ip <- 1 584: e5901004 ldr r1, [r0, #4] ; r1 <- 1cc r0+1 588: e35c0001 cmp ip, #1 ; 0x1 58c: 1a00000a bne 5bc 590: e590900c ldr r9, [r0, #12] ; r9 <- 11a0 r0+3 594: e1a02001 mov r2, r1 598: e58d9018 str r9, [sp, #24] 59c: e5909011 ldr r9, [r0, #16] ; r9 <- r0+4 5a0: e5901008 ldr r1, [r0, #8] ; r1 <- r0+2 5a4: e58d9014 str r9, [sp, #20] ; 0 ?? 5a8: e5909014 ldr r9, [r0, #20] ; 0?? r0+5 5ac: e590e018 ldr lr, [r0, #24] ; 0?? r0+6 5b0: e58d901c str r9, [sp, #28] 5b4: e590001c ldr r0, [r0, #28] ; 0?? r0+7 5b8: ea000006 b 5d8 000005bc : 5bc: e5900008 ldr r0, [r0, #8] 5c0: e1a0200c mov r2, ip 5c4: e58d0018 str r0, [sp, #24] 5c8: e3a00000 mov r0, #0 ; 0x0 5cc: e1a0e000 mov lr, r0 5d0: e58d001c str r0, [sp, #28] 5d4: e58d0014 str r0, [sp, #20] 000005d8 : 5d8: e28dc054 add ip, sp, #84 ; 0x54 5dc: e15e0000 cmp lr, r0 5e0: 0a000026 beq 680 5e4: e59d2014 ldr r2, [sp, #20] 5e8: e04e1002 sub r1, lr, r2 5ec: e3a02000 mov r2, #0 ; 0x0 5f0: e58c2000 str r2, [ip] 5f4: e58c2004 str r2, [ip, #4] 5f8: e58c2008 str r2, [ip, #8] 5fc: e58c200c str r2, [ip, #12] 600: e59d2020 ldr r2, [sp, #32] 604: e152000e cmp r2, lr 608: 3a000002 bcc 618 60c: e59d2020 ldr r2, [sp, #32] 610: e1500002 cmp r0, r2 614: 8a000000 bhi 61c 00000618 : 618: e261a000 rsb sl, r1, #0 ; 0x0 0000061c : 61c: e59d2024 ldr r2, [sp, #36] 620: e152000e cmp r2, lr 624: 3a000002 bcc 634 628: e59d2024 ldr r2, [sp, #36] 62c: e1500002 cmp r0, r2 630: 8a000005 bhi 64c 00000634 : 634: e59d200c ldr r2, [sp, #12] 638: e0812002 add r2, r1, r2 63c: e58d200c str r2, [sp, #12] 640: e59d2010 ldr r2, [sp, #16] 644: e0812002 add r2, r1, r2 648: e58d2010 str r2, [sp, #16] 0000064c : 64c: e59d2028 ldr r2, [sp, #40] 650: e15e0002 cmp lr, r2 654: 8a000016 bhi 6b4 658: e59d2028 ldr r2, [sp, #40] 65c: e1520000 cmp r2, r0 660: 2a000013 bcs 6b4 664: e59d201c ldr r2, [sp, #28] 668: e59d0014 ldr r0, [sp, #20] 66c: e1500002 cmp r0, r2 670: 159d9008 ldrne r9, [sp, #8] 674: 10499001 subne r9, r9, r1 678: 158d9008 strne r9, [sp, #8] 67c: ea00000c b 6b4 00000680 : 680: e3a00000 mov r0, #0 ; 0x0 684: e58c0000 str r0, [ip] 688: e59f01c4 ldr r0, [pc, #452] ; 854 (0xfffffb38) 68c: e080000f add r0, r0, pc ; 0x1cc 690: e0400002 sub r0, r0, r2 694: e58c0004 str r0, [ip, #4] 698: e59f01b8 ldr r0, [pc, #440] ; 858 (0x0) 69c: e0400001 sub r0, r0, r1 6a0: e58c0008 str r0, [ip, #8] 6a4: e59d1018 ldr r1, [sp, #24] ; r0+3 6a8: e59f01ac ldr r0, [pc, #428] ; 85c (0x11a0) 6ac: e0400001 sub r0, r0, r1 6b0: e58c000c str r0, [ip, #12] 000006b4 : 6b4: e59f01a4 ldr r0, [pc, #420] ; 860 (0xaac) 6b8: e080000f add r0, r0, pc ; 0x116c 6bc: e08a0000 add r0, sl, r0 6c0: e58d0000 str r0, [sp] 6c4: e59f0198 ldr r0, [pc, #408] ; 864 (0xab4) 6c8: e080000f add r0, r0, pc ; 0x1184 6cc: e08a0000 add r0, sl, r0 6d0: e58d0040 str r0, [sp, #64] 6d4: ea00000a b 704 ; ; ; memset 0 two memory regions ; ; 000006d8 : 6d8: e59d9000 ldr r9, [sp] 6dc: e59d0060 ldr r0, [sp, #96] 6e0: e4991004 ldr r1, [r9], #4 6e4: e58d9000 str r9, [sp] 6e8: e0800001 add r0, r0, r1 ; r0<-v24+*(116c)=11a0 6ec: e4991004 ldr r1, [r9], #4 ; r1<-*(116c++) = 0 6f0: e58d9000 str r9, [sp] 6f4: e4992004 ldr r2, [r9], #4 ; r2<-*(116c+2) = 0 6f8: e59dc00c ldr ip, [sp, #12] ; 0x0d28 function 6fc: e58d9000 str r9, [sp] 700: eb00028b bl 1134 ; memset(11a0,0,0) ; memset(0x20380000,0,0x1477B) 00000704 : 704: e59d1040 ldr r1, [sp, #64] 708: e59d0000 ldr r0, [sp] 70c: e1500001 cmp r0, r1 710: 1afffff0 bne 6d8 714: e59f014c ldr r0, [pc, #332] ; 868 (0xa64) 718: e080000f add r0, r0, pc ; 0x1184 71c: e08a0000 add r0, sl, r0 720: e58d0004 str r0, [sp, #4] 724: e59f0140 ldr r0, [pc, #320] ; 86c (0xa6c) 728: e080000f add r0, r0, pc ; 0x119c 72c: e08a0000 add r0, sl, r0 730: e58d0044 str r0, [sp, #68] 734: ea00000c b 76c 00000738 : 738: e59d9004 ldr r9, [sp, #4] 73c: e59d0060 ldr r0, [sp, #96] 740: e4991004 ldr r1, [r9], #4 744: e58d9004 str r9, [sp, #4] 748: e499e004 ldr lr, [r9], #4 74c: e58d9004 str r9, [sp, #4] 750: e59d2058 ldr r2, [sp, #88] 754: e0800001 add r0, r0, r1 758: e082100e add r1, r2, lr 75c: e4992004 ldr r2, [r9], #4 760: e59dc010 ldr ip, [sp, #16] 764: e58d9004 str r9, [sp, #4] 768: eb000271 bl 1134 call memcpy (ae8) ; memcpy(0x11a9,0x1145,0x24) ; 0000076c : 76c: e59d1044 ldr r1, [sp, #68] 770: e59d0004 ldr r0, [sp, #4] 774: e1500001 cmp r0, r1 778: 1affffee bne 738 77c: e59d0034 ldr r0, [sp, #52] ; ip==ae8 780: e08ac000 add ip, sl, r0 ; ip<=1140 784: e59d0038 ldr r0, [sp, #56] 788: e08ae000 add lr, sl, r0 ; lr<-1144 78c: e59d003c ldr r0, [sp, #60] 790: e15e000c cmp lr, ip 794: e08a2000 add r2, sl, r0 798: 159d0060 ldrne r0, [sp, #96] ; 0x0 79c: 159f10cc ldrne r1, [pc, #204] ; 870 (0x0) 7a0: 1080000e addne r0, r0, lr ; 1144 7a4: 1040e001 subne lr, r0, r1 ; 1144 7a8: ea000019 b 814 000007ac : 7ac: e28d8054 add r8, sp, #84 ; 0x54 7b0: e4d21001 ldrb r1, [r2], #1 7b4: e58d8030 str r8, [sp, #48] 7b8: e2010030 and r0, r1, #48 ; 0x30 7bc: e1a00240 mov r0, r0, asr #4 7c0: e798a100 ldr sl, [r8, r0, lsl #2] 7c4: e49c0004 ldr r0, [ip], #4 7c8: e3110080 tst r1, #128 ; 0x80 7cc: e08a9000 add r9, sl, r0 7d0: e58d902c str r9, [sp, #44] 7d4: e5990000 ldr r0, [r9] 7d8: 0a000001 beq 7e4 7dc: e3500000 cmp r0, #0 ; 0x0 7e0: 0a00000b beq 814 000007e4 : 7e4: e59d9030 ldr r9, [sp, #48] 7e8: e201a003 and sl, r1, #3 ; 0x3 7ec: e799a10a ldr sl, [r9, sl, lsl #2] 7f0: e35a0000 cmp sl, #0 ; 0x0 7f4: 0a000006 beq 814 7f8: e2111008 ands r1, r1, #8 ; 0x8 7fc: 11a00100 movne r0, r0, lsl #2 800: e080000a add r0, r0, sl 804: e3510000 cmp r1, #0 ; 0x0 808: 11a00140 movne r0, r0, asr #2 80c: e59d102c ldr r1, [sp, #44] 810: e5810000 str r0, [r1] 00000814 : 814: e15c000e cmp ip, lr 818: 1affffe3 bne 7ac 81c: e59d2048 ldr r2, [sp, #72] ; [18] r3 820: e59d104c ldr r1, [sp, #76] ; [19] r2 824: e59d0050 ldr r0, [sp, #80] ; [20] r1 828: e59dc008 ldr ip, [sp, #8] ; 0x874 82c: eb000240 bl 1134 ; ; 830: e91b6c00 ldmdb fp, {sl, fp, sp, lr} 834: e12fff1e bx lr 838: 00000c18 83c: 00000c10 840: 00000c04 844: 00000328 848: 00000590 84c: 00000c08 850: 000007b8 streqh r0, [r0], -r8 854: fffffb38 swinv 0x00fffb38 858: 00000000 andeq r0, r0, r0 85c: 000011a0 andeq r1, r0, r0, lsr #3 860: 00000aac andeq r0, r0, ip, lsr #21 864: 00000ab4 streqh r0, [r0], -r4 868: 00000a64 andeq r0, r0, r4, ror #20 86c: 00000a6c andeq r0, r0, ip, ror #20 870: 00000000 andeq r0, r0, r0