[*] Binary protection state of libuClibc-1.0.31.so
Full RELRO No Canary found NX disabled DSO No RPATH No RUNPATH No Symbols
[*] Function mmap tear down of libuClibc-1.0.31.so
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/lib/libuClibc-1.0.31.so @ 0x11b5c */
| #include <stdint.h>
|
; (fcn) fcn.00011b5c () | void fcn_00011b5c () {
0x00011b5c add ip, pc, 0, 12 |
0x00011b60 add ip, ip, 0x76000 |
0x00011b64 ldr pc, [ip, 0x1d8]! | pc = *((ip += 0x1d8));
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/lib/libuClibc-1.0.31.so @ 0x4acc4 */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) sym.__libc_malloc () | void libc_malloc (size_t size) {
| int32_t var_0h;
| int32_t var_4h;
| int32_t var_ch;
| int32_t var_10h;
| int32_t var_14h;
| int32_t var_18h;
| int32_t var_1ch;
| int32_t var_20h;
| int32_t var_34h;
| r0 = size;
0x0004acc4 ldr r3, [pc, 0x8d0] | r3 = *(0x4b598);
0x0004acc8 cmn r0, 0x21 |
0x0004accc push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0004acd0 add r3, pc, r3 | r3 = pc + r3;
0x0004acd4 sub sp, sp, 0x34 |
| if (r0 < 0x21) {
0x0004acd8 bls 0x4ad00 | goto label_13;
| }
0x0004acdc ldr r3, [pc, 0x8bc] | r3 = *(0x4b59c);
0x0004ace0 bl 0x11934 | fcn_00011934 ();
0x0004ace4 mov r2, 0xc | r2 = 0xc;
0x0004ace8 ldr r3, [pc, r3] | r3 = *(0x0004acf0);
0x0004acec mov r5, 0 | r5 = 0;
0x0004acf0 str r2, [r0, r3] | *((r0 + r3)) = r2;
| do {
0x0004acf4 mov r0, r5 | r0 = r5;
0x0004acf8 add sp, sp, 0x34 |
0x0004acfc pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_13:
0x0004ad00 ldr r2, [pc, 0x89c] | r2 = *(0x4b5a0);
0x0004ad04 ldr r5, [pc, 0x89c] | r5 = *(0x4b5a4);
0x0004ad08 ldr r3, [r3, r2] | r3 = *((r3 + r2));
0x0004ad0c add r4, r0, 0xb | r4 = r0 + 0xb;
0x0004ad10 add r5, pc, r5 | r5 = pc + r5;
0x0004ad14 cmp r4, 0xf |
0x0004ad18 mov r1, r3 | r1 = r3;
0x0004ad1c mov r2, r5 | r2 = r5;
0x0004ad20 add r0, sp, 0x20 | r0 += var_20h;
0x0004ad24 bichi r4, r4, 7 | __asm ("bichi r4, r4, 7");
| if (r4 > 0xf) {
0x0004ad28 movls r4, 0x10 | r4 = 0x10;
| }
0x0004ad2c str r3, [sp, 0xc] | var_ch = r3;
0x0004ad30 bl 0x11dc0 | fcn_00011dc0 ();
0x0004ad34 mov r0, r5 | r0 = r5;
0x0004ad38 bl 0x68ab8 | pthread_mutex_lock ();
0x0004ad3c ldr r0, [pc, 0x868] | r0 = *(0x4b5a8);
0x0004ad40 add r0, pc, r0 | r0 = pc + r0;
0x0004ad44 ldr r6, [r0] | r6 = *(0x4b5a8);
0x0004ad48 ands r3, r6, 1 | r3 = r6 & 1;
0x0004ad4c str r3, [sp, 0xc] | var_ch = r3;
| if (r3 == r6) {
0x0004ad50 bne 0x4ada4 |
0x0004ad54 cmp r6, 0 |
| if (r6 == 0) {
0x0004ad58 bne 0x4ad60 |
0x0004ad5c bl 0x4a618 | fcn_0004a618 (r0);
| }
| label_2:
0x0004ad60 ldr r3, [pc, 0x848] | r3 = *(0x4b5ac);
0x0004ad64 add r1, r4, 0x10 | r1 = r4 + 0x10;
0x0004ad68 add r3, pc, r3 | r3 = pc + r3;
0x0004ad6c ldr r5, [r3, 0x2c] | r5 = *(0x4b5d8);
0x0004ad70 str r1, [sp, 0xc] | var_ch = r1;
0x0004ad74 ldr r2, [r5, 4] | r2 = *(0x4b5dc);
0x0004ad78 bic r2, r2, 3 | r2 = BIT_MASK (r2, 3);
0x0004ad7c cmp r1, r2 |
| if (r1 > r2) {
0x0004ad80 bhi 0x4b1b8 | goto label_14;
| }
0x0004ad84 add r1, r5, r4 | r1 = r5 + r4;
0x0004ad88 str r1, [r3, 0x2c] | *((r3 + 0x2c)) = r1;
0x0004ad8c orr r3, r4, 1 | r3 = r4 | 1;
0x0004ad90 sub r4, r2, r4 | r4 = r2 - r4;
0x0004ad94 orr r4, r4, 1 | r4 |= 1;
0x0004ad98 str r3, [r5, 4] | *((r5 + 4)) = r3;
0x0004ad9c str r4, [r1, 4] | *((r1 + 4)) = r4;
0x0004ada0 b 0x4ae14 |
| } else {
0x0004ada4 cmp r6, r4 |
| if (r6 > r4) {
0x0004ada8 blo 0x4adcc |
0x0004adac lsr r3, r4, 1 | r3 = r4 >> 1;
0x0004adb0 sub r3, r3, 8 | r3 -= 8;
0x0004adb4 add r3, r0, r3 | r3 = r0 + r3;
0x0004adb8 ldr r5, [r3, 4] | r5 = *((r3 + 4));
0x0004adbc cmp r5, 0 |
| if (r5 == 0) {
0x0004adc0 ldrne r2, [r5, 8]! | r2 = *((r5 += 8));
| }
| if (r5 == 0) {
0x0004adc4 strne r2, [r3, 4] | *((r3 + 4)) = r2;
| }
| if (r5 != 0) {
0x0004adc8 bne 0x4aed8 | goto label_6;
| }
| }
0x0004adcc cmp r4, 0xff |
| if (r4 > 0xff) {
0x0004add0 bhi 0x4ae1c | goto label_15;
| }
0x0004add4 ldr r2, [pc, 0x7d8] | r2 = *(0x4b5b0);
0x0004add8 add r3, r4, 0x34 | r3 = r4 + 0x34;
0x0004addc add r2, pc, r2 | r2 = pc + r2;
0x0004ade0 add r3, r3, r2 | r3 += r2;
0x0004ade4 ldr r5, [r3, 4] | r5 = *((r3 + 4));
0x0004ade8 sub ip, r3, 8 |
0x0004adec cmp ip, r5 |
0x0004adf0 lsr r8, r4, 3 | r8 = r4 >> 3;
| if (ip == r5) {
0x0004adf4 beq 0x4ae3c | goto label_16;
| }
0x0004adf8 add r4, r5, r4 | r4 = r5 + r4;
0x0004adfc ldr r2, [r4, 4] | r2 = *((r4 + 4));
0x0004ae00 ldr r1, [r5, 0xc] | r1 = *((r5 + 0xc));
0x0004ae04 orr r2, r2, 1 | r2 |= 1;
0x0004ae08 str r2, [r4, 4] | *((r4 + 4)) = r2;
0x0004ae0c str r1, [r3, 4] | *((r3 + 4)) = r1;
0x0004ae10 str ip, [r1, 8] | *((r1 + 8)) = ip;
| }
| label_0:
0x0004ae14 add r5, r5, 8 | r5 += 8;
0x0004ae18 b 0x4aed8 | goto label_6;
| label_15:
0x0004ae1c mov r0, r4 | r0 = r4;
0x0004ae20 bl 0x4ac50 | fcn_0004ac50 (r0);
0x0004ae24 tst r6, 2 |
0x0004ae28 mov r8, r0 | r8 = r0;
| if ((r6 & 2) != 0) {
0x0004ae2c beq 0x4ae3c |
0x0004ae30 ldr r0, [pc, 0x780] | r0 = *(0x4b5b4);
0x0004ae34 add r0, pc, r0 | r0 = pc + r0;
0x0004ae38 bl 0x4a618 | fcn_0004a618 (r0);
| }
| label_16:
0x0004ae3c ldr sb, [pc, 0x778] | sb = *(0x4b5b8);
0x0004ae40 add r3, r4, 0x10 | r3 = r4 + 0x10;
0x0004ae44 add sb, pc, sb | sb = pc + sb;
0x0004ae48 str r3, [sp, 0x10] | var_10h = r3;
0x0004ae4c add r3, sb, 0x34 | r3 = sb + 0x34;
0x0004ae50 ldr r6, [pc, 0x768] | r6 = *(0x4b5bc);
0x0004ae54 str r3, [sp, 0x14] | var_14h = r3;
0x0004ae58 ldr r3, [pc, 0x764] | r3 = *(0x4b5c0);
0x0004ae5c add r6, pc, r6 | r6 = pc + r6;
0x0004ae60 add r3, pc, r3 | r3 = pc + r3;
0x0004ae64 ldr sl, [r6, 0x30] | sl = *(0x4b5ec);
0x0004ae68 add fp, r6, 0x34 |
0x0004ae6c str r3, [sp, 0x18] | var_18h = r3;
0x0004ae70 mov r1, 1 | r1 = 1;
0x0004ae74 b 0x4af5c | goto label_17;
| label_1:
0x0004ae78 ldr r3, [r5, 0xc] | r3 = *((r5 + 0xc));
0x0004ae7c ldr r7, [r5, 4] | r7 = *((r5 + 4));
0x0004ae80 cmp r4, 0xff |
0x0004ae84 cmpls r3, fp | __asm ("cmpls r3, fp");
0x0004ae88 bic r7, r7, 3 | r7 = BIT_MASK (r7, 3);
| if (r4 != 0xff) {
0x0004ae8c bne 0x4aee8 | goto label_18;
| }
0x0004ae90 cmp sl, r5 |
| if (sl != r5) {
0x0004ae94 bne 0x4aee8 | goto label_18;
| }
0x0004ae98 ldr r2, [sp, 0x10] | r2 = var_10h;
0x0004ae9c cmp r2, r7 |
| if (r2 >= r7) {
0x0004aea0 bhs 0x4aee8 | goto label_18;
| }
0x0004aea4 sub r2, r7, r4 | r2 = r7 - r4;
0x0004aea8 add r3, sl, r4 | r3 = sl + r4;
0x0004aeac orr r1, r2, 1 | r1 = r2 | 1;
0x0004aeb0 orr r4, r4, 1 | r4 |= 1;
0x0004aeb4 add r5, sl, 8 | r5 = sl + 8;
0x0004aeb8 str r3, [r6, 0x3c] | *((r6 + 0x3c)) = r3;
0x0004aebc str r3, [r6, 0x40] | *((r6 + 0x40)) = r3;
0x0004aec0 str r3, [r6, 0x30] | *((r6 + 0x30)) = r3;
0x0004aec4 str fp, [r3, 8] | *((r3 + 8)) = fp;
0x0004aec8 str fp, [r3, 0xc] | *((r3 + 0xc)) = fp;
0x0004aecc str r4, [sl, 4] | *((sl + 4)) = r4;
0x0004aed0 str r1, [r3, 4] | *((r3 + 4)) = r1;
0x0004aed4 str r2, [sl, r7] | *((sl + r7)) = r2;
| label_6:
0x0004aed8 mov r1, 1 | r1 = 1;
0x0004aedc add r0, sp, 0x20 | r0 += var_20h;
0x0004aee0 bl 0x11b38 | fcn_00011b38 ();
0x0004aee4 b 0x4acf4 |
| } while (1);
| label_18:
0x0004aee8 ldr r2, [sp, 0x14] | r2 = var_14h;
0x0004aeec cmp r4, r7 |
0x0004aef0 str r3, [sb, 0x40] | *((sb + 0x40)) = r3;
0x0004aef4 str r2, [r3, 8] | *((r3 + 8)) = r2;
| if (r4 != r7) {
0x0004aef8 addeq r4, r5, r4 | r4 = r5 + r4;
| }
| if (r4 != r7) {
0x0004aefc ldreq r3, [r4, 4] | r3 = *((r4 + 4));
| }
| if (r4 != r7) {
0x0004af00 orreq r3, r3, 1 | r3 |= 1;
| }
| if (r4 == r7) {
0x0004af04 streq r3, [r4, 4] | *((r4 + 4)) = r3;
| goto label_19;
| }
| if (r4 == r7) {
| label_19:
0x0004af08 beq 0x4ae14 | goto label_0;
| }
0x0004af0c cmp r7, 0xff |
| if (r7 > 0xff) {
0x0004af10 bhi 0x4b034 | goto label_20;
| }
0x0004af14 lsr r0, r7, 3 | r0 = r7 >> 3;
0x0004af18 lsl r3, r0, 1 | r3 = r0 << 1;
0x0004af1c add r3, r3, 0xd | r3 += 0xd;
0x0004af20 add r2, sb, r3, lsl 2 | r2 = sb + (r3 << 2);
0x0004af24 ldr r3, [sb, r3, lsl 2] | offset_0 = r3 << 2;
| r3 = *((sb + offset_0));
0x0004af28 sub r2, r2, 8 | r2 -= 8;
| label_5:
0x0004af2c ldr lr, [sp, 0x18] | lr = var_18h;
0x0004af30 asr ip, r0, 5 |
0x0004af34 add ip, ip, 0xcc |
0x0004af38 add ip, lr, ip, lsl 2 |
0x0004af3c ldr lr, [ip, 4] |
0x0004af40 and r0, r0, 0x1f | r0 &= 0x1f;
0x0004af44 orr r0, lr, r1, lsl r0 | r0 = lr | (r1 << r0);
0x0004af48 str r0, [ip, 4] | *((ip + 4)) = r0;
0x0004af4c str r2, [r5, 0xc] | *((r5 + 0xc)) = r2;
0x0004af50 str r3, [r5, 8] | *((r5 + 8)) = r3;
0x0004af54 str r5, [r3, 0xc] | *((r3 + 0xc)) = r5;
0x0004af58 str r5, [r2, 8] | *((r2 + 8)) = r5;
| label_17:
0x0004af5c ldr r5, [r6, 0x40] | r5 = *((r6 + 0x40));
0x0004af60 cmp r5, fp |
| if (r5 != fp) {
0x0004af64 bne 0x4ae78 | goto label_1;
| }
0x0004af68 cmp r4, 0xff |
| if (r4 <= 0xff) {
0x0004af6c addhi r6, r6, r8, lsl 3 | r6 += (r8 << 3);
| }
| if (r4 <= 0xff) {
0x0004af70 addhi r0, r6, 0x2c | r0 = r6 + 0x2c;
| }
| if (r4 <= 0xff) {
0x0004af74 ldrhi r3, [r6, 0x38] | r3 = *((r6 + 0x38));
| }
| if (r4 > 0xff) {
0x0004af78 bhi 0x4b0f8 | goto label_21;
| }
| label_7:
0x0004af7c ldr r2, [pc, 0x644] | r2 = *(0x4b5c4);
0x0004af80 add r8, r8, 1 | r8++;
0x0004af84 lsl r3, r8, 3 | r3 = r8 << 3;
0x0004af88 add r2, pc, r2 | r2 = pc + r2;
0x0004af8c lsr r0, r8, 5 | r0 = r8 >> 5;
0x0004af90 add r3, r3, 0x2c | r3 += 0x2c;
0x0004af94 add r3, r3, r2 | r3 += r2;
0x0004af98 ldr lr, [pc, 0x62c] | lr = *(0x4b5c8);
0x0004af9c add r2, r2, r0, lsl 2 | r2 += (r0 << 2);
0x0004afa0 ldr r5, [pc, 0x628] | r5 = *(0x4b5cc);
0x0004afa4 ldr ip, [pc, 0x628] | ip = *(0x4b5d0);
0x0004afa8 ldr r1, [r2, 0x334] | r1 = *((r2 + 0x334));
0x0004afac and r2, r8, 0x1f | r2 = r8 & 0x1f;
0x0004afb0 mov r8, 1 | r8 = 1;
0x0004afb4 lsl r8, r8, r2 | r8 <<= r2;
0x0004afb8 add lr, pc, lr | lr = pc + lr;
0x0004afbc add r5, pc, r5 | r5 = pc + r5;
0x0004afc0 add ip, pc, ip |
| label_4:
0x0004afc4 clz r2, r8 | r2 &= r8;
0x0004afc8 lsr r2, r2, 5 | r2 >>= 5;
0x0004afcc cmp r8, r1 |
| if (r8 <= r1) {
0x0004afd0 orrhi r2, r2, 1 | r2 |= 1;
| }
0x0004afd4 cmp r2, 0 |
| if (r2 == 0) {
0x0004afd8 beq 0x4b008 | goto label_10;
| }
0x0004afdc add r3, lr, r0, lsl 2 | r3 = lr + (r0 << 2);
0x0004afe0 add r3, r3, 0x334 | r3 += 0x334;
| label_3:
0x0004afe4 add r0, r0, 1 | r0++;
0x0004afe8 cmp r0, 2 |
| if (r0 > 2) {
0x0004afec bhi 0x4ad60 | goto label_2;
| }
0x0004aff0 ldr r1, [r3, 4]! | r1 = *((r3 += 4));
0x0004aff4 cmp r1, 0 |
| if (r1 == 0) {
0x0004aff8 beq 0x4afe4 | goto label_3;
| }
0x0004affc ldr r8, [sp, 0xc] | r8 = var_ch;
0x0004b000 add r3, r5, r0, lsl 8 | r3 = r5 + (r0 << 8);
0x0004b004 add r3, r3, 0x2c | r3 += 0x2c;
| label_10:
0x0004b008 tst r8, r1 |
| if ((r8 & r1) == 0) {
0x0004b00c beq 0x4b138 | goto label_22;
| }
0x0004b010 ldr r2, [r3, 0xc] | r2 = *((r3 + 0xc));
0x0004b014 cmp r3, r2 |
| if (r3 != r2) {
0x0004b018 bne 0x4b144 | goto label_23;
| }
0x0004b01c bic r1, r1, r8 | r1 = BIT_MASK (r1, r8);
0x0004b020 add r2, ip, r0, lsl 2 | r2 = ip + (r0 << 2);
0x0004b024 str r1, [r2, 0x334] | *((r2 + 0x334)) = r1;
0x0004b028 add r3, r3, 8 | r3 += 8;
0x0004b02c lsl r8, r8, 1 | r8 <<= 1;
0x0004b030 b 0x4afc4 | goto label_4;
| label_20:
0x0004b034 mov r0, r7 | r0 = r7;
0x0004b038 str r1, [sp, 0x1c] | var_1ch = r1;
0x0004b03c bl 0x4ac50 | fcn_0004ac50 (r0);
0x0004b040 ldr r1, [sp, 0x1c] | r1 = var_1ch;
0x0004b044 lsl r3, r0, 1 | r3 = r0 << 1;
0x0004b048 add r3, r3, 0xd | r3 += 0xd;
0x0004b04c add r2, sb, r3, lsl 2 | r2 = sb + (r3 << 2);
0x0004b050 ldr r3, [sb, r3, lsl 2] | offset_1 = r3 << 2;
| r3 = *((sb + offset_1));
0x0004b054 sub ip, r2, 8 |
0x0004b058 cmp ip, r3 |
| if (ip == r3) {
0x0004b05c moveq r2, r3 | r2 = r3;
| goto label_24;
| }
| if (ip == r3) {
| label_24:
0x0004b060 beq 0x4af2c | goto label_5;
| }
0x0004b064 ldr r2, [r2, 4] | r2 = *((r2 + 4));
0x0004b068 ldr lr, [r2, 4] |
0x0004b06c cmp lr, r7 |
| if (lr > r7) {
0x0004b070 orrls r7, r7, 1 | r7 |= 1;
| }
| if (lr < r7) {
0x0004b074 bls 0x4b084 | goto label_25;
| }
0x0004b078 mov r3, ip | r3 = ip;
0x0004b07c b 0x4af2c | goto label_5;
| do {
0x0004b080 ldr r3, [r3, 8] | r3 = *((r3 + 8));
| label_25:
0x0004b084 ldr r2, [r3, 4] | r2 = *((r3 + 4));
0x0004b088 cmp r2, r7 |
0x0004b08c bhi 0x4b080 |
| } while (r2 > r7);
0x0004b090 ldr r2, [r3, 0xc] | r2 = *((r3 + 0xc));
0x0004b094 b 0x4af2c | goto label_5;
| label_9:
0x0004b098 str r1, [r0, 0xc] | *((r0 + 0xc)) = r1;
0x0004b09c cmp lr, 0xf |
0x0004b0a0 str r0, [r1, 8] | *((r1 + 8)) = r0;
0x0004b0a4 add r1, r3, r2 | r1 = r3 + r2;
0x0004b0a8 add r5, r3, 8 | r5 = r3 + 8;
| if (lr > 0xf) {
0x0004b0ac ldrls r3, [r1, 4] | r3 = *((r1 + 4));
| }
| if (lr > 0xf) {
0x0004b0b0 orrls r3, r3, 1 | r3 |= 1;
| }
| if (lr <= 0xf) {
0x0004b0b4 strls r3, [r1, 4] | *((r1 + 4)) = r3;
| goto label_26;
| }
| if (lr < 0xf) {
| label_26:
0x0004b0b8 bls 0x4aed8 | goto label_6;
| }
0x0004b0bc ldr r1, [pc, 0x514] |
0x0004b0c0 add ip, r3, r4 |
0x0004b0c4 add r1, pc, r1 | r1 = pc + r1;
0x0004b0c8 str ip, [r1, 0x3c] | *((r1 + 0x3c)) = ip;
0x0004b0cc str ip, [r1, 0x40] | *((r1 + 0x40)) = ip;
0x0004b0d0 add r1, r1, 0x34 | r1 = 0x4b608;
0x0004b0d4 str r1, [ip, 8] | *((ip + 8)) = r1;
0x0004b0d8 str r1, [ip, 0xc] | *((ip + 0xc)) = r1;
0x0004b0dc orr r4, r4, 1 | r4 |= 1;
0x0004b0e0 orr r1, lr, 1 | r1 = lr | 1;
0x0004b0e4 str r4, [r3, 4] | *((r3 + 4)) = r4;
0x0004b0e8 str r1, [ip, 4] | *((ip + 4)) = r1;
0x0004b0ec str lr, [r3, r2] |
0x0004b0f0 b 0x4aed8 | goto label_6;
| label_8:
0x0004b0f4 mov r3, r1 | r3 = r1;
| label_21:
0x0004b0f8 cmp r3, r0 |
| if (r3 == r0) {
0x0004b0fc beq 0x4af7c | goto label_7;
| }
0x0004b100 ldr r2, [r3, 4] | r2 = *((r3 + 4));
0x0004b104 ldr r1, [r3, 0xc] | r1 = *((r3 + 0xc));
0x0004b108 bic r2, r2, 3 | r2 = BIT_MASK (r2, 3);
0x0004b10c cmp r4, r2 |
| if (r4 > r2) {
0x0004b110 bhi 0x4b0f4 | goto label_8;
| }
0x0004b114 ldr r0, [r3, 8] | r0 = *((r3 + 8));
0x0004b118 sub lr, r2, r4 | lr = r2 - r4;
0x0004b11c ldr ip, [r0, 0xc] | ip = *((r0 + 0xc));
0x0004b120 cmp ip, r3 |
| if (ip != r3) {
0x0004b124 bne 0x4b134 | goto label_27;
| }
0x0004b128 ldr ip, [r1, 8] | ip = *((r1 + 8));
0x0004b12c cmp ip, r3 |
| if (ip == r3) {
0x0004b130 beq 0x4b098 | goto label_9;
| }
| label_27:
0x0004b134 bl 0x4b870 | abort ();
| label_22:
0x0004b138 add r3, r3, 8 | r3 += 8;
0x0004b13c lsl r8, r8, 1 | r8 <<= 1;
0x0004b140 b 0x4b008 | goto label_10;
| label_23:
0x0004b144 ldr r1, [r2, 4] | r1 = *((r2 + 4));
0x0004b148 ldr r0, [r2, 0xc] | r0 = *((r2 + 0xc));
0x0004b14c bic r1, r1, 3 | r1 = BIT_MASK (r1, 3);
0x0004b150 sub ip, r1, r4 |
0x0004b154 str r0, [r3, 0xc] | *((r3 + 0xc)) = r0;
0x0004b158 cmp ip, 0xf |
0x0004b15c str r3, [r0, 8] | *((r0 + 8)) = r3;
0x0004b160 add r0, r2, r1 | r0 = r2 + r1;
| if (ip > 0xf) {
0x0004b164 ldrls r3, [r0, 4] | r3 = *((r0 + 4));
| }
0x0004b168 add r5, r2, 8 | r5 = r2 + 8;
| if (ip > 0xf) {
0x0004b16c orrls r3, r3, 1 | r3 |= 1;
| }
| if (ip <= 0xf) {
0x0004b170 strls r3, [r0, 4] | *((r0 + 4)) = r3;
| goto label_28;
| }
| if (ip < 0xf) {
| label_28:
0x0004b174 bls 0x4aed8 | goto label_6;
| }
0x0004b178 ldr r0, [pc, 0x45c] | r0 = *(0x4b5d8);
0x0004b17c add r3, r2, r4 | r3 = r2 + r4;
0x0004b180 add r0, pc, r0 | r0 = pc + r0;
0x0004b184 add lr, r0, 0x34 | lr = r0 + 0x34;
0x0004b188 cmp r4, 0xff |
0x0004b18c str r3, [r0, 0x3c] | *((r0 + 0x3c)) = r3;
0x0004b190 str r3, [r0, 0x40] | *((r0 + 0x40)) = r3;
0x0004b194 orr r4, r4, 1 | r4 |= 1;
0x0004b198 str lr, [r3, 8] |
0x0004b19c str lr, [r3, 0xc] |
| if (r4 > 0xff) {
0x0004b1a0 strls r3, [r0, 0x30] | *((r0 + 0x30)) = r3;
| }
0x0004b1a4 orr r0, ip, 1 | r0 = ip | 1;
0x0004b1a8 str r4, [r2, 4] | *((r2 + 4)) = r4;
0x0004b1ac str r0, [r3, 4] | *((r3 + 4)) = r0;
0x0004b1b0 str ip, [r2, r1] | *((r2 + r1)) = ip;
0x0004b1b4 b 0x4aed8 | goto label_6;
| label_14:
0x0004b1b8 ldr r0, [r3] | r0 = *(r3);
0x0004b1bc ands r0, r0, 2 | r0 &= 2;
| if (r0 != r0) {
0x0004b1c0 beq 0x4b1dc |
0x0004b1c4 mov r0, r3 | r0 = r3;
0x0004b1c8 bl 0x4a618 | fcn_0004a618 (r0);
0x0004b1cc sub r0, r4, 7 | r0 = r4 - 7;
0x0004b1d0 bl 0x11a90 | r0 = fcn_00011a90 ();
0x0004b1d4 mov r5, r0 | r5 = r0;
0x0004b1d8 b 0x4aed8 | goto label_6;
| }
0x0004b1dc ldr r2, [r3, 0x34c] | r2 = *((r3 + 0x34c));
0x0004b1e0 ldr r7, [r3, 0x35c] | r7 = *((r3 + 0x35c));
0x0004b1e4 cmp r4, r2 |
0x0004b1e8 rsb fp, r7, 0 |
| if (r4 > r2) {
0x0004b1ec blo 0x4b2b8 |
0x0004b1f0 ldr r2, [r3, 0x350] | r2 = *((r3 + 0x350));
0x0004b1f4 ldr r3, [r3, 0x354] | r3 = *((r3 + 0x354));
0x0004b1f8 cmp r2, r3 |
| if (r2 >= r3) {
0x0004b1fc bge 0x4b2b8 | goto label_29;
| }
0x0004b200 add r1, r7, 0xa | r1 = r7 + 0xa;
0x0004b204 add r1, r1, r4 | r1 += r4;
0x0004b208 and r5, r1, fp | r5 = r1 & fp;
0x0004b20c cmp r4, r5 |
| if (r4 >= r5) {
0x0004b210 bhs 0x4b2b8 | goto label_29;
| }
0x0004b214 str r0, [sp, 4] | var_4h = r0;
0x0004b218 str r0, [sp] | *(sp) = r0;
0x0004b21c mov r3, 0x22 | r3 = 0x22;
0x0004b220 mov r2, 3 | r2 = 3;
0x0004b224 mov r1, r5 | r1 = r5;
0x0004b228 bl 0x15024 | r0 = mmap ()
0x0004b22c cmn r0, 1 |
| if (r0 == 1) {
0x0004b230 beq 0x4b2b8 | goto label_29;
| }
0x0004b234 ands r3, r0, 7 | r3 = r0 & 7;
0x0004b238 ldr r2, [pc, 0x3a0] | r2 = *(0x4b5dc);
0x0004b23c rsbne r3, r3, 8 | __asm ("rsbne r3, r3, 8");
| if (r3 == r0) {
0x0004b240 strne r3, [r0, r3]! | *((r0 += r3)) = r3;
| }
| if (r3 == r0) {
0x0004b244 subne r3, r5, r3 | r3 = r5 - r3;
| }
| if (r3 != r0) {
0x0004b248 streq r3, [r0] | *(r0) = r3;
| }
0x0004b24c add r2, pc, r2 | r2 = pc + r2;
| if (r3 != r0) {
0x0004b250 orreq r3, r5, 2 | r3 = r5 | 2;
| }
| if (r3 == r0) {
0x0004b254 orrne r3, r3, 2 | r3 |= 2;
| }
0x0004b258 str r3, [r0, 4] | *((r0 + 4)) = r3;
0x0004b25c ldr r3, [r2, 0x350] | r3 = *(0x4b92c);
0x0004b260 ldr r1, [r2, 0x358] | r1 = *(0x4b934);
0x0004b264 add r3, r3, 1 | r3++;
0x0004b268 cmp r3, r1 |
| if (r3 <= r1) {
0x0004b26c strgt r3, [r2, 0x358] | *((r2 + 0x358)) = r3;
| }
0x0004b270 str r3, [r2, 0x350] | *((r2 + 0x350)) = r3;
0x0004b274 ldr r3, [pc, 0x368] | r3 = *(0x4b5e0);
0x0004b278 add r3, pc, r3 | r3 = pc + r3;
0x0004b27c ldr r1, [r3, 0x364] |
0x0004b280 ldr r2, [r3, 0x370] | r2 = *(0x4b950);
0x0004b284 add r1, r5, r1 | r1 = r5 + r1;
0x0004b288 cmp r1, r2 |
| if (r1 <= r2) {
0x0004b28c strhi r1, [r3, 0x370] | *((r3 + 0x370)) = r1;
| }
0x0004b290 str r1, [r3, 0x364] | *((r3 + 0x364)) = r1;
0x0004b294 ldr r3, [pc, 0x34c] | r3 = *(0x4b5e4);
0x0004b298 add r5, r0, 8 | r5 = r0 + 8;
0x0004b29c add r3, pc, r3 | r3 = pc + r3;
0x0004b2a0 ldr r2, [r3, 0x368] | r2 = *(0x4b94c);
0x0004b2a4 add r1, r1, r2 | r1 = 0x4b944;
0x0004b2a8 ldr r2, [r3, 0x374] | r2 = *(0x4b958);
0x0004b2ac cmp r1, r2 |
| if (r1 <= r2) {
0x0004b2b0 strhi r1, [r3, 0x374] | *((r3 + 0x374)) = r1;
| }
0x0004b2b4 b 0x4aed8 | goto label_6;
| }
| label_29:
0x0004b2b8 ldr r3, [pc, 0x32c] |
0x0004b2bc sub r7, r7, 1 | r7--;
0x0004b2c0 add r3, pc, r3 | r3 = pc + r3;
0x0004b2c4 ldr sb, [r3, 0x2c] | sb = *(0x4b614);
0x0004b2c8 ldr r5, [r3, 0x348] |
0x0004b2cc ldr r6, [sb, 4] | r6 = mallopt;
0x0004b2d0 ldr r3, [r3, 0x360] | r3 = *(0x4b948);
0x0004b2d4 add r5, r5, 0x10 | r5 = 0x4b940;
0x0004b2d8 bic r6, r6, 3 | r6 = BIT_MASK (r6, 3);
0x0004b2dc add r5, r5, r4 | r5 += r4;
0x0004b2e0 tst r3, 1 |
| if ((r3 & 1) == 0) {
0x0004b2e4 subne r5, r5, r6 | r5 -= r6;
| }
0x0004b2e8 add r5, r7, r5 | r5 = r7 + r5;
0x0004b2ec and r5, r5, fp | r5 &= fp;
0x0004b2f0 cmp r5, 0 |
0x0004b2f4 add r8, sb, r6 | r8 = sb + r6;
0x0004b2f8 bgt 0x4b36c |
| while (r0 == 1) {
0x0004b2fc ldr r3, [pc, 0x2ec] |
0x0004b300 add r3, pc, r3 | r3 = pc + r3;
0x0004b304 ldr r3, [r3, 0x360] | r3 = *(0x4b94c);
0x0004b308 tst r3, 1 |
| if ((r3 & 1) == 0) {
0x0004b30c addne r3, r7, r6 | r3 = r7 + r6;
| }
| if ((r3 & 1) == 0) {
0x0004b310 addne r5, r3, r5 | r5 = r3 + r5;
| }
| if ((r3 & 1) == 0) {
0x0004b314 andne r5, r5, fp | r5 &= fp;
| }
0x0004b318 cmp r5, 0x100000 |
| if (r5 >= 0x100000) {
0x0004b31c movlo r5, 0x100000 | r5 = 0x100000;
| }
0x0004b320 cmp r4, r5 |
| if (r4 >= r5) {
0x0004b324 bhs 0x4b580 | goto label_30;
| }
0x0004b328 mov r0, 0 | r0 = 0;
0x0004b32c str r0, [sp, 4] | var_4h = r0;
0x0004b330 str r0, [sp] | *(sp) = r0;
0x0004b334 mov r3, 0x22 | r3 = 0x22;
0x0004b338 mov r2, 3 | r2 = 3;
0x0004b33c mov r1, r5 | r1 = r5;
0x0004b340 bl 0x15024 | r0 = mmap ()
0x0004b344 cmn r0, 1 |
0x0004b348 mov sl, r0 | sl = r0;
| if (r0 == 1) {
0x0004b34c beq 0x4b580 | goto label_30;
| }
0x0004b350 ldr r1, [pc, 0x29c] | r1 = *(0x4b5f0);
0x0004b354 add r0, r0, r5 | r0 += r5;
0x0004b358 add r1, pc, r1 | r1 = pc + r1;
0x0004b35c ldr r2, [r1, 0x360] | r2 = *(0x4b950);
0x0004b360 bic r2, r2, 1 | r2 = BIT_MASK (r2, 1);
0x0004b364 str r2, [r1, 0x360] | *((r1 + 0x360)) = r2;
0x0004b368 b 0x4b384 | goto label_31;
0x0004b36c mov r0, r5 | r0 = r5;
0x0004b370 bl 0x14cbc | r0 = sbrk ();
0x0004b374 cmn r0, 1 |
0x0004b378 mov sl, r0 | sl = r0;
| if (r0 == 1) {
0x0004b37c mvnne r0, 0 | r0 = ~0;
| }
0x0004b380 beq 0x4b2fc |
| }
| label_31:
0x0004b384 ldr r1, [pc, 0x26c] | r1 = *(0x4b5f4);
0x0004b388 cmp r8, sl |
0x0004b38c cmneq r0, 1 | __asm ("cmneq r0, 1");
0x0004b390 add r1, pc, r1 | r1 = pc + r1;
0x0004b394 ldr ip, [r1, 0x368] | ip = *(0x4b95c);
0x0004b398 add ip, r5, ip |
| if (r8 != sl) {
0x0004b39c addeq r5, r6, r5 | r5 = r6 + r5;
| }
| if (r8 != sl) {
0x0004b3a0 orreq r5, r5, 1 | r5 |= 1;
| }
0x0004b3a4 str ip, [r1, 0x368] | *((r1 + 0x368)) = ip;
| if (r8 != sl) {
0x0004b3a8 streq r5, [sb, 4] | *((sb + 4)) = r5;
| }
| if (r8 == sl) {
0x0004b3ac beq 0x4b4b0 | goto label_32;
| }
0x0004b3b0 ldr r2, [r1, 0x360] | r2 = *((r1 + 0x360));
0x0004b3b4 tst r2, 1 |
| if ((r2 & 1) != 0) {
0x0004b3b8 beq 0x4b3cc |
0x0004b3bc cmp r6, 0 |
0x0004b3c0 cmpne r8, sl | __asm ("cmpne r8, sl");
0x0004b3c4 bichi r2, r2, 1 | __asm ("bichi r2, r2, 1");
| if (r6 > 0) {
0x0004b3c8 strhi r2, [r1, 0x360] | *((r1 + 0x360)) = r2;
| goto label_33;
| }
| }
| label_33:
0x0004b3cc ldr r1, [pc, 0x228] | r1 = *(0x4b5f8);
0x0004b3d0 add r1, pc, r1 | r1 = pc + r1;
0x0004b3d4 ldr r2, [r1, 0x360] | r2 = *(0x4b958);
0x0004b3d8 ands r2, r2, 1 | r2 &= 1;
| if (r2 == r2) {
0x0004b3dc beq 0x4b548 | goto label_34;
| }
0x0004b3e0 cmp r6, 0 |
| if (r6 == 0) {
0x0004b3e4 subne r8, sl, r8 | r8 = sl - r8;
| }
| if (r6 == 0) {
0x0004b3e8 addne ip, r8, ip |
| }
| if (r6 == 0) {
0x0004b3ec strne ip, [r1, 0x368] | *((r1 + 0x368)) = ip;
| }
0x0004b3f0 ands r2, sl, 7 | r2 = sl & 7;
0x0004b3f4 rsbne r2, r2, 8 | __asm ("rsbne r2, r2, 8");
| if (r2 == sl) {
0x0004b3f8 addne r8, sl, r2 | r8 = sl + r2;
| }
0x0004b3fc add r2, r2, r6 | r2 += r6;
0x0004b400 add r1, r5, r2 | r1 = r5 + r2;
0x0004b404 add r1, sl, r1 | r1 = sl + r1;
0x0004b408 add r7, r7, r1 | r7 += r1;
0x0004b40c sub r2, r2, r1 | r2 -= r1;
0x0004b410 and fp, fp, r7 |
0x0004b414 add fp, fp, r2 |
0x0004b418 mov r0, fp | r0 = fp;
| if (r2 != sl) {
0x0004b41c moveq r8, sl | r8 = sl;
| }
0x0004b420 bl 0x14cbc | r0 = sbrk ();
0x0004b424 cmn r0, 1 |
| if (r0 != 1) {
0x0004b428 bne 0x4b524 | goto label_35;
| }
0x0004b42c mov r0, 0 | r0 = 0;
0x0004b430 bl 0x14cbc | r0 = sbrk ();
| label_11:
0x0004b434 cmn r0, 1 |
| if (r0 == 1) {
0x0004b438 beq 0x4b4b0 | goto label_32;
| }
| label_12:
0x0004b43c mov fp, 0 |
| do {
0x0004b440 ldr r5, [pc, 0x1b8] | r5 = *(0x4b5fc);
0x0004b444 sub r3, r0, r8 | r3 = r0 - r8;
0x0004b448 add r5, pc, r5 | r5 = pc + r5;
0x0004b44c ldr r2, [r5, 0x368] | r2 = *(0x4b964);
0x0004b450 add r3, r3, fp | r3 += fp;
0x0004b454 orr r3, r3, 1 | r3 |= 1;
0x0004b458 add r2, r2, fp | r2 += fp;
0x0004b45c cmp r6, 0 |
0x0004b460 str r8, [r5, 0x2c] | *((r5 + 0x2c)) = r8;
0x0004b464 str r3, [r8, 4] | *((r8 + 4)) = r3;
0x0004b468 str r2, [r5, 0x368] | *((r5 + 0x368)) = r2;
| if (r6 != 0) {
0x0004b46c beq 0x4b4b0 |
0x0004b470 sub r6, r6, 0xc | r6 -= 0xc;
0x0004b474 bic r6, r6, 7 | r6 = BIT_MASK (r6, 7);
0x0004b478 orr r3, r6, 1 | r3 = r6 | 1;
0x0004b47c str r3, [sb, 4] | *((sb + 4)) = r3;
0x0004b480 mov r2, 5 | r2 = 5;
0x0004b484 add r3, sb, r6 | r3 = sb + r6;
0x0004b488 cmp r6, 0xf |
0x0004b48c str r2, [r3, 4] | *((r3 + 4)) = r2;
0x0004b490 str r2, [r3, 8] | *((r3 + 8)) = r2;
| if (r6 < 0xf) {
0x0004b494 bls 0x4b4b0 | goto label_32;
| }
0x0004b498 ldr r6, [r5, 0x344] | r6 = *((r5 + 0x344));
0x0004b49c mvn r3, 0 | r3 = ~0;
0x0004b4a0 add r0, sb, 8 | r0 = sb + 8;
0x0004b4a4 str r3, [r5, 0x344] | *((r5 + 0x344)) = r3;
0x0004b4a8 bl 0x120a8 | fcn_000120a8 ();
0x0004b4ac str r6, [r5, 0x344] | *((r5 + 0x344)) = r6;
| }
| label_32:
0x0004b4b0 ldr r2, [pc, 0x14c] | r2 = *(0x4b600);
0x0004b4b4 add r2, pc, r2 | r2 = pc + r2;
0x0004b4b8 ldr r3, [r2, 0x368] |
0x0004b4bc ldr r1, [r2, 0x36c] | r1 = *(0x4b96c);
0x0004b4c0 cmp r3, r1 |
| if (r3 <= r1) {
0x0004b4c4 strhi r3, [r2, 0x36c] | *((r2 + 0x36c)) = r3;
| }
0x0004b4c8 ldr r2, [pc, 0x138] | r2 = *(0x4b604);
0x0004b4cc add r2, pc, r2 | r2 = pc + r2;
0x0004b4d0 ldr r1, [r2, 0x364] | r1 = *(0x4b968);
0x0004b4d4 add r3, r3, r1 | r3 = 0x4b968;
0x0004b4d8 ldr r1, [r2, 0x374] | r1 = *(0x4b978);
0x0004b4dc cmp r3, r1 |
0x0004b4e0 ldr r1, [pc, 0x124] | r1 = *(0x4b608);
| if (r3 <= r1) {
0x0004b4e4 strhi r3, [r2, 0x374] | *((r2 + 0x374)) = r3;
| }
0x0004b4e8 add r1, pc, r1 | r1 = pc + r1;
0x0004b4ec ldr r5, [r1, 0x2c] | r5 = *(0x4b634);
0x0004b4f0 add r2, r4, 0x10 | r2 = r4 + 0x10;
0x0004b4f4 ldr r3, [r5, 4] | r3 = *(0x4b638);
0x0004b4f8 bic r3, r3, 3 | r3 = BIT_MASK (r3, 3);
0x0004b4fc cmp r2, r3 |
| if (r2 > r3) {
0x0004b500 bhi 0x4b580 | goto label_30;
| }
0x0004b504 add r2, r5, r4 | r2 = r5 + r4;
0x0004b508 str r2, [r1, 0x2c] | *((r1 + 0x2c)) = r2;
0x0004b50c orr r1, r4, 1 | r1 = r4 | 1;
0x0004b510 sub r4, r3, r4 | r4 = r3 - r4;
0x0004b514 orr r4, r4, 1 | r4 |= 1;
0x0004b518 str r1, [r5, 4] | *((r5 + 4)) = r1;
0x0004b51c str r4, [r2, 4] | *((r2 + 4)) = r4;
0x0004b520 b 0x4ae14 | goto label_0;
| label_35:
0x0004b524 cmp r0, sl |
0x0004b528 bhs 0x4b440 |
| } while (r0 >= sl);
0x0004b52c ldr r2, [pc, 0xdc] | r2 = *(0x4b60c);
0x0004b530 add r0, sl, r5 | r0 = sl + r5;
0x0004b534 add r2, pc, r2 | r2 = pc + r2;
0x0004b538 ldr r3, [r2, 0x360] | r3 = *(0x4b96c);
0x0004b53c bic r3, r3, 1 | r3 = BIT_MASK (r3, 1);
0x0004b540 str r3, [r2, 0x360] | *((r2 + 0x360)) = r3;
0x0004b544 b 0x4b434 | goto label_11;
| label_34:
0x0004b548 cmn r0, 1 |
| if (r0 != 1) {
0x0004b54c movne r8, sl | r8 = sl;
| goto label_36;
| }
| if (r0 != 1) {
| label_36:
0x0004b550 bne 0x4b43c | goto label_12;
| }
0x0004b554 mov r0, r2 | r0 = r2;
0x0004b558 str r1, [sp, 0xc] | var_ch = r1;
0x0004b55c bl 0x14cbc | sbrk ();
0x0004b560 ldr r1, [sp, 0xc] | r1 = var_ch;
0x0004b564 mov r8, sl | r8 = sl;
0x0004b568 sub r2, r0, sl | r2 = r0 - sl;
0x0004b56c sub r5, r2, r5 | r5 = r2 - r5;
0x0004b570 ldr r2, [r1, 0x368] | r2 = *((r1 + 0x368));
0x0004b574 add r5, r5, r2 | r5 += r2;
0x0004b578 str r5, [r1, 0x368] | *((r1 + 0x368)) = r5;
0x0004b57c b 0x4b434 | goto label_11;
| label_30:
0x0004b580 ldr r3, [pc, 0x8c] | r3 = *(0x4b610);
0x0004b584 bl 0x11934 | fcn_00011934 ();
0x0004b588 mov r2, 0xc | r2 = 0xc;
0x0004b58c ldr r3, [pc, r3] | r3 = *(0x0004b594);
0x0004b590 mov r5, 0 | r5 = 0;
0x0004b594 str r2, [r0, r3] | *((r0 + r3)) = r2;
0x0004b598 b 0x4aed8 | goto label_6;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/lib/libuClibc-1.0.31.so @ 0x12554 */
| #include <stdint.h>
|
; (fcn) sym.ioperm () | void ioperm (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_4h;
| r0 = arg1;
| r1 = arg2;
0x00012554 ldr r3, [pc, 0xe8] |
0x00012558 push {r0, r1, r4, r5, r6, lr} |
0x0001255c add r3, pc, r3 | r3 = pc + r3;
0x00012560 ldr r3, [r3, 0xc] | r3 = *(0x1264c);
0x00012564 mov r5, r0 | r5 = r0;
0x00012568 cmp r3, 0 |
0x0001256c mov r6, r1 | r6 = r1;
0x00012570 mov r4, r2 | r4 = r2;
0x00012574 beq 0x12598 |
| while (r0 >= 0) {
0x00012578 cmp r5, 0x10000 |
| if (r5 <= 0x10000) {
0x0001257c blo 0x125b4 | goto label_3;
| }
| label_0:
0x00012580 ldr r3, [pc, 0xc0] | r3 = *(0x12644);
0x00012584 bl 0x11934 | fcn_00011934 ();
0x00012588 mov r2, 0x16 | r2 = 0x16;
0x0001258c ldr r3, [pc, r3] | r3 = *(0x00012594);
0x00012590 str r2, [r0, r3] | *((r0 + r3)) = r2;
0x00012594 b 0x125a4 | goto label_2;
0x00012598 bl 0x122ec | r0 = fcn_000122ec ();
0x0001259c cmp r0, 0 |
0x000125a0 bge 0x12578 |
| }
| label_2:
0x000125a4 mvn r4, 0 | r4 = ~0;
| label_1:
0x000125a8 mov r0, r4 | r0 = r4;
0x000125ac add sp, sp, 8 |
0x000125b0 pop {r4, r5, r6, pc} |
| label_3:
0x000125b4 add r5, r5, r6 | r5 += r6;
0x000125b8 cmp r5, 0x10000 |
| if (r5 > 0x10000) {
0x000125bc bhi 0x12580 | goto label_0;
| }
0x000125c0 cmp r4, 0 |
| if (r4 == 0) {
0x000125c4 beq 0x125a8 | goto label_1;
| }
0x000125c8 ldr r4, [pc, 0x7c] | r4 = *(0x12648);
0x000125cc add r4, pc, r4 | r4 = pc + r4;
0x000125d0 ldr r6, [r4] | r6 = *(0x12648);
0x000125d4 cmp r6, 0 |
| if (r6 != 0) {
0x000125d8 movne r4, 0 | r4 = 0;
| goto label_4;
| }
| if (r6 != 0) {
| label_4:
0x000125dc bne 0x125a8 | goto label_1;
| }
0x000125e0 ldr r0, [pc, 0x68] | r0 = *(0x1264c);
0x000125e4 mov r1, 2 | r1 = 2;
0x000125e8 add r0, pc, r0 | r0 = pc + r0;
0x000125ec bl 0x147dc | r0 = open (r0, r1, r2);
0x000125f0 subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 < r0) {
0x000125f4 blt 0x125a4 | goto label_2;
| }
0x000125f8 ldr r1, [r4, 8] | r1 = *((r4 + 8));
0x000125fc ldr r3, [r4, 4] | r3 = *((r4 + 4));
0x00012600 mov r0, 0x10000 | r0 = 0x10000;
0x00012604 lsl r1, r0, r1 | r1 = r0 << r1;
0x00012608 str r3, [sp, 4] | var_4h = r3;
0x0001260c mov r2, 3 | r2 = 3;
0x00012610 mov r3, 1 | r3 = 1;
0x00012614 str r5, [sp] | *(sp) = r5;
0x00012618 mov r0, r6 | r0 = r6;
0x0001261c bl 0x15024 | mmap ()
0x00012620 str r0, [r4] | *(r4) = r0;
0x00012624 mov r0, r5 | r0 = r5;
0x00012628 bl 0x15ac8 | close (r0);
0x0001262c ldr r4, [r4] | r4 = *(r4);
0x00012630 cmn r4, 1 |
| if (r4 == 1) {
0x00012634 movne r4, 0 | r4 = 0;
| }
| if (r4 != 1) {
0x00012638 moveq r4, 1 | r4 = 1;
| }
0x0001263c rsb r4, r4, 0 | r4 -= ;
0x00012640 b 0x125a8 | goto label_1;
| }
[*] Function mmap used 4 times libuClibc-1.0.31.so