[*] Binary protection state of libxtables.so.12.2.0
Partial RELRO No Canary found NX disabled DSO No RPATH No RUNPATH No Symbols
[*] Function fprintf tear down of libxtables.so.12.2.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/libxtables.so.12.2.0 @ 0x28f8 */
| #include <stdint.h>
|
; (fcn) fcn.000028f8 () | void fcn_000028f8 (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| r0 = arg1;
| r1 = arg2;
0x000028f8 push {r0, r1, r2, lr} |
0x000028fc ldr r2, [pc, 0x60] | r2 = *(0x2960);
0x00002900 add r1, r1, 0x10 | r1 += 0x10;
0x00002904 add r2, pc, r2 | r2 = pc + r2;
| do {
0x00002908 ldr r3, [r1, -0x10] | r3 = *((r1 - 0x10));
0x0000290c cmp r3, 0 |
| if (r3 == 0) {
0x00002910 bne 0x291c |
0x00002914 add sp, sp, 0xc |
0x00002918 pop {pc} |
| }
0x0000291c ldr ip, [r1, -4] | ip = *((r1 - 4));
0x00002920 add r1, r1, 0x10 | r1 += 0x10;
0x00002924 cmp ip, 0xff |
0x00002928 bls 0x2908 |
| } while (ip < 0xff);
0x0000292c ldr r1, [pc, 0x34] |
0x00002930 mov r3, r0 | r3 = r0;
0x00002934 ldr r1, [r2, r1] | r1 = *((r2 + r1));
0x00002938 ldr r0, [pc, 0x2c] |
0x0000293c ldr r1, [r1] | r1 = *(0x2964);
0x00002940 ldr r0, [r2, r0] | r0 = *((r2 + r0));
0x00002944 str ip, [sp] | *(sp) = ip;
0x00002948 ldr r2, [r1, 4] | r2 = *(0x2968);
0x0000294c ldr r1, [pc, 0x1c] | r1 = *(0x296c);
0x00002950 ldr r0, [r0] | r0 = *(0x2968);
0x00002954 add r1, pc, r1 | r1 = pc + r1;
0x00002958 bl 0x23e8 | fprintf (r0, r1, r2, r3)
0x0000295c mov r0, 1 | r0 = 1;
0x00002960 bl 0x25b0 | exit (r0);
0x00002964 strdeq r7, r8, [r1], -r4 | __asm ("strdeq r7, r8, [r1], -r4");
0x00002968 strdeq r0, r1, [r0], -ip | __asm ("strdeq r0, r1, [r0], -ip");
0x0000296c strdeq r0, r1, [r0], -r0 | __asm ("strdeq r0, r1, [r0], -r0");
| /* Beware that this jump is a conditional jump.
| * r2dec transformed it as a return, due being the
| * last instruction. Please, check 'pdda' output
| * for more hints. */
0x00002970 andeq r6, r0, pc, lsr 5 | return r6 = r0 & (pc >> 5);
| }
; 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/libxtables.so.12.2.0 @ 0x394c */
| #include <stdint.h>
|
; (fcn) fcn.0000394c () | void fcn_0000394c (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_14h;
| char * format;
| int32_t var_1ch;
| int32_t var_20h;
| int32_t var_24h;
| int32_t var_28h;
| int32_t var_2ch;
| int32_t var_30h;
| char * s;
| int32_t var_19ch;
| r0 = arg1;
| r1 = arg2;
0x0000394c push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00003950 ldr r8, [pc, 0x18c] | r8 = *(0x3ae0);
0x00003954 mov sb, r3 | sb = r3;
0x00003958 ldr r3, [pc, 0x188] | r3 = *(0x3ae4);
0x0000395c sub sp, sp, 0x19c |
0x00003960 add r3, pc, r3 | r3 = pc + r3;
0x00003964 str r3, [sp, 0x28] | var_28h = r3;
0x00003968 mov r3, 0 | r3 = 0;
0x0000396c str r3, [sp, 0x2c] | var_2ch = r3;
0x00003970 ldr r3, [pc, 0x174] | r3 = *(0x3ae8);
0x00003974 mov r4, r0 | r4 = r0;
0x00003978 add r3, pc, r3 | r3 = pc + r3;
0x0000397c str r3, [sp, 0x14] | var_14h = r3;
0x00003980 ldr r3, [pc, 0x168] | r3 = *(0x3aec);
0x00003984 mov r7, r2 | r7 = r2;
0x00003988 add r3, pc, r3 | r3 = pc + r3;
0x0000398c add r8, pc, r8 | r8 = pc + r8;
0x00003990 str r1, [sp, 0x24] | var_24h = r1;
0x00003994 str r3, [sp, 0x18] | format = r3;
| label_0:
0x00003998 mov r1, 0x3a | r1 = 0x3a;
0x0000399c mov r0, r4 | r0 = r4;
0x000039a0 bl 0x2628 | r0 = strchr (r0, r1);
0x000039a4 subs r6, r0, 0 | r6 = r0 - 0;
| if (r6 == r0) {
0x000039a8 bne 0x39b8 |
0x000039ac mov r0, r4 | r0 = r4;
0x000039b0 bl 0x2610 | r0 = strlen (r0);
0x000039b4 add r6, r4, r0 | r6 = r4 + r0;
| }
0x000039b8 add sl, sp, 0x20 | sl += var_20h;
0x000039bc sub fp, r6, r4 |
0x000039c0 add r5, sp, 0x98 | r5 += s;
| do {
0x000039c4 ldr r3, [sl, 4]! | r3 = var_24h;
0x000039c8 cmp r3, 0 |
| if (r3 == 0) {
0x000039cc beq 0x3a88 | goto label_3;
| }
0x000039d0 stmib sp, {r3, r7} | __asm ("stmib sp, {r3, r7}");
0x000039d4 ldr r2, [sp, 0x14] | r2 = var_14h;
0x000039d8 mov r3, fp | r3 = fp;
0x000039dc mov r1, 0x100 | r1 = 0x100;
0x000039e0 str r4, [sp] | *(sp) = r4;
0x000039e4 mov r0, r5 | r0 = r5;
0x000039e8 bl 0x2244 | snprintf (r0, r1, r2, r3);
0x000039ec add r1, sp, 0x30 | r1 += var_30h;
0x000039f0 mov r0, r5 | r0 = r5;
0x000039f4 bl 0x2238 | stat64 ();
0x000039f8 subs r3, r0, 0 | r3 -= s;
| if (r3 == s) {
0x000039fc beq 0x3a48 | goto label_4;
| }
0x00003a00 bl 0x25a4 | r0 = errno_location ();
0x00003a04 ldr r0, [r0] | r0 = *(r0);
0x00003a08 cmp r0, 2 |
0x00003a0c beq 0x39c4 |
| } while (r0 == 2);
0x00003a10 ldr r3, [pc, 0xdc] | r3 = *(0x3af0);
0x00003a14 ldr r3, [r8, r3] | r3 = *((r8 + r3));
0x00003a18 ldr r4, [r3] | r4 = *(0x3af0);
0x00003a1c bl 0x2214 | strerror (r0);
0x00003a20 ldr r1, [pc, 0xd0] | r1 = *(0x3af4);
0x00003a24 mov r2, r5 | r2 = r5;
0x00003a28 add r1, pc, r1 | r1 = pc + r1;
0x00003a2c mov r3, r0 | r3 = r0;
0x00003a30 mov r0, r4 | r0 = r4;
0x00003a34 bl 0x23e8 | fprintf (r0, r1, r2, r3)
0x00003a38 mov r4, 0 | r4 = 0;
| label_1:
0x00003a3c mov r0, r4 | r0 = r4;
0x00003a40 add sp, sp, 0x19c |
0x00003a44 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_4:
0x00003a48 mov r1, 2 | r1 = 2;
0x00003a4c mov r0, r5 | r0 = r5;
0x00003a50 str r3, [sp, 0x1c] | var_1ch = r3;
0x00003a54 bl 0x243c | dlopen ();
0x00003a58 ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x00003a5c cmp r0, 0 |
| if (r0 != 0) {
0x00003a60 bne 0x3aa0 | goto label_5;
| }
0x00003a64 ldr r3, [pc, 0x88] | r3 = *(0x3af0);
0x00003a68 ldr r3, [r8, r3] | r3 = *((r8 + r3));
0x00003a6c ldr r4, [r3] | r4 = *(0x3af0);
0x00003a70 bl 0x21f0 | dlerror ();
0x00003a74 mov r2, r5 | r2 = r5;
0x00003a78 ldr r1, [sp, 0x18] | r1 = format;
0x00003a7c mov r3, r0 | r3 = r0;
0x00003a80 mov r0, r4 | r0 = r4;
0x00003a84 bl 0x23e8 | fprintf (r0, r1, r2, r3)
| label_3:
0x00003a88 ldrb r3, [r6] | r3 = *(r6);
0x00003a8c add r4, r6, 1 | r4 = r6 + 1;
0x00003a90 cmp r3, 0 |
| if (r3 != 0) {
0x00003a94 bne 0x3998 | goto label_0;
| }
0x00003a98 mov r4, r3 | r4 = r3;
0x00003a9c b 0x3a3c | goto label_1;
| label_5:
0x00003aa0 cmp sb, 0 |
| if (sb == 0) {
0x00003aa4 beq 0x3ad0 | goto label_6;
| }
0x00003aa8 mov r1, r3 | r1 = r3;
0x00003aac mov r0, r7 | r0 = r7;
0x00003ab0 bl 0x21cc | r0 = fcn_000021cc ();
| label_2:
0x00003ab4 cmp r0, 0 |
0x00003ab8 mov r4, r0 | r4 = r0;
| if (r0 != 0) {
0x00003abc bne 0x3a3c | goto label_1;
| }
0x00003ac0 bl 0x25a4 | errno_location ();
0x00003ac4 mov r3, 2 | r3 = 2;
0x00003ac8 str r3, [r0] | *(r0) = r3;
0x00003acc b 0x3a3c | goto label_1;
| label_6:
0x00003ad0 mov r2, sb | r2 = sb;
0x00003ad4 mov r1, sb | r1 = sb;
0x00003ad8 mov r0, r7 | r0 = r7;
0x00003adc bl 0x2514 | fcn_00002514 ();
0x00003ae0 b 0x3ab4 | goto label_2;
| }
; 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/libxtables.so.12.2.0 @ 0x4028 */
| #include <stdint.h>
|
; (fcn) sym.xtables_compatible_revision () | void xtables_compatible_revision (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_ch;
| char * dest;
| int32_t var_2dh;
| int32_t var_34h;
| r0 = arg1;
| r1 = arg2;
0x00004028 push {r4, r5, r6, r7, r8, sb, lr} |
0x0000402c ldr r5, [pc, 0x1b0] | r5 = *(0x41e0);
0x00004030 sub sp, sp, 0x34 |
0x00004034 mov r3, 0x1e | r3 = 0x1e;
0x00004038 str r3, [sp, 0xc] | var_ch = r3;
0x0000403c ldr r3, [pc, 0x1a4] | r3 = *(0x41e4);
0x00004040 add r5, pc, r5 | r5 = pc + r5;
0x00004044 ldr r7, [r5, r3] | r7 = *(0x41e0);
0x00004048 mov r8, r0 | r8 = r0;
0x0000404c ldr r3, [r7] | r3 = *(0x41e0);
0x00004050 mov r6, r1 | r6 = r1;
0x00004054 mov sb, r2 | sb = r2;
0x00004058 mov r1, 3 | r1 = 3;
0x0000405c mov r2, 0xff | r2 = 0xff;
0x00004060 ldrb r0, [r3, 0xc] | r0 = *((r3 + 0xc));
0x00004064 bl 0x2328 | r0 = socket (r0, r1, r2);
0x00004068 subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 >= r0) {
0x0000406c bge 0x40e4 | goto label_2;
| }
0x00004070 bl 0x25a4 | r0 = errno_location ();
0x00004074 ldr r4, [r0] | r4 = *(r0);
0x00004078 cmp r4, 1 |
| if (r4 == 1) {
0x0000407c bne 0x40b4 |
0x00004080 cmp r6, 0 |
| if (r6 != 0) {
0x00004084 beq 0x40a8 |
0x00004088 ldr r3, [pc, 0x15c] | r3 = *(0x41e8);
0x0000408c ldr r1, [pc, 0x15c] | r1 = *(0x41ec);
0x00004090 ldr r0, [r5, r3] | r0 = *((r5 + r3));
0x00004094 mov r2, r8 | r2 = r8;
0x00004098 mov r3, r6 | r3 = r6;
0x0000409c add r1, pc, r1 | r1 = pc + r1;
0x000040a0 ldr r0, [r0] | r0 = *(r0);
0x000040a4 bl 0x23e8 | fprintf (r0, r1, r2, r3)
| }
| label_0:
0x000040a8 mov r0, r4 | r0 = r4;
0x000040ac add sp, sp, 0x34 |
0x000040b0 pop {r4, r5, r6, r7, r8, sb, pc} |
| }
0x000040b4 ldr r3, [pc, 0x130] | r3 = *(0x41e8);
0x000040b8 mov r0, r4 | r0 = r4;
0x000040bc ldr r3, [r5, r3] | r3 = *((r5 + r3));
0x000040c0 ldr r5, [r3] | r5 = *(0x41e8);
0x000040c4 bl 0x2214 | strerror (r0);
0x000040c8 ldr r1, [pc, 0x124] | r1 = *(0x41f0);
0x000040cc add r1, pc, r1 | r1 = pc + r1;
0x000040d0 mov r2, r0 | r2 = r0;
0x000040d4 mov r0, r5 | r0 = r5;
| do {
0x000040d8 bl 0x23e8 | fprintf (r0, r1, r2)
0x000040dc mov r0, 1 | r0 = 1;
0x000040e0 bl 0x25b0 | exit (r0);
| label_2:
0x000040e4 mov r2, 1 | r2 = 1;
0x000040e8 mov r1, 2 | r1 = 2;
0x000040ec bl 0x2298 | r0 = fcntl64 ();
0x000040f0 cmn r0, 1 |
| if (r0 != 1) {
0x000040f4 bne 0x4124 | goto label_3;
| }
0x000040f8 ldr r3, [pc, 0xec] | r3 = *(0x41e8);
0x000040fc ldr r3, [r5, r3] | r3 = *((r5 + r3));
0x00004100 ldr r4, [r3] | r4 = *(0x41e8);
0x00004104 bl 0x25a4 | r0 = errno_location ();
0x00004108 ldr r0, [r0] | r0 = *(r0);
0x0000410c bl 0x2214 | strerror (r0);
0x00004110 ldr r1, [pc, 0xe0] | r1 = *(0x41f4);
0x00004114 add r1, pc, r1 | r1 = pc + r1;
0x00004118 mov r2, r0 | r2 = r0;
| label_1:
0x0000411c mov r0, r4 | r0 = r4;
0x00004120 b 0x40d8 |
| } while (1);
| label_3:
0x00004124 ldr r3, [pc, 0xd0] | r3 = *(0x41f8);
0x00004128 mov r1, 1 | r1 = 1;
0x0000412c ldr r3, [r5, r3] | r3 = *((r5 + r3));
0x00004130 ldr r0, [r3] | r0 = *(0x41f8);
0x00004134 bl 0x24c0 | fcn_000024c0 ();
0x00004138 add r3, sp, 0x10 | r3 += dest;
0x0000413c mov r1, r8 | r1 = r8;
0x00004140 mov r0, r3 | r0 = r3;
0x00004144 bl 0x21c0 | strcpy (r0, r1);
0x00004148 ldr r2, [r7] | r2 = *(r7);
0x0000414c strb r6, [sp, 0x2d] | var_2dh = r6;
0x00004150 ldrb r1, [r2, 0xd] | r1 = *((r2 + 0xd));
0x00004154 add r2, sp, 0xc | r2 += var_ch;
0x00004158 str r2, [sp] | *(sp) = r2;
0x0000415c mov r2, sb | r2 = sb;
0x00004160 mov r3, r0 | r3 = r0;
0x00004164 mov r0, r4 | r0 = r4;
0x00004168 bl 0x2568 | r0 = getsockopt ();
0x0000416c cmp r0, 0 |
| if (r0 < 0) {
0x00004170 bge 0x41d4 |
0x00004174 bl 0x25a4 | r0 = errno_location ();
0x00004178 ldr r0, [r0] | r0 = *(r0);
0x0000417c cmp r0, 0x5d |
0x00004180 cmpne r0, 2 | __asm ("cmpne r0, 2");
| if (r0 == 0x5d) {
0x00004184 bne 0x4198 |
0x00004188 mov r0, r4 | r0 = r4;
0x0000418c bl 0x264c | close (r0);
0x00004190 mov r4, 0 | r4 = 0;
0x00004194 b 0x40a8 | goto label_0;
| }
0x00004198 cmp r0, 0x5c |
| if (r0 == 0x5c) {
0x0000419c bne 0x41b4 |
0x000041a0 mov r0, r4 | r0 = r4;
0x000041a4 bl 0x264c | close (r0);
0x000041a8 clz r4, r6 | r4 &= r6;
0x000041ac lsr r4, r4, 5 | r4 >>= 5;
0x000041b0 b 0x40a8 | goto label_0;
| }
0x000041b4 ldr r3, [pc, 0x30] | r3 = *(0x41e8);
0x000041b8 ldr r3, [r5, r3] | r3 = *((r5 + r3));
0x000041bc ldr r4, [r3] | r4 = *(0x41e8);
0x000041c0 bl 0x2214 | strerror (r0);
0x000041c4 ldr r1, [pc, 0x34] | r1 = *(0x41fc);
0x000041c8 add r1, pc, r1 | r1 = pc + r1;
0x000041cc mov r2, r0 | r2 = r0;
0x000041d0 b 0x411c | goto label_1;
| }
0x000041d4 mov r0, r4 | r0 = r4;
0x000041d8 bl 0x264c | close (r0);
0x000041dc mov r4, 1 | r4 = 1;
0x000041e0 b 0x40a8 | goto label_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/libxtables.so.12.2.0 @ 0x3afc */
| #include <stdint.h>
|
; (fcn) sym.xtables_find_match () | void xtables_find_match (int32_t arg_0h, int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_4h;
| int32_t var_ch;
| int32_t var_10h;
| int32_t var_14h;
| int32_t var_1ch;
| r0 = arg1;
| r1 = arg2;
0x00003afc push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00003b00 ldr r7, [pc, 0x42c] | r7 = *(0x3f30);
0x00003b04 sub sp, sp, 0x1c |
0x00003b08 mov r6, r0 | r6 = r0;
0x00003b0c mov fp, r1 |
0x00003b10 mov sb, r2 | sb = r2;
0x00003b14 bl 0x2610 | strlen (r0);
0x00003b18 add r7, pc, r7 | r7 = pc + r7;
0x00003b1c cmp r0, 0x1c |
| if (r0 < 0x1c) {
0x00003b20 bls 0x3b4c | goto label_7;
| }
0x00003b24 ldr r3, [pc, 0x40c] |
0x00003b28 ldr r1, [pc, 0x40c] | r1 = *(0x3f38);
0x00003b2c ldr r3, [r7, r3] | r3 = *((r7 + r3));
0x00003b30 mov r2, r6 | r2 = r6;
0x00003b34 ldr r3, [r3] | r3 = *(0x3f34);
0x00003b38 add r1, pc, r1 | r1 = pc + r1;
0x00003b3c ldr r4, [r3, 0x14] | r4 = *(0x3f48);
0x00003b40 mov r3, 0x1c | r3 = 0x1c;
| do {
0x00003b44 mov r0, 2 | r0 = 2;
0x00003b48 blx r4 | uint32_t (*r4)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
| label_7:
0x00003b4c ldr r1, [pc, 0x3ec] | r1 = *(0x3f3c);
0x00003b50 mov r0, r6 | r0 = r6;
0x00003b54 add r1, pc, r1 | r1 = pc + r1;
0x00003b58 bl 0x2508 | r0 = strcmp (r0, r1);
0x00003b5c cmp r0, 0 |
| if (r0 == 0) {
0x00003b60 beq 0x3c9c | goto label_8;
| }
0x00003b64 ldr r1, [pc, 0x3d8] | r1 = *(0x3f40);
0x00003b68 mov r0, r6 | r0 = r6;
0x00003b6c add r1, pc, r1 | r1 = pc + r1;
0x00003b70 bl 0x2508 | r0 = strcmp (r0, r1);
0x00003b74 cmp r0, 0 |
| if (r0 == 0) {
0x00003b78 beq 0x3ca8 | goto label_9;
| }
0x00003b7c ldr r4, [pc, 0x3c4] | r4 = *(0x3f44);
0x00003b80 mov r0, r6 | r0 = r6;
0x00003b84 add r4, pc, r4 | r4 = pc + r4;
0x00003b88 mov r1, r4 | r1 = r4;
0x00003b8c bl 0x2508 | r0 = strcmp (r0, r1);
0x00003b90 cmp r0, 0 |
| if (r0 != 0) {
0x00003b94 moveq r6, r4 | r6 = r4;
| }
| label_0:
0x00003b98 ldr r3, [pc, 0x3ac] | r3 = *(0x3f48);
0x00003b9c ldr r8, [r7, r3] | r8 = *((r7 + r3));
| label_1:
0x00003ba0 ldr r5, [r8] | r5 = *(r8);
0x00003ba4 cmp r5, 0 |
| if (r5 != 0) {
0x00003ba8 bne 0x3cb4 | goto label_10;
| }
0x00003bac ldr r3, [pc, 0x39c] | r3 = *(0x3f4c);
0x00003bb0 ldr r3, [r7, r3] | r3 = *((r7 + r3));
0x00003bb4 ldr r4, [r3] | r4 = *(0x3f4c);
| label_5:
0x00003bb8 cmp r4, 0 |
| if (r4 != 0) {
0x00003bbc beq 0x3c10 |
0x00003bc0 ldrh r2, [r4, 0x12] | r2 = *((r4 + 0x12));
0x00003bc4 ldr r1, [r4, 8] | r1 = *((r4 + 8));
0x00003bc8 mov r0, r6 | r0 = r6;
0x00003bcc bl 0x2974 | r0 = fcn_00002974 (r0, r1);
0x00003bd0 cmp r0, 0 |
| if (r0 == 0) {
0x00003bd4 beq 0x3eb4 | goto label_11;
| }
0x00003bd8 ldr r3, [r4, 0x58] | r3 = *((r4 + 0x58));
0x00003bdc cmp r3, 0 |
| if (r3 == 0) {
0x00003be0 beq 0x3c10 | goto label_12;
| }
0x00003be4 mov r0, 0x64 | r0 = 0x64;
0x00003be8 bl 0x2400 | fcn_00002400 ();
0x00003bec mov r2, 0x64 | r2 = 0x64;
0x00003bf0 mov r1, r4 | r1 = r4;
0x00003bf4 bl 0x22a4 | memcpy (r0, r1, r2);
0x00003bf8 mov r2, 0 | r2 = 0;
0x00003bfc mov r3, r0 | r3 = r0;
0x00003c00 mov r4, r0 | r4 = r0;
0x00003c04 str r2, [r0, 0x50] | *((r0 + 0x50)) = r2;
0x00003c08 str r2, [r0, 0x5c] | *((r0 + 0x5c)) = r2;
0x00003c0c str r0, [r3, 4] | *((r3 + 4)) = r0;
| }
| label_12:
0x00003c10 adds r3, fp, 0 | r3 += arg_0h;
| if (r3 == arg_0h) {
0x00003c14 movne r3, 1 | r3 = 1;
| }
0x00003c18 cmp r4, 0 |
| if (r4 == 0) {
0x00003c1c movne r3, 0 | r3 = 0;
| }
0x00003c20 cmp r3, 0 |
| if (r3 == 0) {
0x00003c24 beq 0x3ebc | goto label_13;
| }
0x00003c28 cmp fp, 1 |
| if (fp != 1) {
0x00003c2c moveq r4, 0 | r4 = 0;
| }
| if (fp == 1) {
0x00003c30 beq 0x3ebc | goto label_13;
| }
0x00003c34 ldr r3, [pc, 0x318] | r3 = "_";
0x00003c38 ldr r0, [pc, 0x318] |
0x00003c3c ldr r3, [r7, r3] | r3 = *((r7 + r3));
0x00003c40 add r0, pc, r0 | r0 = pc + r0;
0x00003c44 ldr r1, [r3] |
0x00003c48 mov r2, r6 | r2 = r6;
0x00003c4c mov r3, 0 | r3 = 0;
0x00003c50 ldr r1, [r1, 8] | r1 = *(0x3f58);
0x00003c54 ldr r0, [r0] | r0 = *(0x3f54);
0x00003c58 bl 0x394c | r0 = fcn_0000394c (r0, r1);
0x00003c5c cmp r0, 0 |
0x00003c60 cmpeq fp, 3 | __asm ("cmpeq fp, 3");
0x00003c64 mov r4, r0 | r4 = r0;
| if (r0 != 0) {
0x00003c68 bne 0x3ebc | goto label_13;
| }
0x00003c6c ldr r3, [pc, 0x2c4] |
0x00003c70 ldr r3, [r7, r3] | r3 = *((r7 + r3));
0x00003c74 ldr r3, [r3] | r3 = *(0x3f34);
0x00003c78 ldr r4, [r3, 0x14] | r4 = *(0x3f48);
0x00003c7c bl 0x25a4 | r0 = errno_location ();
0x00003c80 ldr r0, [r0] | r0 = *(r0);
0x00003c84 bl 0x2214 | strerror (r0);
0x00003c88 ldr r1, [pc, 0x2cc] | r1 = *(0x3f58);
0x00003c8c mov r2, r6 | r2 = r6;
0x00003c90 add r1, pc, r1 | r1 = pc + r1;
0x00003c94 mov r3, r0 | r3 = r0;
0x00003c98 b 0x3b44 |
| } while (1);
| label_8:
0x00003c9c ldr r6, [pc, 0x2bc] | r6 = *(0x3f5c);
0x00003ca0 add r6, pc, r6 | r6 = pc + r6;
0x00003ca4 b 0x3b98 | goto label_0;
| label_9:
0x00003ca8 ldr r6, [pc, 0x2b4] | r6 = *(0x3f60);
0x00003cac add r6, pc, r6 | r6 = pc + r6;
0x00003cb0 b 0x3b98 | goto label_0;
| label_10:
0x00003cb4 ldr r4, [r5, 8] | r4 = *((r5 + 8));
0x00003cb8 ldrh r2, [r5, 0x12] | r2 = *((r5 + 0x12));
0x00003cbc mov r1, r4 | r1 = r4;
0x00003cc0 mov r0, r6 | r0 = r6;
0x00003cc4 bl 0x2974 | r0 = fcn_00002974 (r0, r1);
0x00003cc8 cmp r0, 0 |
| if (r0 == 0) {
0x00003ccc beq 0x3eac | goto label_14;
| }
0x00003cd0 ldr r3, [r5, 4] | r3 = *((r5 + 4));
0x00003cd4 ldr r0, [r5, 0xc] | r0 = *((r5 + 0xc));
0x00003cd8 str r3, [r8] | *(r8) = r3;
0x00003cdc ldr r3, [pc, 0x270] | r3 = "_";
0x00003ce0 cmp r0, 0 |
0x00003ce4 ldr r3, [r7, r3] | r3 = *((r7 + r3));
| if (r0 != 0) {
0x00003ce8 moveq r0, r4 | r0 = r4;
| }
0x00003cec str r3, [sp, 0x14] | var_14h = r3;
0x00003cf0 ldr r2, [r3] |
0x00003cf4 ldr r3, [pc, 0x23c] |
0x00003cf8 ldr r2, [r2, 0x10] | r2 = *(0x3f60);
0x00003cfc ldr r3, [r7, r3] | r3 = *((r7 + r3));
0x00003d00 ldrb r1, [r5, 0x10] | r1 = *((r5 + 0x10));
0x00003d04 str r3, [sp, 0xc] | var_ch = r3;
0x00003d08 ldr r3, [r3] |
0x00003d0c ldr r3, [r3, 0x18] | r3 = *(0x3f4c);
0x00003d10 blx r3 | r0 = uint32_t (*r3)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x00003d14 cmp r0, 0 |
| if (r0 != 0) {
0x00003d18 streq r5, [r8] | *(r8) = r5;
| }
| if (r0 == 0) {
0x00003d1c beq 0x3eac | goto label_14;
| }
0x00003d20 mov r2, 0 | r2 = 0;
0x00003d24 mov r1, 1 | r1 = 1;
0x00003d28 ldr r0, [r5, 8] | r0 = *((r5 + 8));
0x00003d2c bl 0x2514 | fcn_00002514 ();
0x00003d30 mov r3, 0 | r3 = 0;
0x00003d34 mov r4, r0 | r4 = r0;
| do {
0x00003d38 cmp r4, 0 |
| if (r4 == 0) {
0x00003d3c bne 0x3d78 |
0x00003d40 cmp r3, 0 |
| if (r3 == 0) {
0x00003d44 movne r4, r3 | r4 = r3;
| }
| if (r3 != 0) {
0x00003d48 bne 0x3ea0 | goto label_15;
| }
0x00003d4c ldr r3, [pc, 0x1fc] | r3 = *(0x3f4c);
0x00003d50 ldr r3, [r7, r3] | r3 = *((r7 + r3));
0x00003d54 ldr r4, [r3] | r4 = *(0x3f4c);
| label_3:
0x00003d58 cmp r4, 0 |
| if (r4 != 0) {
0x00003d5c bne 0x3e80 | goto label_16;
| }
| label_4:
0x00003d60 str r4, [r5, 4] | *((r5 + 4)) = r4;
0x00003d64 str r5, [r3] | *(r3) = r5;
0x00003d68 mov r3, 0 | r3 = 0;
0x00003d6c str r3, [r5, 0x58] | *((r5 + 0x58)) = r3;
0x00003d70 str r3, [r5, 0x5c] | *((r5 + 0x5c)) = r3;
0x00003d74 b 0x3ba0 | goto label_1;
| }
0x00003d78 ldrb r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x00003d7c ldrh r1, [r5, 0x12] | r1 = *((r5 + 0x12));
0x00003d80 str r3, [sp, 0x10] | var_10h = r3;
0x00003d84 ldr r3, [r5, 0xc] | r3 = *((r5 + 0xc));
0x00003d88 ldr sl, [r4, 0xc] | sl = *((r4 + 0xc));
0x00003d8c ldrh r2, [r4, 0x12] | r2 = *((r4 + 0x12));
0x00003d90 str r1, [sp, 4] | var_4h = r1;
0x00003d94 ldrb r1, [r5, 0x10] | r1 = *((r5 + 0x10));
0x00003d98 adds r3, r3, 0 | r3 += 0;
| if (r3 == r3) {
0x00003d9c movne r3, 1 | r3 = 1;
| }
0x00003da0 adds r0, sl, 0 | r0 = sl + 0;
0x00003da4 str r1, [sp] | *(sp) = r1;
| if (r0 == sl) {
0x00003da8 movne r0, 1 | r0 = 1;
| }
0x00003dac ldr r1, [sp, 0x10] | r1 = var_10h;
0x00003db0 bl 0x29c4 | r0 = fcn_000029c4 (r0, r1, r2, r3);
0x00003db4 cmp r0, 0 |
| if (r0 == 0) {
0x00003db8 bne 0x3dec |
0x00003dbc ldr r3, [sp, 0xc] | r3 = var_ch;
0x00003dc0 ldr r1, [pc, 0x1a0] | r1 = *(0x3f64);
0x00003dc4 ldr r2, [r3] | r2 = *(r3);
0x00003dc8 ldr r3, [pc, 0x19c] | r3 = *(0x3f68);
0x00003dcc ldr r2, [r2, 4] | r2 = *((r2 + 4));
0x00003dd0 ldr r0, [r7, r3] | r0 = *((r7 + r3));
0x00003dd4 add r1, pc, r1 | r1 = pc + r1;
0x00003dd8 ldr r3, [r5, 8] | r3 = *((r5 + 8));
0x00003ddc ldr r0, [r0] | r0 = *(r0);
0x00003de0 bl 0x23e8 | fprintf (r0, r1, r2, r3)
0x00003de4 mov r0, 1 | r0 = 1;
0x00003de8 bl 0x25b0 | exit (r0);
| }
0x00003dec cmp sl, 0 |
| if (sl != 0) {
0x00003df0 ldreq sl, [r4, 8] | sl = *((r4 + 8));
| }
0x00003df4 cmp r0, 0 |
| if (r0 <= 0) {
0x00003df8 ble 0x3f24 | goto label_17;
| }
0x00003dfc ldr r3, [sp, 0x14] | r3 = var_14h;
0x00003e00 ldr r1, [sp, 0x10] | r1 = var_10h;
0x00003e04 ldr r2, [r3] | r2 = *(r3);
0x00003e08 ldr r3, [sp, 0xc] | r3 = var_ch;
0x00003e0c ldr r2, [r2, 0x10] | r2 = *((r2 + 0x10));
0x00003e10 ldr r3, [r3] | r3 = *(r3);
0x00003e14 mov r0, sl | r0 = sl;
0x00003e18 ldr r3, [r3, 0x18] | r3 = *((r3 + 0x18));
0x00003e1c blx r3 | r0 = uint32_t (*r3)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x00003e20 cmp r0, 0 |
| if (r0 == 0) {
0x00003e24 bne 0x3e44 |
0x00003e28 ldr r3, [pc, 0x120] | r3 = *(0x3f4c);
0x00003e2c ldr r3, [r7, r3] | r3 = *((r7 + r3));
0x00003e30 ldr r2, [r3] | r2 = *(0x3f4c);
| label_2:
0x00003e34 cmp r4, r2 |
| if (r4 != r2) {
0x00003e38 bne 0x3e74 | goto label_18;
| }
0x00003e3c ldr r2, [r4, 4] | r2 = *((r4 + 4));
0x00003e40 str r2, [r3] | *(r3) = r2;
| }
0x00003e44 ldr sl, [r4, 4] | sl = *((r4 + 4));
0x00003e48 cmp sl, 0 |
| if (sl == 0) {
0x00003e4c beq 0x3ea0 | goto label_15;
| }
0x00003e50 ldrh r2, [sl, 0x12] | r2 = *((sl + 0x12));
0x00003e54 ldr r1, [sl, 8] | r1 = *((sl + 8));
0x00003e58 ldr r0, [r5, 8] | r0 = *((r5 + 8));
0x00003e5c bl 0x2974 | fcn_00002974 (r0, r1);
0x00003e60 mov r3, r4 | r3 = r4;
0x00003e64 cmp r0, 0 |
| if (r0 == 0) {
0x00003e68 beq 0x3ea0 | goto label_15;
| }
0x00003e6c mov r4, sl | r4 = sl;
0x00003e70 b 0x3d38 |
| } while (1);
| label_18:
0x00003e74 add r3, r2, 4 | r3 = r2 + 4;
0x00003e78 ldr r2, [r2, 4] | r2 = *((r2 + 4));
0x00003e7c b 0x3e34 | goto label_2;
| label_16:
0x00003e80 add r3, r4, 4 | r3 = r4 + 4;
0x00003e84 ldr r4, [r4, 4] | r4 = *((r4 + 4));
0x00003e88 b 0x3d58 | goto label_3;
| do {
0x00003e8c add r3, r2, 4 | r3 = r2 + 4;
0x00003e90 ldr r2, [r2, 4] | r2 = *((r2 + 4));
| label_6:
0x00003e94 cmp r4, r2 |
0x00003e98 bne 0x3e8c |
| } while (r4 != r2);
0x00003e9c b 0x3d60 | goto label_4;
| label_15:
0x00003ea0 add r3, r4, 4 | r3 = r4 + 4;
0x00003ea4 ldr r4, [r4, 4] | r4 = *((r4 + 4));
0x00003ea8 b 0x3d60 | goto label_4;
| label_14:
0x00003eac add r8, r5, 4 | r8 = r5 + 4;
0x00003eb0 b 0x3ba0 | goto label_1;
| label_11:
0x00003eb4 ldr r4, [r4, 4] | r4 = *((r4 + 4));
0x00003eb8 b 0x3bb8 | goto label_5;
| label_13:
0x00003ebc cmp r4, 0 |
0x00003ec0 cmpne sb, 0 | __asm ("cmpne sb, 0");
| if (r4 == 0) {
0x00003ec4 beq 0x3ef4 | goto label_19;
| }
0x00003ec8 mov r0, 0xc | r0 = 0xc;
0x00003ecc bl 0x2400 | fcn_00002400 ();
0x00003ed0 mov r8, 1 | r8 = 1;
0x00003ed4 mov r7, r0 | r7 = r0;
| do {
0x00003ed8 ldr r5, [sb] | r5 = *(sb);
0x00003edc cmp r5, 0 |
| if (r5 == 0) {
0x00003ee0 bne 0x3f00 |
0x00003ee4 str r4, [r7, 4] | *((r7 + 4)) = r4;
0x00003ee8 strb r5, [r7, 8] | *((r7 + 8)) = r5;
0x00003eec str r5, [r7] | *(r7) = r5;
0x00003ef0 str r7, [sb] | *(sb) = r7;
| label_19:
0x00003ef4 mov r0, r4 | r0 = r4;
0x00003ef8 add sp, sp, 0x1c |
0x00003efc pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| }
0x00003f00 ldr r3, [r5, 4] | r3 = *((r5 + 4));
0x00003f04 mov r0, r6 | r0 = r6;
0x00003f08 ldrh r2, [r3, 0x12] | r2 = *((r3 + 0x12));
0x00003f0c ldr r1, [r3, 8] | r1 = *((r3 + 8));
0x00003f10 bl 0x2974 | fcn_00002974 (r0, r1);
0x00003f14 mov sb, r5 | sb = r5;
0x00003f18 cmp r0, 0 |
| if (r0 == 0) {
0x00003f1c strbne r8, [r5, 8] | *((r5 + 8)) = r8;
| }
0x00003f20 b 0x3ed8 |
| } while (1);
| label_17:
0x00003f24 ldr r3, [pc, 0x24] | r3 = *(0x3f4c);
0x00003f28 ldr r3, [r7, r3] | r3 = *((r7 + r3));
0x00003f2c ldr r2, [r3] | r2 = *(0x3f4c);
0x00003f30 b 0x3e94 | 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/libxtables.so.12.2.0 @ 0x3f70 */
| #include <stdint.h>
|
; (fcn) sym.xtables_find_match_revision () | void xtables_find_match_revision (int32_t arg1) {
| r0 = arg1;
0x00003f70 push {r4, r5, r6, lr} |
0x00003f74 subs r4, r2, 0 | r4 = r2 - 0;
0x00003f78 mov r5, r0 | r5 = r0;
0x00003f7c mov r6, r3 | r6 = r3;
| if (r4 != r2) {
0x00003f80 bne 0x3f90 | goto label_0;
| }
0x00003f84 bl 0x2514 | r0 = fcn_00002514 ();
0x00003f88 subs r4, r0, 0 | r4 = r0 - 0;
| do {
| if (r4 == r0) {
0x00003f8c beq 0x3fc0 | goto label_1;
| }
| label_0:
0x00003f90 ldrb r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x00003f94 cmp r3, r6 |
| if (r3 == r6) {
0x00003f98 beq 0x3fc4 | goto label_2;
| }
0x00003f9c ldr r4, [r4, 4] | r4 = *((r4 + 4));
0x00003fa0 cmp r4, 0 |
| if (r4 == 0) {
0x00003fa4 beq 0x3fc0 | goto label_1;
| }
0x00003fa8 ldrh r2, [r4, 0x12] | r2 = *((r4 + 0x12));
0x00003fac ldr r1, [r4, 8] | r1 = *((r4 + 8));
0x00003fb0 mov r0, r5 | r0 = r5;
0x00003fb4 bl 0x2974 | r0 = fcn_00002974 (r0, r1);
0x00003fb8 cmp r0, 0 |
0x00003fbc b 0x3f8c |
| } while (1);
| label_1:
0x00003fc0 mov r4, 0 | r4 = 0;
| label_2:
0x00003fc4 mov r0, r4 | r0 = r4;
0x00003fc8 pop {r4, r5, r6, pc} |
| }
; 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/libxtables.so.12.2.0 @ 0x3540 */
| #include <stdint.h>
|
; (fcn) sym.xtables_find_target () | void xtables_find_target (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| int32_t var_4h;
| char * s2;
| int32_t var_14h;
| r0 = arg1;
| r1 = arg2;
0x00003540 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00003544 ldrb r3, [r0] | r3 = *(r0);
0x00003548 ldr r6, [pc, 0x3b0] | r6 = *(0x38fc);
0x0000354c cmp r3, 0 |
0x00003550 add r6, pc, r6 | r6 = pc + r6;
0x00003554 sub sp, sp, 0x14 |
0x00003558 mov sl, r1 | sl = r1;
| if (r3 == 0) {
0x0000355c beq 0x3684 | goto label_7;
| }
0x00003560 ldr r1, [pc, 0x39c] | r1 = *(0x3900);
0x00003564 mov r7, r0 | r7 = r0;
0x00003568 add r1, pc, r1 | r1 = pc + r1;
0x0000356c bl 0x2508 | r0 = strcmp (r0, r1);
0x00003570 cmp r0, 0 |
| if (r0 == 0) {
0x00003574 beq 0x3690 | goto label_8;
| }
0x00003578 ldr r1, [pc, 0x388] | r1 = *(0x3904);
0x0000357c mov r0, r7 | r0 = r7;
0x00003580 add r1, pc, r1 | r1 = pc + r1;
0x00003584 bl 0x2508 | r0 = strcmp (r0, r1);
0x00003588 cmp r0, 0 |
| if (r0 == 0) {
0x0000358c beq 0x369c | goto label_9;
| }
0x00003590 ldr r1, [pc, 0x374] | r1 = *(0x3908);
0x00003594 mov r0, r7 | r0 = r7;
0x00003598 add r1, pc, r1 | r1 = pc + r1;
0x0000359c bl 0x2508 | r0 = strcmp (r0, r1);
0x000035a0 cmp r0, 0 |
| if (r0 == 0) {
0x000035a4 beq 0x36a8 | goto label_10;
| }
0x000035a8 ldr r1, [pc, 0x360] | r1 = *(0x390c);
0x000035ac mov r0, r7 | r0 = r7;
0x000035b0 add r1, pc, r1 | r1 = pc + r1;
0x000035b4 bl 0x2508 | r0 = strcmp (r0, r1);
0x000035b8 cmp r0, 0 |
| if (r0 == 0) {
0x000035bc beq 0x36b4 | goto label_11;
| }
| do {
| label_0:
0x000035c0 ldr r3, [pc, 0x34c] | r3 = *(0x3910);
0x000035c4 ldr r8, [r6, r3] | r8 = *((r6 + r3));
0x000035c8 ldr r3, [pc, 0x348] | r3 = *(0x3914);
0x000035cc add r3, pc, r3 | r3 = pc + r3;
0x000035d0 str r3, [sp, 0xc] | s2 = r3;
| label_1:
0x000035d4 ldr r4, [r8] | r4 = *(r8);
0x000035d8 cmp r4, 0 |
| if (r4 != 0) {
0x000035dc bne 0x36c0 | goto label_12;
| }
0x000035e0 ldr r3, [pc, 0x334] | r3 = *(0x3918);
0x000035e4 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x000035e8 ldr r4, [r3] | r4 = *(0x3918);
| label_5:
0x000035ec cmp r4, 0 |
| if (r4 != 0) {
0x000035f0 bne 0x38b8 | goto label_13;
| }
| label_4:
0x000035f4 adds r3, sl, 0 | r3 = sl + 0;
| if (r3 == sl) {
0x000035f8 movne r3, 1 | r3 = 1;
| }
0x000035fc cmp r4, 0 |
| if (r4 == 0) {
0x00003600 movne r3, 0 | r3 = 0;
| }
0x00003604 cmp r3, 0 |
| if (r3 == 0) {
0x00003608 beq 0x38d8 | goto label_14;
| }
0x0000360c cmp sl, 1 |
| if (sl != 1) {
0x00003610 moveq r4, 0 | r4 = 0;
| }
| if (sl == 1) {
0x00003614 beq 0x38e4 | goto label_15;
| }
0x00003618 ldr r3, [pc, 0x300] | r3 = *(0x391c);
0x0000361c ldr r0, [pc, 0x300] |
0x00003620 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00003624 add r0, pc, r0 | r0 = pc + r0;
0x00003628 ldr r1, [r3] |
0x0000362c mov r2, r7 | r2 = r7;
0x00003630 mov r3, 1 | r3 = 1;
0x00003634 ldr r1, [r1, 8] | r1 = *(0x3924);
0x00003638 ldr r0, [r0] | r0 = *(0x3920);
0x0000363c bl 0x394c | r0 = fcn_0000394c (r0, r1);
0x00003640 cmp r0, 0 |
0x00003644 cmpeq sl, 3 | __asm ("cmpeq sl, 3");
0x00003648 mov r4, r0 | r4 = r0;
| if (r0 != 0) {
0x0000364c bne 0x38d8 | goto label_14;
| }
0x00003650 ldr r3, [pc, 0x2d0] |
0x00003654 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00003658 ldr r3, [r3] | r3 = *(0x3924);
0x0000365c ldr r4, [r3, 0x14] | r4 = *(0x3938);
0x00003660 bl 0x25a4 | r0 = errno_location ();
0x00003664 ldr r0, [r0] | r0 = *(r0);
0x00003668 bl 0x2214 | strerror (r0);
0x0000366c ldr r1, [pc, 0x2b8] | r1 = *(0x3928);
0x00003670 mov r2, r7 | r2 = r7;
0x00003674 add r1, pc, r1 | r1 = pc + r1;
0x00003678 mov r3, r0 | r3 = r0;
0x0000367c mov r0, 2 | r0 = 2;
0x00003680 blx r4 | uint32_t (*r4)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
| label_7:
0x00003684 ldr r7, [pc, 0x2a4] | r7 = *(0x392c);
0x00003688 add r7, pc, r7 | r7 = pc + r7;
0x0000368c b 0x35c0 |
| } while (1);
| label_8:
0x00003690 ldr r7, [pc, 0x29c] | r7 = *(0x3930);
0x00003694 add r7, pc, r7 | r7 = pc + r7;
0x00003698 b 0x35c0 | goto label_0;
| label_9:
0x0000369c ldr r7, [pc, 0x294] | r7 = *(0x3934);
0x000036a0 add r7, pc, r7 | r7 = pc + r7;
0x000036a4 b 0x35c0 | goto label_0;
| label_10:
0x000036a8 ldr r7, [pc, 0x28c] | r7 = *(0x3938);
0x000036ac add r7, pc, r7 | r7 = pc + r7;
0x000036b0 b 0x35c0 | goto label_0;
| label_11:
0x000036b4 ldr r7, [pc, 0x284] | r7 = *(0x393c);
0x000036b8 add r7, pc, r7 | r7 = pc + r7;
0x000036bc b 0x35c0 | goto label_0;
| label_12:
0x000036c0 ldr r5, [r4, 8] | r5 = *((r4 + 8));
0x000036c4 ldrh r2, [r4, 0x12] | r2 = *((r4 + 0x12));
0x000036c8 mov r1, r5 | r1 = r5;
0x000036cc mov r0, r7 | r0 = r7;
0x000036d0 bl 0x2974 | r0 = fcn_00002974 (r0, r1);
0x000036d4 cmp r0, 0 |
| if (r0 == 0) {
0x000036d8 beq 0x38b0 | goto label_16;
| }
0x000036dc ldr r3, [r4, 4] | r3 = *((r4 + 4));
0x000036e0 ldr r1, [sp, 0xc] | r1 = s2;
0x000036e4 str r3, [r8] | *(r8) = r3;
0x000036e8 mov r0, r5 | r0 = r5;
0x000036ec bl 0x2508 | r0 = strcmp (r0, r1);
0x000036f0 cmp r0, 0 |
| if (r0 != 0) {
0x000036f4 beq 0x3738 |
0x000036f8 ldr r3, [pc, 0x220] | r3 = *(0x391c);
0x000036fc ldr r0, [r4, 0xc] | r0 = *((r4 + 0xc));
0x00003700 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00003704 cmp r0, 0 |
0x00003708 ldr r2, [r3] |
0x0000370c ldr r3, [pc, 0x214] |
| if (r0 != 0) {
0x00003710 moveq r0, r5 | r0 = r5;
| }
0x00003714 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00003718 ldr r2, [r2, 0x14] | r2 = *(0x3930);
0x0000371c ldr r3, [r3] |
0x00003720 ldrb r1, [r4, 0x10] | r1 = *((r4 + 0x10));
0x00003724 ldr r3, [r3, 0x18] | r3 = *(0x393c);
0x00003728 blx r3 | r0 = uint32_t (*r3)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x0000372c cmp r0, 0 |
| if (r0 != 0) {
0x00003730 streq r4, [r8] | *(r8) = r4;
| }
| if (r0 == 0) {
0x00003734 beq 0x38b0 | goto label_16;
| }
| }
0x00003738 mov r1, 1 | r1 = 1;
0x0000373c ldr r0, [r4, 8] | r0 = *((r4 + 8));
0x00003740 bl 0x21cc | fcn_000021cc ();
0x00003744 mov r3, 0 | r3 = 0;
0x00003748 mov r5, r0 | r5 = r0;
| do {
0x0000374c cmp r5, 0 |
| if (r5 == 0) {
0x00003750 bne 0x3784 |
0x00003754 cmp r3, 0 |
| if (r3 == 0) {
0x00003758 movne r5, r3 | r5 = r3;
| }
| if (r3 != 0) {
0x0000375c bne 0x38a4 | goto label_17;
| }
0x00003760 ldr r3, [pc, 0x1b4] | r3 = *(0x3918);
0x00003764 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00003768 ldr r5, [r3] | r5 = *(0x3918);
| label_3:
0x0000376c str r5, [r4, 4] | *((r4 + 4)) = r5;
0x00003770 str r4, [r3] | *(r3) = r4;
0x00003774 mov r3, 0 | r3 = 0;
0x00003778 str r3, [r4, 0x58] | *((r4 + 0x58)) = r3;
0x0000377c str r3, [r4, 0x5c] | *((r4 + 0x5c)) = r3;
0x00003780 b 0x35d4 | goto label_1;
| }
0x00003784 ldrh r1, [r4, 0x12] | r1 = *((r4 + 0x12));
0x00003788 ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x0000378c ldr sb, [r5, 0xc] | sb = *((r5 + 0xc));
0x00003790 ldrb fp, [r5, 0x10] | fp = *((r5 + 0x10));
0x00003794 ldrh r2, [r5, 0x12] | r2 = *((r5 + 0x12));
0x00003798 str r1, [sp, 4] | var_4h = r1;
0x0000379c ldrb r1, [r4, 0x10] | r1 = *((r4 + 0x10));
0x000037a0 adds r3, r3, 0 | r3 += 0;
| if (r3 == r3) {
0x000037a4 movne r3, 1 | r3 = 1;
| }
0x000037a8 adds r0, sb, 0 | r0 = sb + 0;
0x000037ac str r1, [sp] | *(sp) = r1;
| if (r0 == sb) {
0x000037b0 movne r0, 1 | r0 = 1;
| }
0x000037b4 mov r1, fp | r1 = fp;
0x000037b8 bl 0x29c4 | r0 = fcn_000029c4 (r0, r1, r2, r3);
0x000037bc cmp r0, 0 |
| if (r0 == 0) {
0x000037c0 bne 0x37f8 |
0x000037c4 ldr r3, [pc, 0x15c] | r3 = *(0x3924);
0x000037c8 ldr r1, [pc, 0x174] | r1 = *(0x3940);
0x000037cc ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x000037d0 add r1, pc, r1 | r1 = pc + r1;
0x000037d4 ldr r2, [r3] |
0x000037d8 ldr r3, [pc, 0x168] | r3 = *(0x3944);
0x000037dc ldr r2, [r2, 4] | r2 = *(0x3928);
0x000037e0 ldr r0, [r6, r3] | r0 = *((r6 + r3));
0x000037e4 ldr r3, [r4, 8] | r3 = *((r4 + 8));
0x000037e8 ldr r0, [r0] | r0 = *(r0);
0x000037ec bl 0x23e8 | fprintf (r0, r1, r2, r3)
0x000037f0 mov r0, 1 | r0 = 1;
0x000037f4 bl 0x25b0 | exit (r0);
| }
0x000037f8 cmp sb, 0 |
| if (sb != 0) {
0x000037fc ldreq sb, [r5, 8] | sb = *((r5 + 8));
| }
0x00003800 cmp r0, 0 |
| if (r0 <= 0) {
0x00003804 ble 0x38f0 | goto label_18;
| }
0x00003808 ldr r3, [pc, 0x110] | r3 = *(0x391c);
0x0000380c mov r0, sb | r0 = sb;
0x00003810 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00003814 ldr r2, [r3] |
0x00003818 ldr r3, [pc, 0x108] |
0x0000381c ldr r2, [r2, 0x14] | r2 = *(0x3930);
0x00003820 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00003824 ldr r3, [r3] |
0x00003828 ldr r3, [r3, 0x18] | r3 = *(0x393c);
0x0000382c blx r3 | r0 = uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r2, r3);
0x00003830 cmp r0, 0 |
| if (r0 == 0) {
0x00003834 bne 0x3854 |
0x00003838 ldr r3, [pc, 0xdc] | r3 = *(0x3918);
0x0000383c ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00003840 ldr r2, [r3] | r2 = *(0x3918);
| label_2:
0x00003844 cmp r5, r2 |
| if (r5 != r2) {
0x00003848 bne 0x3884 | goto label_19;
| }
0x0000384c ldr r2, [r5, 4] | r2 = *((r5 + 4));
0x00003850 str r2, [r3] | *(r3) = r2;
| }
0x00003854 ldr sb, [r5, 4] | sb = *((r5 + 4));
0x00003858 cmp sb, 0 |
| if (sb == 0) {
0x0000385c beq 0x38a4 | goto label_17;
| }
0x00003860 ldrh r2, [sb, 0x12] | r2 = *((sb + 0x12));
0x00003864 ldr r1, [sb, 8] | r1 = *((sb + 8));
0x00003868 ldr r0, [r4, 8] | r0 = *((r4 + 8));
0x0000386c bl 0x2974 | fcn_00002974 (r0, r1);
0x00003870 mov r3, r5 | r3 = r5;
0x00003874 cmp r0, 0 |
| if (r0 == 0) {
0x00003878 beq 0x38a4 | goto label_17;
| }
0x0000387c mov r5, sb | r5 = sb;
0x00003880 b 0x374c |
| } while (1);
| label_19:
0x00003884 add r3, r2, 4 | r3 = r2 + 4;
0x00003888 ldr r2, [r2, 4] | r2 = *((r2 + 4));
0x0000388c b 0x3844 | goto label_2;
| do {
0x00003890 add r3, r2, 4 | r3 = r2 + 4;
0x00003894 ldr r2, [r2, 4] | r2 = *((r2 + 4));
| label_6:
0x00003898 cmp r5, r2 |
0x0000389c bne 0x3890 |
| } while (r5 != r2);
0x000038a0 b 0x376c | goto label_3;
| label_17:
0x000038a4 add r3, r5, 4 | r3 = r5 + 4;
0x000038a8 ldr r5, [r5, 4] | r5 = *((r5 + 4));
0x000038ac b 0x376c | goto label_3;
| label_16:
0x000038b0 add r8, r4, 4 | r8 = r4 + 4;
0x000038b4 b 0x35d4 | goto label_1;
| label_13:
0x000038b8 ldrh r2, [r4, 0x12] | r2 = *((r4 + 0x12));
0x000038bc ldr r1, [r4, 8] | r1 = *((r4 + 8));
0x000038c0 mov r0, r7 | r0 = r7;
0x000038c4 bl 0x2974 | r0 = fcn_00002974 (r0, r1);
0x000038c8 cmp r0, 0 |
| if (r0 != 0) {
0x000038cc bne 0x35f4 | goto label_4;
| }
0x000038d0 ldr r4, [r4, 4] | r4 = *((r4 + 4));
0x000038d4 b 0x35ec | goto label_5;
| label_14:
0x000038d8 cmp r4, 0 |
| if (r4 == 0) {
0x000038dc movne r3, 1 | r3 = 1;
| }
| if (r4 == 0) {
0x000038e0 strne r3, [r4, 0x60] | *((r4 + 0x60)) = r3;
| }
| label_15:
0x000038e4 mov r0, r4 | r0 = r4;
0x000038e8 add sp, sp, 0x14 |
0x000038ec pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_18:
0x000038f0 ldr r3, [pc, 0x24] | r3 = *(0x3918);
0x000038f4 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x000038f8 ldr r2, [r3] | r2 = *(0x3918);
0x000038fc b 0x3898 | 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/libxtables.so.12.2.0 @ 0x3fcc */
| #include <stdint.h>
|
; (fcn) sym.xtables_find_target_revision () | void xtables_find_target_revision (int32_t arg1) {
| r0 = arg1;
0x00003fcc push {r4, r5, r6, lr} |
0x00003fd0 subs r4, r2, 0 | r4 = r2 - 0;
0x00003fd4 mov r5, r0 | r5 = r0;
0x00003fd8 mov r6, r3 | r6 = r3;
| if (r4 != r2) {
0x00003fdc bne 0x3fec | goto label_0;
| }
0x00003fe0 bl 0x21cc | r0 = fcn_000021cc ();
0x00003fe4 subs r4, r0, 0 | r4 = r0 - 0;
| do {
| if (r4 == r0) {
0x00003fe8 beq 0x401c | goto label_1;
| }
| label_0:
0x00003fec ldrb r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x00003ff0 cmp r3, r6 |
| if (r3 == r6) {
0x00003ff4 beq 0x4020 | goto label_2;
| }
0x00003ff8 ldr r4, [r4, 4] | r4 = *((r4 + 4));
0x00003ffc cmp r4, 0 |
| if (r4 == 0) {
0x00004000 beq 0x401c | goto label_1;
| }
0x00004004 ldrh r2, [r4, 0x12] | r2 = *((r4 + 0x12));
0x00004008 ldr r1, [r4, 8] | r1 = *((r4 + 8));
0x0000400c mov r0, r5 | r0 = r5;
0x00004010 bl 0x2974 | r0 = fcn_00002974 (r0, r1);
0x00004014 cmp r0, 0 |
0x00004018 b 0x3fe8 |
| } while (1);
| label_1:
0x0000401c mov r4, 0 | r4 = 0;
| label_2:
0x00004020 mov r0, r4 | r0 = r4;
0x00004024 pop {r4, r5, r6, pc} |
| }
; 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/libxtables.so.12.2.0 @ 0x2e90 */
| #include <stdint.h>
|
; (fcn) sym.xtables_insmod () | void xtables_insmod (int32_t arg1, int32_t arg2) {
| int32_t var_0h;
| 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;
| r0 = arg1;
| r1 = arg2;
0x00002e90 push {r4, r5, r6, r7, r8, lr} |
0x00002e94 ldr r6, [pc, 0x184] | r6 = *(0x301c);
0x00002e98 subs r4, r1, 0 | r4 = r1 - 0;
0x00002e9c add r6, pc, r6 | r6 = pc + r6;
0x00002ea0 sub sp, sp, 0x20 |
0x00002ea4 mov r8, r0 | r8 = r0;
0x00002ea8 mov r7, r2 | r7 = r2;
| if (r4 == r1) {
0x00002eac movne r5, 0 | r5 = 0;
| }
| if (r4 != r1) {
0x00002eb0 bne 0x2f6c | goto label_2;
| }
0x00002eb4 ldr r0, [pc, 0x168] | r0 = *(0x3020);
0x00002eb8 add r0, pc, r0 | r0 = pc + r0;
0x00002ebc bl 0x24fc | r0 = open64 ();
0x00002ec0 subs r5, r0, 0 | r5 = r0 - 0;
0x00002ec4 bge 0x2ed4 |
| while (1) {
| label_0:
0x00002ec8 mvn r0, 0 | r0 = ~0;
| label_1:
0x00002ecc add sp, sp, 0x20 |
0x00002ed0 pop {r4, r5, r6, r7, r8, pc} |
0x00002ed4 mov r2, 1 | r2 = 1;
0x00002ed8 mov r1, 2 | r1 = 2;
0x00002edc bl 0x2298 | r0 = fcntl64 ();
0x00002ee0 cmn r0, 1 |
| if (r0 == 1) {
0x00002ee4 bne 0x2f1c |
0x00002ee8 ldr r3, [pc, 0x138] | r3 = *(0x3024);
0x00002eec ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00002ef0 ldr r4, [r3] | r4 = *(0x3024);
0x00002ef4 bl 0x25a4 | r0 = errno_location ();
0x00002ef8 ldr r0, [r0] | r0 = *(r0);
0x00002efc bl 0x2214 | strerror (r0);
0x00002f00 ldr r1, [pc, 0x124] | r1 = *(0x3028);
0x00002f04 add r1, pc, r1 | r1 = pc + r1;
0x00002f08 mov r2, r0 | r2 = r0;
0x00002f0c mov r0, r4 | r0 = r4;
0x00002f10 bl 0x23e8 | fprintf (r0, r1, r2)
0x00002f14 mov r0, 1 | r0 = 1;
0x00002f18 bl 0x25b0 | exit (r0);
| }
0x00002f1c mov r0, 0x1000 | r0 = 0x1000;
0x00002f20 bl 0x22c8 | r0 = malloc (r0);
0x00002f24 subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 == r0) {
0x00002f28 beq 0x2fd4 | goto label_3;
| }
0x00002f2c mov r2, 0x1000 | r2 = 0x1000;
0x00002f30 mov r1, r4 | r1 = r4;
0x00002f34 mov r0, r5 | r0 = r5;
0x00002f38 bl 0x2424 | read (r0, r1, r2);
0x00002f3c ldr r2, [pc, 0xec] | r2 = *(0x302c);
0x00002f40 sub r3, r0, 1 | r3 = r0 - 1;
0x00002f44 cmp r3, r2 |
| if (r3 > r2) {
0x00002f48 bhi 0x2fd4 | goto label_3;
| }
0x00002f4c ldrb r2, [r4, r3] | r2 = *((r4 + r3));
0x00002f50 cmp r2, 0xa |
0x00002f54 mov r2, 0 | r2 = 0;
| if (r2 == 0xa) {
0x00002f58 strbne r2, [r4, r0] | *((r4 + r0)) = r2;
| }
| if (r2 != 0xa) {
0x00002f5c strbeq r2, [r4, r3] | *((r4 + r3)) = r2;
| }
0x00002f60 mov r0, r5 | r0 = r5;
0x00002f64 bl 0x264c | close (r0);
0x00002f68 mov r5, r4 | r5 = r4;
| label_2:
0x00002f6c str r4, [sp, 0x10] | var_10h = r4;
0x00002f70 cmp r7, 0 |
0x00002f74 mov r4, 0 | r4 = 0;
0x00002f78 str r8, [sp, 0x14] | var_14h = r8;
| if (r7 != 0) {
0x00002f7c moveq r3, r4 | r3 = r4;
| }
| if (r7 == 0) {
0x00002f80 ldrne r3, [pc, 0xac] | r3 = *(0x00003034);
| }
| if (r7 == 0) {
0x00002f84 addne r3, pc, r3 | r3 = pc + r3;
| }
0x00002f88 str r3, [sp, 0x18] | var_18h = r3;
0x00002f8c ldr r3, [pc, 0xa4] | r3 = *(0x3034);
0x00002f90 str r4, [sp, 0x1c] | var_1ch = r4;
0x00002f94 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00002f98 ldr r0, [r3] | r0 = *(0x3034);
0x00002f9c bl 0x2334 | fflush (r0);
0x00002fa0 add r3, sp, 0x10 | r3 += var_10h;
0x00002fa4 str r3, [sp] | *(sp) = r3;
0x00002fa8 mov r3, 0 | r3 = 0;
0x00002fac mov r2, r3 | r2 = r3;
0x00002fb0 str r4, [sp, 4] | var_4h = r4;
0x00002fb4 ldr r1, [sp, 0x10] | r1 = var_10h;
0x00002fb8 add r0, sp, 0xc | r0 += var_ch;
0x00002fbc bl 0x22e0 | posix_spawn ();
0x00002fc0 subs r2, r0, 0 | r2 -= var_ch;
| if (r2 == var_ch) {
0x00002fc4 beq 0x2fe8 | goto label_4;
| }
0x00002fc8 mov r0, r5 | r0 = r5;
0x00002fcc bl 0x2688 | free (r0);
0x00002fd0 b 0x2ec8 |
| }
| label_3:
0x00002fd4 mov r0, r4 | r0 = r4;
0x00002fd8 bl 0x2688 | free (r0);
0x00002fdc mov r0, r5 | r0 = r5;
0x00002fe0 bl 0x264c | close (r0);
0x00002fe4 b 0x2ec8 | goto label_0;
| label_4:
0x00002fe8 add r1, sp, 8 | r1 += var_8h;
0x00002fec ldr r0, [sp, 0xc] | r0 = var_ch;
0x00002ff0 bl 0x21e4 | waitpid ();
0x00002ff4 mov r0, r5 | r0 = r5;
0x00002ff8 bl 0x2688 | free (r0);
0x00002ffc ldr r0, [sp, 8] | r0 = var_8h;
0x00003000 tst r0, 0x7f |
| if ((r0 & 0x7f) != 0) {
0x00003004 bne 0x2ec8 | goto label_0;
| }
0x00003008 asr r0, r0, 8 | r0 >>= 8;
0x0000300c and r0, r0, 0xff | r0 &= 0xff;
0x00003010 adds r0, r0, 0 | r0 += 0;
| if (r0 == r0) {
0x00003014 movne r0, 1 | r0 = 1;
| }
0x00003018 rsb r0, r0, 0 | r0 -= ;
0x0000301c b 0x2ecc | goto label_1;
| }
; 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/libxtables.so.12.2.0 @ 0x344c */
| #include <stdint.h>
|
; (fcn) sym.xtables_parse_interface () | void xtables_parse_interface (int32_t arg1, int32_t arg2) {
| r0 = arg1;
| r1 = arg2;
0x0000344c push {r4, r5, r6, r7, r8, sb, sl, lr} |
0x00003450 ldr r6, [pc, 0xd4] | r6 = *(0x3528);
0x00003454 mov r5, r1 | r5 = r1;
0x00003458 mov r7, r2 | r7 = r2;
0x0000345c mov sb, r0 | sb = r0;
0x00003460 bl 0x2610 | strlen (r0);
0x00003464 mov r2, 0x10 | r2 = 0x10;
0x00003468 mov r1, 0 | r1 = 0;
0x0000346c add r6, pc, r6 | r6 = pc + r6;
0x00003470 mov r4, r0 | r4 = r0;
0x00003474 mov r0, r7 | r0 = r7;
0x00003478 bl 0x24cc | memset (r0, r1, r2);
0x0000347c add r8, r4, 1 | r8 = r4 + 1;
0x00003480 mov r2, 0x10 | r2 = 0x10;
0x00003484 mov r1, 0 | r1 = 0;
0x00003488 mov r0, r5 | r0 = r5;
0x0000348c bl 0x24cc | memset (r0, r1, r2);
0x00003490 cmp r8, 0x10 |
| if (r8 >= 0x10) {
0x00003494 bls 0x34c0 |
0x00003498 ldr r3, [pc, 0x90] |
0x0000349c ldr r1, [pc, 0x90] | r1 = *(0x3530);
0x000034a0 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x000034a4 mov r2, sb | r2 = sb;
0x000034a8 ldr r3, [r3] | r3 = *(0x352c);
0x000034ac add r1, pc, r1 | r1 = pc + r1;
0x000034b0 ldr r4, [r3, 0x14] | r4 = xtables_find_target;
0x000034b4 mov r0, 2 | r0 = 2;
0x000034b8 mov r3, 0xf | r3 = 0xf;
0x000034bc blx r4 | uint32_t (*r4)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
| }
0x000034c0 mov r1, sb | r1 = sb;
0x000034c4 mov r0, r5 | r0 = r5;
0x000034c8 bl 0x21c0 | strcpy (r0, r1);
0x000034cc cmp r4, 0 |
0x000034d0 popeq {r4, r5, r6, r7, r8, sb, sl, pc} |
0x000034d4 sub r2, r4, 1 | r2 = r4 - 1;
0x000034d8 ldrb r3, [r5, r2] | r3 = *((r5 + r2));
0x000034dc mov r1, 0xff | r1 = 0xff;
0x000034e0 cmp r3, 0x2b |
| if (r3 == 0x2b) {
0x000034e4 movne r2, r8 | r2 = r8;
| }
0x000034e8 mov r0, r7 | r0 = r7;
0x000034ec bl 0x24cc | memset (r0, r1, r2);
0x000034f0 sub r2, r5, 1 | r2 = r5 - 1;
| do {
0x000034f4 ldrb r3, [r2, 1]! | r3 = *((r2 += 1));
0x000034f8 cmp r3, 0 |
0x000034fc popeq {r4, r5, r6, r7, r8, sb, sl, pc} |
0x00003500 cmp r3, 0x20 |
0x00003504 cmpne r3, 0x2f | __asm ("cmpne r3, 0x2f");
0x00003508 bne 0x34f4 |
| } while (r3 != 0x20);
0x0000350c ldr r3, [pc, 0x24] | r3 = *(0x3534);
0x00003510 ldr r1, [pc, 0x24] | r1 = *(0x3538);
0x00003514 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00003518 mov r2, r5 | r2 = r5;
0x0000351c add r1, pc, r1 | r1 = pc + r1;
0x00003520 ldr r0, [r3] | r0 = *(0x3534);
0x00003524 pop {r4, r5, r6, r7, r8, sb, sl, lr} |
0x00003528 b 0x23e8 | return void (*0x23e8)() ();
| }
; 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/libxtables.so.12.2.0 @ 0x4204 */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) sym.xtables_register_match () | void xtables_register_match (int32_t arg1) {
| int32_t var_0h;
| int32_t var_8h;
| r0 = arg1;
0x00004204 push {r0, r1, r4, r5, r6, r7, r8, lr} |
0x00004208 ldr r4, [pc, 0x20c] | r4 = *(0x4418);
0x0000420c ldmib r0, {r3, r6} | __asm ("ldmib r0, {r3, r6}");
0x00004210 add r4, pc, r4 | r4 = pc + r4;
0x00004214 cmp r3, 0 |
| if (r3 != 0) {
0x00004218 beq 0x424c |
0x0000421c ldr r3, [pc, 0x1fc] | r3 = *(0x441c);
0x00004220 ldr r1, [pc, 0x1fc] | r1 = *(0x4420);
0x00004224 ldr r3, [r4, r3] | r3 = *((r4 + r3));
0x00004228 add r1, pc, r1 | r1 = pc + r1;
0x0000422c ldr r2, [r3] |
0x00004230 ldr r3, [pc, 0x1f0] | r3 = *(0x4424);
0x00004234 ldr r2, [r2, 4] | r2 = *(0x4420);
0x00004238 ldr r0, [r4, r3] | r0 = *((r4 + r3));
0x0000423c mov r3, r6 | r3 = r6;
| label_1:
0x00004240 ldr r0, [r0] | r0 = *(r0);
0x00004244 bl 0x23e8 | fprintf (r0, r1, r2, r3)
0x00004248 b 0x4290 | goto label_0;
| }
0x0000424c ldr r7, [r0] | r7 = *(r0);
0x00004250 mov r5, r0 | r5 = r0;
0x00004254 cmp r7, 0 |
| if (r7 != 0) {
0x00004258 bne 0x4298 | goto label_2;
| }
0x0000425c ldr r3, [pc, 0x1bc] | r3 = *(0x441c);
0x00004260 ldr r1, [pc, 0x1c4] | r1 = *(0x4428);
0x00004264 ldr r3, [r4, r3] | r3 = *((r4 + r3));
0x00004268 add r1, pc, r1 | r1 = pc + r1;
0x0000426c ldr r2, [r3] |
0x00004270 ldr r3, [pc, 0x1b0] | r3 = *(0x4424);
0x00004274 ldr r0, [r4, r3] | r0 = *((r4 + r3));
0x00004278 ldrb r3, [r5, 0x10] | r3 = *((r5 + 0x10));
0x0000427c str r3, [sp] | *(sp) = r3;
0x00004280 ldr r2, [r2, 4] | r2 = *(0x4420);
0x00004284 mov r3, r6 | r3 = r6;
| do {
0x00004288 ldr r0, [r0] | r0 = *(r0);
0x0000428c bl 0x23e8 | fprintf (r0, r1, r2, r3)
| label_0:
0x00004290 mov r0, 1 | r0 = 1;
0x00004294 bl 0x25b0 | exit (r0);
| label_2:
0x00004298 ldr r3, [r0, 0x14] | r3 = *((r0 + 0x14));
0x0000429c add r2, r3, 7 | r2 = r3 + 7;
0x000042a0 bic r2, r2, 7 | r2 = BIT_MASK (r2, 7);
0x000042a4 cmp r3, r2 |
| if (r3 == r2) {
0x000042a8 beq 0x42d8 | goto label_3;
| }
0x000042ac ldr r2, [pc, 0x16c] |
0x000042b0 ldr r1, [pc, 0x170] | r1 = *(0x4424);
0x000042b4 ldr r2, [r4, r2] | r2 = *((r4 + r2));
0x000042b8 ldr r0, [r4, r1] | r0 = *((r4 + r1));
0x000042bc ldr r2, [r2] |
0x000042c0 ldr r1, [pc, 0x168] | r1 = *(0x442c);
0x000042c4 str r3, [sp] | *(sp) = r3;
0x000042c8 add r1, pc, r1 | r1 = pc + r1;
0x000042cc mov r3, r6 | r3 = r6;
0x000042d0 ldr r2, [r2, 4] | r2 = *(0x4420);
0x000042d4 b 0x4288 |
| } while (1);
| label_3:
0x000042d8 ldr r8, [pc, 0x154] | r8 = *(0x4430);
0x000042dc mov r0, r7 | r0 = r7;
0x000042e0 add r8, pc, r8 | r8 = pc + r8;
0x000042e4 mov r1, r8 | r1 = r8;
0x000042e8 bl 0x2508 | r0 = strcmp (r0, r1);
0x000042ec cmp r0, 0 |
| if (r0 != 0) {
0x000042f0 beq 0x4328 |
0x000042f4 ldr r3, [pc, 0x124] | r3 = *(0x441c);
0x000042f8 ldr r1, [pc, 0x138] | r1 = *(0x4434);
0x000042fc ldr r3, [r4, r3] | r3 = *((r4 + r3));
0x00004300 add r1, pc, r1 | r1 = pc + r1;
0x00004304 ldr r2, [r3] |
0x00004308 ldr r3, [pc, 0x118] | r3 = *(0x4424);
0x0000430c ldr r0, [r4, r3] | r0 = *((r4 + r3));
0x00004310 stm sp, {r7, r8} | *(sp) = r7;
| *((sp + 4)) = r8;
0x00004314 ldr r2, [r2, 4] | r2 = *(0x4420);
0x00004318 mov r3, r6 | r3 = r6;
0x0000431c ldr r0, [r0] | r0 = *(r0);
0x00004320 bl 0x23e8 | fprintf (r0, r1, r2, r3)
0x00004324 b 0x4290 | goto label_0;
| }
0x00004328 mov r0, r6 | r0 = r6;
0x0000432c bl 0x2610 | r0 = strlen (r0);
0x00004330 cmp r0, 0x1c |
| if (r0 >= 0x1c) {
0x00004334 bls 0x4360 |
0x00004338 ldr r3, [pc, 0xe0] | r3 = *(0x441c);
0x0000433c ldr r1, [pc, 0xf8] | r1 = *(0x4438);
0x00004340 ldr r3, [r4, r3] | r3 = *((r4 + r3));
0x00004344 add r1, pc, r1 | r1 = pc + r1;
0x00004348 ldr r2, [r3] |
0x0000434c ldr r3, [pc, 0xd4] | r3 = *(0x4424);
0x00004350 ldr r2, [r2, 4] | r2 = *(0x4420);
0x00004354 ldr r0, [r4, r3] | r0 = *((r4 + r3));
0x00004358 mov r3, r6 | r3 = r6;
0x0000435c b 0x4240 | goto label_1;
| }
0x00004360 ldr r7, [r5, 0xc] | r7 = *((r5 + 0xc));
0x00004364 cmp r7, 0 |
| if (r7 != 0) {
0x00004368 beq 0x43a4 |
0x0000436c mov r0, r7 | r0 = r7;
0x00004370 bl 0x2610 | r0 = strlen (r0);
0x00004374 cmp r0, 0x1c |
| if (r0 < 0x1c) {
0x00004378 bls 0x43a4 | goto label_4;
| }
0x0000437c ldr r3, [pc, 0x9c] | r3 = *(0x441c);
0x00004380 ldr r1, [pc, 0xb8] | r1 = *(0x443c);
0x00004384 ldr r3, [r4, r3] | r3 = *((r4 + r3));
0x00004388 add r1, pc, r1 | r1 = pc + r1;
0x0000438c ldr r2, [r3] |
0x00004390 ldr r3, [pc, 0x90] | r3 = *(0x4424);
0x00004394 ldr r2, [r2, 4] | r2 = *(0x4420);
0x00004398 ldr r0, [r4, r3] | r0 = *((r4 + r3));
0x0000439c mov r3, r7 | r3 = r7;
0x000043a0 b 0x4240 | goto label_1;
| }
| label_4:
0x000043a4 ldrh r3, [r5, 0x12] | r3 = *((r5 + 0x12));
0x000043a8 cmp r3, 0xfe |
| if (r3 >= 0xfe) {
0x000043ac bls 0x43d8 |
0x000043b0 ldr r3, [pc, 0x68] | r3 = *(0x441c);
0x000043b4 ldr r1, [pc, 0x88] | r1 = *(0x4440);
0x000043b8 ldr r3, [r4, r3] | r3 = *((r4 + r3));
0x000043bc add r1, pc, r1 | r1 = pc + r1;
0x000043c0 ldr r2, [r3] |
0x000043c4 ldr r3, [pc, 0x5c] | r3 = *(0x4424);
0x000043c8 ldr r2, [r2, 4] | r2 = *(0x4420);
0x000043cc ldr r0, [r4, r3] | r0 = *((r4 + r3));
0x000043d0 mov r3, r6 | r3 = r6;
0x000043d4 b 0x4240 | goto label_1;
| }
0x000043d8 ldr r1, [r5, 0x44] | r1 = *((r5 + 0x44));
0x000043dc cmp r1, 0 |
| if (r1 != 0) {
0x000043e0 beq 0x43ec |
0x000043e4 mov r0, r6 | r0 = r6;
0x000043e8 bl 0x24d8 | fcn_000024d8 ();
| }
0x000043ec ldr r1, [r5, 0x38] | r1 = *((r5 + 0x38));
0x000043f0 cmp r1, 0 |
| if (r1 != 0) {
0x000043f4 beq 0x4400 |
0x000043f8 ldr r0, [r5, 8] | r0 = *((r5 + 8));
0x000043fc bl 0x28f8 | fcn_000028f8 (r0, r1);
| }
0x00004400 ldr r3, [pc, 0x40] | r3 = *(0x4444);
0x00004404 ldr r3, [r4, r3] | r3 = *((r4 + r3));
0x00004408 ldr r2, [r3] | r2 = *(0x4444);
0x0000440c str r5, [r3] | *(r3) = r5;
0x00004410 str r2, [r5, 4] | *((r5 + 4)) = r2;
0x00004414 add sp, sp, 8 |
0x00004418 pop {r4, r5, r6, r7, r8, pc} |
| }
; 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/libxtables.so.12.2.0 @ 0x444c */
| #include <stdint.h>
|
; (fcn) sym.xtables_register_matches () | void xtables_register_matches (int32_t arg1) {
| r0 = arg1;
0x0000444c mov r3, 0x64 | r3 = 0x64;
0x00004450 push {r4, r5, r6, lr} |
0x00004454 mla r4, r1, r3, r0 | __asm ("mla r4, r1, r3, r0");
0x00004458 sub r5, r0, 0x64 | r5 = r0 - 0x64;
0x0000445c sub r4, r4, 0x64 | r4 -= 0x64;
| do {
0x00004460 mov r0, r4 | r0 = r4;
0x00004464 sub r4, r4, 0x64 | r4 -= 0x64;
0x00004468 bl 0x2544 | fcn_00002544 ();
0x0000446c cmp r4, r5 |
0x00004470 bne 0x4460 |
| } while (r4 != r5);
0x00004474 pop {r4, r5, r6, pc} |
| }
; 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/libxtables.so.12.2.0 @ 0x4478 */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) sym.xtables_register_target () | void xtables_register_target (int32_t arg1) {
| int32_t var_0h;
| int32_t var_8h;
| r0 = arg1;
0x00004478 push {r0, r1, r4, r5, r6, r7, r8, lr} |
0x0000447c ldr r4, [pc, 0x228] | r4 = *(0x46a8);
0x00004480 ldmib r0, {r3, r6} | __asm ("ldmib r0, {r3, r6}");
0x00004484 add r4, pc, r4 | r4 = pc + r4;
0x00004488 cmp r3, 0 |
| if (r3 != 0) {
0x0000448c beq 0x44c0 |
0x00004490 ldr r3, [pc, 0x218] | r3 = *(0x46ac);
0x00004494 ldr r1, [pc, 0x218] | r1 = *(0x46b0);
0x00004498 ldr r3, [r4, r3] | r3 = *((r4 + r3));
0x0000449c add r1, pc, r1 | r1 = pc + r1;
0x000044a0 ldr r2, [r3] |
0x000044a4 ldr r3, [pc, 0x20c] | r3 = *(0x46b4);
0x000044a8 ldr r2, [r2, 4] | r2 = *(0x46b0);
0x000044ac ldr r0, [r4, r3] | r0 = *((r4 + r3));
0x000044b0 mov r3, r6 | r3 = r6;
| label_1:
0x000044b4 ldr r0, [r0] | r0 = *(r0);
0x000044b8 bl 0x23e8 | fprintf (r0, r1, r2, r3)
0x000044bc b 0x4504 | goto label_0;
| }
0x000044c0 ldr r7, [r0] | r7 = *(r0);
0x000044c4 mov r5, r0 | r5 = r0;
0x000044c8 cmp r7, 0 |
| if (r7 != 0) {
0x000044cc bne 0x450c | goto label_2;
| }
0x000044d0 ldr r3, [pc, 0x1d8] | r3 = *(0x46ac);
0x000044d4 ldr r1, [pc, 0x1e0] | r1 = *(0x46b8);
0x000044d8 ldr r3, [r4, r3] | r3 = *((r4 + r3));
0x000044dc add r1, pc, r1 | r1 = pc + r1;
0x000044e0 ldr r2, [r3] |
0x000044e4 ldr r3, [pc, 0x1cc] | r3 = *(0x46b4);
0x000044e8 ldr r0, [r4, r3] | r0 = *((r4 + r3));
0x000044ec ldrb r3, [r5, 0x10] | r3 = *((r5 + 0x10));
0x000044f0 str r3, [sp] | *(sp) = r3;
0x000044f4 ldr r2, [r2, 4] | r2 = *(0x46b0);
0x000044f8 mov r3, r6 | r3 = r6;
| do {
0x000044fc ldr r0, [r0] | r0 = *(r0);
0x00004500 bl 0x23e8 | fprintf (r0, r1, r2, r3)
| label_0:
0x00004504 mov r0, 1 | r0 = 1;
0x00004508 bl 0x25b0 | exit (r0);
| label_2:
0x0000450c ldr r3, [r0, 0x14] | r3 = *((r0 + 0x14));
0x00004510 add r2, r3, 7 | r2 = r3 + 7;
0x00004514 bic r2, r2, 7 | r2 = BIT_MASK (r2, 7);
0x00004518 cmp r3, r2 |
| if (r3 == r2) {
0x0000451c beq 0x454c | goto label_3;
| }
0x00004520 ldr r2, [pc, 0x188] |
0x00004524 ldr r1, [pc, 0x18c] | r1 = *(0x46b4);
0x00004528 ldr r2, [r4, r2] | r2 = *((r4 + r2));
0x0000452c ldr r0, [r4, r1] | r0 = *((r4 + r1));
0x00004530 ldr r2, [r2] |
0x00004534 ldr r1, [pc, 0x184] | r1 = *(0x46bc);
0x00004538 str r3, [sp] | *(sp) = r3;
0x0000453c add r1, pc, r1 | r1 = pc + r1;
0x00004540 mov r3, r6 | r3 = r6;
0x00004544 ldr r2, [r2, 4] | r2 = *(0x46b0);
0x00004548 b 0x44fc |
| } while (1);
| label_3:
0x0000454c ldr r8, [pc, 0x170] | r8 = *(0x46c0);
0x00004550 mov r0, r7 | r0 = r7;
0x00004554 add r8, pc, r8 | r8 = pc + r8;
0x00004558 mov r1, r8 | r1 = r8;
0x0000455c bl 0x2508 | r0 = strcmp (r0, r1);
0x00004560 cmp r0, 0 |
| if (r0 != 0) {
0x00004564 beq 0x459c |
0x00004568 ldr r3, [pc, 0x140] | r3 = *(0x46ac);
0x0000456c ldr r1, [pc, 0x154] | r1 = *(0x46c4);
0x00004570 ldr r3, [r4, r3] | r3 = *((r4 + r3));
0x00004574 add r1, pc, r1 | r1 = pc + r1;
0x00004578 ldr r2, [r3] |
0x0000457c ldr r3, [pc, 0x134] | r3 = *(0x46b4);
0x00004580 ldr r0, [r4, r3] | r0 = *((r4 + r3));
0x00004584 stm sp, {r7, r8} | *(sp) = r7;
| *((sp + 4)) = r8;
0x00004588 ldr r2, [r2, 4] | r2 = *(0x46b0);
0x0000458c mov r3, r6 | r3 = r6;
0x00004590 ldr r0, [r0] | r0 = *(r0);
0x00004594 bl 0x23e8 | fprintf (r0, r1, r2, r3)
0x00004598 b 0x4504 | goto label_0;
| }
0x0000459c mov r0, r6 | r0 = r6;
0x000045a0 bl 0x2610 | r0 = strlen (r0);
0x000045a4 cmp r0, 0x1c |
| if (r0 >= 0x1c) {
0x000045a8 bls 0x45d4 |
0x000045ac ldr r3, [pc, 0xfc] | r3 = *(0x46ac);
0x000045b0 ldr r1, [pc, 0x114] | r1 = *(0x46c8);
0x000045b4 ldr r3, [r4, r3] | r3 = *((r4 + r3));
0x000045b8 add r1, pc, r1 | r1 = pc + r1;
0x000045bc ldr r2, [r3] |
0x000045c0 ldr r3, [pc, 0xf0] | r3 = *(0x46b4);
0x000045c4 ldr r2, [r2, 4] | r2 = *(0x46b0);
0x000045c8 ldr r0, [r4, r3] | r0 = *((r4 + r3));
0x000045cc mov r3, r6 | r3 = r6;
0x000045d0 b 0x44b4 | goto label_1;
| }
0x000045d4 ldr r7, [r5, 0xc] | r7 = *((r5 + 0xc));
0x000045d8 cmp r7, 0 |
| if (r7 != 0) {
0x000045dc beq 0x4618 |
0x000045e0 mov r0, r7 | r0 = r7;
0x000045e4 bl 0x2610 | r0 = strlen (r0);
0x000045e8 cmp r0, 0x1c |
| if (r0 < 0x1c) {
0x000045ec bls 0x4618 | goto label_4;
| }
0x000045f0 ldr r3, [pc, 0xb8] | r3 = *(0x46ac);
0x000045f4 ldr r1, [pc, 0xd4] | r1 = *(0x46cc);
0x000045f8 ldr r3, [r4, r3] | r3 = *((r4 + r3));
0x000045fc add r1, pc, r1 | r1 = pc + r1;
0x00004600 ldr r2, [r3] |
0x00004604 ldr r3, [pc, 0xac] | r3 = *(0x46b4);
0x00004608 ldr r2, [r2, 4] | r2 = *(0x46b0);
0x0000460c ldr r0, [r4, r3] | r0 = *((r4 + r3));
0x00004610 mov r3, r7 | r3 = r7;
0x00004614 b 0x44b4 | goto label_1;
| }
| label_4:
0x00004618 ldrh r3, [r5, 0x12] | r3 = *((r5 + 0x12));
0x0000461c cmp r3, 0xfe |
| if (r3 >= 0xfe) {
0x00004620 bls 0x464c |
0x00004624 ldr r3, [pc, 0x84] | r3 = *(0x46ac);
0x00004628 ldr r1, [pc, 0xa4] | r1 = *(0x46d0);
0x0000462c ldr r3, [r4, r3] | r3 = *((r4 + r3));
0x00004630 add r1, pc, r1 | r1 = pc + r1;
0x00004634 ldr r2, [r3] |
0x00004638 ldr r3, [pc, 0x78] | r3 = *(0x46b4);
0x0000463c ldr r2, [r2, 4] | r2 = *(0x46b0);
0x00004640 ldr r0, [r4, r3] | r0 = *((r4 + r3));
0x00004644 mov r3, r6 | r3 = r6;
0x00004648 b 0x44b4 | goto label_1;
| }
0x0000464c ldr r1, [r5, 0x44] | r1 = *((r5 + 0x44));
0x00004650 cmp r1, 0 |
| if (r1 != 0) {
0x00004654 beq 0x4660 |
0x00004658 mov r0, r6 | r0 = r6;
0x0000465c bl 0x24d8 | fcn_000024d8 ();
| }
0x00004660 ldr r1, [r5, 0x38] | r1 = *((r5 + 0x38));
0x00004664 cmp r1, 0 |
| if (r1 != 0) {
0x00004668 beq 0x4674 |
0x0000466c ldr r0, [r5, 8] | r0 = *((r5 + 8));
0x00004670 bl 0x28f8 | fcn_000028f8 (r0, r1);
| }
0x00004674 ldr r2, [pc, 0x5c] |
0x00004678 ldrh r3, [r5, 0x12] | r3 = *((r5 + 0x12));
0x0000467c ldr r2, [r4, r2] | r2 = *((r4 + r2));
0x00004680 ldr r2, [r2] | r2 = *(0x46d4);
0x00004684 ldrb r2, [r2, 0xc] | r2 = *((r2 + 0xc));
0x00004688 cmp r2, r3 |
0x0000468c cmpne r3, 0 | __asm ("cmpne r3, 0");
| if (r2 != r3) {
0x00004690 ldreq r3, [pc, 0x44] | r3 = *((pc + 0x44));
| }
| if (r2 != r3) {
0x00004694 ldreq r3, [r4, r3] | r3 = *((r4 + r3));
| }
| if (r2 != r3) {
0x00004698 ldreq r2, [r3] | r2 = *(r3);
| }
| if (r2 != r3) {
0x0000469c streq r5, [r3] | *(r3) = r5;
| }
| if (r2 != r3) {
0x000046a0 streq r2, [r5, 4] | *((r5 + 4)) = r2;
| }
0x000046a4 add sp, sp, 8 |
0x000046a8 pop {r4, r5, r6, r7, r8, pc} |
| }
; 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/libxtables.so.12.2.0 @ 0x46e0 */
| #include <stdint.h>
|
; (fcn) sym.xtables_register_targets () | void xtables_register_targets (int32_t arg1) {
| r0 = arg1;
0x000046e0 mov r3, 0x68 | r3 = 0x68;
0x000046e4 push {r4, r5, r6, lr} |
0x000046e8 mla r4, r1, r3, r0 | __asm ("mla r4, r1, r3, r0");
0x000046ec sub r5, r0, 0x68 | r5 = r0 - 0x68;
0x000046f0 sub r4, r4, 0x68 | r4 -= 0x68;
| do {
0x000046f4 mov r0, r4 | r0 = r4;
0x000046f8 sub r4, r4, 0x68 | r4 -= 0x68;
0x000046fc bl 0x25bc | fcn_000025bc ();
0x00004700 cmp r4, r5 |
0x00004704 bne 0x46f4 |
| } while (r4 != r5);
0x00004708 pop {r4, r5, r6, pc} |
| }
; 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/libxtables.so.12.2.0 @ 0x2c88 */
| #include <stdint.h>
|
; (fcn) sym.xtables_set_nfproto () | void xtables_set_nfproto (uint32_t arg1) {
| r0 = arg1;
0x00002c88 ldr r3, [pc, 0xb8] | r3 = *(0x2d44);
0x00002c8c sub r0, r0, 2 | r0 -= 2;
0x00002c90 add r3, pc, r3 | r3 = pc + r3;
0x00002c94 cmp r0, 8 |
| if (r0 > 8) {
| /* switch table (9 cases) at 0x2ca0 */
0x00002c98 addls pc, pc, r0, lsl 2 | pc += (r0 << 2);
| }
0x00002c9c b 0x2d28 | goto label_1;
0x00002ca0 b 0x2cc4 | goto label_2;
0x00002ca4 b 0x2d10 | goto label_3;
0x00002ca8 b 0x2d28 | goto label_1;
0x00002cac b 0x2d28 | goto label_1;
0x00002cb0 b 0x2d28 | goto label_1;
0x00002cb4 b 0x2cf8 | goto label_4;
0x00002cb8 b 0x2d28 | goto label_1;
0x00002cbc b 0x2d28 | goto label_1;
0x00002cc0 b 0x2cdc | goto label_5;
| label_2:
0x00002cc4 ldr r2, [pc, 0x80] | r2 = *(0x2d48);
0x00002cc8 ldr r3, [r3, r2] | r3 = *((r3 + r2));
0x00002ccc ldr r2, [pc, 0x7c] | r2 = *(0x2d4c);
0x00002cd0 add r2, pc, r2 | r2 = pc + r2;
0x00002cd4 str r2, [r3] | *(r3) = r2;
0x00002cd8 bx lr | return;
| label_5:
0x00002cdc ldr r2, [pc, 0x68] | r2 = *(0x2d48);
0x00002ce0 ldr r2, [r3, r2] | r2 = *((r3 + r2));
0x00002ce4 ldr r3, [pc, 0x68] |
0x00002ce8 add r3, pc, r3 | r3 = pc + r3;
0x00002cec add r3, r3, 0x18 | r3 = 0x2d68;
| do {
| label_0:
0x00002cf0 str r3, [r2] | *(r2) = r3;
0x00002cf4 bx lr | return;
| label_4:
0x00002cf8 ldr r2, [pc, 0x4c] | r2 = *(0x2d48);
0x00002cfc ldr r2, [r3, r2] | r2 = *((r3 + r2));
0x00002d00 ldr r3, [pc, 0x50] |
0x00002d04 add r3, pc, r3 | r3 = pc + r3;
0x00002d08 add r3, r3, 0x30 | r3 = 0x2d84;
0x00002d0c b 0x2cf0 |
| } while (1);
| label_3:
0x00002d10 ldr r2, [pc, 0x34] | r2 = *(0x2d48);
0x00002d14 ldr r2, [r3, r2] | r2 = *((r3 + r2));
0x00002d18 ldr r3, [pc, 0x3c] |
0x00002d1c add r3, pc, r3 | r3 = pc + r3;
0x00002d20 add r3, r3, 0x48 | r3 = 0x2da0;
0x00002d24 b 0x2cf0 | goto label_0;
| label_1:
0x00002d28 ldr r2, [pc, 0x30] | r2 = *(0x2d5c);
0x00002d2c ldr r1, [pc, 0x30] | r1 = *(0x2d60);
0x00002d30 ldr r3, [r3, r2] | r3 = *((r3 + r2));
0x00002d34 ldr r2, [pc, 0x2c] | r2 = *(0x2d64);
0x00002d38 add r1, pc, r1 | r1 = pc + r1;
0x00002d3c add r2, pc, r2 | r2 = pc + r2;
0x00002d40 ldr r0, [r3] | r0 = *(r3);
0x00002d44 b 0x23e8 | return void (*0x23e8)() ();
| }
; 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/libxtables.so.12.2.0 @ 0x2d6c */
| #include <stdint.h>
|
; (fcn) sym.xtables_set_params () | uint32_t xtables_set_params (int32_t arg1) {
| r0 = arg1;
0x00002d6c ldr r3, [pc, 0x68] | r3 = *(0x2dd8);
0x00002d70 subs r2, r0, 0 | r2 = r0 - 0;
0x00002d74 add r3, pc, r3 | r3 = pc + r3;
| if (r2 == r0) {
0x00002d78 bne 0x2dac |
0x00002d7c ldr r2, [pc, 0x5c] | r2 = *(0x2ddc);
0x00002d80 push {r4, lr} |
0x00002d84 ldr r3, [r3, r2] | r3 = *((r3 + r2));
0x00002d88 ldr r2, [pc, 0x54] |
0x00002d8c ldr r1, [pc, 0x54] | r1 = *(0x2de4);
0x00002d90 add r2, pc, r2 | r2 = pc + r2;
0x00002d94 add r2, r2, 0x14 | r2 = xtables_init_all;
0x00002d98 add r1, pc, r1 | r1 = pc + r1;
0x00002d9c ldr r0, [r3] | r0 = *(r3);
0x00002da0 bl 0x23e8 | fprintf (r0, r1, r2, r3, r4)
0x00002da4 mvn r0, 0 | r0 = ~0;
0x00002da8 pop {r4, pc} |
| }
0x00002dac ldr r1, [pc, 0x38] | r1 = *(0x2de8);
0x00002db0 ldr r0, [r2, 0x14] | r0 = *((r2 + 0x14));
0x00002db4 ldr r1, [r3, r1] | r1 = *((r3 + r1));
0x00002db8 cmp r0, 0 |
0x00002dbc str r2, [r1] | *(r1) = r2;
| if (r0 == 0) {
0x00002dc0 bne 0x2dd4 |
0x00002dc4 ldr r1, [pc, 0x24] | r1 = *(0x2dec);
0x00002dc8 ldr r3, [r3, r1] | r3 = *((r3 + r1));
0x00002dcc str r3, [r2, 0x14] | *((r2 + 0x14)) = r3;
0x00002dd0 bx lr | return;
| }
0x00002dd4 mov r0, 0 | r0 = 0;
0x00002dd8 bx lr | return r0;
| }
[*] Function fprintf used 16 times libxtables.so.12.2.0