[*] Binary protection state of newgrp.shadow
Full RELRO Canary found NX enabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function strcpy tear down of newgrp.shadow
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/newgrp.shadow @ 0x1e90 */
| #include <stdint.h>
|
; (fcn) fcn.00001e90 () | void fcn_00001e90 (int16_t arg_0h, int16_t arg_4h, int16_t arg_8h, int16_t arg_14h, int16_t arg_18h, int16_t arg_1ch, int16_t arg_20h, int16_t arg_24h) {
| int16_t var_0h;
| do {
0x00001770 ldr.w r8, [fp] | r8 = *(fp);
0x00001774 cmp.w r8, 0 |
| if (r8 != 0) {
0x00001778 bne 0x17c6 | goto label_2;
| }
0x0000177a ldr r0, [r5, 0xc] | r0 = *((r5 + 0xc));
0x0000177c bl 0x2a60 | r0 = fcn_00002a60 (r0);
0x00001780 cmp r0, 0 |
| if (r0 == 0) {
0x00001782 beq.w 0x1cfe | goto label_19;
| }
0x00001786 mov r3, r8 | r3 = r8;
0x00001788 str.w r8, [sp, 0x20] | __asm ("str.w r8, [arg_20h]");
0x0000178c str r3, [sp, 0x1c] | *(arg_1ch) = r3;
0x0000178e ldr.w r8, [r0] | r8 = *(r0);
0x00001792 b 0x17cc | goto label_3;
| label_1:
0x00001794 bl 0x1f58 | fcn_00001f58 ();
0x00001798 blx 0x14a4 | fcn_000014a4 ();
0x0000179c movs r0, 1 | r0 = 1;
0x0000179e blx 0x14c8 | fcn_000014c8 ();
0x000017a2 sub.w sl, r8, 2 | sl = r8 - 2;
0x000017a6 add.w fp, r4, 8 |
0x000017aa cmp.w sb, 0 |
| if (sb == 0) {
0x000017ae beq.w 0x18c4 | goto label_20;
| }
0x000017b2 cmp.w sl, 0 |
0x000017b6 beq 0x1770 |
| } while (sl == 0);
0x000017b8 ldr.w r8, [fp] | r8 = *(fp);
0x000017bc ldrb.w r3, [r8] | r3 = *(r8);
0x000017c0 cmp r3, 0x2d |
| if (r3 == 0x2d) {
0x000017c2 beq.w 0x1ce6 | goto label_21;
| }
| label_2:
0x000017c6 movs r3, 0 | r3 = 0;
0x000017c8 strd r3, r3, [sp, 0x1c] | __asm ("strd r3, r3, [sp, 0x1c]");
0x000017ca adds r3, 7 | r3 += 7;
| label_3:
0x000017cc ldr.w sl, [pc, 0x5d4] | sl = *(0x00001da4);
0x000017d0 movs r4, 0x10 | r4 = 0x10;
0x000017d2 mov fp, r4 |
0x000017d4 add sl, pc | sl += pc;
0x000017d6 b 0x17ee | goto label_22;
| label_0:
0x000017d8 blx 0x1534 | r0 = fcn_00001534 ();
0x000017dc ldr r3, [r0] | r3 = *(r0);
0x000017de cmp r3, 0x16 |
| if (r3 != 0x16) {
0x000017e0 bne.w 0x1910 | goto label_23;
| }
0x000017e2 strh r6, [r2, 4] | *((r2 + 4)) = r6;
| do {
0x000017e4 mov r0, r4 | r0 = r4;
0x000017e6 lsl.w fp, fp, 1 |
0x000017ea blx 0x1390 | fcn_00001390 ();
0x000017ec invalid |
| label_22:
0x000017ee lsl.w r0, fp, 2 | r0 = fp << 2;
0x000017f2 bl 0x2c68 | r0 = fcn_00002c68 ();
0x000017f6 mov r1, r0 | r1 = r0;
0x000017f8 str.w r0, [sl, 8] | __asm ("str.w r0, [sl, 8]");
0x000017fc mov r4, r0 | r4 = r0;
0x000017fe mov r0, fp | r0 = fp;
0x00001800 blx 0x1618 | r0 = fcn_00001618 ();
0x00001804 cmp fp, r0 |
0x00001806 str.w r0, [sl, 0xc] | __asm ("str.w r0, [sl, 0xc]");
0x0000180a ble 0x17e4 |
| } while (fp <= r0);
0x0000180c adds r3, r0, 1 | r3 = r0 + 1;
| if (r3 == r0) {
0x0000180e beq 0x17d8 | goto label_0;
| }
0x00001810 cmp r0, 0 |
| if (r0 < 0) {
0x00001812 blt 0x1910 | goto label_23;
| }
0x00001814 mov r0, r8 | r0 = r8;
0x00001816 blx 0x166c | r0 = fcn_0000166c ();
0x0000181a mov r4, r0 | r4 = r0;
0x0000181c cmp r0, 0 |
| if (r0 == 0) {
0x0000181e beq.w 0x1cce | goto label_24;
| }
0x00001822 ldr.w r0, [sl, 0xc] | r0 = *((sl + 0xc));
0x00001826 ldr.w fp, [r4, 8] | fp = *((r4 + 8));
0x0000182a cmp r0, 0 |
| if (r0 <= 0) {
0x0000182c ble.w 0x1956 | goto label_25;
| }
0x00001830 ldr.w r2, [sl, 8] | r2 = *((sl + 8));
0x00001834 movs r3, 0 | r3 = 0;
0x00001836 subs r2, 4 | r2 -= 4;
0x00001838 b 0x1842 |
| while (r1 != fp) {
0x0000183a adds r3, 1 | r3++;
0x0000183c cmp r0, r3 |
| if (r0 == r3) {
0x0000183e beq.w 0x1956 | goto label_25;
| }
0x00001842 ldr r1, [r2, 4]! | r1 = *((r2 += 4));
0x00001846 cmp r1, fp |
0x00001848 bne 0x183a |
| }
0x0000184a mov r0, r8 | r0 = r8;
0x0000184c bl 0x377c | r0 = getsgnam ();
| if (r0 != 0) {
0x00001850 cbz r0, 0x185a |
0x00001852 ldr r3, [r0, 4] | r3 = *((r0 + 4));
0x00001854 str r3, [r4, 4] | *((r4 + 4)) = r3;
0x00001856 ldr r3, [r0, 0xc] | r3 = *((r0 + 0xc));
0x00001858 str r3, [r4, 0xc] | *((r4 + 0xc)) = r3;
| }
| label_5:
0x0000185a ldr.w r0, [pc, 0x54c] |
0x0000185e add r0, pc | r0 = 0x360c;
0x00001860 bl 0x3058 | r0 = fcn_00003058 (r0);
0x00001864 cmp r0, 0 |
| if (r0 != 0) {
0x00001866 bne.w 0x1ad0 | goto label_26;
| }
| label_6:
0x0000186a ldr.w r3, [pc, 0x540] | r3 = *(0x00001dac);
0x0000186e ldr r4, [r4, 8] | r4 = *((r4 + 8));
0x00001870 add r3, pc | r3 += pc;
0x00001872 ldr r6, [r3, 0xc] | r6 = *((r3 + 0xc));
0x00001874 cmp r6, 0 |
| if (r6 <= 0) {
0x00001876 ble.w 0x1cf4 | goto label_27;
| }
0x0000187a ldr r2, [r3, 8] | r2 = *((r3 + 8));
0x0000187c movs r3, 0 | r3 = 0;
0x0000187e subs r2, 4 | r2 -= 4;
0x00001880 b 0x188a |
| while (r1 != r4) {
0x00001882 adds r3, 1 | r3++;
0x00001884 cmp r6, r3 |
| if (r6 == r3) {
0x00001886 beq.w 0x1b4a | goto label_28;
| }
0x0000188a ldr r1, [r2, 4]! | r1 = *((r2 += 4));
0x0000188e cmp r1, r4 |
0x00001890 bne 0x1882 |
| }
| label_15:
0x00001892 cmp r6, r3 |
| if (r6 == r3) {
0x00001894 beq.w 0x1b4a | goto label_28;
| }
| label_7:
0x00001898 blx 0x1570 | fcn_00001570 ();
0x0000189c bl 0x3568 | endsgent ();
0x000018a0 blx 0x15d0 | fcn_000015d0 ();
0x000018a4 blx 0x1320 | endgrent ();
0x000018a8 mov r0, r4 | r0 = r4;
0x000018aa blx 0x1480 | r0 = fcn_00001480 ();
0x000018ae cmp r0, 0 |
| if (r0 == 0) {
0x000018b0 beq.w 0x1a02 | goto label_29;
| }
0x000018b4 ldr.w r0, [pc, 0x4f8] |
0x000018b8 add r0, pc | r0 = 0x366c;
0x000018ba blx 0x143c | fcn_0000143c ();
0x000018be movs r0, 1 | r0 = 1;
0x000018c0 blx 0x14c8 | fcn_000014c8 ();
| label_20:
0x000018c4 cmp.w sl, 0 |
| if (sl == 0) {
0x000018c8 beq.w 0x1794 | goto label_1;
| }
0x000018cc mov.w sb, 1 | sb = 1;
0x000018d0 ldr.w r8, [fp] | r8 = *(fp);
0x000018d4 ldrb.w r3, [r8] | r3 = *(r8);
0x000018d8 cmp r3, 0x2d |
| if (r3 == 0x2d) {
0x000018da beq.w 0x1794 | goto label_1;
| }
0x000018de subs.w sl, sl, 1 | sl--;
| if (sl == sl) {
0x000018e2 beq.w 0x17c6 | goto label_2;
| }
0x000018e6 ldr.w r0, [fp, 4] | r0 = *(arg_4h);
0x000018ea cmp.w sl, 1 |
0x000018ee str r0, [sp, 0x20] | *(arg_20h) = r0;
| if (sl == 1) {
0x000018f0 beq.w 0x1cc4 | goto label_30;
| }
0x000018f4 ldr.w r1, [pc, 0x4bc] |
0x000018f8 add r1, pc | r1 = 0x36b0;
0x000018fa blx 0x1344 | r0 = strcmp (r0, r1);
0x000018fe cmp r0, 0 |
| if (r0 != 0) {
0x00001900 bne.w 0x1bd4 | goto label_31;
| }
0x00001904 ldr.w r3, [fp, 8] | r3 = *(arg_8h);
0x00001908 str r3, [sp, 0x20] | *(arg_20h) = r3;
0x0000190a movs r3, 1 | r3 = 1;
0x0000190c str r3, [sp, 0x1c] | *(arg_1ch) = r3;
0x0000190e b 0x17cc | goto label_3;
| label_23:
0x00001910 ldr.w r0, [pc, 0x4a4] |
0x00001914 add r0, pc |
0x00001916 blx 0x143c | fcn_0000143c ();
0x0000191a movs r0, 1 | r0 = 1;
0x0000191c blx 0x14c8 | fcn_000014c8 ();
0x00001920 ldr.w r3, [pc, 0x498] | r3 = *(0x00001dbc);
0x00001924 movs r1, 1 | r1 = 1;
0x00001926 ldr r0, [sp, 0x14] | r0 = *(arg_14h);
0x00001928 ldr.w r2, [pc, 0x494] |
0x0000192c add r3, pc | r3 += pc;
0x0000192e ldr r3, [r3, 4] | r3 = *((r3 + 4));
0x00001930 add r2, pc |
0x00001932 ldr r0, [r0] | r0 = *(0x36d0);
0x00001934 blx 0x1588 | fcn_00001588 ();
0x00001938 blx 0x1380 | getuid ();
0x0000193a stc p8, c15, [r2, -0x37c]! | __asm ("stc p8, c15, aav.0x000000ff!");
0x0000193e movs r4, 0x84 | r4 = 0x84;
0x00001940 mov r3, r0 | r3 = r0;
0x00001942 movs r1, 1 | r1 = 1;
0x00001944 movs r0, 4 | r0 = 4;
0x00001946 add r2, pc | r2 = 0x503e;
0x00001948 blx 0x15ac | fcn_000015ac ();
0x0000194c blx 0x14a4 | fcn_000014a4 ();
0x00001950 movs r0, 1 | r0 = 1;
0x00001952 blx 0x14c8 | fcn_000014c8 ();
| label_25:
0x00001956 ldr.w sl, [r4, 0xc] | sl = *((r4 + 0xc));
0x0000195a ldr.w r0, [sl] | r0 = *(sl);
| if (r0 != 0) {
0x0000195e cbnz r0, 0x1964 | goto label_32;
| }
0x00001960 b 0x1976 | goto label_33;
| if (r3 == 0) {
| do {
0x00001962 cbz r3, 0x19b4 | goto label_13;
| }
| label_32:
0x00001964 mov r1, r6 | r1 = r6;
0x00001966 blx 0x1344 | r0 = strcmp (r0, r1);
0x0000196a mov r3, r0 | r3 = r0;
0x0000196c ldr r0, [sl, 4]! | r0 = *((sl += 4));
0x00001970 cmp r0, 0 |
0x00001972 bne 0x1962 |
| } while (r0 != 0);
| if (r3 == 0) {
0x00001974 cbz r3, 0x19b4 | goto label_13;
| }
| label_33:
0x00001976 blx 0x154c | fcn_0000154c ();
| do {
| label_4:
0x0000197a blx 0x1558 | r0 = fcn_00001558 ();
0x0000197e mov sl, r0 | sl = r0;
0x00001980 cmp r0, 0 |
| if (r0 == 0) {
0x00001982 beq.w 0x1c9e | goto label_34;
| }
0x00001986 ldr.w r3, [sl, 8] | r3 = *((sl + 8));
0x0000198a cmp fp, r3 |
0x0000198c bne 0x197a |
| } while (fp != r3);
0x0000198e ldr.w r4, [sl, 0xc] | r4 = *((sl + 0xc));
0x00001992 ldr r0, [r4] | r0 = *(r4);
| if (r0 != 0) {
0x00001994 cbnz r0, 0x199a | goto label_35;
| }
0x00001996 b 0x197a | goto label_4;
| if (r3 == 0) {
| do {
0x00001998 cbz r3, 0x19ae | goto label_36;
| }
| label_35:
0x0000199a mov r1, r6 | r1 = r6;
0x0000199c blx 0x1344 | r0 = strcmp (r0, r1);
0x000019a0 mov r3, r0 | r3 = r0;
0x000019a2 ldr r0, [r4, 4]! | r0 = *((r4 += 4));
0x000019a6 cmp r0, 0 |
0x000019a8 bne 0x1998 |
| } while (r0 != 0);
0x000019aa cmp r3, 0 |
| if (r3 != 0) {
0x000019ac bne 0x197a | goto label_4;
| }
| label_36:
0x000019ae mov r4, sl | r4 = sl;
0x000019b0 blx 0x1320 | endgrent ();
| label_13:
0x000019b4 mov r0, r8 | r0 = r8;
0x000019b6 bl 0x377c | r0 = getsgnam ();
| if (r0 != 0) {
0x000019ba cbz r0, 0x19c4 |
0x000019bc ldr r3, [r0, 4] | r3 = *((r0 + 4));
0x000019be str r3, [r4, 4] | *((r4 + 4)) = r3;
0x000019c0 ldr r3, [r0, 0xc] | r3 = *((r0 + 0xc));
0x000019c2 str r3, [r4, 0xc] | *((r4 + 0xc)) = r3;
| }
0x000019c4 ldr r2, [r4, 8] | r2 = *((r4 + 8));
0x000019c6 ldr r3, [r5, 0xc] | r3 = *((r5 + 0xc));
0x000019c8 cmp r2, r3 |
| if (r2 != r3) {
0x000019ca bne.w 0x1c7e | goto label_37;
| }
0x000019ce mov.w sl, 0 | sl = 0;
| label_11:
0x000019d2 ldr r0, [r5] | r0 = *(r5);
| label_18:
0x000019d4 bl 0x2b64 | r0 = fcn_00002b64 (r0);
0x000019d8 mov fp, r0 |
| if (r0 != 0) {
0x000019da cbz r0, 0x19ea |
0x000019dc ldr r0, [r0, 4] | r0 = *((r0 + 4));
0x000019de bl 0x2ca8 | fcn_00002ca8 (r0);
0x000019e2 str r0, [r5, 4] | *((r5 + 4)) = r0;
0x000019e4 mov r0, fp | r0 = fp;
0x000019e6 bl 0x3a20 | fcn_00003a20 (r0);
| }
0x000019ea ldr r3, [r5, 4] | r3 = *((r5 + 4));
0x000019ec ldrb r3, [r3] | r3 = *(r3);
| if (r3 != 0) {
0x000019ee cbnz r3, 0x1a4c | goto label_38;
| }
0x000019f0 ldr r3, [r4, 4] | r3 = *((r4 + 4));
0x000019f2 ldrb r3, [r3] | r3 = *(r3);
| if (r3 == 0) {
0x000019f4 cbz r3, 0x1a4c | goto label_38;
| }
0x000019f6 blx 0x1380 | r0 = getuid ();
0x000019fa cmp r0, 0 |
| if (r0 == 0) {
0x000019fc beq.w 0x185a | goto label_5;
| }
0x00001a00 b 0x1a5e | goto label_39;
| label_29:
0x00001a02 blx 0x1380 | getuid ();
0x00001a06 blx 0x1600 | r0 = fcn_00001600 ();
0x00001a0a mov r4, r0 | r4 = r0;
0x00001a0c cmp r0, 0 |
| if (r0 != 0) {
0x00001a0e bne.w 0x1bc6 | goto label_40;
| }
0x00001a12 ldr r3, [sp, 0x1c] | r3 = *(arg_1ch);
0x00001a14 cmp r3, 0 |
| if (r3 == 0) {
0x00001a16 beq.w 0x1b76 | goto label_41;
| }
0x00001a1a ldr r5, [pc, 0x3ac] |
0x00001a1c blx 0x14a4 | fcn_000014a4 ();
0x00001a20 ldr r2, [pc, 0x3a8] |
0x00001a22 ldr r1, [pc, 0x3ac] |
0x00001a24 add r5, pc | r5 = 0x37f2;
0x00001a26 ldr r3, [sp, 0x20] | r3 = *(arg_20h);
0x00001a28 mov r0, r5 | r0 = r5;
0x00001a2a add r2, pc | r2 = 0x37fa;
0x00001a2c str r4, [sp] | *(sp) = r4;
0x00001a2e add r1, pc | r1 = 0x3804;
0x00001a30 blx 0x15dc | fcn_000015dc ();
0x00001a34 mov r0, r5 | r0 = r5;
0x00001a36 blx 0x143c | fcn_0000143c ();
0x00001a3a blx 0x1534 | r0 = fcn_00001534 ();
0x00001a3e ldr r3, [r0] | r3 = *(r0);
0x00001a40 cmp r3, 2 |
0x00001a42 ite ne |
| if (r3 == 2) {
0x00001a44 movne r0, 0x7e | r0 = 0x7e;
| }
| if (r3 != 2) {
0x00001a46 moveq r0, 0x7f | r0 = 0x7f;
| }
0x00001a48 blx 0x14c8 | fcn_000014c8 ();
| label_38:
0x00001a4c blx 0x1380 | r0 = getuid ();
0x00001a50 cmp r0, 0 |
| if (r0 == 0) {
0x00001a52 beq.w 0x185a | goto label_5;
| }
0x00001a56 cmp.w sl, 0 |
| if (sl == 0) {
0x00001a5a beq.w 0x185a | goto label_5;
| }
| label_39:
0x00001a5e ldr r0, [pc, 0x374] |
0x00001a60 add r0, pc | r0 = 0x383a;
0x00001a62 blx 0x1510 | r0 = fcn_00001510 ();
0x00001a66 mov sl, r0 | sl = r0;
| if (r0 == 0) {
0x00001a68 cbz r0, 0x1ac6 | goto label_14;
| }
0x00001a6a ldr r1, [r4, 4] | r1 = *((r4 + 4));
0x00001a6c bl 0x2cc8 | r0 = fcn_00002cc8 (r0);
0x00001a70 mov fp, r0 |
0x00001a72 mov r0, sl | r0 = sl;
0x00001a74 blx 0x14f8 | fcn_000014f8 ();
0x00001a78 mov.w r2, -1 | r2 = -1;
0x00001a7c mov r1, r0 | r1 = r0;
0x00001a7e mov r0, sl | r0 = sl;
0x00001a80 blx 0x15e8 | fcn_000015e8 ();
0x00001a84 cmp.w fp, 0 |
0x00001a86 lsrs r0, r0, 0x1c | r0 >>= 0x1c;
| if (r0 == r0) {
0x00001a88 beq.w 0x1d44 | goto label_42;
| }
0x00001a8c ldr r1, [r4, 4] | r1 = *((r4 + 4));
0x00001a8e ldrb r3, [r1] | r3 = *(r1);
| if (r3 == 0) {
0x00001a90 cbz r3, 0x1a9e | goto label_43;
| }
0x00001a92 mov r0, fp | r0 = fp;
0x00001a94 blx 0x1344 | r0 = strcmp (r0, r1);
0x00001a98 cmp r0, 0 |
| if (r0 == 0) {
0x00001a9a beq.w 0x185a | goto label_5;
| }
| label_43:
0x00001a9e ldr r0, [r5] | r0 = *(r5);
0x00001aa0 mov r3, r8 | r3 = r8;
0x00001aa2 ldr r2, [pc, 0x334] |
0x00001aa4 movs r1, 1 | r1 = 1;
0x00001aa6 str r0, [sp] | *(sp) = r0;
0x00001aa8 movs r0, 6 | r0 = 6;
0x00001aaa add r2, pc | r2 = 0x3888;
0x00001aac blx 0x15ac | fcn_000015ac ();
0x00001ab0 movs r0, 1 | r0 = 1;
0x00001ab2 blx 0x13c0 | fcn_000013c0 ();
0x00001ab6 ldr r3, [sp, 0x14] | r3 = *(arg_14h);
0x00001ab8 movs r2, 0x12 | r2 = 0x12;
0x00001aba ldr r0, [pc, 0x320] |
0x00001abc movs r1, 1 | r1 = 1;
0x00001abe ldr r3, [r3] | r3 = *(r3);
0x00001ac0 add r0, pc | r0 = 0x38a2;
0x00001ac2 blx 0x1458 | r0 = strcpy (r0, r1)
| label_14:
0x00001ac6 blx 0x14a4 | fcn_000014a4 ();
0x00001aca movs r0, 1 | r0 = 1;
0x00001acc blx 0x14c8 | fcn_000014c8 ();
| label_26:
0x00001ad0 blx 0x135c | r0 = getlogin ();
0x00001ad4 mov fp, r0 |
0x00001ad6 movs r0, 0 | r0 = 0;
0x00001ad8 blx 0x14ec | r0 = fcn_000014ec ();
0x00001adc mov sl, r0 | sl = r0;
0x00001ade cmp.w fp, 0 |
| if (fp == 0) {
0x00001ae2 beq.w 0x1c90 | goto label_44;
| }
0x00001ae6 mov r0, fp | r0 = fp;
0x00001ae8 bl 0x2ca8 | r0 = fcn_00002ca8 (r0);
0x00001aec mov fp, r0 |
0x00001aee cmp.w sl, 0 |
| if (sl == 0) {
0x00001af2 beq 0x1bec | goto label_45;
| }
0x00001af4 mov r0, sl | r0 = sl;
0x00001af6 bl 0x2ca8 | r0 = fcn_00002ca8 (r0);
0x00001afa mov sl, r0 | sl = r0;
0x00001afc cmp.w fp, 0 |
| if (fp == 0) {
0x00001b00 beq.w 0x1d36 | goto label_46;
| }
0x00001b04 mov r3, fp | r3 = fp;
| label_12:
0x00001b06 cmp.w sl, 0 |
| if (sl == 0) {
0x00001b0a beq.w 0x1d30 | goto label_47;
| }
0x00001b0e ldr r1, [pc, 0x2d0] |
0x00001b10 movs r2, 5 | r2 = 5;
0x00001b12 mov r0, sl | r0 = sl;
0x00001b14 str r3, [sp, 0x24] | *(arg_24h) = r3;
0x00001b16 add r1, pc | r1 = 0x38fc;
0x00001b18 blx 0x1654 | fcn_00001654 ();
0x00001b1c ldr r3, [sp, 0x24] | r3 = *(arg_24h);
0x00001b1e cmp r0, 0 |
| if (r0 != 0) {
0x00001b20 bne.w 0x1cca | goto label_48;
| }
0x00001b24 add.w r2, sl, 5 | r2 = sl + 5;
| label_8:
0x00001b28 strd r2, r8, [sp, 4] | __asm ("strd r2, r8, [sp, 4]");
0x00001b2c movs r1, 1 | r1 = 1;
0x00001b2e ldr r2, [pc, 0x2b4] |
0x00001b30 movs r0, 6 | r0 = 6;
0x00001b32 str r3, [sp] | *(sp) = r3;
0x00001b34 mov r3, r6 | r3 = r6;
0x00001b36 add r2, pc | r2 = 0x3920;
0x00001b38 blx 0x15ac | fcn_000015ac ();
0x00001b3c mov r0, fp | r0 = fp;
0x00001b3e blx 0x1390 | fcn_00001390 ();
0x00001b42 mov r0, sl | r0 = sl;
0x00001b44 blx 0x1390 | fcn_00001390 ();
0x00001b48 b 0x186a | goto label_6;
| label_28:
0x00001b4a movs r0, 3 | r0 = 3;
0x00001b4c blx 0x140c | r0 = fcn_0000140c ();
0x00001b50 cmp r6, r0 |
| if (r6 >= r0) {
0x00001b52 bge 0x1bda | goto label_49;
| }
0x00001b54 ldr r3, [pc, 0x290] |
0x00001b56 adds r0, r6, 1 | r0 = r6 + 1;
0x00001b58 add r3, pc | r3 = 0x3944;
0x00001b5a ldr r1, [r3, 8] | r1 = *(0x394c);
0x00001b5c str r0, [r3, 0xc] | *((r3 + 0xc)) = r0;
0x00001b5e str.w r4, [r1, r6, lsl 2] | __asm ("str.w r4, [r1, r6, lsl 2]");
0x00001b62 blx 0x1448 | r0 = fcn_00001448 ();
0x00001b66 cmp r0, 0 |
| if (r0 == 0) {
0x00001b68 beq.w 0x1898 | goto label_7;
| }
0x00001b6a add r6, sp, 0x258 | r6 = sp + 0x258;
0x00001b6c ldr r0, [pc, 0x27c] |
0x00001b6e add r0, pc | r0 = 0x395e;
0x00001b70 blx 0x143c | fcn_0000143c ();
0x00001b74 b 0x1898 | goto label_7;
| label_41:
0x00001b76 ldr r0, [pc, 0x278] |
0x00001b78 add r0, pc | r0 = 0x396e;
0x00001b7a blx 0x1474 | fcn_00001474 ();
0x00001b7e cmp.w sb, 1 |
0x00001b82 mov r6, r0 | r6 = r0;
| if (sb == 1) {
0x00001b84 beq 0x1bfa | goto label_50;
| }
0x00001b86 cmp r0, 0 |
| if (r0 == 0) {
0x00001b88 beq 0x1bfa | goto label_50;
| }
0x00001b8a bl 0x1f98 | r0 = fcn_00001f98 (r0);
0x00001b8e mov r4, r0 | r4 = r0;
| label_9:
0x00001b90 ldr r3, [sp, 0x18] | r3 = *(arg_18h);
0x00001b92 subs r5, r3, 4 | r5 = r3 - 4;
0x00001b94 b 0x1b9c |
| while (r0 != 0) {
0x00001b96 movs r1, 0 | r1 = 0;
0x00001b98 bl 0x1fd0 | fcn_00001fd0 (r0, r1, r2);
0x00001b9c ldr r0, [r5, 4]! | r0 = *((r5 += 4));
0x00001ba0 cmp r0, 0 |
0x00001ba2 bne 0x1b96 |
| }
0x00001ba4 cmp.w sb, 0 |
0x00001ba8 it ne |
| if (sb == 0) {
0x00001baa movne r4, 0 | r4 = 0;
| }
| label_10:
0x00001bac ldr r3, [pc, 0x244] | r3 = *(0x1df4);
0x00001bae mov r1, r4 | r1 = r4;
0x00001bb0 mov r0, r6 | r0 = r6;
0x00001bb2 ldr r3, [r7, r3] | r3 = *((r7 + r3));
0x00001bb4 ldr r2, [r3] | r2 = *(0x1df4);
0x00001bb6 bl 0x2658 | r0 = fcn_00002658 (r0, r1, r2);
0x00001bba cmp r0, 2 |
0x00001bbc ite ne |
| if (r0 == 2) {
0x00001bbe movne r0, 0x7e | r0 = 0x7e;
| }
| if (r0 != 2) {
0x00001bc0 moveq r0, 0x7f | r0 = 0x7f;
| }
0x00001bc2 blx 0x14c8 | fcn_000014c8 ();
| label_40:
0x00001bc6 ldr r0, [pc, 0x230] |
0x00001bc8 add r0, pc | r0 = 0x39c6;
0x00001bca blx 0x143c | fcn_0000143c ();
0x00001bcc ldc p0, c2, [r8], -4 | __asm ("ldc p0, c2, [r8], -4");
0x00001bd0 blx 0x14c8 | fcn_000014c8 ();
| label_31:
0x00001bd4 movs r3, 1 | r3 = 1;
0x00001bd6 str r3, [sp, 0x1c] | *(arg_1ch) = r3;
0x00001bd8 b 0x17cc | goto label_3;
| label_49:
0x00001bda ldr r3, [sp, 0x14] | r3 = *(arg_14h);
0x00001bdc movs r2, 0x10 | r2 = 0x10;
0x00001bde ldr r0, [pc, 0x21c] |
0x00001be0 movs r1, 1 | r1 = 1;
0x00001be2 ldr r3, [r3] | r3 = *(r3);
0x00001be4 add r0, pc | r0 = 0x39e6;
0x00001be6 blx 0x1458 | strcpy (r0, r1)
0x00001be8 ldc p6, c14, [r8], -0x154 | __asm ("ldc p6, c14, [r8], -aav.0x000000ff");
| label_45:
0x00001bec cmp r0, 0 |
| if (r0 == 0) {
0x00001bee beq.w 0x1d3c | goto label_51;
| }
0x00001bf2 ldr r2, [pc, 0x20c] |
0x00001bf4 mov r3, r0 | r3 = r0;
0x00001bf6 add r2, pc | r2 = 0x39fc;
0x00001bf8 b 0x1b28 | goto label_8;
| label_50:
0x00001bfa ldr r6, [r5, 0x18] | r6 = *((r5 + 0x18));
0x00001bfc cmp r6, 0 |
| if (r6 == 0) {
0x00001bfe beq 0x1cf8 | goto label_52;
| }
0x00001c00 ldrb r3, [r6] | r3 = *(r6);
| if (r3 == 0) {
0x00001c02 cbnz r3, 0x1c08 |
0x00001c04 ldr r6, [pc, 0x1fc] |
0x00001c06 add r6, pc | r6 = 0x3a0e;
| }
| label_16:
0x00001c08 mov r0, r6 | r0 = r6;
0x00001c0a bl 0x1f98 | r0 = fcn_00001f98 (r0);
0x00001c0e mov r4, r0 | r4 = r0;
0x00001c10 cmp.w sb, 0 |
| if (sb == 0) {
0x00001c14 beq 0x1b90 | goto label_9;
| }
0x00001c16 ldr r0, [r5, 0x14] | r0 = *((r5 + 0x14));
0x00001c18 blx 0x1424 | r0 = fcn_00001424 ();
0x00001c1c cmp r0, 0 |
| if (r0 != 0) {
0x00001c1e bne.w 0x1d26 | goto label_53;
| }
| label_17:
0x00001c22 ldr.w r8, [pc, 0x1e4] |
0x00001c26 ldr.w sb, [pc, 0x1e4] |
0x00001c2a ldr r3, [sp, 0x18] | r3 = *(arg_18h);
0x00001c2c ldr.w sl, [pc, 0x1e0] |
0x00001c30 add r8, pc | r8 = 0x3a3e;
0x00001c32 add sb, pc | sb = 0x3a44;
0x00001c34 subs r5, r3, 4 | r5 = r3 - 4;
0x00001c36 add sl, pc | sl = 0x3a4a;
0x00001c38 b 0x1c74 |
| while (r4 != 0) {
0x00001c3a movs r2, 5 | r2 = 5;
0x00001c3c mov r1, r8 | r1 = r8;
0x00001c3e mov r0, r4 | r0 = r4;
0x00001c40 blx 0x1654 | r0 = fcn_00001654 ();
| if (r0 != 0) {
0x00001c44 cbz r0, 0x1c6c |
0x00001c46 movs r2, 5 | r2 = 5;
0x00001c48 mov r1, sb | r1 = sb;
0x00001c4a mov r0, r4 | r0 = r4;
0x00001c4c blx 0x1654 | r0 = fcn_00001654 ();
| if (r0 == 0) {
0x00001c50 cbz r0, 0x1c6c | goto label_54;
| }
0x00001c52 movs r2, 6 | r2 = 6;
0x00001c54 mov r1, sl | r1 = sl;
0x00001c56 mov r0, r4 | r0 = r4;
0x00001c58 blx 0x1654 | r0 = fcn_00001654 ();
| if (r0 == 0) {
0x00001c5c cbz r0, 0x1c6c | goto label_54;
| }
0x00001c5e ldr r1, [pc, 0x1b4] |
0x00001c60 movs r2, 5 | r2 = 5;
0x00001c62 mov r0, r4 | r0 = r4;
0x00001c64 add r1, pc | r1 = 0x3a7e;
0x00001c66 blx 0x1654 | r0 = fcn_00001654 ();
| if (r0 != 0) {
0x00001c6a cbnz r0, 0x1c74 | goto label_55;
| }
| }
| label_54:
0x00001c6c mov r0, r4 | r0 = r4;
0x00001c6e movs r1, 0 | r1 = 0;
0x00001c70 bl 0x1fd0 | fcn_00001fd0 (r0, r1, r2);
| label_55:
0x00001c74 ldr r4, [r5, 4]! | r4 = *((r5 += 4));
0x00001c78 cmp r4, 0 |
0x00001c7a bne 0x1c3a |
| }
0x00001c7c b 0x1bac | goto label_10;
| label_37:
0x00001c7e ldr r1, [r5] | r1 = *(r5);
0x00001c80 ldr r0, [r4, 0xc] | r0 = *((r4 + 0xc));
0x00001c82 bl 0x2530 | r0 = fcn_00002530 (r0, r1);
0x00001c86 eor r3, r0, 1 | r3 = r0 ^ 1;
0x00001c8a uxtb.w sl, r3 | sl = (int8_t) r3;
0x00001c8e b 0x19d2 | goto label_11;
| if (r0 == 0) {
| label_44:
0x00001c90 cbz r0, 0x1cec | goto label_56;
| }
0x00001c92 bl 0x2ca8 | fcn_00002ca8 (r0);
0x00001c96 ldr r3, [pc, 0x180] |
0x00001c98 mov sl, r0 | sl = r0;
0x00001c9a add r3, pc | r3 = 0x3ab8;
0x00001c9c b 0x1b06 | goto label_12;
| label_34:
0x00001c9e blx 0x1320 | endgrent ();
0x00001ca2 mov r0, r8 | r0 = r8;
0x00001ca4 bl 0x295c | r0 = fcn_0000295c (r0);
0x00001ca8 mov r4, r0 | r4 = r0;
0x00001caa cmp r0, 0 |
| if (r0 != 0) {
0x00001cac bne.w 0x19b4 | goto label_13;
| }
0x00001cb0 ldr r3, [pc, 0x168] |
0x00001cb2 movw r2, 0x286 | r2 = 0x286;
0x00001cb6 ldr r1, [pc, 0x168] |
0x00001cb8 ldr r0, [pc, 0x168] |
0x00001cba add r3, pc | r3 = 0x3ada;
0x00001cbc add r1, pc | r1 = 0x3ae2;
0x00001cbe add r0, pc | r0 = 0x3ae6;
0x00001cc0 blx 0x1690 | fcn_00001690 ();
| label_30:
0x00001cc4 str.w sl, [sp, 0x1c] | __asm ("str.w sl, [arg_1ch]");
0x00001cc8 b 0x17cc | goto label_3;
| label_48:
0x00001cca mov r2, sl | r2 = sl;
0x00001ccc b 0x1b28 | goto label_8;
| label_24:
0x00001cce ldr r1, [sp, 0x14] | r1 = *(arg_14h);
0x00001cd0 ldr r2, [pc, 0x154] |
0x00001cd2 ldr.w r3, [sl, 4] | r3 = *((sl + 4));
0x00001cd6 ldr r0, [r1] | r0 = *(r1);
0x00001cd8 movs r1, 1 | r1 = 1;
0x00001cda add r2, pc | r2 = 0x3b06;
0x00001cdc str.w r8, [sp] | __asm ("str.w r8, [sp]");
0x00001ce0 blx 0x1588 | fcn_00001588 ();
0x00001ce4 b 0x1ac6 | goto label_14;
| label_21:
0x00001ce6 bl 0x1f58 | fcn_00001f58 ();
0x00001cea b 0x1ac6 | goto label_14;
| label_56:
0x00001cec ldr r3, [pc, 0x13c] |
0x00001cee add r3, pc | r3 = 0x3b1e;
0x00001cf0 mov r2, r3 | r2 = r3;
0x00001cf2 b 0x1b28 | goto label_8;
| label_27:
0x00001cf4 movs r3, 0 | r3 = 0;
0x00001cf6 b 0x1892 | goto label_15;
| label_52:
0x00001cf8 ldr r6, [pc, 0x134] |
0x00001cfa add r6, pc | r6 = 0x3b2e;
0x00001cfc b 0x1c08 | goto label_16;
| label_19:
0x00001cfe ldr r3, [pc, 0x134] |
0x00001d00 ldr r1, [r5, 0xc] | r1 = *((r5 + 0xc));
0x00001d02 ldr r0, [sp, 0x14] | r0 = *(arg_14h);
0x00001d04 ldr r2, [pc, 0x130] |
0x00001d06 add r3, pc |
0x00001d08 ldr r3, [r3, 4] | r3 = "@\t@\n@";
0x00001d0a ldr r0, [r0] | r0 = *(r0);
0x00001d0c add r2, pc | r2 = 0x3b48;
0x00001d0e str r1, [sp] | *(sp) = r1;
0x00001d10 movs r1, 1 | r1 = 1;
0x00001d12 blx 0x1588 | fcn_00001588 ();
0x00001d14 invalid |
0x00001d16 ldr r2, [pc, 0x124] |
0x00001d18 movs r1, 1 | r1 = 1;
0x00001d1a ldr r3, [r5, 0xc] | r3 = *((r5 + 0xc));
0x00001d1c movs r0, 2 | r0 = 2;
0x00001d1e add r2, pc | r2 = "Usage: newgrp [-] [group]\n";
0x00001d20 blx 0x15ac | fcn_000015ac ();
0x00001d24 b 0x1ac6 | goto label_14;
| label_53:
0x00001d26 ldr r0, [pc, 0x118] |
0x00001d28 add r0, pc | r0 = 0x3b6e;
0x00001d2a blx 0x143c | fcn_0000143c ();
0x00001d2e b 0x1c22 | goto label_17;
| label_47:
0x00001d30 ldr r2, [pc, 0x110] |
0x00001d32 add r2, pc | r2 = 0x3b7a;
0x00001d34 b 0x1b28 | goto label_8;
| label_46:
0x00001d36 ldr r3, [pc, 0x110] |
0x00001d38 add r3, pc | r3 = 0x3b86;
0x00001d3a b 0x1b06 | goto label_12;
| label_51:
0x00001d3c ldr r3, [pc, 0x10c] |
0x00001d3e add r3, pc | r3 = 0x3b8e;
0x00001d40 mov r2, r3 | r2 = r3;
0x00001d42 b 0x1b28 | goto label_8;
| label_42:
0x00001d44 ldr r3, [pc, 0x108] |
0x00001d46 ldr r2, [sp, 0x14] | r2 = *(arg_14h);
0x00001d48 add r3, pc | r3 = "newgrp";
0x00001d4a ldr r4, [r2] | r4 = *(r2);
0x00001d4c ldr r5, [r3, 4] | r5 = *(0x3ba0);
0x00001d4e blx 0x1534 | r0 = fcn_00001534 ();
0x00001d52 ldr r0, [r0] | r0 = *(r0);
0x00001d54 blx 0x1498 | fcn_00001498 ();
0x00001d58 ldr r2, [pc, 0xf8] |
0x00001d5a mov r1, r0 | r1 = r0;
0x00001d5c mov r3, r5 | r3 = r5;
0x00001d5e str r1, [sp] | *(sp) = r1;
0x00001d60 mov r0, r4 | r0 = r4;
0x00001d62 movs r1, 1 | r1 = 1;
0x00001d64 add r2, pc | r2 = 0x3bbc;
0x00001d66 blx 0x1588 | fcn_00001588 ();
0x00001d6a ldr r2, [pc, 0xec] |
0x00001d6c mov r3, r8 | r3 = r8;
0x00001d6e movs r1, 1 | r1 = 1;
0x00001d70 movs r0, 6 | r0 = 6;
0x00001d72 add r2, pc | r2 = 0x3bd0;
0x00001d74 blx 0x15ac | fcn_000015ac ();
0x00001d78 b 0x1ac6 | goto label_14;
0x00001e90 adds r0, 0x14 | r0 += 0x14;
0x00001e92 b 0x19d4 | goto label_18;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/newgrp.shadow @ 0x1fd0 */
| #include <stdint.h>
|
; (fcn) fcn.00001fd0 () | void fcn_00001fd0 (int16_t arg_1h, int16_t arg1, uint32_t arg2) {
| int16_t var_0h;
| int32_t var_4h;
| int32_t var_4h_2;
| int16_t var_10h;
| int16_t var_14h;
| r0 = arg1;
| r1 = arg2;
0x00001fd0 push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00001fd4 sub sp, 0x1c |
0x00001fd6 ldr.w sb, [pc, 0x164] |
0x00001fda add sb, pc | sb = 0x411c;
0x00001fdc cmp r1, 0 |
| if (arg_1h == ) {
0x00001fde beq 0x20ba | goto label_3;
| }
0x00001fe0 mov r5, r1 | r5 = r1;
0x00001fe2 mov r6, r0 | r6 = r0;
0x00001fe4 blx 0x14f8 | r0 = fcn_000014f8 ();
0x00001fe8 mov r4, r0 | r4 = r0;
0x00001fea mov r0, r5 | r0 = r5;
0x00001fec blx 0x14f8 | r0 = fcn_000014f8 ();
0x00001ff0 add r4, r0 | r4 += r0;
0x00001ff2 adds r7, r4, 2 | r7 = r4 + 2;
0x00001ff4 adds r4, 1 | r4++;
0x00001ff6 mov r0, r7 | r0 = r7;
0x00001ff8 bl 0x2c68 | fcn_00002c68 ();
0x00001ffc ldr r3, [pc, 0x140] |
0x00001ffe mov r1, r7 | r1 = r7;
0x00002000 movs r2, 1 | r2 = 1;
0x00002002 strd r6, r5, [sp, 4] | __asm ("strd r6, r5, [var_4h]");
0x00002006 mov r8, r0 | r8 = r0;
0x00002008 add r3, pc | r3 = 0x414c;
0x0000200a str r3, [sp] | *(sp) = r3;
0x0000200c mov.w r3, -1 | r3 = -1;
0x00002010 blx 0x1678 | r0 = fcn_00001678 ();
0x00002014 cmp r4, r0 |
| if (r4 != r0) {
0x00002016 bne 0x20f8 | goto label_4;
| }
| label_0:
0x00002018 movs r1, 0x3d | r1 = 0x3d;
0x0000201a mov r0, r8 | r0 = r8;
0x0000201c blx 0x1504 | r0 = fcn_00001504 ();
0x00002020 cmp r0, 0 |
| if (r0 == 0) {
0x00002022 beq 0x20de | goto label_5;
| }
0x00002024 ldr r3, [pc, 0x11c] | r3 = *(0x2144);
0x00002026 sub.w r7, r0, r8 | r7 = r0 - r8;
0x0000202a ldr.w sl, [sb, r3] | sl = *((sb + r3));
0x0000202e ldr r3, [pc, 0x118] | r3 = *(0x214a);
0x00002030 ldr.w fp, [sl] | fp = *(sl);
0x00002034 ldr.w r3, [sb, r3] | r3 = *((sb + r3));
0x00002038 ldr r5, [r3] | r5 = *(0x214a);
0x0000203a str r3, [sp, 0x14] | var_14h = r3;
0x0000203c cmp.w fp, 0 |
| if (fp == 0) {
0x00002040 beq 0x20ea | goto label_6;
| }
0x00002042 subs r6, r5, 4 | r6 = r5 - 4;
0x00002044 str r5, [sp, 0x10] | var_10h = r5;
0x00002046 movs r4, 0 | r4 = 0;
0x00002048 mov r5, r6 | r5 = r6;
| do {
0x0000204a ldr r6, [r5, 4]! | r6 = *((r5 += 4));
0x0000204e mov r2, r7 | r2 = r7;
0x00002050 mov r0, r8 | r0 = r8;
0x00002052 mov r1, r6 | r1 = r6;
0x00002054 blx 0x1654 | r0 = fcn_00001654 ();
| if (r0 == 0) {
0x00002058 cbnz r0, 0x2064 |
0x0000205a ldrb r2, [r6, r7] | r2 = *((r6 + r7));
0x0000205c cmp r2, 0 |
0x0000205e it ne |
| if (r2 != 0) {
0x00002060 cmpne r2, 0x3d | __asm ("cmpne r2, 0x3d");
| }
| if (r2 == 0) {
0x00002062 beq 0x20c2 | goto label_7;
| }
| }
0x00002064 adds r4, 1 | r4++;
0x00002066 cmp fp, r4 |
0x00002068 bne 0x204a |
| } while (fp != r4);
0x0000206a ldr r5, [sp, 0x10] | r5 = var_10h;
| label_1:
0x0000206c add.w r3, fp, 1 | r3 += arg_1h;
0x00002070 lsl.w r1, fp, 2 | r1 = fp << 2;
0x00002074 str.w r3, [sl] | __asm ("str.w r3, [sl]");
0x00002078 lsls r3, r3, 0x1c | r3 <<= 0x1c;
0x0000207a it ne |
| if (r3 == r3) {
0x0000207c addne r1, 4 | r1 += 4;
| }
0x0000207e str.w r8, [r5, fp, lsl 2] | __asm ("str.w r8, [r5, fp, lsl 2]");
0x00002082 beq 0x208e |
| while (1) {
| label_2:
0x00002084 movs r3, 0 | r3 = 0;
0x00002086 str r3, [r5, r1] | *((r5 + r1)) = r3;
0x00002088 add sp, 0x1c |
0x0000208a pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
0x0000208e mov r0, r5 | r0 = r5;
0x00002090 adds r1, 0x44 | r1 += 0x44;
0x00002092 blx 0x1418 | r0 = fcn_00001418 ();
0x00002096 mov r5, r0 | r5 = r0;
0x00002098 cmp r0, 0 |
| if (r0 == 0) {
0x0000209a beq 0x210a | goto label_8;
| }
0x0000209c ldr r3, [pc, 0xac] | r3 = *(0x214c);
0x0000209e ldr r2, [sp, 0x14] | r2 = var_14h;
0x000020a0 ldr.w r3, [sb, r3] | r3 = *((sb + r3));
0x000020a4 ldr r2, [r2] | r2 = *(r2);
0x000020a6 ldr r1, [r3] | r1 = *(0x214c);
0x000020a8 cmp r1, r2 |
0x000020aa ldr.w r1, [sl] | r1 = *(sl);
0x000020ae it eq |
| if (r1 != r2) {
0x000020b0 streq r0, [r3] | *(r3) = r0;
| }
0x000020b2 ldr r3, [sp, 0x14] | r3 = var_14h;
0x000020b4 lsls r1, r1, 2 | r1 <<= 2;
0x000020b6 str r0, [r3] | *(r3) = r0;
0x000020b8 b 0x2084 |
| }
| label_3:
0x000020ba bl 0x2ca8 | r0 = fcn_00002ca8 (r0);
0x000020be mov r8, r0 | r8 = r0;
0x000020c0 b 0x2018 | goto label_0;
| label_7:
0x000020c2 cmp fp, r4 |
0x000020c4 ldr r5, [sp, 0x10] | r5 = var_10h;
| if (fp < r4) {
0x000020c6 bls 0x206c | goto label_1;
| }
0x000020c8 ldr.w r0, [r5, r4, lsl 2] | offset_0 = r4 << 2;
| r0 = *((r5 + offset_0));
0x000020cc blx 0x1390 | fcn_00001390 ();
0x000020d0 ldr r3, [sp, 0x14] | r3 = var_14h;
0x000020d2 ldr r3, [r3] | r3 = *(r3);
0x000020d4 str.w r8, [r3, r4, lsl 2] | __asm ("str.w r8, [r3, r4, lsl 2]");
0x000020d8 add sp, 0x1c |
0x000020da pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_5:
0x000020de mov r0, r8 | r0 = r8;
0x000020e0 add sp, 0x1c |
0x000020e2 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x000020e6 b.w 0x138c | void (*0x138c)() ();
| label_6:
0x000020ea movs r3, 1 | r3 = 1;
0x000020ec movs r1, 4 | r1 = 4;
0x000020ee str.w r3, [sl] | __asm ("str.w r3, [sl]");
0x000020f2 str.w r8, [r5] | __asm ("str.w r8, [r5]");
0x000020f6 b 0x2084 | goto label_2;
| label_4:
0x000020f8 ldr r3, [pc, 0x54] |
0x000020fa movs r2, 0x4e | r2 = 0x4e;
0x000020fc ldr r1, [pc, 0x54] |
0x000020fe ldr r0, [pc, 0x58] |
0x00002100 add r3, pc | r3 = "LOGIN_PLAIN_PROMPT";
0x00002102 add r1, pc | r1 = 0x425a;
0x00002104 add r0, pc | r0 = 0x4262;
0x00002106 blx 0x1690 | fcn_00001690 ();
| label_8:
0x0000210a bl 0x38f4 | r0 = fcn_000038f4 ();
0x0000210e mov r3, r0 | r3 = r0;
0x00002110 ldr r0, [pc, 0x48] |
0x00002112 movs r1, 1 | r1 = 1;
0x00002114 movs r2, 0x15 | r2 = 0x15;
0x00002116 add r0, pc | r0 = 0x4276;
0x00002118 blx 0x1458 | strcpy (r0, r1)
0x0000211c ldr r4, [sp, 0x14] | r4 = var_14h;
0x0000211e ldr.w r3, [sl] | r3 = *(sl);
0x00002122 ldr r2, [r4] | r2 = *(r4);
0x00002124 subs r3, 1 | r3--;
0x00002126 ldr.w r0, [r2, r3, lsl 2] | offset_1 = r3 << 2;
| r0 = *((r2 + offset_1));
0x0000212a str.w r3, [sl] | __asm ("str.w r3, [sl]");
0x0000212e blx 0x1390 | fcn_00001390 ();
0x00002132 ldr.w r1, [sl] | r1 = *(sl);
0x00002136 ldr r5, [r4] | r5 = *(r4);
0x00002138 lsls r1, r1, 2 | r1 <<= 2;
0x0000213a b 0x2084 | goto label_2;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/newgrp.shadow @ 0x2e14 */
| #include <stdint.h>
|
; (fcn) fcn.00002e14 () | void fcn_00002e14 (int16_t arg1, int16_t arg2) {
| r0 = arg1;
| r1 = arg2;
0x00002e14 ldr r3, [pc, 0x5c] |
0x00002e16 push {r4, r5, r6, lr} |
0x00002e18 mov r4, r0 | r4 = r0;
0x00002e1a ldr r6, [pc, 0x5c] |
0x00002e1c mov r5, r1 | r5 = r1;
0x00002e1e add r3, pc | r3 = 0x5c96;
0x00002e20 ldrb r3, [r3] | r3 = *(r3);
0x00002e22 add r6, pc | r6 = 0x5ca0;
0x00002e24 cbz r3, 0x2e48 |
| while (1) {
0x00002e26 mov r0, r4 | r0 = r4;
0x00002e28 bl 0x2d8c | r0 = fcn_00002d8c (r0);
0x00002e2c mov r4, r0 | r4 = r0;
| if (r0 == 0) {
0x00002e2e cbz r0, 0x2e6c | goto label_0;
| }
0x00002e30 mov r0, r5 | r0 = r5;
0x00002e32 blx 0x13e4 | r0 = fcn_000013e4 ();
0x00002e36 mov r5, r0 | r5 = r0;
| if (r0 == 0) {
0x00002e38 cbz r0, 0x2e4e | goto label_1;
| }
0x00002e3a ldr r0, [r4, 4] | r0 = *((r4 + 4));
| if (r0 != 0) {
0x00002e3c cbz r0, 0x2e42 |
0x00002e3e blx 0x1390 | fcn_00001390 ();
| }
0x00002e42 movs r0, 0 | r0 = 0;
0x00002e44 str r5, [r4, 4] | *((r4 + 4)) = r5;
0x00002e46 pop {r4, r5, r6, pc} |
0x00002e48 bl 0x2e88 | fcn_00002e88 (r0, r1);
0x00002e4c b 0x2e26 |
| }
| label_1:
0x00002e4e ldr r3, [pc, 0x2c] |
0x00002e50 movs r2, 0x2a | r2 = 0x2a;
0x00002e52 ldr r0, [pc, 0x2c] |
0x00002e54 movs r1, 1 | r1 = 1;
0x00002e56 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00002e58 add r0, pc | r0 = 0x5cde;
0x00002e5a ldr r3, [r3] | r3 = *(0x2e7e);
0x00002e5c blx 0x1458 | strcpy (r0, r1)
0x00002e60 ldr r2, [pc, 0x20] |
0x00002e62 movs r1, 1 | r1 = 1;
0x00002e64 movs r0, 3 | r0 = 3;
0x00002e66 add r2, pc | r2 = 0x5cee;
0x00002e68 blx 0x15ac | fcn_000015ac ();
| label_0:
0x00002e6c mov.w r0, -1 | r0 = -1;
0x00002e70 pop {r4, r5, r6, pc} |
| }
[*] Function strcpy used 5 times newgrp.shadow