[*] Binary protection state of libnss_compat.so.2
Full RELRO No Canary found NX enabled DSO No RPATH No RUNPATH No Symbols
[*] Function strcat tear down of libnss_compat.so.2
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/lib/libnss_compat.so.2 @ 0x1c3c */
| #include <stdint.h>
|
; (fcn) fcn.00001c3c () | void fcn_00001c3c (int16_t arg1, int16_t arg2, uint32_t arg3) {
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| do {
0x00000e40 invalid | void (*0xe44)() ();
0x00001c3c push.w {r3, r4, r5, r6, r7, r8, sb, lr} |
0x00001c40 mov r4, r1 | r4 = r1;
0x00001c42 ldr r6, [r1, 4] | r6 = *((r1 + 4));
0x00001c44 mov r7, r0 | r7 = r0;
0x00001c46 mov r5, r2 | r5 = r2;
| if (r6 != 0) {
0x00001c48 cbz r6, 0x1c86 |
0x00001c4a ldrb r3, [r6] | r3 = *(r6);
| if (r3 == 0) {
0x00001c4c cbz r3, 0x1c86 | goto label_2;
| }
0x00001c4e cmp r2, 0 |
| if (r2 == 0) {
0x00001c50 beq.w 0x1d98 | goto label_7;
| }
0x00001c54 ldr.w sb, [r0, 4] | sb = *((r0 + 4));
0x00001c58 cmp.w sb, 0 |
| if (sb != 0) {
0x00001c5c beq 0x1c72 |
0x00001c5e mov r0, sb | r0 = sb;
0x00001c60 blx 0xe74 | r0 = fcn_00000e74 ();
0x00001c64 mov r8, r0 | r8 = r0;
0x00001c66 mov r0, r6 | r0 = r6;
0x00001c68 blx 0xe74 | r0 = fcn_00000e74 ();
0x00001c6c cmp r8, r0 |
| if (r8 >= r0) {
0x00001c6e bhs.w 0x1d7c | goto label_8;
| }
| }
0x00001c72 str r5, [r7, 4] | *((r7 + 4)) = r5;
0x00001c74 mov r0, r5 | r0 = r5;
0x00001c76 ldr r1, [r4, 4] | r1 = *((r4 + 4));
0x00001c78 blx 0xe44 | fcn_00000e44 ();
0x00001c7c ldr r0, [r7, 4] | r0 = *((r7 + 4));
0x00001c7e blx 0xe74 | fcn_00000e74 ();
0x00001c82 adds r0, 1 | r0++;
0x00001c84 add r5, r0 | r5 += r0;
| }
| label_2:
0x00001c86 ldr r6, [r4, 0x10] | r6 = *((r4 + 0x10));
| if (r6 != 0) {
0x00001c88 cbz r6, 0x1cc2 |
0x00001c8a ldrb r3, [r6] | r3 = *(r6);
| if (r3 == 0) {
0x00001c8c cbz r3, 0x1cc2 | goto label_1;
| }
0x00001c8e cmp r5, 0 |
| if (r5 == 0) {
0x00001c90 beq 0x1d32 | goto label_4;
| }
0x00001c92 ldr.w sb, [r7, 0x10] | sb = *((r7 + 0x10));
0x00001c96 cmp.w sb, 0 |
| if (sb != 0) {
0x00001c9a beq 0x1cae |
0x00001c9c mov r0, sb | r0 = sb;
0x00001c9e blx 0xe74 | r0 = fcn_00000e74 ();
0x00001ca2 mov r8, r0 | r8 = r0;
0x00001ca4 mov r0, r6 | r0 = r6;
0x00001ca6 blx 0xe74 | r0 = fcn_00000e74 ();
0x00001caa cmp r8, r0 |
| if (r8 >= r0) {
0x00001cac bhs 0x1d70 | goto label_9;
| }
| }
0x00001cae str r5, [r7, 0x10] | *((r7 + 0x10)) = r5;
0x00001cb0 mov r0, r5 | r0 = r5;
0x00001cb2 ldr r1, [r4, 0x10] | r1 = *((r4 + 0x10));
0x00001cb4 blx 0xe44 | fcn_00000e44 ();
0x00001cb8 ldr r0, [r7, 0x10] | r0 = *((r7 + 0x10));
0x00001cba blx 0xe74 | fcn_00000e74 ();
0x00001cbe adds r0, 1 | r0++;
0x00001cc0 add r5, r0 | r5 += r0;
| }
| label_1:
0x00001cc2 ldr r6, [r4, 0x14] | r6 = *((r4 + 0x14));
| if (r6 != 0) {
0x00001cc4 cbz r6, 0x1cfe |
0x00001cc6 ldrb r3, [r6] | r3 = *(r6);
| if (r3 == 0) {
0x00001cc8 cbz r3, 0x1cfe | goto label_0;
| }
0x00001cca cmp r5, 0 |
| if (r5 == 0) {
0x00001ccc beq 0x1d88 | goto label_10;
| }
0x00001cce ldr.w sb, [r7, 0x14] | sb = *((r7 + 0x14));
0x00001cd2 cmp.w sb, 0 |
| if (sb != 0) {
0x00001cd6 beq 0x1cea |
0x00001cd8 mov r0, sb | r0 = sb;
0x00001cda blx 0xe74 | r0 = fcn_00000e74 ();
0x00001cde mov r8, r0 | r8 = r0;
0x00001ce0 mov r0, r6 | r0 = r6;
0x00001ce2 blx 0xe74 | r0 = fcn_00000e74 ();
0x00001ce6 cmp r8, r0 |
| if (r8 >= r0) {
0x00001ce8 bhs 0x1d64 | goto label_11;
| }
| }
0x00001cea str r5, [r7, 0x14] | *((r7 + 0x14)) = r5;
0x00001cec mov r0, r5 | r0 = r5;
0x00001cee ldr r1, [r4, 0x14] | r1 = *((r4 + 0x14));
0x00001cf0 blx 0xe44 | fcn_00000e44 ();
0x00001cf4 ldr r0, [r7, 0x14] | r0 = *((r7 + 0x14));
0x00001cf6 blx 0xe74 | fcn_00000e74 ();
0x00001cfa adds r0, 1 | r0++;
0x00001cfc add r5, r0 | r5 += r0;
| }
| label_0:
0x00001cfe ldr r6, [r4, 0x18] | r6 = *((r4 + 0x18));
| if (r6 == 0) {
0x00001d00 cbz r6, 0x1d52 | goto label_3;
| }
0x00001d02 ldrb r3, [r6] | r3 = *(r6);
| if (r3 == 0) {
0x00001d04 cbz r3, 0x1d52 | goto label_3;
| }
| if (r5 == 0) {
0x00001d06 cbz r5, 0x1d4a | goto label_12;
| }
0x00001d08 ldr.w sb, [r7, 0x18] | sb = *((r7 + 0x18));
0x00001d0c cmp.w sb, 0 |
| if (sb != 0) {
0x00001d10 beq 0x1d24 |
0x00001d12 mov r0, sb | r0 = sb;
0x00001d14 blx 0xe74 | fcn_00000e74 ();
0x00001d16 stm.w lr!, {r7, sb, sl, lr} | *(lr!) = r7;
| *((lr! + 4)) = sb;
| *((lr! + 8)) = sl;
| *((lr! + 12)) = lr;
0x00001d1a mov r0, r6 | r0 = r6;
0x00001d1c blx 0xe74 | r0 = fcn_00000e74 ();
0x00001d20 cmp r8, r0 |
| if (r8 >= r0) {
0x00001d22 bhs 0x1d56 | goto label_13;
| }
| }
0x00001d24 str r5, [r7, 0x18] | *((r7 + 0x18)) = r5;
0x00001d26 mov r0, r5 | r0 = r5;
0x00001d28 ldr r1, [r4, 0x18] | r1 = *((r4 + 0x18));
0x00001d2a pop.w {r3, r4, r5, r6, r7, r8, sb, lr} |
0x00001d2e b.w 0xe40 |
| } while (1);
| label_4:
0x00001d32 mov r0, r6 | r0 = r6;
0x00001d34 blx 0xe10 | fcn_00000e10 ();
0x00001d38 ldr r6, [r4, 0x14] | r6 = *((r4 + 0x14));
0x00001d3a str r0, [r7, 0x10] | *((r7 + 0x10)) = r0;
| if (r6 != 0) {
0x00001d3c cbz r6, 0x1d42 |
| label_5:
0x00001d3e ldrb r3, [r6] | r3 = *(r6);
| if (r3 != 0) {
0x00001d40 cbnz r3, 0x1d88 | goto label_10;
| }
| }
| label_6:
0x00001d42 ldr r6, [r4, 0x18] | r6 = *((r4 + 0x18));
0x00001d44 cbz r6, 0x1d52 |
| while (r6 != 0) {
0x00001d46 ldrb r3, [r6] | r3 = *(r6);
| if (r3 != 0) {
0x00001d48 cbz r3, 0x1d52 |
| label_12:
0x00001d4a mov r0, r6 | r0 = r6;
0x00001d4c blx 0xe10 | fcn_00000e10 ();
0x00001d50 str r0, [r7, 0x18] | *((r7 + 0x18)) = r0;
| }
| label_3:
0x00001d52 pop.w {r3, r4, r5, r6, r7, r8, sb, pc} |
| label_13:
0x00001d56 adds r2, r0, 1 | r2 = r0 + 1;
0x00001d58 mov r1, r6 | r1 = r6;
0x00001d5a mov r0, sb | r0 = sb;
0x00001d5c pop.w {r3, r4, r5, r6, r7, r8, sb, lr} |
0x00001d60 b.w 0xddc | void (*0xddc)() ();
| label_11:
0x00001d64 adds r2, r0, 1 | r2 = r0 + 1;
0x00001d66 mov r1, r6 | r1 = r6;
0x00001d68 mov r0, sb | r0 = sb;
0x00001d6a blx 0xde0 | fcn_00000de0 ();
0x00001d6e b 0x1cfe | goto label_0;
| label_9:
0x00001d70 adds r2, r0, 1 | r2 = r0 + 1;
0x00001d72 mov r1, r6 | r1 = r6;
0x00001d74 mov r0, sb | r0 = sb;
0x00001d76 blx 0xde0 | fcn_00000de0 ();
0x00001d7a b 0x1cc2 | goto label_1;
| label_8:
0x00001d7c adds r2, r0, 1 | r2 = r0 + 1;
0x00001d7e mov r1, r6 | r1 = r6;
0x00001d80 mov r0, sb | r0 = sb;
0x00001d82 blx 0xde0 | fcn_00000de0 ();
0x00001d86 b 0x1c86 | goto label_2;
| label_10:
0x00001d88 mov r0, r6 | r0 = r6;
0x00001d8a blx 0xe10 | fcn_00000e10 ();
0x00001d8e ldr r6, [r4, 0x18] | r6 = *((r4 + 0x18));
0x00001d90 str r0, [r7, 0x14] | *((r7 + 0x14)) = r0;
0x00001d92 cmp r6, 0 |
0x00001d94 bne 0x1d46 |
| }
0x00001d96 b 0x1d52 | goto label_3;
| label_7:
0x00001d98 mov r0, r6 | r0 = r6;
0x00001d9a blx 0xe10 | fcn_00000e10 ();
0x00001d9e ldr r6, [r4, 0x10] | r6 = *((r4 + 0x10));
0x00001da0 str r0, [r7, 4] | *((r7 + 4)) = r0;
| if (r6 == 0) {
0x00001da2 cbz r6, 0x1daa | goto label_14;
| }
0x00001da4 ldrb r3, [r6] | r3 = *(r6);
0x00001da6 cmp r3, 0 |
| if (r3 != 0) {
0x00001da8 bne 0x1d32 | goto label_4;
| }
| label_14:
0x00001daa ldr r6, [r4, 0x14] | r6 = *((r4 + 0x14));
0x00001dac cmp r6, 0 |
| if (r6 != 0) {
0x00001dae bne 0x1d3e | goto label_5;
| }
0x00001db0 b 0x1d42 | goto label_6;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/lib/libnss_compat.so.2 @ 0x1db4 */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) fcn.00001db4 () | void fcn_00001db4 (int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| int16_t var_0h;
| int16_t var_8h;
| int16_t var_9h;
| int32_t var_4h;
| int16_t var_ch;
| int32_t var_4h_2;
| int32_t var_4h_3;
| int32_t var_ch_2;
| int32_t var_ch_3;
| int32_t var_14h;
| int32_t var_14h_2;
| int16_t var_0h_2;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x00001db4 push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00001db8 sub sp, 0x34 |
0x00001dba add r7, sp, 8 | r7 += var_8h;
0x00001dbc str r2, [r7, 4] | var_4h = r2;
0x00001dbe ldr r2, [pc, 0xec] |
0x00001dc0 ldr.w fp, [r7, 0x50] | fp = *((r7 + 0x50));
0x00001dc4 add r2, pc | r2 = 0x3c76;
0x00001dc6 ldr.w sl, [r2, 8] | sl = *(0x3c7e);
0x00001dca cmp.w sl, 0 |
| if (sl == 0) {
0x00001dce beq 0x1ea6 | goto label_1;
| }
0x00001dd0 add.w r5, r7, 0xc | r5 += var_ch;
0x00001dd4 movs r4, 0 | r4 = 0;
0x00001dd6 str r4, [r7, 0xc] | var_ch = r4;
0x00001dd8 mov r2, r4 | r2 = r4;
0x00001dda mov sb, r0 | sb = r0;
0x00001ddc strd r4, r4, [r5, 4] | __asm ("strd r4, r4, [var_4h_2]");
0x00001de0 mov r0, r5 | r0 = r5;
0x00001de2 strd r4, r4, [r5, 0xc] | __asm ("strd r4, r4, [var_ch_2]");
0x00001de6 strd r4, r4, [r5, 0x14] | __asm ("strd r4, r4, [var_14h]");
0x00001dea mov r6, r1 | r6 = r1;
0x00001dec mov r8, r3 | r8 = r3;
0x00001dee bl 0x1c3c | fcn_00001c3c (r0, r1, r2);
0x00001df2 mov r0, r5 | r0 = r5;
0x00001df4 bl 0x1b94 | r0 = fcn_00001b94 (r0);
0x00001df8 cmp r0, fp |
| if (r0 > fp) {
0x00001dfa bhi 0x1e9a | goto label_2;
| }
0x00001dfc ldr r3, [r7, 0x54] | r3 = *((r7 + 0x54));
0x00001dfe sub.w fp, fp, r0 |
0x00001e02 mov r2, r8 | r2 = r8;
0x00001e04 mov r0, sb | r0 = sb;
0x00001e06 mov r1, r6 | r1 = r6;
0x00001e08 str r3, [sp] | *(sp) = r3;
0x00001e0a mov r3, fp | r3 = fp;
0x00001e0c blx sl | r0 = sl (r0, r1, r2, r3);
0x00001e0e cmp r0, 1 |
0x00001e10 mov sl, r0 | sl = r0;
0x00001e12 beq 0x1e1e |
| while (1) {
| label_0:
0x00001e14 mov r0, sl | r0 = sl;
0x00001e16 adds r7, 0x2c | r7 += 0x2c;
0x00001e18 mov sp, r7 |
0x00001e1a pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
0x00001e1e ldr r1, [r6] | r1 = *(r6);
0x00001e20 mov r0, r1 | r0 = r1;
0x00001e22 str r1, [r7] | *(r7) = r1;
0x00001e24 blx 0xe74 | fcn_00000e74 ();
0x00001e28 ldr r2, [r7, 4] | r2 = var_4h;
0x00001e2a adds r0, 0xa | r0 += 0xa;
0x00001e2c bic r0, r0, 7 | r0 = BIT_MASK (r0, 7);
0x00001e30 mov r3, sp | r3 = sp;
0x00001e32 sub.w sp, sp, r0 |
0x00001e36 ldr r1, [r7] | r1 = *(r7);
0x00001e38 ldr.w sb, [r2, 0xc] | sb = *((r2 + 0xc));
0x00001e3c add r2, sp, 8 | r2 += var_8h;
0x00001e3e cmp.w sb, 0 |
| if (sb != 0) {
0x00001e42 beq 0x1e7c |
0x00001e44 strd r2, r3, [r7] | __asm ("strd r2, r3, [r7]");
0x00001e48 mov.w r3, 0x7c | r3 = 0x7c;
0x00001e4c strb.w r3, [sp, 8] | var_8h = r3;
0x00001e50 add.w r0, sp, 9 | r0 += var_9h;
0x00001e54 blx 0xeec | fcn_00000eec ();
0x00001e58 ldr r2, [r7] | r2 = *(r7);
0x00001e5a mov.w r3, 0x7c | r3 = 0x7c;
0x00001e5e strb r3, [r0] | *(r0) = r3;
0x00001e60 strb r4, [r0, 1] | *((r0 + 1)) = r4;
0x00001e62 mov r0, sb | r0 = sb;
0x00001e64 mov r1, r2 | r1 = r2;
0x00001e66 blx 0xd94 | strstr (r0, r1);
0x00001e6a ldr r3, [r7, 4] | r3 = *((r7 + 4));
0x00001e6c mov sp, r3 |
| if (r0 == 0) {
0x00001e6e cbz r0, 0x1e7e | goto label_3;
| }
0x00001e70 mov sl, r4 | sl = r4;
0x00001e72 adds r7, 0x2c | r7 += 0x2c;
0x00001e74 mov r0, sl | r0 = sl;
0x00001e76 mov sp, r7 |
0x00001e78 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| }
0x00001e7c mov sp, r3 |
| label_3:
0x00001e7e add.w r2, r8, fp | r2 = r8 + fp;
0x00001e82 mov r1, r5 | r1 = r5;
0x00001e84 mov r0, r6 | r0 = r6;
0x00001e86 bl 0x1c3c | fcn_00001c3c (r0, r1, r2);
0x00001e8a mov r0, r5 | r0 = r5;
0x00001e8c bl 0x1a78 | fcn_00001a78 (r0);
0x00001e90 mov r0, sl | r0 = sl;
0x00001e92 adds r7, 0x2c | r7 += 0x2c;
0x00001e94 mov sp, r7 |
0x00001e96 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_2:
0x00001e9a ldr r2, [r7, 0x54] | r2 = *((r7 + 0x54));
0x00001e9c movs r3, 0x22 | r3 = 0x22;
0x00001e9e mvn sl, 1 | sl = ~1;
0x00001ea2 str r3, [r2] | *(r2) = r3;
0x00001ea4 b 0x1e14 |
| }
| label_1:
0x00001ea6 mov.w sl, -1 | sl = -1;
0x00001eaa b 0x1e14 | goto label_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/libnss_compat.so.2 @ 0x22e4 */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) fcn.000022e4 () | void fcn_000022e4 (int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| int16_t var_0h;
| int16_t var_4h;
| int16_t var_8h;
| int16_t var_10h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x000022e4 push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x000022e8 subw sp, sp, 0x47c | __asm ("subw sp, sp, 0x47c");
0x000022ec mov sl, r3 | sl = r3;
0x000022ee subs r3, r2, 1 | r3 = r2 - 1;
0x000022f0 add r7, sp, 0x10 | r7 += var_10h;
0x000022f2 ldr r5, [pc, 0x268] |
0x000022f4 mov r4, r2 | r4 = r2;
0x000022f6 str r3, [r7, 0x1c] | *((r7 + 0x1c)) = r3;
0x000022f8 mov r6, r1 | r6 = r1;
0x000022fa ldr r3, [pc, 0x264] |
0x000022fc ldr r2, [pc, 0x264] |
0x000022fe add r5, pc | r5 = 0x4860;
0x00002300 str r0, [r7, 0x18] | *((r7 + 0x18)) = r0;
0x00002302 add r3, pc | r3 = 0x4868;
0x00002304 add r2, pc | r2 = 0x486c;
0x00002306 str r3, [r7, 0x10] | *((r7 + 0x10)) = r3;
0x00002308 adds r3, 0x18 | r3 += 0x18;
0x0000230a str r2, [r7, 0x14] | *((r7 + 0x14)) = r2;
0x0000230c str r3, [r7, 0xc] | *((r7 + 0xc)) = r3;
| label_1:
0x0000230e ldr r3, [r7, 0x1c] | r3 = *((r7 + 0x1c));
0x00002310 add.w r8, r6, r3 | r8 = r6 + r3;
| label_0:
0x00002314 cmp r4, 2 |
| if (r4 < 2) {
0x00002316 bls 0x23f8 | goto label_5;
| }
0x00002318 add.w sb, r7, 0x30 | sb = r7 + 0x30;
0x0000231c ldr r0, [r5, 8] | r0 = *((r5 + 8));
0x0000231e mov r1, sb | r1 = sb;
0x00002320 blx 0xdb8 | fgetpos (r0, r1);
0x00002324 movs r3, 0xff | r3 = 0xff;
0x00002326 mov r1, r4 | r1 = r4;
0x00002328 strb.w r3, [r8] | *(r8) = r3;
0x0000232c mov r0, r6 | r0 = r6;
0x0000232e ldr r2, [r5, 8] | r2 = *((r5 + 8));
0x00002330 blx 0xee0 | r0 = fcn_00000ee0 ();
0x00002334 mov fp, r0 |
0x00002336 cmp r0, 0 |
| if (r0 == 0) {
0x00002338 beq 0x23ea | goto label_6;
| }
0x0000233a ldrb.w r3, [r8] | r3 = *(r8);
0x0000233e cmp r3, 0xff |
| if (r3 != 0xff) {
0x00002340 bne 0x240e | goto label_7;
| }
0x00002342 movs r3, 0 | r3 = 0;
0x00002344 strb.w r3, [r8] | *(r8) = r3;
0x00002348 blx 0xe68 | r0 = fcn_00000e68 ();
0x0000234c ldr r1, [r0] | r1 = *(r0);
0x0000234e mov r0, fp | r0 = fp;
| do {
0x00002350 mov ip, r0 |
0x00002352 ldrb r3, [r0], 1 | r3 = *(r0);
| r0++;
0x00002356 ldrh.w r2, [r1, r3, lsl 1] | offset_0 = r3 << 1;
| r2 = *((r1 + offset_0));
0x0000235a lsls r2, r2, 0x12 | r2 <<= 0x12;
0x0000235c bmi 0x2350 |
| } while (r2 < r2);
0x0000235e cmp r3, 0x23 |
0x00002360 it ne |
| if (r3 == 0x23) {
0x00002362 cmpne r3, 0 | __asm ("cmpne r3, 0");
| goto label_8;
| }
| if (r3 == 0x23) {
| label_8:
0x00002364 beq 0x2314 | goto label_0;
| }
0x00002366 str.w sl, [sp] | __asm ("str.w sl, [sp]");
0x0000236a mov r0, ip | r0 = ip;
0x0000236c ldr r1, [r7, 0x18] | r1 = *((r7 + 0x18));
0x0000236e mov r3, r4 | r3 = r4;
0x00002370 mov r2, r6 | r2 = r6;
0x00002372 blx 0xdf8 | r0 = fcn_00000df8 ();
0x00002376 cmp r0, 0 |
| if (r0 == 0) {
0x00002378 beq 0x230e | goto label_1;
| }
0x0000237a adds r0, 1 | r0++;
| if (r0 == 1) {
0x0000237c beq.w 0x24e6 | goto label_9;
| }
0x00002380 ldr r3, [r7, 0x18] | r3 = *((r7 + 0x18));
0x00002382 ldr.w r8, [r3] | r8 = *(r3);
0x00002386 ldrb.w r3, [r8] | r3 = *(r8);
0x0000238a sub.w r2, r3, 0x2b | r2 = r3 - 0x2b;
0x0000238e ands r2, r2, 0xfd | r2 &= 0xfd;
| if (r2 != r2) {
0x00002392 bne.w 0x24c0 | goto label_10;
| }
0x00002396 cmp r3, 0x2d |
| if (r3 == 0x2d) {
0x00002398 beq.w 0x24a4 | goto label_11;
| }
0x0000239c cmp r3, 0x2b |
| if (r3 != 0x2b) {
0x0000239e bne 0x230e | goto label_1;
| }
0x000023a0 ldrb.w r3, [r8, 1] | r3 = *((r8 + 1));
0x000023a4 cmp r3, 0x40 |
| if (r3 == 0x40) {
0x000023a6 beq 0x246a | goto label_12;
| }
0x000023a8 tst.w r3, 0xbf |
| if ((r3 & 0xbf) != 0) {
0x000023ac bne 0x241c | goto label_13;
| }
0x000023ae cmp r3, 0 |
| if (r3 != 0) {
0x000023b0 bne 0x230e | goto label_1;
| }
0x000023b2 ldr r5, [pc, 0x1b4] |
0x000023b4 movs r3, 1 | r3 = 1;
0x000023b6 ldr.w r8, [r7, 0x18] | r8 = *((r7 + 0x18));
0x000023ba movs r2, 0 | r2 = 0;
0x000023bc add r5, pc | r5 = 0x492a;
0x000023be mov r1, r8 | r1 = r8;
0x000023c0 add.w r0, r5, 0x18 | r0 = r5 + 0x18;
0x000023c4 strb r3, [r5, 1] | *((r5 + 1)) = r3;
0x000023c6 strb r2, [r5, 2] | *((r5 + 2)) = r2;
0x000023c8 bl 0x1c3c | fcn_00001c3c (r0, r1, r2);
0x000023cc ldr r3, [pc, 0x19c] |
0x000023ce add r3, pc |
0x000023d0 ldr r3, [r3, 0x10] | r3 = *(0x494e);
| if (r3 == 0) {
0x000023d2 cbz r3, 0x2416 | goto label_14;
| }
0x000023d4 ldr r3, [r5, 4] | r3 = *((r5 + 4));
0x000023d6 cmp r3, 1 |
| if (r3 != 1) {
0x000023d8 bne 0x2402 | goto label_2;
| }
0x000023da mov r3, sl | r3 = sl;
0x000023dc mov r2, r4 | r2 = r4;
0x000023de mov r1, r6 | r1 = r6;
0x000023e0 mov r0, r8 | r0 = r8;
0x000023e2 bl 0x1f40 | r0 = fcn_00001f40 (r0, r1, r2, r3);
0x000023e6 mov r3, r0 | r3 = r0;
0x000023e8 b 0x2402 | goto label_2;
| label_6:
0x000023ea ldr r0, [r5, 8] | r0 = *((r5 + 8));
0x000023ec ldr r2, [r0] | r2 = *(r0);
0x000023ee lsls r1, r2, 0x1b | r1 = r2 << 0x1b;
| if (r1 < r2) {
0x000023f0 bmi 0x2412 | goto label_15;
| }
| do {
| label_3:
0x000023f2 mov r1, sb | r1 = sb;
0x000023f4 blx 0xed4 | fcn_00000ed4 ();
| label_5:
0x000023f8 mvn r3, 1 | r3 = ~1;
0x000023fc movs r2, 0x22 | r2 = 0x22;
0x000023fe str.w r2, [sl] | __asm ("str.w r2, [sl]");
| label_2:
0x00002402 mov r0, r3 | r0 = r3;
0x00002404 addw r7, r7, 0x46c | __asm ("addw r7, var_0h");
0x00002408 mov sp, r7 |
0x0000240a pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_7:
0x0000240e ldr r0, [r5, 8] | r0 = *((r5 + 8));
0x00002410 b 0x23f2 |
| } while (1);
| label_15:
0x00002412 mov r3, fp | r3 = fp;
0x00002414 b 0x2402 | goto label_2;
| label_14:
0x00002416 mov.w r3, -1 | r3 = -1;
0x0000241a b 0x2402 | goto label_2;
| label_13:
0x0000241c mov r0, r8 | r0 = r8;
0x0000241e mov fp, sp |
0x00002420 adds r1, r0, 1 | r1 = r0 + 1;
0x00002422 str r1, [r7, 8] | *((r7 + 8)) = r1;
0x00002424 blx 0xe74 | r0 = fcn_00000e74 ();
0x00002428 adds r3, r0, 7 | r3 = r0 + 7;
0x0000242a mov r2, r0 | r2 = r0;
0x0000242c bic r3, r3, 7 | r3 = BIT_MASK (r3, 7);
0x00002430 ldr r1, [r7, 8] | r1 = *((r7 + 8));
0x00002432 sub.w sp, sp, r3 |
0x00002436 add.w r8, sp, 0x10 | r8 += var_10h;
0x0000243a mov r0, r8 | r0 = r8;
0x0000243c blx 0xde0 | fcn_00000de0 ();
0x00002440 ldr r1, [r7, 8] | r1 = *((r7 + 8));
0x00002442 mov r3, r6 | r3 = r6;
0x00002444 strd r4, sl, [sp] | __asm ("strd r4, sl, [sp]");
0x00002448 mov r0, r1 | r0 = r1;
0x0000244a ldrd r2, r1, [r7, 0x14] | __asm ("ldrd r2, r1, [r7, 0x14]");
0x0000244e bl 0x1db4 | fcn_00001db4 (r0, r1, r2, r3);
0x00002452 str r0, [r7, 8] | *((r7 + 8)) = r0;
0x00002454 mov r0, r8 | r0 = r8;
0x00002456 bl 0x2018 | fcn_00002018 (r0);
0x0000245a ldr r3, [r7, 8] | r3 = *((r7 + 8));
0x0000245c cmp r3, 1 |
| if (r3 == 1) {
0x0000245e beq 0x24be | goto label_16;
| }
0x00002460 bics r2, r3, 2 | __asm ("bics r2, r3, 2");
| if (r3 != 1) {
0x00002464 bne 0x24c4 | goto label_17;
| }
0x00002466 mov sp, fp |
0x00002468 b 0x230e | goto label_1;
| label_12:
0x0000246a ldrb.w r3, [r8, 2] | r3 = *((r8 + 2));
0x0000246e cmp r3, 0 |
| if (r3 == 0) {
0x00002470 beq.w 0x230e | goto label_1;
| }
0x00002474 ldr.w r8, [r7, 0x18] | r8 = *((r7 + 0x18));
0x00002478 movw r3, 0x101 | r3 = 0x101;
0x0000247c ldr r1, [r7, 0x10] | r1 = *((r7 + 0x10));
0x0000247e ldr r0, [r7, 0xc] | r0 = *((r7 + 0xc));
0x00002480 strh r3, [r1] | *(r1) = r3;
0x00002482 mov r1, r8 | r1 = r8;
0x00002484 bl 0x1c3c | fcn_00001c3c (r0, r1, r2);
0x00002488 ldr.w r1, [r8] | r1 = *(r8);
0x0000248c mov r3, r4 | r3 = r4;
0x0000248e mov r0, r8 | r0 = r8;
0x00002490 mov r2, r6 | r2 = r6;
0x00002492 str.w sl, [sp] | __asm ("str.w sl, [sp]");
0x00002496 adds r1, 2 | r1 += 2;
0x00002498 bl 0x2114 | r0 = fcn_00002114 (r0, r1, r2, r3);
0x0000249c cmp r0, 2 |
0x0000249e mov r3, r0 | r3 = r0;
| if (r0 != 2) {
0x000024a0 bne 0x2402 | goto label_2;
| }
0x000024a2 b 0x230e | goto label_1;
| label_11:
0x000024a4 ldrb.w r3, [r8, 1] | r3 = *((r8 + 1));
0x000024a8 cmp r3, 0x40 |
| if (r3 == 0x40) {
0x000024aa beq 0x24ee | goto label_18;
| }
0x000024ac tst.w r3, 0xbf |
| if ((r3 & 0xbf) == 0) {
0x000024b0 beq.w 0x230e | goto label_1;
| }
0x000024b4 add.w r0, r8, 1 | r0 = r8 + 1;
0x000024b8 bl 0x2018 | fcn_00002018 (r0);
0x000024bc b 0x230e | goto label_1;
| label_16:
0x000024be mov sp, fp |
| label_10:
0x000024c0 movs r3, 1 | r3 = 1;
0x000024c2 b 0x2402 | goto label_2;
| label_17:
0x000024c4 adds r2, r3, 2 | r2 = r3 + 2;
| if (r2 != r3) {
0x000024c6 beq 0x24cc |
0x000024c8 mov sp, fp |
0x000024ca b 0x2402 | goto label_2;
| }
0x000024cc ldr r2, [pc, 0xa0] |
0x000024ce mov r1, sb | r1 = sb;
0x000024d0 str r3, [r7, 0x1c] | *((r7 + 0x1c)) = r3;
0x000024d2 add r2, pc | r2 = 0x4a46;
0x000024d4 ldr r0, [r2, 8] | r0 = *(0x4a4e);
0x000024d6 blx 0xed4 | fcn_00000ed4 ();
0x000024da movs r2, 0x22 | r2 = 0x22;
0x000024dc ldr r3, [r7, 0x1c] | r3 = *((r7 + 0x1c));
0x000024de str.w r2, [sl] | __asm ("str.w r2, [sl]");
0x000024e2 mov sp, fp |
0x000024e4 b 0x2402 | goto label_2;
| label_9:
0x000024e6 ldr r3, [pc, 0x8c] |
0x000024e8 add r3, pc | r3 = 0x4a62;
0x000024ea ldr r0, [r3, 8] | r0 = *(0x4a6a);
0x000024ec b 0x23f2 | goto label_3;
| label_18:
0x000024ee ldrb.w r3, [r8, 2] | r3 = *((r8 + 2));
0x000024f2 cmp r3, 0 |
| if (r3 == 0) {
0x000024f4 beq.w 0x230e | goto label_1;
| }
0x000024f8 add.w sb, r7, 0x3c | sb = r7 + 0x3c;
0x000024fc mov r1, r2 | r1 = r2;
0x000024fe mov r0, sb | r0 = sb;
0x00002500 movs r2, 0x2c | r2 = 0x2c;
0x00002502 blx 0xebc | fcn_00000ebc ();
0x00002506 add.w r0, r8, 2 | r0 = r8 + 2;
0x0000250a mov r1, sb | r1 = sb;
0x0000250c blx 0xe8c | fcn_00000e8c ();
0x00002510 add.w fp, r7, 0x2c |
0x00002514 add.w r3, r7, 0x28 | r3 = r7 + 0x28;
0x00002516 lsls r0, r5, 0xc | r0 = r5 << 0xc;
0x00002518 add.w r8, r7, 0x24 | r8 = r7 + 0x24;
0x0000251c str r3, [r7, 8] | *((r7 + 8)) = r3;
0x0000251e add.w r3, r7, 0x68 | r3 = r7 + 0x68;
0x00002522 str r3, [r7, 4] | *((r7 + 4)) = r3;
| do {
| label_4:
0x00002524 mov.w r3, 0x400 | r3 = 0x400;
0x00002528 str.w sl, [sp, 8] | __asm ("str.w sl, [var_8h]");
0x0000252c str r3, [sp, 4] | var_4h = r3;
0x0000252e mov r2, fp | r2 = fp;
0x00002530 ldr r3, [r7, 4] | r3 = *((r7 + 4));
0x00002532 mov r1, r8 | r1 = r8;
0x00002534 str r3, [sp] | *(sp) = r3;
0x00002536 mov r3, sb | r3 = sb;
0x00002538 ldr r0, [r7, 8] | r0 = *((r7 + 8));
0x0000253a blx 0xdd0 | r0 = internal_getnetgrent_r ();
| if (r0 == 0) {
0x0000253e cbz r0, 0x2554 | goto label_19;
| }
0x00002540 ldr.w r0, [r8] | r0 = *(r8);
0x00002544 cmp r0, 0 |
0x00002546 beq 0x2524 |
| } while (r0 == 0);
0x00002548 ldrb r3, [r0] | r3 = *(r0);
0x0000254a cmp r3, 0x2d |
| if (r3 == 0x2d) {
0x0000254c beq 0x2524 | goto label_4;
| }
0x0000254e bl 0x2018 | fcn_00002018 (r0);
0x00002552 b 0x2524 | goto label_4;
| label_19:
0x00002554 mov r0, sb | r0 = sb;
0x00002556 blx 0xe80 | fcn_00000e80 ();
0x0000255a b 0x230e | 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/libnss_compat.so.2 @ 0x329c */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) fcn.0000329c () | void fcn_0000329c (int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| int16_t var_0h;
| int16_t var_8h;
| int16_t var_9h;
| int32_t var_4h;
| void * ptr;
| void * var_ch_2;
| int32_t var_14h;
| int32_t var_14h_2;
| int32_t var_1ch;
| int32_t var_20h;
| int32_t var_20h_2;
| int32_t var_28h;
| int32_t var_28h_2;
| int16_t var_0h_2;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x0000329c push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x000032a0 mov r6, r3 | r6 = r3;
0x000032a2 ldr r3, [pc, 0xfc] |
0x000032a4 sub sp, 0x3c |
0x000032a6 add r7, sp, 8 | r7 += var_8h;
0x000032a8 ldr r5, [r7, 0x58] | r5 = *((r7 + 0x58));
0x000032aa add r3, pc | r3 = 0x6650;
0x000032ac ldr.w sl, [r3, 8] | sl = *(0x6658);
0x000032b0 cmp.w sl, 0 |
| if (sl == 0) {
0x000032b4 beq 0x3398 | goto label_1;
| }
0x000032b6 add.w fp, r7, 0xc |
0x000032ba mov.w r3, -1 | r3 = -1;
0x000032be mov r8, r0 | r8 = r0;
0x000032c0 mov sb, r2 | sb = r2;
0x000032c2 mov r0, fp | r0 = fp;
0x000032c4 movs r2, 0 | r2 = 0;
0x000032c6 mov r4, r1 | r4 = r1;
0x000032c8 strd r2, r2, [r7, 0xc] | __asm ("strd r2, r2, [ptr]");
0x000032ca movs r2, 3 | r2 = 3;
0x000032cc strd r2, r2, [r7, 0x14] | __asm ("strd r2, r2, [var_14h]");
0x000032ce movs r2, 5 | r2 = 5;
0x000032d0 str r2, [r7, 0x1c] | var_1ch = r2;
0x000032d2 strd r3, r3, [r7, 0x20] | __asm ("strd r3, r3, [var_20h]");
0x000032d6 strd r3, r3, [r7, 0x28] | __asm ("strd r3, r3, [var_28h]");
0x000032da bl 0x2cf8 | fcn_00002cf8 (r0, r1, r2);
0x000032de ldr r0, [r7, 0x10] | r0 = var_ch_2;
| if (r0 != 0) {
0x000032e0 cbz r0, 0x32f0 |
0x000032e2 blx 0xe74 | fcn_00000e74 ();
0x000032e6 adds r0, 1 | r0++;
0x000032e8 cmp r5, r0 |
0x000032ea it hs |
| if (r5 < r0) {
0x000032ec subhs r5, r5, r0 | r5 -= r0;
| }
| if (r5 <= r0) {
0x000032ee blo 0x338c | goto label_2;
| }
| }
0x000032f0 ldr r3, [r7, 0x5c] | r3 = *((r7 + 0x5c));
0x000032f2 mov r0, r8 | r0 = r8;
0x000032f4 mov r2, r6 | r2 = r6;
0x000032f6 mov r1, r4 | r1 = r4;
0x000032f8 str r3, [sp] | *(sp) = r3;
0x000032fa mov r3, r5 | r3 = r5;
0x000032fc blx sl | r0 = sl (r0, r1, r2, r3);
0x000032fe cmp r0, 1 |
0x00003300 mov r8, r0 | r8 = r0;
0x00003302 beq 0x330e |
| while (1) {
| label_0:
0x00003304 mov r0, r8 | r0 = r8;
0x00003306 adds r7, 0x34 | r7 += 0x34;
0x00003308 mov sp, r7 |
0x0000330a pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
0x0000330e ldr r1, [r4] | r1 = *(r4);
0x00003310 mov sl, sp | sl = sp;
0x00003312 mov r0, r1 | r0 = r1;
0x00003314 str r1, [r7, 4] | var_4h = r1;
0x00003316 blx 0xe74 | fcn_00000e74 ();
0x0000331a ldr.w sb, [sb, 0xc] | sb = *((sb + 0xc));
0x0000331e adds r0, 0xa | r0 += 0xa;
0x00003320 bic r0, r0, 7 | r0 = BIT_MASK (r0, 7);
0x00003324 ldr r1, [r7, 4] | r1 = var_4h;
0x00003326 sub.w sp, sp, r0 |
0x0000332a add r3, sp, 8 | r3 += var_8h;
0x0000332c cmp.w sb, 0 |
| if (sb != 0) {
0x00003330 beq 0x336a |
0x00003332 movs r2, 0x7c | r2 = 0x7c;
0x00003334 add.w r0, sp, 9 | r0 += var_9h;
0x00003338 strb.w r2, [sp, 8] | var_8h = r2;
0x0000333c str r3, [r7, 4] | *((r7 + 4)) = r3;
0x0000333e blx 0xeec | fcn_00000eec ();
0x00003342 ldr r3, [r7, 4] | r3 = *((r7 + 4));
0x00003344 movs r2, 0x7c | r2 = 0x7c;
0x00003346 mov ip, r0 |
0x00003348 strb r2, [r0] | *(r0) = r2;
0x0000334a mov r0, sb | r0 = sb;
0x0000334c mov.w sb, 0 | sb = 0;
0x00003350 mov r1, r3 | r1 = r3;
0x00003352 strb.w sb, [ip, 1] | *((ip + 1)) = sb;
0x00003356 blx 0xd94 | strstr (r0, r1);
0x0000335a mov sp, sl |
| if (r0 == 0) {
0x0000335c cbz r0, 0x336c | goto label_3;
| }
0x0000335e mov r8, sb | r8 = sb;
0x00003360 adds r7, 0x34 | r7 += 0x34;
0x00003362 mov r0, r8 | r0 = r8;
0x00003364 mov sp, r7 |
0x00003366 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| }
0x0000336a mov sp, sl |
| label_3:
0x0000336c adds r2, r6, r5 | r2 = r6 + r5;
0x0000336e mov r1, fp | r1 = fp;
0x00003370 mov r0, r4 | r0 = r4;
0x00003372 bl 0x2cf8 | fcn_00002cf8 (r0, r1, r2);
0x00003376 ldr r0, [r7, 0xc] | r0 = ptr;
0x00003378 blx 0xdc4 | free (r0);
0x0000337c ldr r0, [r7, 0x10] | r0 = var_ch_2;
0x0000337e blx 0xdc4 | free (r0);
0x00003382 mov r0, r8 | r0 = r8;
0x00003384 adds r7, 0x34 | r7 += 0x34;
0x00003386 mov sp, r7 |
0x00003388 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_2:
0x0000338c ldr r2, [r7, 0x5c] | r2 = *((r7 + 0x5c));
0x0000338e movs r3, 0x22 | r3 = 0x22;
0x00003390 mvn r8, 1 | r8 = ~1;
0x00003394 str r3, [r2] | *(r2) = r3;
0x00003396 b 0x3304 |
| }
| label_1:
0x00003398 mov.w r8, -1 | r8 = -1;
0x0000339c b 0x3304 | goto label_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/libnss_compat.so.2 @ 0x33a4 */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) fcn.000033a4 () | void fcn_000033a4 (int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| int16_t var_0h;
| int16_t var_4h;
| int16_t var_8h;
| int16_t var_10h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x000033a4 push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x000033a8 subw sp, sp, 0x47c | __asm ("subw sp, sp, 0x47c");
0x000033ac mov sl, r3 | sl = r3;
0x000033ae subs r3, r2, 1 | r3 = r2 - 1;
0x000033b0 add r7, sp, 0x10 | r7 += var_10h;
0x000033b2 ldr r5, [pc, 0x248] |
0x000033b4 mov r4, r2 | r4 = r2;
0x000033b6 str r3, [r7, 0x1c] | *((r7 + 0x1c)) = r3;
0x000033b8 mov r6, r1 | r6 = r1;
0x000033ba ldr r3, [pc, 0x244] |
0x000033bc ldr r2, [pc, 0x244] |
0x000033be add r5, pc | r5 = 0x69c0;
0x000033c0 str r0, [r7, 0x18] | *((r7 + 0x18)) = r0;
0x000033c2 add r3, pc | r3 = 0x69c8;
0x000033c4 add r2, pc | r2 = 0x69cc;
0x000033c6 str r3, [r7, 0x10] | *((r7 + 0x10)) = r3;
0x000033c8 adds r3, 0x18 | r3 += 0x18;
0x000033ca str r2, [r7, 0x14] | *((r7 + 0x14)) = r2;
0x000033cc str r3, [r7, 0xc] | *((r7 + 0xc)) = r3;
| label_1:
0x000033ce ldr r3, [r7, 0x1c] | r3 = *((r7 + 0x1c));
0x000033d0 add.w r8, r6, r3 | r8 = r6 + r3;
| label_0:
0x000033d4 cmp r4, 2 |
| if (r4 < 2) {
0x000033d6 bls 0x349e | goto label_5;
| }
0x000033d8 add.w sb, r7, 0x30 | sb = r7 + 0x30;
0x000033dc ldr r0, [r5, 8] | r0 = *((r5 + 8));
0x000033de mov r1, sb | r1 = sb;
0x000033e0 blx 0xdb8 | fgetpos (r0, r1);
0x000033e4 movs r3, 0xff | r3 = 0xff;
0x000033e6 mov r1, r4 | r1 = r4;
0x000033e8 strb.w r3, [r8] | *(r8) = r3;
0x000033ec mov r0, r6 | r0 = r6;
0x000033ee ldr r2, [r5, 8] | r2 = *((r5 + 8));
0x000033f0 blx 0xee0 | r0 = fcn_00000ee0 ();
0x000033f4 mov fp, r0 |
0x000033f6 cmp r0, 0 |
| if (r0 == 0) {
0x000033f8 beq 0x3490 | goto label_6;
| }
0x000033fa ldrb.w r3, [r8] | r3 = *(r8);
0x000033fe cmp r3, 0xff |
| if (r3 != 0xff) {
0x00003400 bne 0x34b4 | goto label_7;
| }
0x00003402 blx 0xe68 | r0 = fcn_00000e68 ();
0x00003406 ldr r1, [r0] | r1 = *(r0);
0x00003408 mov r0, fp | r0 = fp;
| do {
0x0000340a mov ip, r0 |
0x0000340c ldrb r3, [r0], 1 | r3 = *(r0);
| r0++;
0x00003410 ldrh.w r2, [r1, r3, lsl 1] | offset_0 = r3 << 1;
| r2 = *((r1 + offset_0));
0x00003414 lsls r2, r2, 0x12 | r2 <<= 0x12;
0x00003416 bmi 0x340a |
| } while (r2 < r2);
0x00003418 cmp r3, 0x23 |
0x0000341a it ne |
| if (r3 == 0x23) {
0x0000341c cmpne r3, 0 | __asm ("cmpne r3, 0");
| goto label_8;
| }
| if (r3 == 0x23) {
| label_8:
0x0000341e beq 0x33d4 | goto label_0;
| }
0x00003420 str.w sl, [sp] | __asm ("str.w sl, [sp]");
0x00003424 mov r0, ip | r0 = ip;
0x00003426 ldr r1, [r7, 0x18] | r1 = *((r7 + 0x18));
0x00003428 mov r3, r4 | r3 = r4;
0x0000342a mov r2, r6 | r2 = r6;
0x0000342c blx 0xf04 | r0 = fcn_00000f04 ();
0x00003430 cmp r0, 0 |
| if (r0 == 0) {
0x00003432 beq 0x33ce | goto label_1;
| }
0x00003434 adds r0, 1 | r0++;
| if (r0 == 1) {
0x00003436 beq.w 0x3586 | goto label_9;
| }
0x0000343a ldr r3, [r7, 0x18] | r3 = *((r7 + 0x18));
0x0000343c ldr.w r8, [r3] | r8 = *(r3);
0x00003440 ldrb.w r3, [r8] | r3 = *(r8);
0x00003444 sub.w r2, r3, 0x2b | r2 = r3 - 0x2b;
0x00003448 ands r2, r2, 0xfd | r2 &= 0xfd;
| if (r2 != r2) {
0x0000344c bne.w 0x3560 | goto label_10;
| }
0x00003450 cmp r3, 0x2d |
| if (r3 == 0x2d) {
0x00003452 beq 0x3544 | goto label_11;
| }
0x00003454 cmp r3, 0x2b |
| if (r3 != 0x2b) {
0x00003456 bne 0x33ce | goto label_1;
| }
0x00003458 ldrb.w r3, [r8, 1] | r3 = *((r8 + 1));
0x0000345c cmp r3, 0x40 |
| if (r3 == 0x40) {
0x0000345e beq 0x350a | goto label_12;
| }
0x00003460 tst.w r3, 0xbf |
| if ((r3 & 0xbf) != 0) {
0x00003464 bne 0x34bc | goto label_13;
| }
0x00003466 cmp r3, 0 |
| if (r3 != 0) {
0x00003468 bne 0x33ce | goto label_1;
| }
0x0000346a ldr r0, [pc, 0x19c] |
0x0000346c movs r2, 0 | r2 = 0;
0x0000346e ldr r5, [r7, 0x18] | r5 = *((r7 + 0x18));
0x00003470 movs r3, 1 | r3 = 1;
0x00003472 add r0, pc | r0 = 0x6a80;
0x00003474 strb r2, [r0, 1] | *((r0 + 1)) = r2;
0x00003476 mov r1, r5 | r1 = r5;
0x00003478 strb r3, [r0, 2] | *((r0 + 2)) = r3;
0x0000347a adds r0, 0x18 | r0 += 0x18;
0x0000347c bl 0x2cf8 | fcn_00002cf8 (r0, r1, r2);
0x00003480 mov r3, sl | r3 = sl;
0x00003482 mov r2, r4 | r2 = r4;
0x00003484 mov r1, r6 | r1 = r6;
0x00003486 mov r0, r5 | r0 = r5;
0x00003488 bl 0x2d80 | r0 = fcn_00002d80 (r0, r1, r2, r3);
0x0000348c mov r3, r0 | r3 = r0;
0x0000348e b 0x34a8 | goto label_2;
| label_6:
0x00003490 ldr r0, [r5, 8] | r0 = *((r5 + 8));
0x00003492 ldr r2, [r0] | r2 = *(r0);
0x00003494 lsls r1, r2, 0x1b | r1 = r2 << 0x1b;
| if (r1 < r2) {
0x00003496 bmi 0x34b8 | goto label_14;
| }
| do {
| label_3:
0x00003498 mov r1, sb | r1 = sb;
0x0000349a blx 0xed4 | fcn_00000ed4 ();
| label_5:
0x0000349e mvn r3, 1 | r3 = ~1;
0x000034a2 movs r2, 0x22 | r2 = 0x22;
0x000034a4 str.w r2, [sl] | __asm ("str.w r2, [sl]");
| label_2:
0x000034a8 mov r0, r3 | r0 = r3;
0x000034aa addw r7, r7, 0x46c | __asm ("addw r7, var_0h");
0x000034ae mov sp, r7 |
0x000034b0 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_7:
0x000034b4 ldr r0, [r5, 8] | r0 = *((r5 + 8));
0x000034b6 b 0x3498 |
| } while (1);
| label_14:
0x000034b8 mov r3, fp | r3 = fp;
0x000034ba b 0x34a8 | goto label_2;
| label_13:
0x000034bc mov r0, r8 | r0 = r8;
0x000034be mov fp, sp |
0x000034c0 adds r1, r0, 1 | r1 = r0 + 1;
0x000034c2 str r1, [r7, 8] | *((r7 + 8)) = r1;
0x000034c4 blx 0xe74 | r0 = fcn_00000e74 ();
0x000034c8 adds r3, r0, 7 | r3 = r0 + 7;
0x000034ca mov r2, r0 | r2 = r0;
0x000034cc bic r3, r3, 7 | r3 = BIT_MASK (r3, 7);
0x000034d0 ldr r1, [r7, 8] | r1 = *((r7 + 8));
0x000034d2 sub.w sp, sp, r3 |
0x000034d6 add.w r8, sp, 0x10 | r8 += var_10h;
0x000034da mov r0, r8 | r0 = r8;
0x000034dc blx 0xde0 | fcn_00000de0 ();
0x000034e0 ldr r1, [r7, 8] | r1 = *((r7 + 8));
0x000034e2 mov r3, r6 | r3 = r6;
0x000034e4 strd r4, sl, [sp] | __asm ("strd r4, sl, [sp]");
0x000034e8 mov r0, r1 | r0 = r1;
0x000034ea ldrd r2, r1, [r7, 0x14] | __asm ("ldrd r2, r1, [r7, 0x14]");
0x000034ee bl 0x329c | fcn_0000329c (r0, r1, r2, r3);
0x000034f2 str r0, [r7, 8] | *((r7 + 8)) = r0;
0x000034f4 mov r0, r8 | r0 = r8;
0x000034f6 bl 0x2f88 | fcn_00002f88 (r0);
0x000034fa ldr r3, [r7, 8] | r3 = *((r7 + 8));
0x000034fc cmp r3, 1 |
| if (r3 == 1) {
0x000034fe beq 0x355e | goto label_15;
| }
0x00003500 bics r2, r3, 2 | __asm ("bics r2, r3, 2");
| if (r3 != 1) {
0x00003504 bne 0x3564 | goto label_16;
| }
0x00003506 mov sp, fp |
0x00003508 b 0x33ce | goto label_1;
| label_12:
0x0000350a ldrb.w r3, [r8, 2] | r3 = *((r8 + 2));
0x0000350e cmp r3, 0 |
| if (r3 == 0) {
0x00003510 beq.w 0x33ce | goto label_1;
| }
0x00003514 ldr r1, [r7, 0x10] | r1 = *((r7 + 0x10));
0x00003516 movs r3, 1 | r3 = 1;
0x00003518 ldr.w r8, [r7, 0x18] | r8 = *((r7 + 0x18));
0x0000351c ldr r0, [r7, 0xc] | r0 = *((r7 + 0xc));
0x0000351e strb r3, [r1] | *(r1) = r3;
0x00003520 strb r3, [r1, 2] | *((r1 + 2)) = r3;
0x00003522 mov r1, r8 | r1 = r8;
0x00003524 bl 0x2cf8 | fcn_00002cf8 (r0, r1, r2);
0x00003528 ldr.w r1, [r8] | r1 = *(r8);
0x0000352c mov r3, r4 | r3 = r4;
0x0000352e mov r0, r8 | r0 = r8;
0x00003530 mov r2, r6 | r2 = r6;
0x00003532 str.w sl, [sp] | __asm ("str.w sl, [sp]");
0x00003536 adds r1, 2 | r1 += 2;
0x00003538 bl 0x3084 | r0 = fcn_00003084 (r0, r1, r2, r3);
0x0000353c cmp r0, 2 |
0x0000353e mov r3, r0 | r3 = r0;
| if (r0 != 2) {
0x00003540 bne 0x34a8 | goto label_2;
| }
0x00003542 b 0x33ce | goto label_1;
| label_11:
0x00003544 ldrb.w r3, [r8, 1] | r3 = *((r8 + 1));
0x00003548 cmp r3, 0x40 |
| if (r3 == 0x40) {
0x0000354a beq 0x358e | goto label_17;
| }
0x0000354c tst.w r3, 0xbf |
| if ((r3 & 0xbf) == 0) {
0x00003550 beq.w 0x33ce | goto label_1;
| }
0x00003554 add.w r0, r8, 1 | r0 = r8 + 1;
0x00003558 bl 0x2f88 | fcn_00002f88 (r0);
0x0000355c b 0x33ce | goto label_1;
| label_15:
0x0000355e mov sp, fp |
| label_10:
0x00003560 movs r3, 1 | r3 = 1;
0x00003562 b 0x34a8 | goto label_2;
| label_16:
0x00003564 adds r2, r3, 2 | r2 = r3 + 2;
| if (r2 != r3) {
0x00003566 beq 0x356c |
0x00003568 mov sp, fp |
0x0000356a b 0x34a8 | goto label_2;
| }
0x0000356c ldr r2, [pc, 0x9c] |
0x0000356e mov r1, sb | r1 = sb;
0x00003570 str r3, [r7, 0x1c] | *((r7 + 0x1c)) = r3;
0x00003572 add r2, pc | r2 = 0x6b82;
0x00003574 ldr r0, [r2, 8] | r0 = *(0x6b8a);
0x00003576 blx 0xed4 | fcn_00000ed4 ();
0x0000357a movs r2, 0x22 | r2 = 0x22;
0x0000357c ldr r3, [r7, 0x1c] | r3 = *((r7 + 0x1c));
0x0000357e str.w r2, [sl] | __asm ("str.w r2, [sl]");
0x00003582 mov sp, fp |
0x00003584 b 0x34a8 | goto label_2;
| label_9:
0x00003586 ldr r3, [pc, 0x88] |
0x00003588 add r3, pc | r3 = 0x6b9e;
0x0000358a ldr r0, [r3, 8] | r0 = *(0x6ba6);
0x0000358c b 0x3498 | goto label_3;
| label_17:
0x0000358e ldrb.w r3, [r8, 2] | r3 = *((r8 + 2));
0x00003592 cmp r3, 0 |
| if (r3 == 0) {
0x00003594 beq.w 0x33ce | goto label_1;
| }
0x00003598 add.w sb, r7, 0x3c | sb = r7 + 0x3c;
0x0000359c mov r1, r2 | r1 = r2;
0x0000359e mov r0, sb | r0 = sb;
0x000035a0 movs r2, 0x2c | r2 = 0x2c;
0x000035a2 blx 0xebc | fcn_00000ebc ();
0x000035a6 add.w r0, r8, 2 | r0 = r8 + 2;
0x000035aa mov r1, sb | r1 = sb;
0x000035ac blx 0xe8c | fcn_00000e8c ();
0x000035b0 add.w fp, r7, 0x2c |
0x000035b4 add.w r3, r7, 0x28 | r3 = r7 + 0x28;
0x000035b8 add.w r8, r7, 0x24 | r8 = r7 + 0x24;
0x000035bc str r3, [r7, 4] | *((r7 + 4)) = r3;
0x000035be add.w r3, r7, 0x68 | r3 = r7 + 0x68;
0x000035c2 str r3, [r7, 8] | *((r7 + 8)) = r3;
| do {
| label_4:
0x000035c4 mov.w r3, 0x400 | r3 = 0x400;
0x000035c8 str.w sl, [sp, 8] | __asm ("str.w sl, [var_8h]");
0x000035cc str r3, [sp, 4] | var_4h = r3;
0x000035ce mov r2, fp | r2 = fp;
0x000035d0 ldr r3, [r7, 8] | r3 = *((r7 + 8));
0x000035d2 mov r1, r8 | r1 = r8;
0x000035d4 str r3, [sp] | *(sp) = r3;
0x000035d6 mov r3, sb | r3 = sb;
0x000035d8 ldr r0, [r7, 4] | r0 = *((r7 + 4));
0x000035da blx 0xdd0 | r0 = internal_getnetgrent_r ();
| if (r0 == 0) {
0x000035de cbz r0, 0x35f4 | goto label_18;
| }
0x000035e0 ldr.w r0, [r8] | r0 = *(r8);
0x000035e4 cmp r0, 0 |
0x000035e6 beq 0x35c4 |
| } while (r0 == 0);
0x000035e8 ldrb r3, [r0] | r3 = *(r0);
0x000035ea cmp r3, 0x2d |
| if (r3 == 0x2d) {
0x000035ec beq 0x35c4 | goto label_4;
| }
0x000035ee bl 0x2f88 | fcn_00002f88 (r0);
0x000035f2 b 0x35c4 | goto label_4;
| label_18:
0x000035f4 mov r0, sb | r0 = sb;
0x000035f6 blx 0xe80 | fcn_00000e80 ();
0x000035fa b 0x33ce | 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/libnss_compat.so.2 @ 0x3a30 */
| #include <stdint.h>
|
; (fcn) fcn.00003a30 () | void fcn_00003a30 (int16_t arg_18h, void * arg1, uint32_t arg2, int16_t arg3, uint32_t arg4) {
| int16_t var_4h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x00003a30 push {r4, r5, r6, lr} |
0x00003a32 mov r4, r0 | r4 = r0;
0x00003a34 ldr r5, [r4] | r5 = *(r4);
0x00003a36 mov r6, r1 | r6 = r1;
0x00003a38 sub sp, 8 |
0x00003a3a ldr r1, [r1] | r1 = *(r1);
0x00003a3c ldr r0, [r2] | r0 = *(r2);
0x00003a3e cmp r5, r1 |
| if (r5 == r1) {
0x00003a40 beq 0x3a50 | goto label_3;
| }
| label_1:
0x00003a42 ldr r2, [sp, 0x18] | r2 = *(arg_18h);
0x00003a44 adds r3, r5, 1 | r3 = r5 + 1;
0x00003a46 str.w r2, [r0, r5, lsl 2] | __asm ("str.w r2, [r0, r5, lsl 2]");
0x00003a4a str r3, [r4] | *(r4) = r3;
| do {
| label_0:
0x00003a4c add sp, 8 |
0x00003a4e pop {r4, r5, r6, pc} |
| label_3:
0x00003a50 cmp r3, 0 |
| if (r3 <= 0) {
0x00003a52 ble 0x3a76 | goto label_4;
| }
0x00003a54 cmp r5, r3 |
0x00003a56 beq 0x3a4c |
| } while (r5 == r3);
0x00003a58 lsls r5, r5, 1 | r5 <<= 1;
0x00003a5a cmp r5, r3 |
0x00003a5c it ge |
| if (r5 < r3) {
0x00003a5e movge r5, r3 | r5 = r3;
| }
| label_2:
0x00003a60 lsls r1, r5, 2 | r1 = r5 << 2;
0x00003a62 str r2, [sp, 4] | var_4h = r2;
0x00003a64 blx 0xe28 | r0 = fcn_00000e28 ();
0x00003a68 cmp r0, 0 |
| if (r0 == 0) {
0x00003a6a beq 0x3a4c | goto label_0;
| }
0x00003a6c ldr r2, [sp, 4] | r2 = var_4h;
0x00003a6e str r0, [r2] | *(r2) = r0;
0x00003a70 str r5, [r6] | *(r6) = r5;
0x00003a72 ldr r5, [r4] | r5 = *(r4);
0x00003a74 b 0x3a42 | goto label_1;
| label_4:
0x00003a76 lsls r5, r5, 1 | r5 <<= 1;
0x00003a78 b 0x3a60 | goto label_2;
| }
[*] Function strcat used 1 times libnss_compat.so.2