[*] Binary protection state of libxtables.so.12.4.0
Full RELRO Canary found NX enabled DSO No RPATH No RUNPATH No Symbols
[*] Function popen tear down of libxtables.so.12.4.0
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/lib/libxtables.so.12.4.0 @ 0x58a0 */
| #include <stdint.h>
|
; (fcn) fcn.000058a0 () | void fcn_000058a0 (int16_t arg1) {
| int16_t var_0h_2;
| int16_t var_8h;
| int16_t var_ch;
| int16_t var_0h;
| int16_t var_4h;
| r0 = arg1;
0x000058a0 invalid |
0x000058a4 movs r2, 0 | r2 = 0;
0x000058a6 push {r4, lr} |
0x000058a8 sub sp, 8 |
0x000058aa ldr r4, [pc, 0x68] |
0x000058ac mov r1, r0 | r1 = r0;
0x000058ae add ip, pc |
0x000058b0 mov r3, sp | r3 = sp;
0x000058b2 mov r0, r2 | r0 = r2;
0x000058b4 ldr.w r4, [ip, r4] | r4 = *((ip + r4));
0x000058b8 ldr r4, [r4] | r4 = *(0x5916);
0x000058ba str r4, [sp, 4] | var_4h = r4;
0x000058bc mov.w r4, 0 | r4 = 0;
0x000058c0 str r2, [sp] | *(sp) = r2;
0x000058c2 blx 0x2654 | r0 = fcn_00002654 ();
| if (r0 != 0) {
0x000058c6 cbnz r0, 0x5906 | goto label_0;
| }
0x000058c8 ldr r0, [sp] | r0 = *(sp);
| if (r0 == 0) {
0x000058ca cbz r0, 0x5902 | goto label_1;
| }
0x000058cc mov r3, r0 | r3 = r0;
0x000058ce b 0x58d8 |
| while (r2 != 0xa) {
0x000058d0 cmp r2, 2 |
| if (r2 == 2) {
0x000058d2 beq 0x58de | goto label_2;
| }
0x000058d4 ldr r3, [r3, 0x1c] | r3 = *((r3 + 0x1c));
| if (r3 == 0) {
0x000058d6 cbz r3, 0x5902 | goto label_1;
| }
0x000058d8 ldr r2, [r3, 4] | r2 = *((r3 + 4));
0x000058da cmp r2, 0xa |
0x000058dc bne 0x58d0 |
| }
| label_2:
0x000058de ldr r3, [r3, 0x14] | r3 = *((r3 + 0x14));
0x000058e0 ldrh r4, [r3, 2] | r4 = *((r3 + 2));
0x000058e2 blx 0x2648 | fcn_00002648 ();
0x000058e6 rev16 r0, r4 | __asm ("rev16 r0, r4");
0x000058e8 uxth r0, r0 | r0 = (int16_t) r0;
| do {
0x000058ea ldr r2, [pc, 0x2c] |
0x000058ec ldr r3, [pc, 0x24] | r3 = *(0x5914);
0x000058ee add r2, pc | r2 = 0xb20c;
0x000058f0 ldr r3, [r2, r3] | r3 = *(0xb20c);
0x000058f2 ldr r2, [r3] | r2 = *(0xb20c);
0x000058f4 ldr r3, [sp, 4] | r3 = var_4h;
0x000058f6 eors r2, r3 | r2 ^= r3;
0x000058f8 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x000058fc bne 0x590c | goto label_3;
| }
0x000058fe add sp, 8 |
0x00005900 pop {r4, pc} |
| label_1:
0x00005902 blx 0x2648 | fcn_00002648 ();
| label_0:
0x00005906 mov.w r0, -1 | r0 = -1;
0x0000590a b 0x58ea |
| } while (1);
| label_3:
0x0000590c blx 0x2320 | fcn_00002320 ();
0x00005910 adds r5, 0x46 | r5 += 0x46;
0x00005912 movs r1, r0 | r1 = r0;
0x00005914 lsls r4, r1, 7 | r4 = r1 << 7;
0x00005916 movs r0, r0 |
0x00005918 adds r5, 6 | r5 += 6;
0x0000591a movs r1, r0 | r1 = r0;
0x0000591c ldr r2, [pc, 0x13c] |
0x0000591e ldr r3, [pc, 0x140] | r3 = *(0x5a62);
0x00005920 push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00005924 mov r4, r0 | r4 = r0;
0x00005926 add r2, pc | r2 = 0xb386;
0x00005928 ldr.w sl, [pc, 0x138] | sl = *(0x00005a64);
0x0000592c sub sp, 0x14 |
0x0000592e ldr r3, [r2, r3] |
0x00005930 ldr r0, [r0] | r0 = *(r0);
0x00005932 add sl, pc | sl += pc;
0x00005934 ldr.w r8, [r4, 8] | r8 = *((r4 + 8));
0x00005938 ldr r3, [r3] | r3 = *(0xb386);
0x0000593a str r3, [sp, 0xc] | var_ch = r3;
0x0000593c mov.w r3, 0 | r3 = 0;
0x00005940 blx 0x2314 | fcn_00002314 ();
0x00005944 str r0, [sp, 8] | var_8h = r0;
0x00005946 cmp r0, 0 |
| if (r0 == 0) {
0x00005948 beq 0x5a46 | goto label_4;
| }
0x0000594a ldr.w r3, [r8, 0x1c] | r3 = *((r8 + 0x1c));
0x0000594e mov sb, r0 | sb = r0;
0x00005950 cmp r3, 1 |
0x00005952 ite hi |
| if (r3 <= 1) {
0x00005954 lsrhi r7, r3, 1 | r7 = r3 >> 1;
| }
| if (r3 > 1) {
0x00005956 movls r7, 2 | r7 = 2;
| }
0x00005958 ands r3, r3, 1 | r3 &= 1;
| if (r3 != r3) {
0x0000595c bne 0x5a30 | goto label_5;
| }
0x0000595e ldr r6, [pc, 0x108] |
0x00005960 add r5, sp, 8 | r5 += var_8h;
0x00005962 strb r3, [r4, 0x15] | *((r4 + 0x15)) = r3;
0x00005964 movs r3, 0 |
0x00005966 movt r3, 0xffff | r3 = 0x-10000;
0x0000596a add r6, pc | r6 = 0xb3d8;
0x0000596c str r3, [r4, 0x18] | *((r4 + 0x18)) = r3;
0x0000596e b 0x59a2 |
| while (r0 != 0) {
0x00005970 cmp r3, r7 |
| if (r3 == r7) {
0x00005972 beq 0x5a02 | goto label_6;
| }
0x00005974 ldrb.w r2, [fp] | r2 = *(fp);
| if (r2 != 0) {
0x00005978 cbz r2, 0x599c |
0x0000597a bl 0x58a0 | r0 = fcn_000058a0 (r0);
0x0000597e cmp r0, 0 |
| if (r0 < 0) {
0x00005980 blt 0x5a1c | goto label_7;
| }
0x00005982 ldr.w r3, [r8, 0x14] | r3 = *((r8 + 0x14));
0x00005986 lsls r2, r3, 0x1b | r2 = r3 << 0x1b;
| if (r2 < r3) {
0x00005988 bpl 0x598e |
0x0000598a rev16 r0, r0 | __asm ("rev16 r0, r0");
0x0000598c uxth r0, r0 | r0 = (int16_t) r0;
| }
0x0000598e ldrb r3, [r4, 0x15] | r3 = *((r4 + 0x15));
0x00005990 cmp r3, 1 |
0x00005992 itt ls |
| if (r3 > 1) {
0x00005994 addls r2, r3, 0xc | r2 = r3 + 0xc;
| }
| if (r3 > 1) {
0x00005998 strh.w r0, [r4, r2, lsl 1] | offset_0 = r2 << 1;
| *((r4 + offset_0)) = r0;
| goto label_8;
| }
| }
| label_8:
0x0000599c adds r3, 1 | r3++;
0x0000599e uxtb r3, r3 | r3 = (int8_t) r3;
0x000059a0 strb r3, [r4, 0x15] | *((r4 + 0x15)) = r3;
0x000059a2 mov r1, r6 | r1 = r6;
0x000059a4 mov r0, r5 | r0 = r5;
0x000059a6 blx 0x2424 | loc_imp_gmon_start_ ();
0x000059aa ldrb r3, [r4, 0x15] | r3 = *((r4 + 0x15));
0x000059ac mov fp, r0 |
0x000059ae cmp r0, 0 |
0x000059b0 bne 0x5970 |
| }
0x000059b2 cmp r3, 1 |
0x000059b4 itttt eq |
| if (r3 == 1) {
0x000059b6 ldrheq r3, [r4, 0x18] | __asm ("ldrheq r3, [r4, 0x18]");
| }
| if (r3 == 1) {
0x000059b8 strheq r3, [r4, 0x1a] | __asm ("strheq r3, [r4, 0x1a]");
| }
| if (r3 != 1) {
0x000059ba moveq r3, 2 | r3 = 2;
| }
| if (r3 != 1) {
0x000059bc strbeq r3, [r4, 0x15] | *((r4 + 0x15)) = r3;
| }
0x000059be ldr.w r3, [r8, 0x14] | r3 = *((r8 + 0x14));
0x000059c2 lsls r3, r3, 0x1c | r3 <<= 0x1c;
0x000059c4 bmi 0x59e6 |
| while (1) {
0x000059c6 ldr r2, [pc, 0xa4] |
0x000059c8 ldr r3, [pc, 0x94] | r3 = *(0x5a60);
0x000059ca add r2, pc | r2 = 0xb43c;
0x000059cc ldr r3, [r2, r3] | r3 = *(0xb43c);
0x000059ce ldr r2, [r3] | r2 = *(0xb43c);
0x000059d0 ldr r3, [sp, 0xc] | r3 = var_ch;
0x000059d2 eors r2, r3 | r2 ^= r3;
0x000059d4 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x000059d8 bne 0x5a58 | goto label_9;
| }
0x000059da mov r0, sb | r0 = sb;
0x000059dc add sp, 0x14 |
0x000059de pop.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x000059e2 b.w 0x224c | void (*0x224c)() ();
0x000059e6 ldrd r3, r0, [r4, 8] | __asm ("ldrd r3, r0, [r4, 8]");
0x000059ea add.w r1, r4, 0x18 | r1 = r4 + 0x18;
0x000059ee ldrb r2, [r4, 0x15] | r2 = *((r4 + 0x15));
0x000059f0 ldr r3, [r3, 0x18] | r3 = *((r3 + 0x18));
0x000059f2 cmp r2, r7 |
0x000059f4 it hs |
| if (r2 < r7) {
0x000059f6 movhs r2, r7 | r2 = r7;
| }
0x000059f8 lsls r2, r2, 1 | r2 <<= 1;
0x000059fa add r0, r3 | r0 += r3;
0x000059fc blx 0x22b4 | fcn_000022b4 ();
0x00005a00 b 0x59c6 |
| }
| label_6:
0x00005a02 ldr r1, [pc, 0x6c] | r1 = *(0x5a72);
0x00005a04 ldr r2, [r4, 4] | r2 = *((r4 + 4));
0x00005a06 ldr.w r3, [r8] | r3 = *(r8);
0x00005a0a ldr.w r0, [sl, r1] | r0 = *((sl + r1));
0x00005a0e str r7, [sp] | *(sp) = r7;
0x00005a10 ldr r1, [pc, 0x60] |
0x00005a12 ldr r0, [r0] | r0 = *(r0);
0x00005a14 add r1, pc | r1 = 0xb48c;
0x00005a16 ldr r4, [r0, 0x14] | r4 = *((r0 + 0x14));
0x00005a18 movs r0, 2 | r0 = 2;
0x00005a1a blx r4 | uint32_t (*r4)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
| label_7:
0x00005a1c ldr r3, [pc, 0x50] |
0x00005a1e mov r2, fp | r2 = fp;
0x00005a20 ldr r1, [pc, 0x54] |
0x00005a22 movs r0, 2 | r0 = 2;
0x00005a24 ldr.w r3, [sl, r3] | r3 = *((sl + r3));
0x00005a28 add r1, pc | r1 = 0xb4a4;
0x00005a2a ldr r3, [r3] |
0x00005a2c ldr r3, [r3, 0x14] | r3 = *(0x5a84);
0x00005a2e blx r3 | uint32_t (*r3)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
| label_5:
0x00005a30 ldr r3, [pc, 0x3c] |
0x00005a32 movs r0, 1 | r0 = 1;
0x00005a34 ldr r2, [pc, 0x44] |
0x00005a36 ldr r1, [pc, 0x48] |
0x00005a38 ldr.w r3, [sl, r3] | r3 = *((sl + r3));
0x00005a3c add r2, pc | r2 = 0xb4bc;
0x00005a3e add r1, pc | r1 = 0xb4c4;
0x00005a40 ldr r3, [r3] |
0x00005a42 ldr r3, [r3, 0x14] | r3 = *(0x5a84);
0x00005a44 blx r3 | uint32_t (*r3)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
| label_4:
0x00005a46 ldr r3, [pc, 0x28] |
0x00005a48 movs r0, 4 | r0 = 4;
0x00005a4a ldr r1, [pc, 0x38] |
0x00005a4c ldr.w r3, [sl, r3] | r3 = *((sl + r3));
0x00005a50 add r1, pc | r1 = 0xb4da;
0x00005a52 ldr r3, [r3] |
0x00005a54 ldr r3, [r3, 0x14] | r3 = *(0x5a86);
0x00005a56 blx r3 | r0 = uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r1, r3);
| label_9:
0x00005a58 blx 0x2320 | fcn_00002320 ();
0x00005a5c adds r4, 0xce | r4 += 0xce;
0x00005a5e movs r1, r0 | r1 = r0;
0x00005a60 lsls r4, r1, 7 | r4 = r1 << 7;
0x00005a62 movs r0, r0 |
0x00005a64 adds r4, 0xc2 | r4 += 0xc2;
0x00005a66 movs r1, r0 | r1 = r0;
0x00005a68 movs r6, 0xae | r6 = 0xae;
0x00005a6a movs r0, r0 |
0x00005a6c adds r4, 0x2a | r4 += 0x2a;
0x00005a6e movs r1, r0 | r1 = r0;
0x00005a70 lsls r0, r0, 7 | r0 <<= 7;
0x00005a72 movs r0, r0 |
0x00005a74 movs r5, 0xa0 | r5 = 0xa0;
0x00005a76 movs r0, r0 |
0x00005a78 movs r5, 0xc4 | r5 = 0xc4;
0x00005a7a movs r0, r0 |
0x00005a7c cmp r2, 0x78 |
0x00005a7e movs r0, r0 |
0x00005a80 movs r5, 0x4a | r5 = 0x4a;
0x00005a82 movs r0, r0 |
0x00005a84 movs r5, 0x30 | r5 = 0x30;
0x00005a86 movs r0, r0 |
0x00005a88 push {r4, r5, r6, lr} |
0x00005a8a mov r4, r0 | r4 = r0;
0x00005a8c ldr r5, [pc, 0x3c] |
0x00005a8e ldr r0, [r0] | r0 = *(r0);
0x00005a90 ldr r6, [r4, 8] | r6 = *((r4 + 8));
0x00005a92 add r5, pc | r5 = 0xb562;
0x00005a94 bl 0x58a0 | r0 = fcn_000058a0 (r0);
0x00005a98 subs r3, r0, 0 | r3 = r0 - 0;
| if (r3 >= r0) {
0x00005a9a blt 0x5ab8 |
0x00005a9c ldr r2, [r6, 0x14] | r2 = *((r6 + 0x14));
0x00005a9e uxth r3, r3 | r3 = (int16_t) r3;
0x00005aa0 lsls r1, r2, 0x1b | r1 = r2 << 0x1b;
| if (r1 < r2) {
0x00005aa2 bpl 0x5aa8 |
0x00005aa4 rev16 r3, r3 | __asm ("rev16 r3, r3");
0x00005aa6 uxth r3, r3 | r3 = (int16_t) r3;
| }
0x00005aa8 lsls r2, r2, 0x1c | r2 <<= 0x1c;
0x00005aaa strh r3, [r4, 0x18] | *((r4 + 0x18)) = r3;
0x00005aac ittt mi |
| if (r2 < r2) {
0x00005aae ldrdmi r2, r1, [r4, 8] | __asm ("ldrdmi r2, r1, [r4, 8]");
| }
| if (r2 >= r2) {
0x00005ab2 ldrmi r2, [r2, 0x18] | r2 = *((r2 + 0x18));
| }
| if (r2 < r2) {
0x00005ab4 strh r3, [r1, r2] | *((r1 + r2)) = r3;
| }
0x00005ab6 pop {r4, r5, r6, pc} |
| }
0x00005ab8 ldr r3, [pc, 0x14] |
0x00005aba movs r0, 2 | r0 = 2;
0x00005abc ldr r1, [pc, 0x14] |
0x00005abe ldr r2, [r4] | r2 = *(r4);
0x00005ac0 ldr r3, [r5, r3] | r3 = *((r5 + r3));
0x00005ac2 add r1, pc | r1 = 0xb59a;
0x00005ac4 ldr r3, [r3] |
0x00005ac6 ldr r3, [r3, 0x14] | r3 = *(0x5ae4);
0x00005ac8 blx r3 | uint32_t (*r3)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x00005aca nop |
0x00005acc adds r3, 0x62 | r3 += 0x62;
0x00005ace movs r1, r0 | r1 = r0;
0x00005ad0 lsls r0, r0, 7 | r0 <<= 7;
0x00005ad2 movs r0, r0 |
0x00005ad4 movs r5, 0x2a | r5 = 0x2a;
0x00005ad6 movs r0, r0 |
0x00005ad8 push {r4, lr} |
0x00005ada mov r4, r0 | r4 = r0;
0x00005adc ldr r0, [r0] | r0 = *(r0);
0x00005ade blx 0x21a8 | fcn_000021a8 ();
0x00005ae2 ldr r3, [r4, 8] | r3 = *((r4 + 8));
0x00005ae4 uxtb r0, r0 | r0 = (int8_t) r0;
0x00005ae6 strb r0, [r4, 0x18] | *((r4 + 0x18)) = r0;
0x00005ae8 ldr r2, [r3, 0x14] | r2 = *(0x5af8);
0x00005aea lsls r2, r2, 0x1c | r2 <<= 0x1c;
0x00005aec ittt mi |
| if (r2 >= r2) {
0x00005aee ldrmi r2, [r4, 0xc] | r2 = *((r4 + 0xc));
| }
| if (r2 >= r2) {
0x00005af0 ldrmi r3, [r3, 0x18] | r3 = *((r3 + 0x18));
| }
| if (r2 >= r2) {
0x00005af2 strbmi r0, [r2, r3] | *((r2 + r3)) = r0;
| }
0x00005af4 pop {r4, pc} |
| }
[*] Function popen used 1 times libxtables.so.12.4.0