[*] Binary protection state of libxtables.so.12.4.0
Full RELRO Canary found NX enabled DSO No RPATH No RUNPATH No Symbols
[*] Function fprintf 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 @ 0x3404 */
| #include <stdint.h>
|
; (fcn) fcn.00003404 () | void fcn_00003404 (int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| int16_t var_0h;
| int16_t var_1ch;
| int16_t var_20h;
| int16_t var_24h;
| int16_t var_28h;
| int16_t var_2ch;
| int16_t var_30h;
| int16_t var_98h;
| int16_t var_a4h;
| int16_t var_1a4h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x00003404 svcmi 0xf0e92d | __asm ("svcmi aav.0x000000ff");
0x00003408 sub sp, 0x1ac |
0x0000340a str r3, [sp, 0x2c] | var_2ch = r3;
0x0000340c mov r7, r2 | r7 = r2;
0x0000340e mov r4, r0 | r4 = r0;
0x00003410 add.w sb, sp, 0x98 | sb += var_98h;
0x00003414 ldr r3, [pc, 0x164] |
0x00003416 mov fp, r7 |
0x00003418 ldr r2, [pc, 0x164] |
0x0000341a str r1, [sp, 0x20] | var_20h = r1;
0x0000341c add r3, pc | r3 = 0x699c;
0x0000341e str r3, [sp, 0x24] | var_24h = r3;
0x00003420 mov r0, r3 | r0 = r3;
0x00003422 ldr r3, [pc, 0x160] | r3 = *(0x3586);
0x00003424 add r2, pc | r2 = 0x69a8;
0x00003426 ldr r3, [r2, r3] |
0x00003428 ldr r3, [r3] | r3 = *(0x69a8);
0x0000342a str r3, [sp, 0x1a4] | var_1a4h = r3;
0x0000342c mov.w r3, 0 | r3 = 0;
0x00003430 ldr r3, [pc, 0x154] |
0x00003432 str.w r1, [sb] | __asm ("str.w r1, [sb]");
0x00003436 add r3, pc | r3 = 0x69c2;
0x00003438 str r3, [sp, 0x1c] | var_1ch = r3;
0x0000343a ldr r3, [pc, 0x150] |
0x0000343c add r3, pc | r3 = 0x69ce;
0x0000343e str r3, [sp, 0x28] | var_28h = r3;
0x00003440 ldr r3, [pc, 0x14c] |
0x00003442 add r3, pc | r3 = 0x69d6;
0x00003444 str.w r3, [sb, 4] | __asm ("str.w r3, [sb, 4]");
0x00003448 movs r3, 0 | r3 = 0;
0x0000344a str.w r3, [sb, 8] | __asm ("str.w r3, [sb, 8]");
| label_0:
0x0000344e movs r1, 0x3a | r1 = 0x3a;
0x00003450 mov r0, r4 | r0 = r4;
0x00003452 blx 0x2484 | r0 = fcn_00002484 ();
0x00003456 mov r6, r0 | r6 = r0;
0x00003458 cmp r0, 0 |
| if (r0 == 0) {
0x0000345a beq 0x34f6 | goto label_5;
| }
| label_1:
0x0000345c ldr r3, [sp, 0x20] | r3 = var_20h;
| if (r3 == 0) {
0x0000345e cbz r3, 0x34ae | goto label_6;
| }
0x00003460 mov r2, fp | r2 = fp;
0x00003462 subs r7, r6, r4 | r7 = r6 - r4;
0x00003464 mov fp, r6 |
0x00003466 mov r8, sb | r8 = sb;
0x00003468 add r5, sp, 0xa4 | r5 += var_a4h;
0x0000346a add.w sl, sp, 0x30 | sl += var_30h;
0x0000346e mov r6, r2 | r6 = r2;
| do {
0x00003470 strd r3, r6, [sp, 0xc] | __asm ("strd r3, r6, [sp, 0xc]");
0x00003474 movs r2, 1 | r2 = 1;
0x00003476 ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x00003478 mov r0, r5 | r0 = r5;
0x0000347a strd r7, r4, [sp, 4] | __asm ("strd r7, r4, [sp, 4]");
0x0000347e str r3, [sp] | *(sp) = r3;
0x00003480 mov.w r3, 0x100 | r3 = 0x100;
0x00003484 mov r1, r3 | r1 = r3;
0x00003486 blx 0x26c8 | fcn_000026c8 ();
0x0000348a mov r1, sl | r1 = sl;
0x0000348c mov r0, r5 | r0 = r5;
0x0000348e blx 0x2338 | r0 = fcn_00002338 ();
0x00003492 cmp r0, 0 |
| if (r0 == 0) {
0x00003494 beq 0x3500 | goto label_7;
| }
0x00003496 blx 0x24ac | r0 = fcn_000024ac ();
0x0000349a ldr r0, [r0] | r0 = *(r0);
0x0000349c cmp r0, 2 |
| if (r0 != 2) {
0x0000349e bne 0x34bc | goto label_8;
| }
0x000034a0 ldr r3, [r8, 4]! | r3 = *((r8 += 4));
0x000034a4 cmp r3, 0 |
0x000034a6 bne 0x3470 |
| } while (r3 != 0);
0x000034a8 mov r3, r6 | r3 = r6;
0x000034aa mov r6, fp | r6 = fp;
0x000034ac mov fp, r3 |
| label_6:
0x000034ae mov r4, r6 | r4 = r6;
0x000034b0 ldrb r3, [r4], 1 | r3 = *(r4);
| r4++;
0x000034b4 cmp r3, 0 |
| if (r3 != 0) {
0x000034b6 bne 0x344e | goto label_0;
| }
| label_2:
0x000034b8 mov r4, r3 | r4 = r3;
0x000034ba b 0x34da | goto label_3;
| label_8:
0x000034bc ldr r2, [sp, 0x24] | r2 = var_24h;
0x000034be movs r4, 0 | r4 = 0;
0x000034c0 ldr r3, [pc, 0xd0] | r3 = *(0x3594);
0x000034c2 ldr r3, [r2, r3] | r3 = *((r2 + r3));
0x000034c4 ldr r6, [r3] | r6 = *(0x3594);
0x000034c6 blx 0x2400 | vfprintf_chk ()
0x000034ca ldr r2, [pc, 0xcc] |
0x000034cc mov r3, r5 | r3 = r5;
0x000034ce str r0, [sp] | *(sp) = r0;
0x000034d0 movs r1, 1 | r1 = 1;
0x000034d2 mov r0, r6 | r0 = r6;
0x000034d4 add r2, pc | r2 = 0x6a72;
0x000034d6 blx 0x2574 | fcn_00002574 ();
| label_3:
0x000034da ldr r2, [pc, 0xc0] |
0x000034dc ldr r3, [pc, 0xa4] | r3 = *(0x3584);
0x000034de add r2, pc | r2 = 0x6a80;
0x000034e0 ldr r3, [r2, r3] | r3 = *(0x6a80);
0x000034e2 ldr r2, [r3] | r2 = *(0x6a80);
0x000034e4 ldr r3, [sp, 0x1a4] | r3 = var_1a4h;
0x000034e6 eors r2, r3 | r2 ^= r3;
0x000034e8 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x000034ec bne 0x3578 | goto label_9;
| }
0x000034ee mov r0, r4 | r0 = r4;
0x000034f0 add sp, 0x1ac |
0x000034f2 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_5:
0x000034f6 mov r0, r4 | r0 = r4;
0x000034f8 blx 0x2478 | r0 = fcn_00002478 ();
0x000034fc adds r6, r4, r0 | r6 = r4 + r0;
0x000034fe b 0x345c | goto label_1;
| label_7:
0x00003500 mov r3, r6 | r3 = r6;
0x00003502 movs r1, 2 | r1 = 2;
0x00003504 mov r0, r5 | r0 = r5;
0x00003506 mov r6, fp | r6 = fp;
0x00003508 mov fp, r3 |
0x0000350a blx 0x240c | r0 = strsep ();
| if (r0 != 0) {
0x0000350e cbnz r0, 0x3536 | goto label_10;
| }
0x00003510 ldr r2, [sp, 0x24] | r2 = var_24h;
0x00003512 ldr r3, [pc, 0x80] | r3 = *(0x3596);
0x00003514 ldr r3, [r2, r3] | r3 = *((r2 + r3));
0x00003516 ldr r4, [r3] | r4 = *(0x3596);
0x00003518 blx 0x21c0 | dlerror ();
0x0000351c mov r3, r5 | r3 = r5;
0x0000351e str r0, [sp] | *(sp) = r0;
0x00003520 ldr r2, [sp, 0x28] | r2 = var_28h;
0x00003522 mov r0, r4 | r0 = r4;
0x00003524 movs r1, 1 | r1 = 1;
0x00003526 mov r4, r6 | r4 = r6;
0x00003528 blx 0x2574 | fcn_00002574 ();
0x0000352c ldrb r3, [r4], 1 | r3 = *(r4);
| r4++;
0x00003530 cmp r3, 0 |
| if (r3 != 0) {
0x00003532 bne 0x344e | goto label_0;
| }
0x00003534 b 0x34b8 | goto label_2;
| label_10:
0x00003536 mov r4, r0 | r4 = r0;
0x00003538 movs r0, 8 | r0 = 8;
0x0000353a mov r7, fp | r7 = fp;
0x0000353c blx 0x23e8 | r0 = strerror (r0);
| if (r0 != 0) {
0x00003540 cbz r0, 0x354e |
0x00003542 ldr r2, [pc, 0x5c] |
0x00003544 str r4, [r0, 4] | *((r0 + 4)) = r4;
0x00003546 add r2, pc | r2 = 0x6aec;
0x00003548 ldr r1, [r2, 4] | r1 = *(0x6af0);
0x0000354a str r0, [r2, 4] | *((r2 + 4)) = r0;
0x0000354c str r1, [r0] | *(r0) = r1;
| }
0x0000354e ldr r3, [sp, 0x2c] | r3 = var_2ch;
| if (r3 == 0) {
0x00003550 cbz r3, 0x356a | goto label_11;
| }
0x00003552 movs r1, 0 | r1 = 0;
0x00003554 mov r0, r7 | r0 = r7;
0x00003556 blx 0x2598 | r0 = fcn_00002598 ();
0x0000355a mov r4, r0 | r4 = r0;
| label_4:
0x0000355c cmp r4, 0 |
| if (r4 != 0) {
0x0000355e bne 0x34da | goto label_3;
| }
0x00003560 blx 0x24ac | fcn_000024ac ();
0x00003564 movs r3, 2 | r3 = 2;
0x00003566 str r3, [r0] | *(r0) = r3;
0x00003568 b 0x34da | goto label_3;
| label_11:
0x0000356a ldr r2, [sp, 0x2c] | r2 = var_2ch;
0x0000356c mov r0, r7 | r0 = r7;
0x0000356e mov r1, r2 | r1 = r2;
0x00003570 blx 0x25c0 | r0 = fcn_000025c0 ();
0x00003574 mov r4, r0 | r4 = r0;
0x00003576 b 0x355c | goto label_4;
| label_9:
0x00003578 blx 0x2320 | fcn_00002320 ();
0x0000357c ldr r0, [r3, r7] | r0 = *((r3 + r7));
0x0000357e movs r1, r0 | r1 = r0;
0x00003580 ldr r0, [r2, r7] | r0 = *((r2 + r7));
0x00003582 movs r1, r0 | r1 = r0;
0x00003584 lsls r4, r1, 7 | r4 = r1 << 7;
0x00003586 movs r0, r0 |
0x00003588 orrs r2, r2 | r2 |= r2;
0x0000358a movs r0, r0 |
0x0000358c orrs r4, r3 | r4 |= r3;
0x0000358e movs r0, r0 |
0x00003590 cmn r6, r7 |
0x00003592 movs r0, r0 |
0x00003594 lsls r0, r4, 7 | r0 = r4 << 7;
0x00003596 movs r0, r0 |
0x00003598 cmp r4, r0 |
0x0000359a movs r0, r0 |
0x0000359c ldr r6, [r2, r4] | r6 = *((r2 + r4));
0x0000359e movs r1, r0 | r1 = r0;
0x000035a0 ldrh r2, [r0, r3] | r2 = *((r0 + r3));
0x000035a2 movs r1, r0 | r1 = r0;
| }
; 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 @ 0x38d0 */
| #include <stdint.h>
|
; (fcn) sym.xtables_compatible_revision () | void xtables_compatible_revision (int16_t arg1, int16_t arg2, int16_t arg3) {
| int16_t var_0h;
| char * dest;
| int16_t var_ch;
| int16_t var_28h;
| int16_t var_29h;
| int16_t var_2ch;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x000038d0 mvnsmi lr, 0xb4000 | __asm ("mvnsmi lr, aav.0x000000ff");
0x000038d4 sub sp, 0x34 |
0x000038d6 ldr r5, [pc, 0x138] |
0x000038d8 movs r3, 0x1e | r3 = 0x1e;
0x000038da mov r7, r0 | r7 = r0;
0x000038dc ldr r4, [pc, 0x134] | r4 = *(0x3a14);
0x000038de add r5, pc | r5 = 0x72f4;
0x000038e0 ldr r6, [pc, 0x134] |
0x000038e2 ldr.w ip, [pc, 0x138] | ip = *(0x3a1e);
0x000038e6 ldr r4, [r5, r4] |
0x000038e8 mov r5, r1 | r5 = r1;
0x000038ea add r6, pc | r6 = 0x7306;
0x000038ec movs r1, 3 | r1 = 3;
0x000038ee ldr r4, [r4] | r4 = *(0x72f4);
0x000038f0 str r4, [sp, 0x2c] | var_2ch = r4;
0x000038f2 mov.w r4, 0 | r4 = 0;
0x000038f6 str r3, [sp, 8] | dest = r3;
0x000038f8 ldr.w sb, [r6, ip] | sb = *(0x7306);
0x000038fc mov r4, r2 | r4 = r2;
0x000038fe movs r2, 0xff | r2 = 0xff;
0x00003900 ldr.w r3, [sb] | r3 = *(0x7306);
0x00003904 ldrb r0, [r3, 0xc] | r0 = *((r3 + 0xc));
0x00003906 blx 0x2670 | r0 = close (r0);
0x0000390a subs.w r8, r0, 0 | r8 = r0 - 0;
| if (r8 >= r0) {
0x0000390e bge 0x393a | goto label_2;
| }
0x00003910 blx 0x24ac | r0 = fcn_000024ac ();
0x00003914 ldr r4, [r0] | r4 = *(r0);
0x00003916 cmp r4, 1 |
| if (r4 != 1) {
0x00003918 bne 0x39c4 | goto label_3;
| }
0x0000391a cmp r5, 0 |
| if (r5 != 0) {
0x0000391c bne 0x39aa | goto label_4;
| }
| do {
| label_0:
0x0000391e ldr r2, [pc, 0x100] |
0x00003920 ldr r3, [pc, 0xf0] | r3 = *(0x3a14);
0x00003922 add r2, pc | r2 = 0x7348;
0x00003924 ldr r3, [r2, r3] | r3 = *(0x7348);
0x00003926 ldr r2, [r3] | r2 = *(0x7348);
0x00003928 ldr r3, [sp, 0x2c] | r3 = var_2ch;
0x0000392a eors r2, r3 | r2 ^= r3;
0x0000392c mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00003930 bne 0x39c0 | goto label_5;
| }
0x00003932 mov r0, r4 | r0 = r4;
0x00003934 add sp, 0x34 |
0x00003936 pop.w {r4, r5, r6, r7, r8, sb, pc} |
| label_2:
0x0000393a movs r2, 1 | r2 = 1;
0x0000393c movs r1, 2 | r1 = 2;
0x0000393e blx 0x25b4 | fcn_000025b4 ();
0x00003942 adds r0, 1 | r0++;
| if (r0 == 1) {
0x00003944 beq 0x39e4 | goto label_6;
| }
0x00003946 ldr r3, [pc, 0xdc] | r3 = *(0x3a26);
0x00003948 movs r1, 1 | r1 = 1;
0x0000394a ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x0000394c ldr r0, [r3] | r0 = *(0x3a26);
0x0000394e blx 0x2580 | fcn_00002580 ();
0x00003952 add r3, sp, 0xc | r3 += var_ch;
0x00003954 mov r1, r7 | r1 = r7;
0x00003956 movs r2, 0x1c | r2 = 0x1c;
0x00003958 mov r0, r3 | r0 = r3;
0x0000395a blx 0x2500 | fcn_00002500 ();
0x0000395e ldr.w r1, [sb] | r1 = *(sb);
0x00003962 mov r3, r0 | r3 = r0;
0x00003964 mov r2, r4 | r2 = r4;
0x00003966 add r0, sp, 8 | r0 += dest;
0x00003968 movs r4, 0 | r4 = 0;
0x0000396a strb.w r5, [sp, 0x29] | var_29h = r5;
0x0000396e strb.w r4, [sp, 0x28] | var_28h = r4;
0x00003972 ldrb r1, [r1, 0xd] | r1 = *((r1 + 0xd));
0x00003974 str r0, [sp] | *(sp) = r0;
0x00003976 mov r0, r8 | r0 = r8;
0x00003978 blx 0x23ac | r0 = strcpy (r0, r1);
0x0000397c cmp r0, r4 |
| if (r0 >= r4) {
0x0000397e bge 0x39a0 | goto label_7;
| }
0x00003980 blx 0x24ac | r0 = fcn_000024ac ();
0x00003984 ldr r0, [r0] | r0 = *(r0);
0x00003986 cmp r0, 0x5d |
0x00003988 it ne |
| if (r0 != 0x5d) {
0x0000398a cmpne r0, 2 | __asm ("cmpne r0, 2");
| }
| if (r0 == 0x5d) {
0x0000398c beq 0x39a2 | goto label_8;
| }
0x0000398e cmp r0, 0x5c |
| if (r0 != 0x5c) {
0x00003990 bne 0x39fc | goto label_9;
| }
0x00003992 clz r4, r5 | r4 &= r5;
0x00003996 mov r0, r8 | r0 = r8;
0x00003998 lsrs r4, r4, 5 | r4 >>= 5;
0x0000399a blx 0x26a4 | fcn_000026a4 ();
0x0000399e b 0x391e |
| } while (1);
| label_7:
0x000039a0 movs r4, 1 | r4 = 1;
| label_8:
0x000039a2 mov r0, r8 | r0 = r8;
0x000039a4 blx 0x26a4 | fcn_000026a4 ();
0x000039a8 b 0x391e | goto label_0;
| label_4:
0x000039aa ldr r2, [pc, 0x7c] | r2 = *(0x3a2a);
0x000039ac mov r3, r7 | r3 = r7;
0x000039ae ldr r1, [r6, r2] | r1 = *((r6 + r2));
0x000039b0 ldr r2, [pc, 0x78] |
0x000039b2 str r5, [sp] | *(sp) = r5;
0x000039b4 ldr r0, [r1] | r0 = *(r1);
0x000039b6 mov r1, r4 | r1 = r4;
0x000039b8 add r2, pc | r2 = 0x73e8;
0x000039ba blx 0x2574 | fcn_00002574 ();
0x000039be b 0x391e | goto label_0;
| label_5:
0x000039c0 blx 0x2320 | fcn_00002320 ();
| label_3:
0x000039c4 ldr r3, [pc, 0x60] | r3 = *(0x3a28);
0x000039c6 mov r0, r4 | r0 = r4;
0x000039c8 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x000039ca ldr r4, [r3] | r4 = *(0x3a28);
0x000039cc blx 0x2400 | vfprintf_chk ()
0x000039d0 ldr r2, [pc, 0x5c] |
0x000039d2 mov r3, r0 | r3 = r0;
0x000039d4 add r2, pc | r2 = 0x7408;
| do {
| label_1:
0x000039d6 movs r1, 1 | r1 = 1;
0x000039d8 mov r0, r4 | r0 = r4;
0x000039da blx 0x2574 | fcn_00002574 ();
0x000039de movs r0, 1 | r0 = 1;
0x000039e0 blx 0x2454 | strtoul (r0, r1, r2);
| label_6:
0x000039e4 ldr r3, [pc, 0x40] | r3 = *(0x3a28);
0x000039e6 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x000039e8 ldr r4, [r3] | r4 = *(0x3a28);
0x000039ea blx 0x24ac | r0 = fcn_000024ac ();
0x000039ee ldr r0, [r0] | r0 = *(r0);
0x000039f0 blx 0x2400 | vfprintf_chk ()
0x000039f4 ldr r2, [pc, 0x3c] |
0x000039f6 mov r3, r0 | r3 = r0;
0x000039f8 add r2, pc | r2 = 0x7430;
0x000039fa b 0x39d6 |
| } while (1);
| label_9:
0x000039fc ldr r3, [pc, 0x28] | r3 = *(0x3a28);
0x000039fe ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00003a00 ldr r4, [r3] | r4 = *(0x3a28);
0x00003a02 blx 0x2400 | vfprintf_chk ()
0x00003a06 ldr r2, [pc, 0x30] |
0x00003a08 mov r3, r0 | r3 = r0;
0x00003a0a add r2, pc | r2 = 0x7448;
0x00003a0c b 0x39d6 | goto label_1;
| }
; 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 @ 0x35a4 */
| #include <stdint.h>
|
; (fcn) sym.xtables_find_match () | void xtables_find_match (int16_t arg_0h, int16_t arg1, int16_t arg2, int16_t arg3) {
| int16_t var_4h;
| int16_t var_8h;
| int16_t var_ch;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x000035a4 push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x000035a8 sub sp, 0x14 |
0x000035aa ldr.w r8, [pc, 0x23c] | r8 = *(0x000037e8);
0x000035ae mov r5, r0 | r5 = r0;
0x000035b0 str r1, [sp, 0xc] | var_ch = r1;
0x000035b2 str r2, [sp, 4] | var_4h = r2;
0x000035b4 add r8, pc | r8 += pc;
0x000035b6 blx 0x2478 | r0 = fcn_00002478 ();
0x000035ba cmp r0, 0x1c |
| if (r0 > 0x1c) {
0x000035bc bhi.w 0x37d2 | goto label_10;
| }
0x000035c0 ldr r1, [pc, 0x228] |
0x000035c2 mov r0, r5 | r0 = r5;
0x000035c4 add r1, pc | r1 = 0x6db4;
0x000035c6 blx 0x21cc | r0 = strcmp (r0, r1);
0x000035ca cmp r0, 0 |
| if (r0 == 0) {
0x000035cc beq.w 0x36da | goto label_11;
| }
0x000035d0 ldr r1, [pc, 0x21c] |
0x000035d2 mov r0, r5 | r0 = r5;
0x000035d4 add r1, pc | r1 = 0x6dc8;
0x000035d6 blx 0x21cc | r0 = strcmp (r0, r1);
0x000035da cmp r0, 0 |
| if (r0 == 0) {
0x000035dc beq.w 0x37be | goto label_12;
| }
0x000035e0 ldr r4, [pc, 0x210] |
0x000035e2 mov r0, r5 | r0 = r5;
0x000035e4 add r4, pc | r4 = 0x6ddc;
0x000035e6 mov r1, r4 | r1 = r4;
0x000035e8 blx 0x21cc | r0 = strcmp (r0, r1);
0x000035ec cmp r0, 0 |
0x000035ee it eq |
| if (r0 != 0) {
0x000035f0 moveq r5, r4 | r5 = r4;
| }
| label_8:
0x000035f2 ldr r3, [pc, 0x204] | r3 = *(0x37fa);
0x000035f4 ldr.w r3, [r8, r3] | r3 = *((r8 + r3));
0x000035f8 ldr r4, [r3] | r4 = *(0x37fa);
0x000035fa cmp r4, 0 |
| if (r4 == 0) {
0x000035fc beq 0x36ea | goto label_13;
| }
| label_1:
0x000035fe ldr r2, [pc, 0x1fc] | r2 = *(0x37fe);
0x00003600 mov fp, r3 |
0x00003602 movs r6, 0 | r6 = 0;
0x00003604 mov sl, r6 | sl = r6;
0x00003606 ldr.w r3, [r8, r2] | r3 = *((r8 + r2));
0x0000360a str r3, [sp, 8] | var_8h = r3;
0x0000360c b 0x365e |
| while (r0 == 0) {
0x0000360e ldr r3, [pc, 0x1f0] |
0x00003610 ldr.w r3, [r8, r3] | r3 = *((r8 + r3));
0x00003614 ldr r3, [r3] | r3 = *(0x3802);
0x00003616 ldrb r2, [r3, 0xc] | r2 = *((r3 + 0xc));
0x00003618 cmp.w sb, 0 |
0x0000361c it ne |
| if (sb != 0) {
0x0000361e cmpne r2, sb | __asm ("cmpne r2, sb");
| }
| if (sb != 0) {
0x00003620 bne 0x3670 | goto label_14;
| }
0x00003622 ldr r2, [r3, 0x10] | r2 = *((r3 + 0x10));
0x00003624 ldr r3, [r4, 4] | r3 = *((r4 + 4));
0x00003626 ldr r0, [r4, 0xc] | r0 = *((r4 + 0xc));
0x00003628 str.w r3, [fp] | __asm ("str.w r3, [fp]");
0x0000362c ldr r3, [pc, 0x1d4] |
0x0000362e cmp r0, 0 |
0x00003630 it eq |
| if (r0 != 0) {
0x00003632 moveq r0, r7 | r0 = r7;
| }
0x00003634 ldrb r1, [r4, 0x10] | r1 = *((r4 + 0x10));
0x00003636 ldr.w r3, [r8, r3] | r3 = *((r8 + r3));
0x0000363a ldr r3, [r3] |
0x0000363c ldr r3, [r3, 0x18] | r3 = xtables_find_match_revision;
0x0000363e blx r3 | r0 = uint32_t (*r3)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x00003640 cmp r0, 0 |
| if (r0 == 0) {
0x00003642 beq 0x36f4 | goto label_15;
| }
0x00003644 cmp r6, 0 |
| if (r6 == 0) {
0x00003646 beq.w 0x3750 | goto label_16;
| }
0x0000364a ldr r3, [r6, 4] | r3 = *((r6 + 4));
| label_7:
0x0000364c adds r6, 4 | r6 += 4;
| label_9:
0x0000364e str r3, [r4, 4] | *((r4 + 4)) = r3;
0x00003650 str r4, [r6] | *(r6) = r4;
0x00003652 mov r6, r4 | r6 = r4;
0x00003654 strd sl, sl, [r4, 0x58] | __asm ("strd sl, sl, [r4, 0x58]");
| label_3:
0x00003658 ldr.w r4, [fp] | r4 = *(fp);
| if (r4 == 0) {
0x0000365c cbz r4, 0x3680 | goto label_2;
| }
| label_0:
0x0000365e ldr r7, [r4, 8] | r7 = *((r4 + 8));
0x00003660 mov r0, r5 | r0 = r5;
0x00003662 ldrh.w sb, [r4, 0x12] | sb = *((r4 + 0x12));
0x00003666 mov r1, r7 | r1 = r7;
0x00003668 blx 0x21cc | r0 = strcmp (r0, r1);
0x0000366c cmp r0, 0 |
0x0000366e beq 0x360e |
| }
| label_14:
0x00003670 ldr.w r4, [fp] | r4 = *(fp);
| label_4:
0x00003674 add.w fp, r4, 4 |
0x00003678 ldr.w r4, [fp] | r4 = *(fp);
0x0000367c cmp r4, 0 |
| if (r4 != 0) {
0x0000367e bne 0x365e | goto label_0;
| }
| label_2:
0x00003680 ldr r3, [sp, 8] | r3 = var_8h;
0x00003682 ldr r4, [r3] | r4 = *(r3);
0x00003684 cmp r4, 0 |
| if (r4 == 0) {
0x00003686 beq 0x3704 | goto label_17;
| }
0x00003688 ldr r3, [pc, 0x174] | r3 = *(0x3800);
0x0000368a ldr.w sl, [r8, r3] | sl = *((r8 + r3));
0x0000368e ldr.w r7, [sl] | r7 = *(sl);
| label_5:
0x00003692 ldr r1, [r4, 8] | r1 = *((r4 + 8));
0x00003694 mov r0, r5 | r0 = r5;
0x00003696 blx 0x21cc | r0 = strcmp (r0, r1);
0x0000369a cmp r0, 0 |
| if (r0 != 0) {
0x0000369c bne 0x36fe | goto label_18;
| }
0x0000369e ldrh r3, [r4, 0x12] | r3 = *((r4 + 0x12));
0x000036a0 ldrb r2, [r7, 0xc] | r2 = *((r7 + 0xc));
0x000036a2 cmp r3, 0 |
0x000036a4 it ne |
| if (r3 != 0) {
0x000036a6 cmpne r2, r3 | __asm ("cmpne r2, r3");
| }
| if (r3 != 0) {
0x000036a8 bne 0x36fe | goto label_18;
| }
0x000036aa ldr r3, [r4, 0x58] | r3 = *((r4 + 0x58));
0x000036ac mov r6, r0 | r6 = r0;
| if (r3 != 0) {
0x000036ae cbz r3, 0x36c8 |
0x000036b0 movs r0, 0x64 | r0 = 0x64;
0x000036b2 blx 0x23f4 | r0 = dlopen ();
0x000036b6 mov r7, r0 | r7 = r0;
0x000036b8 mov r1, r4 | r1 = r4;
0x000036ba mov r4, r7 | r4 = r7;
0x000036bc movs r2, 0x64 | r2 = 0x64;
0x000036be blx 0x22b4 | fcn_000022b4 ();
0x000036c2 str r6, [r7, 0x50] | *((r7 + 0x50)) = r6;
0x000036c4 str r6, [r7, 0x5c] | *((r7 + 0x5c)) = r6;
0x000036c6 str r7, [r7, 4] | *((r7 + 4)) = r7;
| }
| label_6:
0x000036c8 ldr r3, [sp, 4] | r3 = var_4h;
0x000036ca cmp r4, 0 |
0x000036cc it ne |
| if (r4 != 0) {
0x000036ce cmpne r3, 0 | __asm ("cmpne r3, 0");
| }
| if (r4 != 0) {
0x000036d0 bne 0x3762 | goto label_19;
| }
0x000036d2 mov r0, r4 | r0 = r4;
0x000036d4 add sp, 0x14 |
0x000036d6 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_11:
0x000036da ldr r3, [pc, 0x11c] | r3 = *(0x37fa);
0x000036dc ldr r5, [pc, 0x128] |
0x000036de ldr.w r3, [r8, r3] | r3 = *((r8 + r3));
0x000036e2 add r5, pc | r5 = 0x6eee;
0x000036e4 ldr r4, [r3] | r4 = *(0x37fa);
0x000036e6 cmp r4, 0 |
| if (r4 != 0) {
0x000036e8 bne 0x35fe | goto label_1;
| }
| label_13:
0x000036ea ldr r3, [pc, 0x110] | r3 = *(0x37fe);
0x000036ec ldr.w r3, [r8, r3] | r3 = *((r8 + r3));
0x000036f0 str r3, [sp, 8] | var_8h = r3;
0x000036f2 b 0x3680 | goto label_2;
| label_15:
0x000036f4 cmp r6, 0 |
| if (r6 != 0) {
0x000036f6 bne 0x3658 | goto label_3;
| }
0x000036f8 str.w r4, [fp] | __asm ("str.w r4, [fp]");
0x000036fc b 0x3674 | goto label_4;
| label_18:
0x000036fe ldr r4, [r4, 4] | r4 = *((r4 + 4));
0x00003700 cmp r4, 0 |
| if (r4 != 0) {
0x00003702 bne 0x3692 | goto label_5;
| }
| label_17:
0x00003704 ldr r3, [sp, 0xc] | r3 = var_ch;
0x00003706 cmp r3, 1 |
| if (r3 < 1) {
0x00003708 bls 0x37c4 | goto label_20;
| }
0x0000370a ldr r3, [pc, 0xf4] | r3 = *(0x3802);
0x0000370c mov r2, r5 | r2 = r5;
0x0000370e ldr.w sl, [r8, r3] | sl = *((r8 + r3));
0x00003712 ldr r3, [pc, 0xf8] |
0x00003714 add r3, pc | r3 = 0x6f26;
0x00003716 ldr r0, [r3] | r0 = *(0x6f26);
0x00003718 ldr.w r3, [sl] | r3 = *(sl);
0x0000371c ldr r1, [r3, 8] | r1 = *(0x6f2e);
0x0000371e movs r3, 0 | r3 = 0;
0x00003720 bl 0x3404 | fcn_00003404 (r0, r1, r2, r3);
0x00003724 ldr r3, [sp, 0xc] | r3 = var_ch;
0x00003726 mov r4, r0 | r4 = r0;
0x00003728 cmp r0, 0 |
0x0000372a it eq |
| if (r0 != 0) {
0x0000372c cmpeq r3, 3 | __asm ("cmpeq r3, 3");
| goto label_21;
| }
| if (r0 != 0) {
| label_21:
0x0000372e bne 0x36c8 | goto label_6;
| }
0x00003730 ldr r3, [pc, 0xd0] |
0x00003732 ldr.w r3, [r8, r3] | r3 = *((r8 + r3));
0x00003736 ldr r3, [r3] | r3 = *(0x3804);
0x00003738 ldr r4, [r3, 0x14] | r4 = *(0x3818);
0x0000373a blx 0x24ac | r0 = fcn_000024ac ();
0x0000373e ldr r0, [r0] | r0 = *(r0);
0x00003740 blx 0x2400 | vfprintf_chk ()
0x00003744 ldr r1, [pc, 0xc8] |
0x00003746 mov r3, r0 | r3 = r0;
0x00003748 mov r2, r5 | r2 = r5;
0x0000374a movs r0, 2 | r0 = 2;
0x0000374c add r1, pc | r1 = 0x6f60;
0x0000374e blx r4 | uint32_t (*r4)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
| label_16:
0x00003750 ldr r3, [sp, 8] | r3 = var_8h;
0x00003752 ldr r3, [r3] | r3 = *(r3);
0x00003754 cmp r3, 0 |
| if (r3 == 0) {
0x00003756 beq 0x37ce | goto label_22;
| }
| do {
0x00003758 mov r6, r3 | r6 = r3;
0x0000375a ldr r3, [r3, 4] | r3 = *((r3 + 4));
0x0000375c cmp r3, 0 |
0x0000375e bne 0x3758 |
| } while (r3 != 0);
0x00003760 b 0x364c | goto label_7;
| label_19:
0x00003762 movs r0, 0xc | r0 = 0xc;
0x00003764 blx 0x23f4 | dlopen ();
0x00003768 ldr r3, [sp, 4] | r3 = var_4h;
0x0000376a mov r8, r0 | r8 = r0;
0x0000376c ldr r6, [r3] | r6 = *(r3);
| if (r6 == 0) {
0x0000376e cbz r6, 0x37a2 | goto label_23;
| }
0x00003770 ldr.w sl, [sl] | sl = *(sl);
0x00003774 mov.w sb, 1 | sb = 1;
0x00003778 b 0x377c |
| while (r3 != 0) {
0x0000377a mov r6, r3 | r6 = r3;
0x0000377c ldr r7, [r6, 4] | r7 = *((r6 + 4));
0x0000377e mov r0, r5 | r0 = r5;
0x00003780 ldr r1, [r7, 8] | r1 = *((r7 + 8));
0x00003782 blx 0x21cc | r0 = strcmp (r0, r1);
| if (r0 == 0) {
0x00003786 cbnz r0, 0x379a |
0x00003788 ldrh r3, [r7, 0x12] | r3 = *((r7 + 0x12));
0x0000378a ldrb.w r2, [sl, 0xc] | r2 = *((sl + 0xc));
0x0000378e cmp r3, 0 |
0x00003790 it ne |
| if (r3 != 0) {
0x00003792 cmpne r2, r3 | __asm ("cmpne r2, r3");
| }
0x00003794 it eq |
| if (r3 == 0) {
0x00003796 strbeq sb, [r6, 8] | *((r6 + 8)) = sb;
| goto label_24;
| }
| }
| label_24:
0x0000379a ldr r3, [r6] | r3 = *(r6);
0x0000379c cmp r3, 0 |
0x0000379e bne 0x377a |
| }
0x000037a0 str r6, [sp, 4] | var_4h = r6;
| label_23:
0x000037a2 movs r3, 0 | r3 = 0;
0x000037a4 mov r0, r4 | r0 = r4;
0x000037a6 strb.w r3, [r8, 8] | *((r8 + 8)) = r3;
0x000037aa str.w r3, [r8] | __asm ("str.w r3, [r8]");
0x000037ae ldr r3, [sp, 4] | r3 = var_4h;
0x000037b0 str.w r4, [r8, 4] | __asm ("str.w r4, [r8, 4]");
0x000037b4 str.w r8, [r3] | __asm ("str.w r8, [r3]");
0x000037b8 add sp, 0x14 |
0x000037ba pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_12:
0x000037be ldr r5, [pc, 0x54] |
0x000037c0 add r5, pc | r5 = 0x6fda;
0x000037c2 b 0x35f2 | goto label_8;
| label_20:
0x000037c4 movs r4, 0 | r4 = 0;
0x000037c6 mov r0, r4 | r0 = r4;
0x000037c8 add sp, 0x14 |
0x000037ca pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_22:
0x000037ce ldr r6, [sp, 8] | r6 = var_8h;
0x000037d0 b 0x364e | goto label_9;
| label_10:
0x000037d2 ldr r0, [pc, 0x30] |
0x000037d4 movs r3, 0x1c | r3 = 0x1c;
0x000037d6 ldr r1, [pc, 0x40] |
0x000037d8 mov r2, r5 | r2 = r5;
0x000037da ldr.w r4, [r8, r0] | r4 = *((r8 + r0));
0x000037de movs r0, 2 | r0 = 2;
0x000037e0 add r1, pc | r1 = 0x6ffe;
0x000037e2 ldr r4, [r4] | r4 = *(r4);
0x000037e4 ldr r4, [r4, 0x14] | r4 = *((r4 + 0x14));
0x000037e6 blx r4 | uint32_t (*r4)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x000037e8 ldr r0, [r0, r1] | r0 = *(0x3806);
0x000037ea movs r1, r0 | r1 = r0;
0x000037ec rors r4, r1 | __asm ("rors r4, r1");
0x000037ee movs r0, r0 |
0x000037f0 rors r4, r0 | __asm ("rors r4, r0");
0x000037f2 movs r0, r0 |
0x000037f4 adcs r4, r7 | __asm ("adcs r4, r7");
0x000037f6 movs r0, r0 |
0x000037f8 lsls r0, r0, 8 | r0 <<= 8;
0x000037fa movs r0, r0 |
0x000037fc lsls r0, r2, 7 | r0 = r2 << 7;
0x000037fe movs r0, r0 |
0x00003800 lsls r0, r7, 7 | r0 = r7 << 7;
0x00003802 movs r0, r0 |
0x00003804 lsls r0, r0, 7 | r0 <<= 7;
0x00003806 movs r0, r0 |
0x00003808 eors r6, r7 | r6 ^= r7;
0x0000380a movs r0, r0 |
0x0000380c ldr r4, [r6, r3] | r4 = *((r6 + r3));
0x0000380e movs r1, r0 | r1 = r0;
0x00003810 eors r0, r3 | r0 ^= r3;
0x00003812 movs r0, r0 |
0x00003814 subs r7, 0xa0 | r7 -= 0xa0;
0x00003816 movs r0, r0 |
0x00003818 subs r7, 0x88 | r7 -= 0x88;
0x0000381a movs r0, r0 |
| }
; 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 @ 0x381c */
| #include <stdint.h>
|
; (fcn) sym.xtables_find_match_revision () | void xtables_find_match_revision (int16_t arg1, int16_t arg3, int16_t arg4) {
| r0 = arg1;
| r2 = arg3;
| r3 = arg4;
0x0000381c push.w {r4, r5, r6, r7, r8, lr} |
0x00003820 mov r6, r0 | r6 = r0;
0x00003822 ldr r5, [pc, 0x4c] |
0x00003824 mov r7, r3 | r7 = r3;
0x00003826 mov r4, r2 | r4 = r2;
0x00003828 add r5, pc | r5 = 0x709e;
| if (r2 == 0) {
0x0000382a cbz r2, 0x3862 | goto label_2;
| }
| label_0:
0x0000382c ldr r3, [pc, 0x44] | r3 = *(0x3874);
0x0000382e ldr r3, [r5, r3] | r3 = *((r5 + r3));
0x00003830 ldr.w r8, [r3] | r8 = *(0x3874);
| do {
0x00003834 ldrb r2, [r4, 0x10] | r2 = *((r4 + 0x10));
0x00003836 mov r0, r6 | r0 = r6;
0x00003838 cmp r2, r7 |
| if (r2 == r7) {
0x0000383a beq 0x385c | goto label_3;
| }
0x0000383c ldr r4, [r4, 4] | r4 = *((r4 + 4));
| if (r4 == 0) {
0x0000383e cbz r4, 0x3856 | goto label_1;
| }
0x00003840 ldr r1, [r4, 8] | r1 = *((r4 + 8));
0x00003842 ldrh r5, [r4, 0x12] | r5 = *((r4 + 0x12));
0x00003844 blx 0x21cc | r0 = strcmp (r0, r1);
| if (r0 != 0) {
0x00003848 cbnz r0, 0x3856 | goto label_1;
| }
0x0000384a ldrb.w r3, [r8, 0xc] | r3 = *((r8 + 0xc));
0x0000384e cmp r5, 0 |
0x00003850 it ne |
| if (r5 != 0) {
0x00003852 cmpne r3, r5 | __asm ("cmpne r3, r5");
| }
0x00003854 beq 0x3834 |
| } while (r5 == 0);
| label_1:
0x00003856 movs r0, 0 | r0 = 0;
0x00003858 pop.w {r4, r5, r6, r7, r8, pc} |
| label_3:
0x0000385c mov r0, r4 | r0 = r4;
0x0000385e pop.w {r4, r5, r6, r7, r8, pc} |
| label_2:
0x00003862 blx 0x25c0 | r0 = fcn_000025c0 ();
0x00003866 mov r4, r0 | r4 = r0;
0x00003868 cmp r0, 0 |
| if (r0 != 0) {
0x0000386a bne 0x382c | goto label_0;
| }
0x0000386c b 0x3856 | goto label_1;
| }
; 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 @ 0x3204 */
| #include <stdint.h>
|
; (fcn) sym.xtables_find_target () | void xtables_find_target (int16_t arg1, int16_t arg2) {
| int16_t var_4h_2;
| int16_t var_8h;
| int16_t var_ch;
| r0 = arg1;
| r1 = arg2;
0x00003204 push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00003208 sub sp, 0x14 |
0x0000320a ldrb r3, [r0] | r3 = *(r0);
0x0000320c ldr.w sb, [pc, 0x1b0] | sb = *(0x000033c0);
0x00003210 str r1, [sp, 0xc] | var_ch = r1;
0x00003212 add sb, pc | sb += pc;
| if (r3 != 0) {
0x00003214 cbz r3, 0x322c |
0x00003216 ldr r1, [pc, 0x1ac] |
0x00003218 mov r6, r0 | r6 = r0;
0x0000321a add r1, pc | r1 = 0x65e4;
0x0000321c blx 0x21cc | r0 = strcmp (r0, r1);
0x00003220 cmp r0, 0 |
| if (r0 != 0) {
0x00003222 bne.w 0x3364 | goto label_6;
| }
0x00003226 ldr r6, [pc, 0x1a0] |
0x00003228 add r6, pc | r6 = 0x65f6;
0x0000322a b 0x3230 |
| } else {
0x0000322c ldr r6, [pc, 0x19c] |
0x0000322e add r6, pc | r6 = 0x65fe;
| }
| label_5:
0x00003230 ldr r3, [pc, 0x19c] | r3 = *(0x33d0);
0x00003232 ldr.w r5, [sb, r3] | r5 = *((sb + r3));
0x00003236 ldr r3, [pc, 0x19c] | r3 = *(0x33d6);
0x00003238 ldr r4, [r5] | r4 = *(r5);
0x0000323a ldr.w r3, [sb, r3] | r3 = *((sb + r3));
0x0000323e str r3, [sp, 8] | var_8h = r3;
0x00003240 cmp r4, 0 |
| if (r4 == 0) {
0x00003242 beq 0x32c4 | goto label_7;
| }
0x00003244 ldr.w fp, [pc, 0x190] |
0x00003248 mov.w r8, 0 | r8 = 0;
0x0000324c mov r3, r6 | r3 = r6;
0x0000324e mov r6, r8 | r6 = r8;
0x00003250 mov r8, r3 | r8 = r3;
0x00003252 add fp, pc | fp = 0x662e;
| do {
0x00003254 ldr r7, [r4, 8] | r7 = *((r4 + 8));
0x00003256 mov r0, r8 | r0 = r8;
0x00003258 ldrh.w sl, [r4, 0x12] | sl = *((r4 + 0x12));
0x0000325c mov r1, r7 | r1 = r7;
0x0000325e blx 0x21cc | r0 = strcmp (r0, r1);
0x00003262 cmp r0, 0 |
| if (r0 != 0) {
0x00003264 bne 0x335a | goto label_8;
| }
0x00003266 ldr r3, [pc, 0x174] |
0x00003268 ldr.w r3, [sb, r3] | r3 = *((sb + r3));
0x0000326c ldr r3, [r3] | r3 = *(0x33de);
0x0000326e ldrb r2, [r3, 0xc] | r2 = *((r3 + 0xc));
0x00003270 cmp.w sl, 0 |
0x00003274 it ne |
| if (sl != 0) {
0x00003276 cmpne r2, sl | __asm ("cmpne r2, sl");
| }
| if (sl != 0) {
0x00003278 bne 0x335a | goto label_8;
| }
0x0000327a ldr r2, [r4, 4] | r2 = *((r4 + 4));
0x0000327c mov r1, fp | r1 = fp;
0x0000327e mov r0, r7 | r0 = r7;
0x00003280 str r3, [sp, 4] | var_4h_2 = r3;
0x00003282 str r2, [r5] | *(r5) = r2;
0x00003284 blx 0x21cc | strcmp (r0, r1);
0x00003288 ldr r3, [sp, 4] | r3 = var_4h_2;
| if (r0 != 0) {
0x0000328a cbz r0, 0x32a8 |
0x0000328c ldr r2, [r3, 0x14] | r2 = *((r3 + 0x14));
0x0000328e ldr r3, [pc, 0x150] |
0x00003290 ldr r0, [r4, 0xc] | r0 = *((r4 + 0xc));
0x00003292 ldrb r1, [r4, 0x10] | r1 = *((r4 + 0x10));
0x00003294 ldr.w r3, [sb, r3] | r3 = *((sb + r3));
0x00003298 cmp r0, 0 |
0x0000329a it eq |
| if (r0 != 0) {
0x0000329c moveq r0, r7 | r0 = r7;
| }
0x0000329e ldr r3, [r3] |
0x000032a0 ldr r3, [r3, 0x18] | r3 = *(0x33fa);
0x000032a2 blx r3 | r0 = uint32_t (*r3)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x000032a4 cmp r0, 0 |
| if (r0 == 0) {
0x000032a6 beq 0x3312 | goto label_9;
| }
| }
0x000032a8 cmp r6, 0 |
| if (r6 == 0) {
0x000032aa beq 0x335e | goto label_10;
| }
0x000032ac ldr r2, [r6, 4] | r2 = *((r6 + 4));
0x000032ae adds r3, r6, 4 | r3 = r6 + 4;
| label_4:
0x000032b0 mov r6, r4 | r6 = r4;
0x000032b2 str r2, [r4, 4] | *((r4 + 4)) = r2;
0x000032b4 str r4, [r3] | *(r3) = r4;
0x000032b6 movs r3, 0 | r3 = 0;
0x000032b8 strd r3, r3, [r4, 0x58] | __asm ("strd r3, r3, [r4, 0x58]");
| label_0:
0x000032bc ldr r4, [r5] | r4 = *(r5);
0x000032be cmp r4, 0 |
0x000032c0 bne 0x3254 |
| } while (r4 != 0);
0x000032c2 mov r6, r8 | r6 = r8;
| label_7:
0x000032c4 ldr r3, [sp, 8] | r3 = var_8h;
0x000032c6 ldr r4, [r3] | r4 = *(r3);
| if (r4 == 0) {
0x000032c8 cbz r4, 0x3322 | goto label_11;
| }
0x000032ca ldr r3, [pc, 0x110] | r3 = *(0x33de);
0x000032cc ldr.w r3, [sb, r3] | r3 = *((sb + r3));
0x000032d0 ldr r7, [r3] | r7 = *(0x33de);
| label_1:
0x000032d2 ldr r1, [r4, 8] | r1 = *((r4 + 8));
0x000032d4 mov r0, r6 | r0 = r6;
0x000032d6 blx 0x21cc | r0 = strcmp (r0, r1);
| if (r0 != 0) {
0x000032da cbnz r0, 0x331c | goto label_12;
| }
0x000032dc ldrh r3, [r4, 0x12] | r3 = *((r4 + 0x12));
0x000032de ldrb r2, [r7, 0xc] | r2 = *((r7 + 0xc));
0x000032e0 cmp r3, 0 |
0x000032e2 it ne |
| if (r3 != 0) {
0x000032e4 cmpne r2, r3 | __asm ("cmpne r2, r3");
| }
| if (r3 != 0) {
0x000032e6 bne 0x331c | goto label_12;
| }
0x000032e8 ldr r3, [r4, 0x58] | r3 = *((r4 + 0x58));
0x000032ea mov r5, r0 | r5 = r0;
| if (r3 != 0) {
0x000032ec cbz r3, 0x3306 |
0x000032ee movs r0, 0x68 | r0 = 0x68;
0x000032f0 blx 0x23f4 | r0 = dlopen ();
0x000032f4 mov r6, r0 | r6 = r0;
0x000032f6 mov r1, r4 | r1 = r4;
0x000032f8 mov r4, r6 | r4 = r6;
0x000032fa movs r2, 0x68 | r2 = 0x68;
0x000032fc blx 0x22b4 | fcn_000022b4 ();
0x00003300 str r5, [r6, 0x50] | *((r6 + 0x50)) = r5;
0x00003302 str r5, [r6, 0x5c] | *((r6 + 0x5c)) = r5;
0x00003304 str r6, [r6, 4] | *((r6 + 4)) = r6;
| }
| label_2:
0x00003306 movs r3, 1 | r3 = 1;
0x00003308 mov r0, r4 | r0 = r4;
0x0000330a str r3, [r4, 0x60] | *((r4 + 0x60)) = r3;
0x0000330c add sp, 0x14 |
0x0000330e pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_9:
0x00003312 cmp r6, 0 |
| if (r6 != 0) {
0x00003314 bne 0x32bc | goto label_0;
| }
0x00003316 str r4, [r5] | *(r5) = r4;
| label_3:
0x00003318 adds r5, r4, 4 | r5 = r4 + 4;
0x0000331a b 0x32bc | goto label_0;
| label_12:
0x0000331c ldr r4, [r4, 4] | r4 = *((r4 + 4));
0x0000331e cmp r4, 0 |
| if (r4 != 0) {
0x00003320 bne 0x32d2 | goto label_1;
| }
| label_11:
0x00003322 ldr r3, [sp, 0xc] | r3 = var_ch;
0x00003324 cmp r3, 1 |
| if (r3 < 1) {
0x00003326 bls 0x3350 | goto label_13;
| }
0x00003328 ldr r2, [pc, 0xb0] | r2 = *(0x33dc);
0x0000332a ldr r3, [pc, 0xb8] |
0x0000332c ldr.w r2, [sb, r2] | r2 = *((sb + r2));
0x00003330 add r3, pc | r3 = 0x671a;
0x00003332 ldr r0, [r3] | r0 = *(0x671a);
0x00003334 ldr r3, [r2] | r3 = *(0x33dc);
0x00003336 mov r2, r6 | r2 = r6;
0x00003338 ldr r1, [r3, 8] | r1 = *(0x33e4);
0x0000333a movs r3, 1 | r3 = 1;
0x0000333c bl 0x3404 | fcn_00003404 (r0, r1, r2, r3);
0x00003340 ldr r3, [sp, 0xc] | r3 = var_ch;
0x00003342 mov r4, r0 | r4 = r0;
0x00003344 cmp r0, 0 |
0x00003346 it eq |
| if (r0 == 0) {
0x00003348 cmpeq r3, 3 | __asm ("cmpeq r3, 3");
| }
| if (r0 == 0) {
0x0000334a beq 0x339e | goto label_14;
| }
0x0000334c cmp r0, 0 |
| if (r0 != 0) {
0x0000334e bne 0x3306 | goto label_2;
| }
| label_13:
0x00003350 movs r4, 0 | r4 = 0;
0x00003352 mov r0, r4 | r0 = r4;
0x00003354 add sp, 0x14 |
0x00003356 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_8:
0x0000335a ldr r4, [r5] | r4 = *(r5);
0x0000335c b 0x3318 | goto label_3;
| label_10:
0x0000335e ldr r3, [sp, 8] | r3 = var_8h;
0x00003360 ldr r2, [r3] | r2 = *(r3);
0x00003362 b 0x32b0 | goto label_4;
| label_6:
0x00003364 ldr r1, [pc, 0x80] |
0x00003366 mov r0, r6 | r0 = r6;
0x00003368 add r1, pc | r1 = 0x6754;
0x0000336a blx 0x21cc | r0 = strcmp (r0, r1);
| if (r0 == 0) {
0x0000336e cbz r0, 0x3392 | goto label_15;
| }
0x00003370 ldr r1, [pc, 0x78] |
0x00003372 mov r0, r6 | r0 = r6;
0x00003374 add r1, pc | r1 = 0x6764;
0x00003376 blx 0x21cc | r0 = strcmp (r0, r1);
| if (r0 == 0) {
0x0000337a cbz r0, 0x3398 | goto label_16;
| }
0x0000337c ldr r1, [pc, 0x70] |
0x0000337e mov r0, r6 | r0 = r6;
0x00003380 add r1, pc | r1 = 0x6774;
0x00003382 blx 0x21cc | r0 = strcmp (r0, r1);
0x00003386 cmp r0, 0 |
| if (r0 != 0) {
0x00003388 bne.w 0x3230 | goto label_5;
| }
0x0000338c ldr r6, [pc, 0x64] |
0x0000338e add r6, pc | r6 = 0x6786;
0x00003390 b 0x3230 | goto label_5;
| label_15:
0x00003392 ldr r6, [pc, 0x64] |
0x00003394 add r6, pc | r6 = 0x6792;
0x00003396 b 0x3230 | goto label_5;
| label_16:
0x00003398 ldr r6, [pc, 0x60] |
0x0000339a add r6, pc | r6 = 0x679a;
0x0000339c b 0x3230 | goto label_5;
| label_14:
0x0000339e ldr r3, [pc, 0x40] |
0x000033a0 ldr.w r3, [sb, r3] | r3 = *((sb + r3));
0x000033a4 ldr r3, [r3] | r3 = *(0x33e2);
0x000033a6 ldr r4, [r3, 0x14] | r4 = *(0x33f6);
0x000033a8 blx 0x24ac | r0 = fcn_000024ac ();
0x000033ac ldr r0, [r0] | r0 = *(r0);
0x000033ae blx 0x2400 | vfprintf_chk ()
0x000033b2 ldr r1, [pc, 0x4c] |
0x000033b4 mov r3, r0 | r3 = r0;
0x000033b6 mov r2, r6 | r2 = r6;
0x000033b8 movs r0, 2 | r0 = 2;
0x000033ba add r1, pc | r1 = 0x67c0;
0x000033bc blx r4 | uint32_t (*r4)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x000033be nop |
0x000033c0 ldrh r2, [r4, r7] | r2 = *((r4 + r7));
0x000033c2 movs r1, r0 | r1 = r0;
0x000033c4 add lr, ip | lr += ip;
0x000033c6 movs r0, r0 |
0x000033c8 add ip, sb |
0x000033ca movs r0, r0 |
0x000033cc add lr, r8 | lr += r8;
0x000033ce movs r0, r0 |
0x000033d0 lsls r4, r2, 7 | r4 = r2 << 7;
0x000033d2 movs r0, r0 |
0x000033d4 lsls r0, r6, 7 | r0 = r6 << 7;
0x000033d6 movs r0, r0 |
0x000033d8 add sl, r4 | sl += r4;
0x000033da movs r0, r0 |
0x000033dc lsls r0, r7, 7 | r0 = r7 << 7;
0x000033de movs r0, r0 |
0x000033e0 lsls r0, r0, 7 | r0 <<= 7;
0x000033e2 movs r0, r0 |
0x000033e4 ldrb r0, [r3, r3] | r0 = *((r3 + r3));
0x000033e6 movs r1, r0 | r1 = r0;
0x000033e8 bics r0, r4 | __asm ("bics r0, r4");
0x000033ea movs r0, r0 |
0x000033ec bics r4, r3 | __asm ("bics r4, r3");
0x000033ee movs r0, r0 |
0x000033f0 bics r0, r3 | __asm ("bics r0, r3");
0x000033f2 movs r0, r0 |
0x000033f4 muls r6, r4, r6 | r6 = r4 * r6;
0x000033f6 movs r0, r0 |
0x000033f8 muls r0, r4, r0 | r0 = r4 * r0;
0x000033fa movs r0, r0 |
0x000033fc muls r2, r3, r2 | r2 = r3 * r2;
0x000033fe movs r0, r0 |
0x00003400 muls r6, r4, r6 | r6 = r4 * r6;
0x00003402 movs r0, r0 |
| }
; 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 @ 0x3878 */
| #include <stdint.h>
|
; (fcn) sym.xtables_find_target_revision () | void xtables_find_target_revision (int16_t arg1, int16_t arg3, int16_t arg4) {
| r0 = arg1;
| r2 = arg3;
| r3 = arg4;
0x00003878 mvnsmi lr, sp, lsr 18 | __asm ("mvnsmi lr, sp, lsr 18");
0x0000387c mov r8, r0 | r8 = r0;
0x0000387e ldr r5, [pc, 0x48] |
0x00003880 mov r6, r3 | r6 = r3;
0x00003882 mov r4, r2 | r4 = r2;
0x00003884 add r5, pc | r5 = 0x7152;
| if (r2 == 0) {
0x00003886 cbz r2, 0x38ba | goto label_2;
| }
| label_0:
0x00003888 ldr r3, [pc, 0x40] | r3 = *(0x38cc);
0x0000388a ldr r3, [r5, r3] | r3 = *((r5 + r3));
0x0000388c ldr r7, [r3] | r7 = *(0x38cc);
| do {
0x0000388e ldrb r2, [r4, 0x10] | r2 = *((r4 + 0x10));
0x00003890 mov r0, r8 | r0 = r8;
0x00003892 cmp r2, r6 |
| if (r2 == r6) {
0x00003894 beq 0x38b4 | goto label_3;
| }
0x00003896 ldr r4, [r4, 4] | r4 = *((r4 + 4));
| if (r4 == 0) {
0x00003898 cbz r4, 0x38ae | goto label_1;
| }
0x0000389a ldr r1, [r4, 8] | r1 = *((r4 + 8));
0x0000389c ldrh r5, [r4, 0x12] | r5 = *((r4 + 0x12));
0x0000389e blx 0x21cc | r0 = strcmp (r0, r1);
| if (r0 != 0) {
0x000038a2 cbnz r0, 0x38ae | goto label_1;
| }
0x000038a4 ldrb r3, [r7, 0xc] | r3 = *((r7 + 0xc));
0x000038a6 cmp r5, 0 |
0x000038a8 it ne |
| if (r5 != 0) {
0x000038aa cmpne r3, r5 | __asm ("cmpne r3, r5");
| }
0x000038ac beq 0x388e |
| } while (r5 == 0);
| label_1:
0x000038ae movs r0, 0 | r0 = 0;
0x000038b0 pop.w {r4, r5, r6, r7, r8, pc} |
| label_3:
0x000038b4 mov r0, r4 | r0 = r4;
0x000038b6 pop.w {r4, r5, r6, r7, r8, pc} |
| label_2:
0x000038ba blx 0x2598 | r0 = fcn_00002598 ();
0x000038be mov r4, r0 | r4 = r0;
0x000038c0 cmp r0, 0 |
| if (r0 != 0) {
0x000038c2 bne 0x3888 | goto label_0;
| }
0x000038c4 b 0x38ae | goto label_1;
| }
[*] Function fprintf used 7 times libxtables.so.12.4.0