[*] Binary protection state of libip4tc.so.0.1.0
Partial RELRO No Canary found NX disabled DSO No RPATH No RUNPATH No Symbols
[*] Function fprintf tear down of libip4tc.so.0.1.0
; 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/usr/lib/libip4tc.so.0.1.0 @ 0x19b0 */
| #include <stdint.h>
|
; (fcn) fcn.000019b0 () | uint32_t fcn_000019b0 (int32_t arg1) {
| r0 = arg1;
0x000019b0 ldr r3, [pc, 0x78] | r3 = *(0x1a2c);
0x000019b4 add r2, r0, 5 | r2 = r0 + 5;
0x000019b8 add r3, pc, r3 | r3 = pc + r3;
0x000019bc cmp r2, 4 |
| if (r2 > 4) {
| /* switch table (5 cases) at 0x19c8 */
0x000019c0 addls pc, pc, r2, lsl 2 | pc += (r2 << 2);
| }
0x000019c4 b 0x19f4 | goto label_0;
0x000019c8 b 0x1a18 | goto label_1;
0x000019cc b 0x19e8 | goto label_2;
0x000019d0 b 0x19f4 | goto label_0;
0x000019d4 b 0x19dc | goto label_3;
0x000019d8 b 0x1a24 | goto label_4;
| label_3:
0x000019dc ldr r0, [pc, 0x50] | r0 = *(0x1a30);
0x000019e0 add r0, pc, r0 | r0 = pc + r0;
0x000019e4 bx lr | return r0;
| label_2:
0x000019e8 ldr r0, [pc, 0x48] | r0 = *(0x1a34);
0x000019ec add r0, pc, r0 | r0 = pc + r0;
0x000019f0 bx lr | return r0;
| label_0:
0x000019f4 ldr r1, [pc, 0x40] | r1 = *(0x1a38);
0x000019f8 push {r4, lr} |
0x000019fc ldr r3, [r3, r1] | r3 = *((r3 + r1));
0x00001a00 ldr r1, [pc, 0x38] | r1 = *(0x1a3c);
0x00001a04 mov r2, r0 | r2 = r0;
0x00001a08 add r1, pc, r1 | r1 = pc + r1;
0x00001a0c ldr r0, [r3] | r0 = *(r3);
0x00001a10 bl 0xe68 | r0 = fprintf (r0, r1, r2, r3, r4)
0x00001a14 bl 0xe50 | abort ();
| label_1:
0x00001a18 ldr r0, [pc, 0x24] | r0 = *(0x1a40);
0x00001a1c add r0, pc, r0 | r0 = pc + r0;
0x00001a20 bx lr | return r0;
| label_4:
0x00001a24 ldr r0, [pc, 0x1c] | r0 = iptc_is_chain;
0x00001a28 add r0, pc, r0 | r0 = pc + r0;
0x00001a2c bx lr | return r0;
| }
; 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/usr/lib/libip4tc.so.0.1.0 @ 0x2cd4 */
| #include <stdint.h>
|
; (fcn) fcn.00002cd4 () | void fcn_00002cd4 (int32_t arg_58h, int32_t arg2) {
| int32_t var_4h;
| int32_t var_8h;
| 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_24h;
| int32_t var_28h;
| int32_t var_2ch;
| int32_t var_34h;
| r1 = arg2;
0x00002cd4 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00002cd8 sub sp, sp, 0x34 |
0x00002cdc mov r7, r3 | r7 = r3;
0x00002ce0 ldrb r3, [sp, 0x58] | r3 = *(arg_58h);
0x00002ce4 mov r6, r2 | r6 = r2;
0x00002ce8 str r3, [sp, 0x14] | var_14h = r3;
0x00002cec ldr r3, [pc, 0x3cc] | r3 = *(0x30bc);
0x00002cf0 mov r5, r1 | r5 = r1;
0x00002cf4 add r3, pc, r3 | r3 = pc + r3;
0x00002cf8 str r3, [sp, 0xc] | var_ch = r3;
0x00002cfc ldr r2, [sp, 0xc] | r2 = var_ch;
0x00002d00 ldr r3, [pc, 0x3bc] | r3 = *(0x30c0);
0x00002d04 mov r1, r7 | r1 = r7;
0x00002d08 ldr r2, [r2, r3] | r2 = *((r2 + r3));
0x00002d0c ldr r3, [pc, 0x3b4] | r3 = *(0x30c4);
0x00002d10 add r3, pc, r3 | r3 = pc + r3;
0x00002d14 str r2, [r3] | *(r3) = r2;
0x00002d18 bl 0x2374 | r0 = fcn_00002374 (r0, r1);
0x00002d1c subs r3, r0, 0 | r3 = r0 - 0;
0x00002d20 str r3, [sp, 8] | var_8h = r3;
0x00002d24 bne 0x2d34 |
| while (1) {
0x00002d28 bl 0xed4 | errno_location ();
0x00002d2c mov r3, 2 | r3 = 2;
0x00002d30 b 0x2d4c | goto label_7;
0x00002d34 ldrh r1, [r5, 0x5a] | r1 = *((r5 + 0x5a));
0x00002d38 bl 0x1244 | r0 = fcn_00001244 (r0, r1);
0x00002d3c subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 == r0) {
0x00002d40 bne 0x2d58 |
0x00002d44 bl 0xed4 | errno_location ();
0x00002d48 mov r3, 0xc | r3 = 0xc;
| label_7:
0x00002d4c str r3, [r0] | *(r0) = r3;
0x00002d50 mov r5, 0 | r5 = 0;
0x00002d54 b 0x2ff4 | goto label_8;
| }
0x00002d58 add fp, r4, 0x28 |
0x00002d5c ldrh r2, [r5, 0x5a] | r2 = *((r5 + 0x5a));
0x00002d60 mov r1, r5 | r1 = r5;
0x00002d64 mov r0, fp | r0 = fp;
0x00002d68 bl 0xe20 | memcpy (r0, r1, r2);
0x00002d6c mov r3, 0 | r3 = 0;
0x00002d70 str r3, [r4, 0xc] | *((r4 + 0xc)) = r3;
0x00002d74 ldr r2, [sp, 0x14] | r2 = var_14h;
0x00002d78 mov r1, r4 | r1 = r4;
0x00002d7c mov r0, r7 | r0 = r7;
0x00002d80 bl 0x2954 | r0 = fcn_00002954 (r0, r1);
0x00002d84 subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 == r0) {
0x00002d88 bne 0x2d98 |
| label_6:
0x00002d8c mov r0, r4 | r0 = r4;
0x00002d90 bl 0xf10 | free (r0);
0x00002d94 b 0x2ff4 | goto label_8;
| }
0x00002d98 ldr r3, [r4, 0x1c] | r3 = *((r4 + 0x1c));
0x00002d9c cmp r3, 3 |
0x00002da0 str r3, [sp, 4] | var_4h = r3;
| if (r3 == 3) {
0x00002da4 bne 0x2dbc |
0x00002da8 ldr r3, [r4, 0x20] | r3 = *((r4 + 0x20));
0x00002dac cmp r3, 0 |
| if (r3 == 0) {
0x00002db0 ldrne r2, [r3, 0x2c] | r2 = *((r3 + 0x2c));
| }
| if (r3 == 0) {
0x00002db4 subne r2, r2, 1 | r2--;
| }
| if (r3 != 0) {
0x00002db8 strne r2, [r3, 0x2c] | *((r3 + 0x2c)) = r2;
| goto label_9;
| }
| }
| label_9:
0x00002dbc ldr r3, [sp, 8] | r3 = var_8h;
0x00002dc0 ldr r5, [r3, 0x54]! | r5 = *((r3 += 0x54));
0x00002dc4 str r3, [sp, 0x10] | var_10h = r3;
0x00002dc8 add r3, r4, 0x48 | r3 = r4 + 0x48;
0x00002dcc str r3, [sp, 0x1c] | var_1ch = r3;
0x00002dd0 add r3, r6, 0x70 | r3 = r6 + 0x70;
0x00002dd4 str r3, [sp, 0x20] | var_20h = r3;
0x00002dd8 add r3, r4, 0x98 | r3 = r4 + 0x98;
0x00002ddc str r3, [sp, 0x24] | var_24h = r3;
| label_1:
0x00002de0 ldr r3, [sp, 0x10] | r3 = var_10h;
0x00002de4 cmp r5, r3 |
| if (r5 != r3) {
0x00002de8 bne 0x2df8 | goto label_10;
| }
0x00002dec mov r0, r4 | r0 = r4;
0x00002df0 bl 0xf10 | free (r0);
0x00002df4 b 0x2d28 |
| }
| label_10:
0x00002df8 ldr r2, [r4, 0x28] | r2 = *((r4 + 0x28));
0x00002dfc ldr r3, [r5, 0x28] | r3 = *((r5 + 0x28));
0x00002e00 cmp r2, r3 |
| if (r2 != r3) {
0x00002e04 bne 0x2fb8 | goto label_3;
| }
0x00002e08 ldr r2, [r4, 0x2c] | r2 = *((r4 + 0x2c));
0x00002e0c ldr r3, [r5, 0x2c] | r3 = *((r5 + 0x2c));
0x00002e10 cmp r2, r3 |
| if (r2 != r3) {
0x00002e14 bne 0x2fb8 | goto label_3;
| }
0x00002e18 ldr r2, [r4, 0x30] | r2 = *((r4 + 0x30));
0x00002e1c ldr r3, [r5, 0x30] | r3 = *((r5 + 0x30));
0x00002e20 cmp r2, r3 |
| if (r2 != r3) {
0x00002e24 bne 0x2fb8 | goto label_3;
| }
0x00002e28 ldr r2, [r4, 0x34] | r2 = *((r4 + 0x34));
0x00002e2c ldr r3, [r5, 0x34] | r3 = *((r5 + 0x34));
0x00002e30 cmp r2, r3 |
| if (r2 != r3) {
0x00002e34 bne 0x2fb8 | goto label_3;
| }
0x00002e38 ldr r2, [r4, 0x78] | r2 = *((r4 + 0x78));
0x00002e3c ldr r3, [r5, 0x78] | r3 = *((r5 + 0x78));
0x00002e40 cmp r2, r3 |
| if (r2 != r3) {
0x00002e44 bne 0x2fb8 | goto label_3;
| }
0x00002e48 add r3, r4, 0x38 | r3 = r4 + 0x38;
0x00002e4c add r2, r5, 0x38 | r2 = r5 + 0x38;
| do {
0x00002e50 ldrb r1, [r3, 0x20] | r1 = *((r3 + 0x20));
0x00002e54 ldrb lr, [r2, 0x20] |
0x00002e58 mov ip, r3 |
0x00002e5c cmp r1, lr |
0x00002e60 mov r0, r2 | r0 = r2;
| if (r1 != lr) {
0x00002e64 bne 0x2fb8 | goto label_3;
| }
0x00002e68 ldrb ip, [ip] | ip = *(ip);
0x00002e6c ldrb r0, [r0] | r0 = *(r0);
0x00002e70 and ip, ip, r1 |
0x00002e74 and r1, r1, r0 | r1 &= r0;
0x00002e78 cmp ip, r1 |
0x00002e7c add r3, r3, 1 | r3++;
0x00002e80 add r2, r2, 1 | r2++;
| if (ip != r1) {
0x00002e84 bne 0x2fb8 | goto label_3;
| }
0x00002e88 ldrb r1, [r3, 0x2f] | r1 = *((r3 + 0x2f));
0x00002e8c ldrb r0, [r2, 0x2f] | r0 = *((r2 + 0x2f));
0x00002e90 cmp r1, r0 |
| if (r1 != r0) {
0x00002e94 bne 0x2fb8 | goto label_3;
| }
0x00002e98 ldrb r0, [r3, 0xf] | r0 = *((r3 + 0xf));
0x00002e9c ldrb ip, [r2, 0xf] | ip = *((r2 + 0xf));
0x00002ea0 and r0, r0, r1 | r0 &= r1;
0x00002ea4 and r1, r1, ip | r1 &= ip;
0x00002ea8 cmp r0, r1 |
| if (r0 != r1) {
0x00002eac bne 0x2fb8 | goto label_3;
| }
0x00002eb0 ldr r1, [sp, 0x1c] | r1 = var_1ch;
0x00002eb4 cmp r3, r1 |
0x00002eb8 bne 0x2e50 |
| } while (r3 != r1);
0x00002ebc ldr r2, [r4, 0x80] | r2 = *((r4 + 0x80));
0x00002ec0 ldr r3, [r5, 0x80] | r3 = *((r5 + 0x80));
0x00002ec4 cmp r2, r3 |
| if (r2 != r3) {
0x00002ec8 bne 0x2fb8 | goto label_3;
| }
0x00002ecc ldr r6, [sp, 0x20] | r6 = var_20h;
0x00002ed0 ldrh sb, [r4, 0x80] | sb = *((r4 + 0x80));
0x00002ed4 add r3, r5, 0x98 | r3 = r5 + 0x98;
0x00002ed8 mov r8, 0x70 | r8 = 0x70;
0x00002edc str r3, [sp, 0x18] | var_18h = r3;
| do {
0x00002ee0 cmp r8, sb |
| if (r8 > sb) {
0x00002ee4 blo 0x2f30 |
0x00002ee8 cmn r6, 0x20 |
| if (r6 == 0x20) {
0x00002eec beq 0x2fb8 | goto label_3;
| }
0x00002ef0 ldr r3, [r5, 0x1c] | r3 = *((r5 + 0x1c));
0x00002ef4 ldr r2, [sp, 4] | r2 = var_4h;
0x00002ef8 cmp r2, r3 |
| if (r2 != r3) {
0x00002efc bne 0x2fb8 | goto label_3;
| }
0x00002f00 ldrh r3, [r5, 0x80] | r3 = *((r5 + 0x80));
0x00002f04 ldr r1, [sp, 4] | r1 = var_4h;
0x00002f08 add r2, r5, 0x28 | r2 = r5 + 0x28;
0x00002f0c add r8, fp, sb | r8 = fp + sb;
0x00002f10 add sl, r2, r3 | sl = r2 + r3;
0x00002f14 cmp r1, 3 |
| if (r1 > 3) {
| /* switch table (4 cases) at 0x2f20 */
0x00002f18 addls pc, pc, r1, lsl 2 | pc += (r1 << 2);
| }
0x00002f1c b 0x3064 | goto label_11;
0x00002f20 b 0x3000 | goto label_12;
0x00002f24 b 0x300c | goto label_13;
0x00002f28 b 0x2fdc | goto label_4;
0x00002f2c b 0x2fc0 | goto label_14;
| }
0x00002f30 ldr r3, [sp, 0x24] | r3 = var_24h;
0x00002f34 ldr ip, [sp, 0x18] | ip = var_18h;
0x00002f38 add r2, fp, r8 | r2 = fp + r8;
0x00002f3c sub r1, r2, r3 | r1 = r2 - r3;
0x00002f40 ldrh r0, [fp, r8] | r0 = *((fp + r8));
0x00002f44 ldrh sl, [ip, r1] | sl = *((ip + r1));
0x00002f48 ldr r3, [sp, 0x18] | r3 = var_18h;
0x00002f4c cmp sl, r0 |
0x00002f50 add r3, r3, r1 | r3 += r1;
| if (sl != r0) {
0x00002f54 bne 0x2fb8 | goto label_3;
| }
0x00002f58 add r1, r3, 2 | r1 = r3 + 2;
0x00002f5c add r0, r2, 2 | r0 = r2 + 2;
0x00002f60 str r3, [sp, 0x2c] | var_2ch = r3;
0x00002f64 str r2, [sp, 0x28] | var_28h = r2;
0x00002f68 bl 0xea4 | r0 = strcmp (r0, r1);
0x00002f6c cmp r0, 0 |
| if (r0 != 0) {
0x00002f70 bne 0x2fb8 | goto label_3;
| }
0x00002f74 ldr r2, [sp, 0x28] | r2 = var_28h;
0x00002f78 ldr r3, [sp, 0x2c] | r3 = var_2ch;
0x00002f7c add r0, r2, 0x20 | r0 = r2 + 0x20;
0x00002f80 add r3, r3, 0x20 | r3 += 0x20;
0x00002f84 add r2, r6, 0x20 | r2 = r6 + 0x20;
0x00002f88 add ip, r6, sl |
| label_0:
0x00002f8c cmp ip, r2 |
0x00002f90 mov r6, r2 | r6 = r2;
| if (ip != r2) {
0x00002f94 addeq r8, r8, sl | r8 += sl;
| }
0x00002f98 beq 0x2ee0 |
| } while (ip == r2);
0x00002f9c ldrb lr, [r0], 1 |
0x00002fa0 ldrb r1, [r3], 1 | r1 = *(r3);
| r3++;
0x00002fa4 add r2, r2, 1 | r2++;
0x00002fa8 eor r1, r1, lr | r1 ^= lr;
0x00002fac ldrb lr, [r6] |
0x00002fb0 tst r1, lr |
| if ((r1 & lr) == 0) {
0x00002fb4 beq 0x2f8c | goto label_0;
| }
| do {
| label_3:
0x00002fb8 ldr r5, [r5] | r5 = *(r5);
0x00002fbc b 0x2de0 | goto label_1;
| label_14:
0x00002fc0 ldr r3, [r4, 0x20] | r3 = *((r4 + 0x20));
0x00002fc4 ldr r2, [r5, 0x20] | r2 = *((r5 + 0x20));
| label_2:
0x00002fc8 sub r3, r3, r2 | r3 -= r2;
0x00002fcc clz r3, r3 | r3 &= r3;
0x00002fd0 lsr r3, r3, 5 | r3 >>= 5;
0x00002fd4 cmp r3, 0 |
0x00002fd8 beq 0x2fb8 |
| } while (r3 == 0);
| label_4:
0x00002fdc ldr r3, [sp, 0x14] | r3 = var_14h;
0x00002fe0 cmp r3, 0 |
| if (r3 == 0) {
0x00002fe4 beq 0x3088 | goto label_15;
| }
0x00002fe8 mov r0, r4 | r0 = r4;
0x00002fec bl 0xf10 | free (r0);
0x00002ff0 mov r5, 1 | r5 = 1;
| label_8:
0x00002ff4 mov r0, r5 | r0 = r5;
0x00002ff8 add sp, sp, 0x34 |
0x00002ffc pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_12:
0x00003000 ldr r3, [r8, 0x20] | r3 = *((r8 + 0x20));
0x00003004 ldr r2, [sl, 0x20] | r2 = *((sl + 0x20));
0x00003008 b 0x2fc8 | goto label_2;
| label_13:
0x0000300c ldrh r1, [fp, sb] | r1 = *((fp + sb));
0x00003010 ldrh sb, [r2, r3] | sb = *((r2 + r3));
0x00003014 cmp sb, r1 |
| if (sb != r1) {
0x00003018 bne 0x2fb8 | goto label_3;
| }
0x0000301c add r1, sl, 2 | r1 = sl + 2;
0x00003020 add r0, r8, 2 | r0 = r8 + 2;
0x00003024 bl 0xea4 | r0 = strcmp (r0, r1);
0x00003028 cmp r0, 0 |
| if (r0 != 0) {
0x0000302c moveq r3, 0x20 | r3 = 0x20;
| }
| if (r0 == 0) {
0x00003030 subeq sb, sb, 0x20 | sb -= 0x20;
| goto label_16;
| }
| if (r0 != 0) {
| label_16:
0x00003034 bne 0x2fb8 | goto label_3;
| }
| label_5:
0x00003038 sub r2, r3, 0x20 | r2 = r3 - 0x20;
0x0000303c cmp r2, sb |
| if (r2 >= sb) {
0x00003040 bhs 0x2fdc | goto label_4;
| }
0x00003044 ldrb r1, [sl, r3] | r1 = *((sl + r3));
0x00003048 ldrb r2, [r8, r3] | r2 = *((r8 + r3));
0x0000304c eor r2, r2, r1 | r2 ^= r1;
0x00003050 ldrb r1, [r6, r3] | r1 = *((r6 + r3));
0x00003054 add r3, r3, 1 | r3++;
0x00003058 tst r2, r1 |
| if ((r2 & r1) == 0) {
0x0000305c beq 0x3038 | goto label_5;
| }
0x00003060 b 0x2fb8 | goto label_3;
| label_11:
0x00003064 ldr r2, [sp, 0xc] | r2 = var_ch;
0x00003068 ldr r3, [pc, 0x5c] | r3 = *(0x30c8);
0x0000306c ldr r1, [pc, 0x5c] | r1 = *(0x30cc);
0x00003070 ldr r3, [r2, r3] | r3 = *((r2 + r3));
0x00003074 add r1, pc, r1 | r1 = pc + r1;
0x00003078 ldr r2, [sp, 4] | r2 = var_4h;
0x0000307c ldr r0, [r3] | r0 = *(0x30c8);
0x00003080 bl 0xe68 | r0 = fprintf (r0, r1, r2, r3)
0x00003084 bl 0xe50 | abort ();
| label_15:
0x00003088 ldr r3, [r7, 0x14] | r3 = *((r7 + 0x14));
0x0000308c ldr r2, [sp, 8] | r2 = var_8h;
0x00003090 cmp r3, r5 |
| if (r3 != r5) {
0x00003094 ldreq r3, [r5, 4] | r3 = *((r5 + 4));
| }
0x00003098 mov r0, r5 | r0 = r5;
| if (r3 != r5) {
0x0000309c streq r3, [r7, 0x14] | *((r7 + 0x14)) = r3;
| }
0x000030a0 ldr r3, [sp, 8] | r3 = var_8h;
0x000030a4 mov r5, 1 | r5 = 1;
0x000030a8 ldr r3, [r3, 0x50] | r3 = *((r3 + 0x50));
0x000030ac sub r3, r3, 1 | r3--;
0x000030b0 str r3, [r2, 0x50] | *((r2 + 0x50)) = r3;
0x000030b4 bl 0x1ad8 | fcn_00001ad8 (r0);
0x000030b8 str r5, [r7, 4] | *((r7 + 4)) = r5;
0x000030bc b 0x2d8c | 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/usr/lib/libip4tc.so.0.1.0 @ 0x1580 */
| #include <stdint.h>
|
; (fcn) sym.dump_entries () | void dump_entries (int32_t arg1) {
| int32_t var_0h;
| int32_t var_4h;
| int32_t var_8h;
| int32_t var_ch;
| int32_t var_10h;
| int32_t var_1ch;
| r0 = arg1;
0x00001580 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00001584 ldr r8, [pc, 0x3a8] | r8 = *(0x1930);
0x00001588 ldr r3, [pc, 0x3a8] | r3 = *(0x1934);
0x0000158c add r8, pc, r8 | r8 = pc + r8;
0x00001590 ldr r2, [r8, r3] | r2 = *(0x1930);
0x00001594 ldr r3, [pc, 0x3a0] | r3 = *(0x1938);
0x00001598 mov r5, r0 | r5 = r0;
0x0000159c add r3, pc, r3 | r3 = pc + r3;
0x000015a0 str r2, [r3] | *(r3) = r2;
0x000015a4 ldr r1, [pc, 0x394] | r1 = *(0x193c);
0x000015a8 ldr r3, [r0, 0x7c] | r3 = *((r0 + 0x7c));
0x000015ac ldr r0, [pc, 0x390] | r0 = *(0x1940);
0x000015b0 sub sp, sp, 0x1c |
0x000015b4 ldr r2, [r3, 0x20] | r2 = *(0x1958);
0x000015b8 add r1, pc, r1 | r1 = pc + r1;
0x000015bc add r0, pc, r0 | r0 = pc + r0;
0x000015c0 bl 0xdfc | printf (r0, r1, r2, r3, r4, r5);
0x000015c4 ldr r0, [pc, 0x37c] | r0 = *(0x1944);
0x000015c8 add r1, r5, 0x28 | r1 = r5 + 0x28;
0x000015cc add r0, pc, r0 | r0 = pc + r0;
0x000015d0 bl 0xdfc | printf (r0, r1);
0x000015d4 ldr r3, [r5, 0x5c] | r3 = *((r5 + 0x5c));
0x000015d8 ldr r0, [pc, 0x36c] | r0 = *(0x1948);
0x000015dc str r3, [sp, 4] | var_4h = r3;
0x000015e0 ldr r3, [r5, 0x58] | r3 = *((r5 + 0x58));
0x000015e4 add r1, r5, 0x4c | r1 = r5 + 0x4c;
0x000015e8 str r3, [sp] | *(sp) = r3;
0x000015ec add r0, pc, r0 | r0 = pc + r0;
0x000015f0 ldm r1, {r1, r2, r3} | r1 = *(r1);
| r2 = *((r1 + 4));
| r3 = *((r1 + 8));
0x000015f4 bl 0xdfc | printf (r0, r1, r2, r3);
0x000015f8 ldr r3, [r5, 0x70] | r3 = *((r5 + 0x70));
0x000015fc ldr r0, [pc, 0x34c] | r0 = *(0x194c);
0x00001600 str r3, [sp, 4] | var_4h = r3;
0x00001604 ldr r3, [r5, 0x6c] | r3 = *((r5 + 0x6c));
0x00001608 add r1, r5, 0x60 | r1 = r5 + 0x60;
0x0000160c str r3, [sp] | *(sp) = r3;
0x00001610 add r0, pc, r0 | r0 = pc + r0;
0x00001614 ldm r1, {r1, r2, r3} | r1 = *(r1);
| r2 = *((r1 + 4));
| r3 = *((r1 + 8));
0x00001618 bl 0xdfc | printf (r0, r1, r2, r3);
0x0000161c ldr sb, [pc, 0x330] | sb = *(0x1950);
0x00001620 ldr sl, [pc, 0x330] | sl = *(0x1954);
0x00001624 mov r7, 0 | r7 = 0;
0x00001628 add sb, pc, sb | sb = pc + sb;
0x0000162c add sl, pc, sl | sl = pc + sl;
| label_7:
0x00001630 ldr r3, [r5, 0x7c] | r3 = *((r5 + 0x7c));
0x00001634 ldr r0, [r3, 0x20] | r0 = *((r3 + 0x20));
0x00001638 cmp r0, r7 |
| if (r0 <= r7) {
0x0000163c bhi 0x1648 |
0x00001640 add sp, sp, 0x1c |
0x00001644 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| }
0x00001648 add r3, r3, 0x28 | r3 += 0x28;
0x0000164c mov r1, 0 | r1 = 0;
0x00001650 add r4, r3, r7 | r4 = r3 + r7;
0x00001654 mov r2, r1 | r2 = r1;
| do {
0x00001658 cmp r0, r2 |
| if (r0 <= r2) {
0x0000165c bhi 0x1680 |
0x00001660 ldr r3, [pc, 0x2f4] | r3 = *(0x1958);
0x00001664 ldr r1, [pc, 0x2f4] | r1 = *(0x195c);
0x00001668 ldr r3, [r8, r3] | r3 = *((r8 + r3));
0x0000166c mov r2, r7 | r2 = r7;
0x00001670 add r1, pc, r1 | r1 = pc + r1;
0x00001674 ldr r0, [r3] | r0 = *(0x1958);
0x00001678 bl 0xe68 | r0 = fprintf (r0, r1, r2, r3)
0x0000167c bl 0xe50 | abort ();
| }
0x00001680 add ip, r3, r2 |
0x00001684 cmp r4, ip |
| if (r4 == ip) {
0x00001688 beq 0x171c | goto label_8;
| }
0x0000168c ldrh ip, [ip, 0x5a] | ip = *((ip + 0x5a));
0x00001690 add r1, r1, 1 | r1++;
0x00001694 add r2, r2, ip | r2 += ip;
0x00001698 b 0x1658 |
| } while (1);
| label_0:
0x0000169c add r1, r4, r6 | r1 = r4 + r6;
0x000016a0 add r1, r1, 2 | r1 += 2;
0x000016a4 mov r0, sl | r0 = sl;
0x000016a8 bl 0xdfc | printf (r0, r1);
0x000016ac ldrh r3, [r4, r6] | r3 = *((r4 + r6));
0x000016b0 add r6, r6, r3 | r6 += r3;
0x000016b4 b 0x18ac | goto label_9;
| label_3:
0x000016b8 ldr r1, [pc, 0x2a4] | r1 = *(0x1960);
0x000016bc add r1, pc, r1 | r1 = pc + r1;
0x000016c0 b 0x1914 | goto label_10;
| label_4:
0x000016c4 ldr r1, [pc, 0x29c] | r1 = *(0x1964);
0x000016c8 add r1, pc, r1 | r1 = pc + r1;
0x000016cc b 0x1914 | goto label_10;
| label_5:
0x000016d0 ldr r1, [pc, 0x294] | r1 = *(0x1968);
0x000016d4 add r1, pc, r1 | r1 = pc + r1;
0x000016d8 b 0x1914 | goto label_10;
| label_6:
0x000016dc ldr r1, [pc, 0x28c] | r1 = *(0x196c);
0x000016e0 add r1, pc, r1 | r1 = pc + r1;
0x000016e4 b 0x1914 | goto label_10;
| label_2:
0x000016e8 ldr r0, [pc, 0x284] | r0 = *(0x1970);
0x000016ec add r0, pc, r0 | r0 = pc + r0;
0x000016f0 b 0x191c | goto label_11;
| label_1:
0x000016f4 ldr r1, [pc, 0x27c] | r1 = *(0x1974);
0x000016f8 mov r0, fp | r0 = fp;
0x000016fc add r1, pc, r1 | r1 = pc + r1;
0x00001700 bl 0xea4 | r0 = strcmp (r0, r1);
0x00001704 cmp r0, 0 |
| if (r0 != 0) {
0x00001708 bne 0x1920 | goto label_12;
| }
0x0000170c ldr r0, [pc, 0x268] | r0 = *(0x1978);
0x00001710 add r1, r6, 0x20 | r1 = r6 + 0x20;
0x00001714 add r0, pc, r0 | r0 = pc + r0;
0x00001718 b 0x191c | goto label_11;
| label_8:
0x0000171c mov r0, sb | r0 = sb;
0x00001720 bl 0xdfc | printf (r0);
0x00001724 ldr r0, [r4] | r0 = *(r4);
0x00001728 bl 0x3dfc | fcn_00003dfc (r0);
0x0000172c add fp, r4, 0x40 |
0x00001730 mov r6, r0 | r6 = r0;
0x00001734 ldr r0, [r4, 8] | r0 = *((r4 + 8));
0x00001738 bl 0x3dfc | fcn_00003dfc (r0);
0x0000173c lsr r3, r6, 8 | r3 = r6 >> 8;
0x00001740 lsr r2, r6, 0x10 | r2 = r6 >> 0x10;
0x00001744 and r3, r3, 0xff | r3 &= 0xff;
0x00001748 and r2, r2, 0xff | r2 &= 0xff;
0x0000174c and r1, r0, 0xff | r1 = r0 & 0xff;
0x00001750 str r1, [sp, 0x10] | var_10h = r1;
0x00001754 lsr r1, r0, 8 | r1 = r0 >> 8;
0x00001758 and r1, r1, 0xff | r1 &= 0xff;
0x0000175c str r1, [sp, 0xc] | var_ch = r1;
0x00001760 lsr r1, r0, 0x10 | r1 = r0 >> 0x10;
0x00001764 lsr r0, r0, 0x18 | r0 >>= 0x18;
0x00001768 str r0, [sp, 4] | var_4h = r0;
0x0000176c ldr r0, [pc, 0x20c] | r0 = *(0x197c);
0x00001770 and r1, r1, 0xff | r1 &= 0xff;
0x00001774 str r1, [sp, 8] | var_8h = r1;
0x00001778 and r1, r6, 0xff | r1 = r6 & 0xff;
0x0000177c str r1, [sp] | *(sp) = r1;
0x00001780 add r0, pc, r0 | r0 = pc + r0;
0x00001784 lsr r1, r6, 0x18 | r1 = r6 >> 0x18;
0x00001788 bl 0xdfc | printf (r0, r1, r2, r3);
0x0000178c ldr r0, [r4, 4] | r0 = *((r4 + 4));
0x00001790 bl 0x3dfc | r0 = fcn_00003dfc (r0);
0x00001794 mov r6, r0 | r6 = r0;
0x00001798 ldr r0, [r4, 0xc] | r0 = *((r4 + 0xc));
0x0000179c bl 0x3dfc | fcn_00003dfc (r0);
0x000017a0 lsr r3, r6, 8 | r3 = r6 >> 8;
0x000017a4 lsr r2, r6, 0x10 | r2 = r6 >> 0x10;
0x000017a8 and r3, r3, 0xff | r3 &= 0xff;
0x000017ac and r2, r2, 0xff | r2 &= 0xff;
0x000017b0 and r1, r0, 0xff | r1 = r0 & 0xff;
0x000017b4 str r1, [sp, 0x10] | var_10h = r1;
0x000017b8 lsr r1, r0, 8 | r1 = r0 >> 8;
0x000017bc and r1, r1, 0xff | r1 &= 0xff;
0x000017c0 str r1, [sp, 0xc] | var_ch = r1;
0x000017c4 lsr r1, r0, 0x10 | r1 = r0 >> 0x10;
0x000017c8 lsr r0, r0, 0x18 | r0 >>= 0x18;
0x000017cc str r0, [sp, 4] | var_4h = r0;
0x000017d0 ldr r0, [pc, 0x1ac] | r0 = *(0x1980);
0x000017d4 and r1, r1, 0xff | r1 &= 0xff;
0x000017d8 str r1, [sp, 8] | var_8h = r1;
0x000017dc and r1, r6, 0xff | r1 = r6 & 0xff;
0x000017e0 str r1, [sp] | *(sp) = r1;
0x000017e4 add r0, pc, r0 | r0 = pc + r0;
0x000017e8 lsr r1, r6, 0x18 | r1 = r6 >> 0x18;
0x000017ec bl 0xdfc | printf (r0, r1, r2, r3);
0x000017f0 ldr r0, [pc, 0x190] | r0 = *(0x1984);
0x000017f4 add r1, r4, 0x10 | r1 = r4 + 0x10;
0x000017f8 add r0, pc, r0 | r0 = pc + r0;
0x000017fc bl 0xdfc | printf (r0, r1);
0x00001800 add r6, r4, 0x30 | r6 = r4 + 0x30;
| do {
0x00001804 ldrb r3, [r6], 1 | r3 = *(r6);
| r6++;
0x00001808 cmp r3, 0 |
| if (r3 != 0) {
0x0000180c moveq r0, 0x2e | r0 = 0x2e;
| }
| if (r3 == 0) {
0x00001810 movne r0, 0x58 | r0 = 0x58;
| }
0x00001814 bl 0xde4 | putchar (r0);
0x00001818 cmp r6, fp |
0x0000181c bne 0x1804 |
| } while (r6 != fp);
0x00001820 ldr r0, [pc, 0x164] | r0 = *(0x1988);
0x00001824 add r1, r4, 0x20 | r1 = r4 + 0x20;
0x00001828 add r0, pc, r0 | r0 = pc + r0;
0x0000182c bl 0xdfc | printf (r0, r1);
0x00001830 add fp, r4, 0x50 |
| do {
0x00001834 ldrb r3, [r6], 1 | r3 = *(r6);
| r6++;
0x00001838 cmp r3, 0 |
| if (r3 != 0) {
0x0000183c moveq r0, 0x2e | r0 = 0x2e;
| }
| if (r3 == 0) {
0x00001840 movne r0, 0x58 | r0 = 0x58;
| }
0x00001844 bl 0xde4 | putchar (r0);
0x00001848 cmp fp, r6 |
0x0000184c bne 0x1834 |
| } while (fp != r6);
0x00001850 ldr r0, [pc, 0x138] | r0 = *(0x198c);
0x00001854 ldrh r1, [r4, 0x50] | r1 = *((r4 + 0x50));
0x00001858 add r0, pc, r0 | r0 = pc + r0;
0x0000185c bl 0xdfc | printf (r0, r1);
0x00001860 ldr r0, [pc, 0x12c] | r0 = *(0x1990);
0x00001864 ldrb r1, [r4, 0x52] | r1 = *((r4 + 0x52));
0x00001868 add r0, pc, r0 | r0 = pc + r0;
0x0000186c bl 0xdfc | printf (r0, r1);
0x00001870 ldr r0, [pc, 0x120] | r0 = *(0x1994);
0x00001874 ldrb r1, [r4, 0x53] | r1 = *((r4 + 0x53));
0x00001878 add r0, pc, r0 | r0 = pc + r0;
0x0000187c bl 0xdfc | printf (r0, r1);
0x00001880 ldrd r0, r1, [r4, 0x68] | __asm ("ldrd r0, r1, [r4, 0x68]");
0x00001884 ldrd r2, r3, [r4, 0x60] | __asm ("ldrd r2, r3, [r4, 0x60]");
0x00001888 strd r0, r1, [sp] | __asm ("strd r0, r1, [sp]");
0x0000188c ldr r0, [pc, 0x108] | r0 = *(0x1998);
0x00001890 mov r6, 0x70 | r6 = 0x70;
0x00001894 add r0, pc, r0 | r0 = pc + r0;
0x00001898 bl 0xdfc | printf (r0, r1, r2, r3, r4, r5, r6);
0x0000189c ldr r0, [pc, 0xfc] | r0 = *(0x199c);
0x000018a0 ldr r1, [r4, 0x54] | r1 = *((r4 + 0x54));
0x000018a4 add r0, pc, r0 | r0 = pc + r0;
0x000018a8 bl 0xdfc | printf (r0, r1);
| label_9:
0x000018ac ldrh r3, [r4, 0x58] | r3 = *((r4 + 0x58));
0x000018b0 cmp r6, r3 |
| if (r6 <= r3) {
0x000018b4 blo 0x169c | goto label_0;
| }
0x000018b8 ldr r0, [pc, 0xe4] | r0 = *(0x19a0);
0x000018bc add r6, r4, r3 | r6 = r4 + r3;
0x000018c0 add fp, r6, 2 |
0x000018c4 ldrh r2, [r4, r3] | r2 = *((r4 + r3));
0x000018c8 mov r1, fp | r1 = fp;
0x000018cc add r0, pc, r0 | r0 = pc + r0;
0x000018d0 bl 0xdfc | printf (r0, r1, r2, r3, r4, r5, r6);
0x000018d4 ldrb r3, [r6, 2] | r3 = *((r6 + 2));
0x000018d8 cmp r3, 0 |
| if (r3 != 0) {
0x000018dc bne 0x16f4 | goto label_1;
| }
0x000018e0 ldr r1, [r6, 0x20] | r1 = *((r6 + 0x20));
0x000018e4 cmp r1, 0 |
| if (r1 >= 0) {
0x000018e8 bge 0x16e8 | goto label_2;
| }
0x000018ec cmn r1, 2 |
| if (r1 == 2) {
0x000018f0 beq 0x16b8 | goto label_3;
| }
0x000018f4 cmn r1, 1 |
| if (r1 == 1) {
0x000018f8 beq 0x16c4 | goto label_4;
| }
0x000018fc cmn r1, 4 |
| if (r1 == 4) {
0x00001900 beq 0x16d0 | goto label_5;
| }
0x00001904 cmn r1, 5 |
| if (r1 != 5) {
0x00001908 bne 0x16dc | goto label_6;
| }
0x0000190c ldr r1, [pc, 0x94] | r1 = *(0x19a4);
0x00001910 add r1, pc, r1 | r1 = pc + r1;
| label_10:
0x00001914 ldr r0, [pc, 0x90] | r0 = *(0x19a8);
0x00001918 add r0, pc, r0 | r0 = pc + r0;
| label_11:
0x0000191c bl 0xdfc | printf (r0, r1);
| label_12:
0x00001920 mov r0, 0xa | r0 = 0xa;
0x00001924 bl 0xde4 | putchar (r0);
0x00001928 ldrh r3, [r4, 0x5a] | r3 = *((r4 + 0x5a));
0x0000192c add r7, r7, r3 | r7 += r3;
0x00001930 b 0x1630 | goto label_7;
| }
; 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/usr/lib/libip4tc.so.0.1.0 @ 0x1e9c */
| #include <stdint.h>
|
; (fcn) sym.iptc_init () | void iptc_init (char * arg1) {
| int32_t var_0h;
| char * src;
| int32_t var_ch;
| int32_t var_10h;
| char * s2;
| int32_t var_64h;
| int32_t var_20h;
| int32_t var_24h;
| int32_t var_28h;
| char * dest;
| size_t size;
| int32_t var_80h;
| int32_t var_84h;
| r0 = arg1;
0x00001e9c ldr r3, [pc, 0x4b4] | r3 = *(0x2354);
0x00001ea0 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00001ea4 ldr r7, [pc, 0x4b0] | r7 = *(0x2358);
0x00001ea8 sub sp, sp, 0x84 |
0x00001eac add r3, pc, r3 | r3 = pc + r3;
0x00001eb0 str r3, [sp, 0xc] | var_ch = r3;
0x00001eb4 ldr r3, [pc, 0x4a4] | r3 = *(0x235c);
0x00001eb8 add r7, pc, r7 | r7 = pc + r7;
0x00001ebc str r0, [sp, 8] | src = r0;
0x00001ec0 ldr r3, [r7, r3] | r3 = *(0x2358);
0x00001ec4 str r3, [sp, 0x10] | var_10h = r3;
0x00001ec8 ldr r3, [pc, 0x494] | r3 = *(0x2360);
0x00001ecc add r3, pc, r3 | r3 = pc + r3;
0x00001ed0 str r3, [sp, 0x14] | s2 = r3;
| label_1:
0x00001ed4 ldr r3, [sp, 0xc] | r3 = var_ch;
0x00001ed8 ldr r2, [sp, 0x10] | r2 = var_10h;
0x00001edc ldr r0, [sp, 8] | r0 = src;
0x00001ee0 str r2, [r3] | *(r3) = r2;
0x00001ee4 bl 0xee0 | r0 = strlen (r0);
0x00001ee8 cmp r0, 0x1f |
| if (r0 < 0x1f) {
0x00001eec bls 0x1f04 | goto label_12;
| }
0x00001ef0 bl 0xed4 | errno_location ();
0x00001ef4 mov r3, 0x16 | r3 = 0x16;
0x00001ef8 str r3, [r0] | *(r0) = r3;
| do {
| label_0:
0x00001efc mov r4, 0 | r4 = 0;
0x00001f00 b 0x215c | goto label_13;
| label_12:
0x00001f04 mov r2, 0xff | r2 = 0xff;
0x00001f08 mov r1, 3 | r1 = 3;
0x00001f0c mov r0, 2 | r0 = 2;
0x00001f10 bl 0xe44 | r0 = socket (r0, r1, r2);
0x00001f14 subs r5, r0, 0 | r5 = r0 - 0;
0x00001f18 blt 0x1efc |
| } while (r5 < r0);
0x00001f1c mov r2, 1 | r2 = 1;
0x00001f20 mov r1, 2 | r1 = 2;
0x00001f24 bl 0xe14 | r0 = fcntl64 ();
0x00001f28 cmn r0, 1 |
| if (r0 == 1) {
0x00001f2c bne 0x1f60 |
0x00001f30 ldr r3, [pc, 0x430] | r3 = *(0x2364);
0x00001f34 ldr r3, [r7, r3] | r3 = *((r7 + r3));
0x00001f38 ldr r4, [r3] | r4 = *(0x2364);
0x00001f3c bl 0xed4 | r0 = errno_location ();
0x00001f40 ldr r0, [r0] | r0 = *(r0);
0x00001f44 bl 0xe08 | strerror (r0);
0x00001f48 ldr r1, [pc, 0x41c] | r1 = *(0x2368);
0x00001f4c add r1, pc, r1 | r1 = pc + r1;
0x00001f50 mov r2, r0 | r2 = r0;
0x00001f54 mov r0, r4 | r0 = r4;
0x00001f58 bl 0xe68 | r0 = fprintf (r0, r1, r2)
0x00001f5c bl 0xe50 | abort ();
| }
0x00001f60 add r6, sp, 0x2c | r6 += dest;
0x00001f64 ldr r1, [sp, 8] | r1 = src;
0x00001f68 mov sb, 0x54 | sb = 0x54;
0x00001f6c mov r0, r6 | r0 = r6;
0x00001f70 str sb, [sp, 0x20] | var_20h = sb;
0x00001f74 bl 0xdf0 | strcpy (r0, r1);
0x00001f78 add r3, sp, 0x20 | r3 += var_20h;
0x00001f7c str r3, [sp] | *(sp) = r3;
0x00001f80 mov r2, 0x40 | r2 = 0x40;
0x00001f84 mov r3, r6 | r3 = r6;
0x00001f88 mov r1, 0 | r1 = 0;
0x00001f8c mov r0, r5 | r0 = r5;
0x00001f90 bl 0xeb0 | r0 = getsockopt ();
0x00001f94 cmp r0, 0 |
0x00001f98 bge 0x1fa8 |
| while (1) {
| label_2:
0x00001f9c mov r0, r5 | r0 = r5;
0x00001fa0 bl 0xef8 | close (r0);
0x00001fa4 b 0x1efc | goto label_0;
0x00001fa8 mov r0, 0x80 | r0 = 0x80;
0x00001fac bl 0xe38 | r0 = malloc (r0);
0x00001fb0 subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 != r0) {
0x00001fb4 bne 0x1fc8 | goto label_14;
| }
0x00001fb8 bl 0xed4 | errno_location ();
0x00001fbc mov r3, 0xc | r3 = 0xc;
0x00001fc0 str r3, [r0] | *(r0) = r3;
0x00001fc4 b 0x1f9c |
| }
| label_14:
0x00001fc8 mov r2, 0x7c | r2 = 0x7c;
0x00001fcc mov r1, 0 | r1 = 0;
0x00001fd0 add fp, r4, 8 |
0x00001fd4 add r8, r4, 0x28 | r8 = r4 + 0x28;
0x00001fd8 bl 0xe98 | memset (r0, r1, r2);
0x00001fdc mov r1, r6 | r1 = r6;
0x00001fe0 str fp, [r4, 8] | *((r4 + 8)) = fp;
0x00001fe4 str fp, [r4, 0xc] | *((r4 + 0xc)) = fp;
0x00001fe8 mov r0, r8 | r0 = r8;
0x00001fec bl 0xdf0 | strcpy (r0, r1);
0x00001ff0 ldr r0, [sp, 0x7c] | r0 = size;
0x00001ff4 add r0, r0, 0x28 | r0 += 0x28;
0x00001ff8 bl 0xe38 | r0 = malloc (r0);
0x00001ffc cmp r0, 0 |
0x00002000 mov sl, r0 | sl = r0;
0x00002004 str r0, [r4, 0x7c] | *((r4 + 0x7c)) = r0;
| if (r0 == 0) {
0x00002008 beq 0x2078 | goto label_15;
| }
0x0000200c mov r1, r6 | r1 = r6;
0x00002010 bl 0xdf0 | strcpy (r0, r1);
0x00002014 mov r2, sb | r2 = sb;
0x00002018 mov r1, r6 | r1 = r6;
0x0000201c str r5, [r4] | *(r4) = r5;
0x00002020 mov r0, r8 | r0 = r8;
0x00002024 bl 0xe20 | memcpy (r0, r1, r2);
0x00002028 ldr r3, [r4, 0x78] | r3 = *((r4 + 0x78));
0x0000202c add r2, sp, 0x80 | r2 += var_80h;
0x00002030 str r3, [sl, 0x20] | *((sl + 0x20)) = r3;
0x00002034 add r3, r3, 0x28 | r3 += 0x28;
0x00002038 str r3, [r2, -0x64]! | *((r2 -= 0x64)) = r3;
0x0000203c mov r1, 0 | r1 = 0;
0x00002040 str r2, [sp] | *(sp) = r2;
0x00002044 mov r3, sl | r3 = sl;
0x00002048 mov r2, 0x41 | r2 = 0x41;
0x0000204c mov r0, r5 | r0 = r5;
0x00002050 bl 0xeb0 | r0 = getsockopt ();
0x00002054 cmp r0, 0 |
| if (r0 >= 0) {
0x00002058 bge 0x2084 | goto label_16;
| }
| label_3:
0x0000205c mov r0, r4 | r0 = r4;
0x00002060 bl 0xe5c | fcn_00000e5c ();
0x00002064 bl 0xed4 | r0 = errno_location ();
0x00002068 ldr r3, [r0] | r3 = *(r0);
0x0000206c cmp r3, 0xb |
| if (r3 == 0xb) {
0x00002070 beq 0x1ed4 | goto label_1;
| }
0x00002074 b 0x1efc | goto label_0;
| label_15:
0x00002078 mov r0, r4 | r0 = r4;
0x0000207c bl 0xf10 | free (r0);
0x00002080 b 0x1f9c | goto label_2;
| label_16:
0x00002084 ldr sb, [pc, 0x2e4] | sb = *(0x00002370);
0x00002088 mov r6, 0 | r6 = 0;
0x0000208c mov r3, 1 | r3 = 1;
0x00002090 add sb, pc, sb | sb = pc + sb;
0x00002094 str r6, [sp, 0x24] | var_24h = r6;
0x00002098 str r3, [r4, 0x24] | *((r4 + 0x24)) = r3;
| do {
0x0000209c ldr r5, [r4, 0x7c] | r5 = *((r4 + 0x7c));
0x000020a0 ldr r2, [r5, 0x20] | r2 = *((r5 + 0x20));
0x000020a4 cmp r6, r2 |
| if (r6 >= r2) {
0x000020a8 bhs 0x2134 | goto label_8;
| }
0x000020ac add r5, r5, 0x28 | r5 += 0x28;
0x000020b0 add r8, r5, r6 | r8 = r5 + r6;
0x000020b4 ldrh r3, [r8, 0x5a] | r3 = *((r8 + 0x5a));
0x000020b8 add r3, r3, r6 | r3 += r6;
0x000020bc cmp r2, r3 |
| if (r2 != r3) {
0x000020c0 bne 0x20f0 | goto label_17;
| }
0x000020c4 ldr r1, [sp, 0x24] | r1 = var_24h;
0x000020c8 add r0, r4, 0x10 | r0 = r4 + 0x10;
0x000020cc bl 0x1b08 | fcn_00001b08 (r0, r1);
0x000020d0 mov r3, 0 | r3 = 0;
0x000020d4 str r3, [r4, 0x10] | *((r4 + 0x10)) = r3;
| label_4:
0x000020d8 ldr r3, [sp, 0x24] | r3 = var_24h;
0x000020dc add r3, r3, 1 | r3++;
0x000020e0 str r3, [sp, 0x24] | var_24h = r3;
0x000020e4 ldrh r3, [r8, 0x5a] | r3 = *((r8 + 0x5a));
0x000020e8 add r6, r6, r3 | r6 += r3;
0x000020ec b 0x209c |
| } while (1);
| label_17:
0x000020f0 ldrh sl, [r8, 0x58] | sl = *((r8 + 0x58));
0x000020f4 ldr r1, [sp, 0x14] | r1 = s2;
0x000020f8 add sl, r8, sl | sl = r8 + sl;
0x000020fc add r0, sl, 2 | r0 = sl + 2;
0x00002100 bl 0xea4 | r0 = strcmp (r0, r1);
0x00002104 subs r1, r0, 0 | r1 = r0 - 0;
| if (r1 == r0) {
0x00002108 ldrne r1, [r4, 0x48] | r1 = *((r4 + 0x48));
| }
| if (r1 == r0) {
0x0000210c movne r3, 0 | r3 = 0;
| }
| if (r1 == r0) {
0x00002110 movne r0, 1 | r0 = 1;
| }
| if (r1 != r0) {
0x00002114 bne 0x2188 | goto label_6;
| }
0x00002118 add r0, sl, 0x20 | r0 = sl + 0x20;
0x0000211c bl 0x1530 | r0 = fcn_00001530 (r0, r1);
0x00002120 subs r1, r0, 0 | r1 = r0 - 0;
| if (r1 != r0) {
0x00002124 bne 0x2168 | goto label_18;
| }
| label_5:
0x00002128 bl 0xed4 | errno_location ();
0x0000212c mvn r3, 0xb | r3 = ~0xb;
| label_7:
0x00002130 str r3, [r0] | *(r0) = r3;
| label_8:
0x00002134 mov r0, r4 | r0 = r4;
0x00002138 bl 0x127c | r0 = fcn_0000127c (r0);
0x0000213c cmp r0, 0 |
| if (r0 < 0) {
0x00002140 blt 0x205c | goto label_3;
| }
0x00002144 mov r0, r4 | r0 = r4;
0x00002148 bl 0x10ac | fcn_000010ac (r0);
0x0000214c ldr r6, [r4, 8] | r6 = *((r4 + 8));
0x00002150 add sl, sp, 0x28 | sl += var_28h;
| label_9:
0x00002154 cmp fp, r6 |
| if (fp != r6) {
0x00002158 bne 0x22b0 | goto label_19;
| }
| label_13:
0x0000215c mov r0, r4 | r0 = r4;
0x00002160 add sp, sp, 0x84 |
0x00002164 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_18:
0x00002168 ldr r3, [r4, 0x18] | r3 = *((r4 + 0x18));
0x0000216c mov r2, r6 | r2 = r6;
0x00002170 add r3, r3, 1 | r3++;
0x00002174 str r3, [r4, 0x18] | *((r4 + 0x18)) = r3;
0x00002178 mov r0, r4 | r0 = r4;
0x0000217c add r3, sp, 0x24 | r3 += var_24h;
0x00002180 bl 0x1e10 | fcn_00001e10 (r0, r1);
0x00002184 b 0x20d8 | goto label_4;
| label_6:
0x00002188 ands r2, r1, r0, lsl r3 | r2 = r1 & (r0 << r3);
0x0000218c add sl, r3, 1 | sl = r3 + 1;
| if (r2 == r1) {
0x00002190 beq 0x21d4 | goto label_20;
| }
0x00002194 add r2, r4, r3, lsl 2 | r2 = r4 + (r3 << 2);
0x00002198 ldr r2, [r2, 0x4c] | r2 = *((r2 + 0x4c));
0x0000219c add r2, r5, r2 | r2 = r5 + r2;
0x000021a0 cmp r8, r2 |
| if (r8 != r2) {
0x000021a4 bne 0x21d4 | goto label_20;
| }
0x000021a8 mov r1, sl | r1 = sl;
0x000021ac ldr r0, [sb, r3, lsl 2] | offset_0 = r3 << 2;
| r0 = *((sb + offset_0));
0x000021b0 bl 0x1530 | r0 = fcn_00001530 (r0, r1);
0x000021b4 subs r1, r0, 0 | r1 = r0 - 0;
| if (r1 == r0) {
0x000021b8 beq 0x2128 | goto label_5;
| }
0x000021bc str sl, [r1, 0x28] | *((r1 + 0x28)) = sl;
0x000021c0 add r3, sp, 0x24 | r3 += var_24h;
0x000021c4 mov r2, r6 | r2 = r6;
0x000021c8 mov r0, r4 | r0 = r4;
0x000021cc bl 0x1e10 | fcn_00001e10 (r0, r1);
0x000021d0 b 0x21e0 | goto label_21;
| label_20:
0x000021d4 cmp sl, 5 |
0x000021d8 mov r3, sl | r3 = sl;
| if (sl != 5) {
0x000021dc bne 0x2188 | goto label_6;
| }
| label_21:
0x000021e0 ldrh r1, [r8, 0x5a] | r1 = *((r8 + 0x5a));
0x000021e4 ldr r0, [r4, 0x10] | r0 = *((r4 + 0x10));
0x000021e8 bl 0x1244 | r0 = fcn_00001244 (r0, r1);
0x000021ec subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 == r0) {
0x000021f0 bne 0x2200 |
0x000021f4 bl 0xed4 | errno_location ();
0x000021f8 mov r3, 0xc | r3 = 0xc;
0x000021fc b 0x2130 | goto label_7;
| }
0x00002200 ldr sl, [sp, 0x24] | sl = var_24h;
0x00002204 ldrh r2, [r8, 0x5a] | r2 = *((r8 + 0x5a));
0x00002208 mov r1, r8 | r1 = r8;
0x0000220c str sl, [r5, 0x14] | *((r5 + 0x14)) = sl;
0x00002210 str r6, [r5, 0x18] | *((r5 + 0x18)) = r6;
0x00002214 add r0, r5, 0x28 | r0 = r5 + 0x28;
0x00002218 bl 0xe20 | memcpy (r0, r1, r2);
0x0000221c ldrh r0, [r8, 0x58] | r0 = *((r8 + 0x58));
0x00002220 mov r3, 1 | r3 = 1;
0x00002224 add r2, r8, r0 | r2 = r8 + r0;
0x00002228 str r3, [r5, 0xc] | *((r5 + 0xc)) = r3;
0x0000222c str sl, [r5, 0x10] | *((r5 + 0x10)) = sl;
0x00002230 ldrb r1, [r2, 2] | r1 = *((r2 + 2));
0x00002234 cmp r1, 0 |
| if (r1 == 0) {
0x00002238 bne 0x2284 |
0x0000223c ldrh r3, [r8, r0] | r3 = *((r8 + r0));
0x00002240 cmp r3, 0x28 |
| if (r3 != 0x28) {
0x00002244 beq 0x2260 |
0x00002248 bl 0xed4 | errno_location ();
0x0000224c mov r3, 0x16 | r3 = 0x16;
0x00002250 str r3, [r0] | *(r0) = r3;
0x00002254 mov r0, r5 | r0 = r5;
0x00002258 bl 0xf10 | free (r0);
0x0000225c b 0x2134 | goto label_8;
| }
0x00002260 ldr r2, [r2, 0x20] | r2 = *((r2 + 0x20));
0x00002264 cmp r2, 0 |
| if (r2 >= 0) {
0x00002268 strlt r1, [r5, 0x1c] | *((r5 + 0x1c)) = r1;
| }
| if (r2 < 0) {
0x0000226c blt 0x2288 | goto label_22;
| }
0x00002270 ldrh r3, [r8, 0x5a] | r3 = *((r8 + 0x5a));
0x00002274 add r3, r3, r6 | r3 += r6;
0x00002278 cmp r2, r3 |
| if (r2 != r3) {
0x0000227c moveq r3, 2 | r3 = 2;
| }
| if (r2 != r3) {
0x00002280 movne r3, 3 | r3 = 3;
| goto label_23;
| }
| }
| label_23:
0x00002284 str r3, [r5, 0x1c] | *((r5 + 0x1c)) = r3;
| label_22:
0x00002288 ldr r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x0000228c ldr r2, [r3, 0x58] | r2 = *((r3 + 0x58));
0x00002290 add r1, r3, 0x54 | r1 = r3 + 0x54;
0x00002294 str r5, [r3, 0x58] | *((r3 + 0x58)) = r5;
0x00002298 stm r5, {r1, r2} | *(r5) = r1;
| *((r5 + 4)) = r2;
0x0000229c str r5, [r2] | *(r2) = r5;
0x000022a0 ldr r2, [r3, 0x50] | r2 = *((r3 + 0x50));
0x000022a4 add r2, r2, 1 | r2++;
0x000022a8 str r2, [r3, 0x50] | *((r3 + 0x50)) = r2;
0x000022ac b 0x20d8 | goto label_4;
| label_19:
0x000022b0 mov r8, r6 | r8 = r6;
0x000022b4 ldr r5, [r8, 0x54]! | r5 = *((r8 += 0x54));
| label_11:
0x000022b8 cmp r5, r8 |
| if (r5 == r8) {
0x000022bc ldreq r6, [r6] | r6 = *(r6);
| goto label_24;
| }
| if (r5 == r8) {
| label_24:
0x000022c0 beq 0x2154 | goto label_9;
| }
0x000022c4 ldr r3, [r5, 0x1c] | r3 = *((r5 + 0x1c));
0x000022c8 cmp r3, 3 |
| if (r3 != 3) {
0x000022cc bne 0x2350 | goto label_25;
| }
0x000022d0 ldrh r3, [r5, 0x80] | r3 = *((r5 + 0x80));
0x000022d4 ldr r0, [r4, 8] | r0 = *((r4 + 8));
0x000022d8 add r3, r5, r3 | r3 = r5 + r3;
0x000022dc cmp fp, r0 |
0x000022e0 ldr sb, [r3, 0x48] | sb = *((r3 + 0x48));
| if (fp == r0) {
0x000022e4 beq 0x205c | goto label_3;
| }
0x000022e8 ldr r3, [r4, 0x24] | r3 = *((r4 + 0x24));
0x000022ec cmp r3, 0 |
| if (r3 != 0) {
0x000022f0 beq 0x2310 |
0x000022f4 mov r3, 1 | r3 = 1;
0x000022f8 str r3, [sp] | *(sp) = r3;
0x000022fc mov r2, sl | r2 = sl;
0x00002300 mov r3, r4 | r3 = r4;
0x00002304 mov r1, sb | r1 = sb;
0x00002308 mov r0, 0 | r0 = 0;
0x0000230c bl 0x140c | fcn_0000140c (r0, r1, r2);
| }
0x00002310 ldr r2, [r0, 4] | r2 = *((r0 + 4));
0x00002314 ldr r3, [r2] | r3 = *(r2);
| label_10:
0x00002318 cmp r2, r3 |
| if (r2 == r3) {
0x0000231c beq 0x205c | goto label_3;
| }
0x00002320 ldr r1, [r3, 0x60] | r1 = *((r3 + 0x60));
0x00002324 cmp sb, r1 |
| if (sb > r1) {
0x00002328 blo 0x2338 |
0x0000232c ldr r1, [r3, 0x68] | r1 = *((r3 + 0x68));
0x00002330 cmp sb, r1 |
| if (sb < r1) {
0x00002334 bls 0x2340 | goto label_26;
| }
| }
0x00002338 ldr r3, [r3] | r3 = *(r3);
0x0000233c b 0x2318 | goto label_10;
| label_26:
0x00002340 ldr r2, [r3, 0x2c] | r2 = *((r3 + 0x2c));
0x00002344 str r3, [r5, 0x20] | *((r5 + 0x20)) = r3;
0x00002348 add r2, r2, 1 | r2++;
0x0000234c str r2, [r3, 0x2c] | *((r3 + 0x2c)) = r2;
| label_25:
0x00002350 ldr r5, [r5] | r5 = *(r5);
0x00002354 b 0x22b8 | goto label_11;
| }
[*] Function fprintf used 5 times libip4tc.so.0.1.0