[*] 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-50593792.squashfs_v4_le_extract/usr/bin/newgrp.shadow @ 0x1db8 */
| #include <stdint.h>
|
; (fcn) fcn.00001db8 () | void fcn_00001db8 (int16_t arg_10h, int16_t arg_14h, int16_t arg_18h, int16_t arg_1ch, int16_t arg_20h, int16_t arg_24h) {
| int16_t var_0h;
| label_3:
0x000016d4 ldr.w sl, [r3] | sl = *(r3);
0x000016d8 ldrb.w r2, [sl] | r2 = *(sl);
0x000016dc cmp r2, 0x2d |
| if (r2 == 0x2d) {
0x000016de beq.w 0x1812 | goto label_18;
| }
0x000016e2 subs.w sb, sb, 1 | sb--;
| if (sb != sb) {
0x000016e6 bne.w 0x1840 | goto label_19;
| }
| label_1:
0x000016ea movs r3, 0 | r3 = 0;
0x000016ec strd r3, r3, [sp, 0x1c] | __asm ("strd r3, r3, [sp, 0x1c]");
| label_2:
0x000016f0 ldr.w r4, [pc, 0x5dc] | r4 = *(0x00001cd0);
0x000016f4 movs r5, 0x10 | r5 = 0x10;
0x000016f6 add r4, pc | r4 += pc;
0x000016f8 b 0x170c | goto label_20;
| label_0:
0x000016fa blx 0x1490 | r0 = fcn_00001490 ();
0x000016fe ldr r3, [r0] | r3 = *(r0);
0x00001700 cmp r3, 0x16 |
| if (r3 != 0x16) {
0x00001702 bne 0x1802 | goto label_21;
| }
| do {
0x00001704 mov r0, r6 | r0 = r6;
0x00001706 lsls r5, r5, 1 | r5 <<= 1;
0x00001708 blx 0x12ec | fcn_000012ec ();
| label_20:
0x0000170c lsls r0, r5, 2 | r0 = r5 << 2;
0x0000170e bl 0x2c20 | r0 = fcn_00002c20 ();
0x00001712 mov r1, r0 | r1 = r0;
0x00001714 str r0, [r4, 0xc] | *((r4 + 0xc)) = r0;
0x00001716 mov r6, r0 | r6 = r0;
0x00001718 mov r0, r5 | r0 = r5;
0x0000171a blx 0x1574 | r0 = fcn_00001574 ();
0x0000171e cmp r5, r0 |
0x00001720 str r0, [r4, 0x10] | *((r4 + 0x10)) = r0;
0x00001722 ble 0x1704 |
| } while (r5 <= r0);
0x00001724 adds r3, r0, 1 | r3 = r0 + 1;
| if (r3 == r0) {
0x00001726 beq 0x16fa | goto label_0;
| }
0x00001728 cmp r0, 0 |
| if (r0 < 0) {
0x0000172a blt 0x1802 | goto label_21;
| }
0x0000172c mov r0, sl | r0 = sl;
0x0000172e blx 0x15c8 | r0 = fcn_000015c8 ();
0x00001732 mov r5, r0 | r5 = r0;
0x00001734 cmp r0, 0 |
| if (r0 == 0) {
0x00001736 beq.w 0x1be2 | goto label_22;
| }
0x0000173a ldr r0, [r4, 0x10] | r0 = *((r4 + 0x10));
0x0000173c ldr.w sb, [r5, 8] | sb = *((r5 + 8));
0x00001740 cmp r0, 0 |
| if (r0 <= 0) {
0x00001742 ble.w 0x18aa | goto label_23;
| }
0x00001746 ldr r2, [r4, 0xc] | r2 = *((r4 + 0xc));
0x00001748 movs r3, 0 | r3 = 0;
0x0000174a subs r2, 4 | r2 -= 4;
0x0000174c b 0x1756 |
| while (r1 != sb) {
0x0000174e adds r3, 1 | r3++;
0x00001750 cmp r3, r0 |
| if (r3 == r0) {
0x00001752 beq.w 0x18aa | goto label_23;
| }
0x00001756 ldr r1, [r2, 4]! | r1 = *((r2 += 4));
0x0000175a cmp r1, sb |
0x0000175c bne 0x174e |
| }
0x0000175e mov r0, sl | r0 = sl;
0x00001760 bl 0x3720 | r0 = getsgnam ();
| if (r0 != 0) {
0x00001764 cbz r0, 0x176e |
0x00001766 ldr r3, [r0, 4] | r3 = *((r0 + 4));
0x00001768 str r3, [r5, 4] | *((r5 + 4)) = r3;
0x0000176a ldr r3, [r0, 0xc] | r3 = *((r0 + 0xc));
0x0000176c str r3, [r5, 0xc] | *((r5 + 0xc)) = r3;
| }
| label_5:
0x0000176e ldr.w r0, [pc, 0x564] |
0x00001772 add r0, pc | r0 = 0x344c;
0x00001774 bl 0x3028 | r0 = fcn_00003028 (r0);
0x00001778 cmp r0, 0 |
| if (r0 != 0) {
0x0000177a bne.w 0x1a16 | goto label_24;
| }
| label_6:
0x0000177e ldr.w r3, [pc, 0x558] | r3 = *(0x00001cd8);
0x00001782 ldr r4, [r5, 8] | r4 = *((r5 + 8));
0x00001784 add r3, pc | r3 += pc;
0x00001786 ldr r5, [r3, 0x10] | r5 = *((r3 + 0x10));
0x00001788 cmp r5, 0 |
| if (r5 <= 0) {
0x0000178a ble.w 0x1a8a | goto label_25;
| }
0x0000178e ldr r2, [r3, 0xc] | r2 = *((r3 + 0xc));
0x00001790 movs r3, 0 | r3 = 0;
0x00001792 subs r2, 4 | r2 -= 4;
0x00001794 b 0x179e |
| while (r1 != r4) {
0x00001796 adds r3, 1 | r3++;
0x00001798 cmp r3, r5 |
| if (r3 == r5) {
0x0000179a beq.w 0x1a8e | goto label_26;
| }
0x0000179e ldr r1, [r2, 4]! | r1 = *((r2 += 4));
0x000017a2 cmp r1, r4 |
0x000017a4 bne 0x1796 |
| }
| label_7:
0x000017a6 blx 0x14d8 | fcn_000014d8 ();
0x000017aa bl 0x350c | endsgent ();
0x000017ae blx 0x1538 | fcn_00001538 ();
0x000017b2 blx 0x127c | endgrent ();
0x000017b6 mov r0, r4 | r0 = r4;
0x000017b8 blx 0x13dc | r0 = fcn_000013dc ();
0x000017bc cmp r0, 0 |
| if (r0 == 0) {
0x000017be beq.w 0x194c | goto label_27;
| }
0x000017c2 ldr.w r0, [pc, 0x518] |
0x000017c6 add r0, pc | r0 = 0x34a8;
0x000017c8 blx 0x1398 | fcn_00001398 ();
0x000017cc movs r0, 1 | r0 = 1;
0x000017ce blx 0x1424 | fcn_00001424 ();
0x000017d2 cmp.w fp, 0 |
| if (fp == 0) {
0x000017d6 beq 0x1812 | goto label_18;
| }
0x000017d8 mov.w fp, 0 |
0x000017dc ldr.w sl, [r3] | sl = *(r3);
0x000017e0 cmp.w sl, 0 |
| if (sl != 0) {
0x000017e4 bne 0x16ea | goto label_1;
| }
0x000017e6 ldr r3, [sp, 0x10] | r3 = *(arg_10h);
0x000017e8 ldr r0, [r3, 0xc] | r0 = *((r3 + 0xc));
0x000017ea bl 0x29d8 | r0 = fcn_000029d8 (r0);
0x000017ee cmp r0, 0 |
| if (r0 == 0) {
0x000017f0 beq.w 0x1c30 | goto label_28;
| }
0x000017f4 mov r3, sl | r3 = sl;
0x000017f6 str.w sl, [sp, 0x20] | __asm ("str.w sl, [arg_20h]");
0x000017fa str r3, [sp, 0x1c] | *(arg_1ch) = r3;
0x000017fc ldr.w sl, [r0] | sl = *(r0);
0x00001800 b 0x16f0 | goto label_2;
| label_21:
0x00001802 ldr.w r0, [pc, 0x4dc] |
0x00001806 add r0, pc | r0 = 0x34ec;
0x00001808 blx 0x1398 | fcn_00001398 ();
0x0000180c movs r0, 1 | r0 = 1;
0x0000180e blx 0x1424 | fcn_00001424 ();
| label_18:
0x00001812 bl 0x1e80 | fcn_00001e80 ();
0x00001816 blx 0x1400 | fcn_00001400 ();
0x0000181a movs r0, 1 | r0 = 1;
0x0000181c blx 0x1424 | fcn_00001424 ();
0x00001820 cmp.w fp, 0 |
| if (fp == 0) {
0x00001824 beq.w 0x16d4 | goto label_3;
| }
0x00001828 mov.w fp, 0 |
0x0000182c ldr.w sl, [r3] | sl = *(r3);
0x00001830 ldrb.w r3, [sl] | r3 = *(sl);
0x00001834 cmp r3, 0x2d |
| if (r3 != 0x2d) {
0x00001836 bne.w 0x16ea | goto label_1;
| }
0x0000183a bl 0x1e80 | fcn_00001e80 ();
0x0000183e b 0x1a0c | goto label_13;
| label_19:
0x00001840 ldr r2, [r3, 4] | r2 = *((r3 + 4));
0x00001842 cmp.w sb, 1 |
0x00001846 strd r3, r2, [sp, 0x1c] | __asm ("strd r3, r2, [sp, 0x1c]");
| if (sb == 1) {
0x0000184a beq.w 0x1bdc | goto label_29;
| }
0x0000184e ldr.w r1, [pc, 0x494] |
0x00001852 mov r0, r2 | r0 = r2;
0x00001854 add r1, pc | r1 = 0x353e;
0x00001856 blx 0x12a0 | r0 = strcmp (r0, r1);
0x0000185a cmp r0, 0 |
| if (r0 != 0) {
0x0000185c bne.w 0x1b12 | goto label_30;
| }
0x00001860 ldr r3, [sp, 0x1c] | r3 = *(arg_1ch);
0x00001862 ldr r3, [r3, 8] | r3 = *((r3 + 8));
0x00001864 str r3, [sp, 0x20] | *(arg_20h) = r3;
0x00001866 movs r3, 1 | r3 = 1;
0x00001868 str r3, [sp, 0x1c] | *(arg_1ch) = r3;
0x0000186a b 0x16f0 | goto label_2;
| label_23:
0x000018aa ldr r4, [r5, 0xc] | r4 = *((r5 + 0xc));
0x000018ac ldr r0, [r4] | r0 = *(r4);
| if (r0 != 0) {
0x000018ae cbnz r0, 0x18b4 | goto label_31;
| }
0x000018b0 b 0x18c6 | goto label_32;
| if (r3 == 0) {
| do {
0x000018b2 cbz r3, 0x18fe | goto label_14;
| }
| label_31:
0x000018b4 mov r1, r7 | r1 = r7;
0x000018b6 blx 0x12a0 | r0 = strcmp (r0, r1);
0x000018ba mov r3, r0 | r3 = r0;
0x000018bc ldr r0, [r4, 4]! | r0 = *((r4 += 4));
0x000018c0 cmp r0, 0 |
0x000018c2 bne 0x18b2 |
| } while (r0 != 0);
| if (r3 == 0) {
0x000018c4 cbz r3, 0x18fe | goto label_14;
| }
| label_32:
0x000018c6 blx 0x14b4 | fcn_000014b4 ();
| do {
| label_4:
0x000018ca blx 0x14c0 | r0 = fcn_000014c0 ();
0x000018ce mov r5, r0 | r5 = r0;
0x000018d0 cmp r0, 0 |
| if (r0 == 0) {
0x000018d2 beq.w 0x1bf8 | goto label_33;
| }
0x000018d6 ldr r3, [r5, 8] | r3 = *((r5 + 8));
0x000018d8 cmp r3, sb |
0x000018da bne 0x18ca |
| } while (r3 != sb);
0x000018dc ldr r4, [r5, 0xc] | r4 = *((r5 + 0xc));
0x000018de ldr r0, [r4] | r0 = *(r4);
| if (r0 != 0) {
0x000018e0 cbnz r0, 0x18e6 | goto label_34;
| }
0x000018e2 b 0x18ca | goto label_4;
| do {
| if (r3 == 0) {
0x000018e4 cbz r3, 0x18fa | goto label_35;
| }
| label_34:
0x000018e6 mov r1, r7 | r1 = r7;
0x000018e8 blx 0x12a0 | r0 = strcmp (r0, r1);
0x000018ec mov r3, r0 | r3 = r0;
0x000018ee ldr r0, [r4, 4]! | r0 = *((r4 += 4));
0x000018f2 cmp r0, 0 |
0x000018f4 bne 0x18e4 |
| } while (r0 != 0);
0x000018f6 cmp r3, 0 |
| if (r3 != 0) {
0x000018f8 bne 0x18ca | goto label_4;
| }
| label_35:
0x000018fa blx 0x127c | endgrent ();
| label_17:
0x000018fc invalid |
| label_14:
0x000018fe mov r0, sl | r0 = sl;
0x00001900 bl 0x3720 | r0 = getsgnam ();
| if (r0 != 0) {
0x00001904 cbz r0, 0x190e |
0x00001906 ldr r3, [r0, 4] | r3 = *((r0 + 4));
0x00001908 str r3, [r5, 4] | *((r5 + 4)) = r3;
0x0000190a ldr r3, [r0, 0xc] | r3 = *((r0 + 0xc));
0x0000190c str r3, [r5, 0xc] | *((r5 + 0xc)) = r3;
| }
0x0000190e ldr r1, [sp, 0x10] | r1 = *(arg_10h);
0x00001910 ldr r2, [r5, 8] | r2 = *((r5 + 8));
0x00001912 ldr r3, [r1, 0xc] | r3 = *((r1 + 0xc));
0x00001914 cmp r2, r3 |
| if (r2 != r3) {
0x00001916 bne.w 0x1bba | goto label_36;
| }
0x0000191a movs r4, 0 | r4 = 0;
| label_11:
0x0000191c ldr r6, [sp, 0x10] | r6 = *(arg_10h);
0x0000191e ldr r0, [r6] | r0 = *(r6);
0x00001920 bl 0x2afc | fcn_00002afc (r0);
0x00001922 invalid |
| if (r0 != 0) {
0x00001926 cbz r0, 0x1930 |
0x00001928 ldr r0, [r0, 4] | r0 = *((r0 + 4));
0x0000192a bl 0x2c70 | fcn_00002c70 (r0);
0x0000192e str r0, [r6, 4] | *((r6 + 4)) = r0;
| }
0x00001930 mov r0, sb | r0 = sb;
0x00001932 bl 0x3948 | fcn_00003948 (r0);
0x00001936 ldr r3, [sp, 0x10] | r3 = *(arg_10h);
0x00001938 ldr r3, [r3, 4] | r3 = *((r3 + 4));
0x0000193a ldrb r3, [r3] | r3 = *(r3);
| if (r3 == 0) {
0x0000193c cbnz r3, 0x1996 |
0x0000193e ldr r3, [r5, 4] | r3 = *((r5 + 4));
0x00001940 ldrb r3, [r3] | r3 = *(r3);
| if (r3 == 0) {
0x00001942 cbz r3, 0x1996 | goto label_37;
| }
0x00001944 blx 0x12dc | r0 = getuid ();
| if (r0 != 0) {
0x00001948 cbnz r0, 0x19a6 | goto label_38;
| }
0x0000194a b 0x176e | goto label_5;
| label_27:
0x0000194c blx 0x12dc | getuid ();
0x00001950 blx 0x155c | r0 = fcn_0000155c ();
0x00001954 mov r4, r0 | r4 = r0;
0x00001956 cmp r0, 0 |
| if (r0 != 0) {
0x00001958 bne.w 0x1b04 | goto label_39;
| }
0x0000195c ldr r3, [sp, 0x1c] | r3 = *(arg_1ch);
0x0000195e cmp r3, 0 |
| if (r3 == 0) {
0x00001960 beq.w 0x1aba | goto label_40;
| }
0x00001964 ldr r5, [pc, 0x38c] |
0x00001966 blx 0x1400 | fcn_00001400 ();
0x0000196a ldr r2, [pc, 0x38c] |
0x0000196c ldr r1, [pc, 0x38c] |
0x0000196e add r5, pc | r5 = 0x3666;
0x00001970 ldr r3, [sp, 0x20] | r3 = *(arg_20h);
0x00001972 mov r0, r5 | r0 = r5;
0x00001974 add r2, pc | r2 = 0x3672;
0x00001976 str r4, [sp] | *(sp) = r4;
0x00001978 add r1, pc | r1 = 0x3678;
0x0000197a blx 0x1544 | fcn_00001544 ();
0x0000197e mov r0, r5 | r0 = r5;
0x00001980 blx 0x1398 | fcn_00001398 ();
0x00001984 blx 0x1490 | r0 = fcn_00001490 ();
0x00001988 ldr r3, [r0] | r3 = *(r0);
0x0000198a cmp r3, 2 |
0x0000198c ite eq |
| if (r3 != 2) {
0x0000198e moveq r0, 0x7f | r0 = 0x7f;
| }
| if (r3 == 2) {
0x00001990 movne r0, 0x7e | r0 = 0x7e;
| }
0x00001992 blx 0x1424 | fcn_00001424 ();
| }
| label_37:
0x00001996 blx 0x12dc | r0 = getuid ();
0x0000199a cmp r0, 0 |
| if (r0 == 0) {
0x0000199c beq.w 0x176e | goto label_5;
| }
0x000019a0 cmp r4, 0 |
| if (r4 == 0) {
0x000019a2 beq.w 0x176e | goto label_5;
| }
| label_38:
0x000019a6 ldr r0, [pc, 0x358] |
0x000019a8 add r0, pc | r0 = 0x36ae;
0x000019aa blx 0x146c | r0 = fcn_0000146c ();
0x000019ae mov sb, r0 | sb = r0;
| if (r0 == 0) {
0x000019b0 cbz r0, 0x1a0c | goto label_13;
| }
0x000019b2 ldr r1, [r5, 4] | r1 = *((r5 + 4));
0x000019b4 bl 0x2c90 | r0 = fcn_00002c90 (r0);
0x000019b8 mov r4, r0 | r4 = r0;
0x000019ba mov r0, sb | r0 = sb;
0x000019bc blx 0x1454 | fcn_00001454 ();
0x000019c0 movs r1, 0 | r1 = 0;
0x000019c2 mov r2, r0 | r2 = r0;
0x000019c4 mov r0, sb | r0 = sb;
0x000019c6 blx 0x149c | fcn_0000149c ();
0x000019ca cmp r4, 0 |
| if (r4 == 0) {
0x000019cc beq.w 0x1c6a | goto label_41;
| }
0x000019ce strh r5, [r1, 0xa] | *((r1 + 0xa)) = r5;
0x000019d0 ldr r1, [r5, 4] | r1 = *((r5 + 4));
0x000019d2 ldrb r3, [r1] | r3 = *(r1);
| if (r3 == 0) {
0x000019d4 cbz r3, 0x19e2 | goto label_42;
| }
0x000019d6 mov r0, r4 | r0 = r4;
0x000019d8 blx 0x12a0 | r0 = strcmp (r0, r1);
0x000019dc cmp r0, 0 |
| if (r0 == 0) {
0x000019de beq.w 0x176e | goto label_5;
| }
| label_42:
0x000019e2 ldr r3, [sp, 0x10] | r3 = *(arg_10h);
0x000019e4 movs r1, 1 | r1 = 1;
0x000019e6 ldr r2, [pc, 0x31c] |
0x000019e8 ldr r0, [r3] | r0 = *(r3);
0x000019ea mov r3, sl | r3 = sl;
0x000019ec add r2, pc | r2 = 0x36f6;
0x000019ee str r0, [sp] | *(sp) = r0;
0x000019f0 movs r0, 6 | r0 = 6;
0x000019f2 blx 0x1514 | fcn_00001514 ();
0x000019f6 movs r0, 1 | r0 = 1;
0x000019f8 blx 0x131c | fcn_0000131c ();
0x000019fc ldr r3, [sp, 0x14] | r3 = *(arg_14h);
0x000019fe movs r2, 0x12 | r2 = 0x12;
0x00001a00 ldr r0, [pc, 0x304] |
0x00001a02 movs r1, 1 | r1 = 1;
0x00001a04 ldr r3, [r3] | r3 = *(r3);
0x00001a06 add r0, pc | r0 = 0x3712;
0x00001a08 blx 0x13b4 | r0 = strcpy (r0, r1)
| label_13:
0x00001a0c blx 0x1400 | fcn_00001400 ();
0x00001a10 movs r0, 1 | r0 = 1;
0x00001a12 blx 0x1424 | fcn_00001424 ();
| label_24:
0x00001a16 blx 0x12b8 | r0 = getlogin ();
0x00001a1a mov sb, r0 | sb = r0;
0x00001a1c movs r0, 0 | r0 = 0;
0x00001a1e blx 0x1448 | r0 = fcn_00001448 ();
0x00001a22 mov r4, r0 | r4 = r0;
0x00001a24 cmp.w sb, 0 |
| if (sb == 0) {
0x00001a28 beq.w 0x1bca | goto label_43;
| }
0x00001a2c mov r0, sb | r0 = sb;
0x00001a2e bl 0x2c70 | r0 = fcn_00002c70 (r0);
0x00001a32 mov sb, r0 | sb = r0;
0x00001a34 cmp r4, 0 |
| if (r4 == 0) {
0x00001a36 beq 0x1b2a | goto label_44;
| }
0x00001a38 mov r0, r4 | r0 = r4;
0x00001a3a bl 0x2c70 | r0 = fcn_00002c70 (r0);
0x00001a3e mov r4, r0 | r4 = r0;
0x00001a40 cmp.w sb, 0 |
| if (sb == 0) {
0x00001a44 beq.w 0x1c64 | goto label_45;
| }
0x00001a48 mov r3, sb | r3 = sb;
| label_12:
0x00001a4a cmp r4, 0 |
| if (r4 == 0) {
0x00001a4c beq.w 0x1ca0 | goto label_46;
| }
0x00001a50 ldr r1, [pc, 0x2b8] |
0x00001a52 movs r2, 5 | r2 = 5;
0x00001a54 mov r0, r4 | r0 = r4;
0x00001a56 str r3, [sp, 0x24] | *(arg_24h) = r3;
0x00001a58 add r1, pc | r1 = 0x3768;
0x00001a5a blx 0x15b0 | fcn_000015b0 ();
0x00001a5e ldr r3, [sp, 0x24] | r3 = *(arg_24h);
0x00001a60 cmp r0, 0 |
| if (r0 != 0) {
0x00001a62 bne.w 0x1bd8 | goto label_47;
| }
0x00001a66 adds r2, r4, 5 | r2 = r4 + 5;
| label_8:
0x00001a68 strd r2, sl, [sp, 4] | __asm ("strd r2, sl, [sp, 4]");
0x00001a6c movs r1, 1 | r1 = 1;
0x00001a6e ldr r2, [pc, 0x2a0] |
0x00001a70 movs r0, 6 | r0 = 6;
0x00001a72 str r3, [sp] | *(sp) = r3;
0x00001a74 mov r3, r7 | r3 = r7;
0x00001a76 add r2, pc | r2 = 0x378c;
0x00001a78 blx 0x1514 | fcn_00001514 ();
0x00001a7c mov r0, sb | r0 = sb;
0x00001a7e blx 0x12ec | fcn_000012ec ();
0x00001a82 mov r0, r4 | r0 = r4;
0x00001a84 blx 0x12ec | fcn_000012ec ();
0x00001a88 b 0x177e | goto label_6;
| if (r0 != 6) {
| label_25:
0x00001a8a bne.w 0x17a6 | goto label_7;
| }
| label_26:
0x00001a8e movs r0, 3 | r0 = 3;
0x00001a90 blx 0x1368 | r0 = fcn_00001368 ();
0x00001a94 cmp r0, r5 |
| if (r0 <= r5) {
0x00001a96 ble 0x1b18 | goto label_48;
| }
0x00001a98 ldr r3, [pc, 0x278] |
0x00001a9a adds r0, r5, 1 | r0 = r5 + 1;
0x00001a9c add r3, pc | r3 = 0x37b4;
0x00001a9e ldr r1, [r3, 0xc] | r1 = *(0x37c0);
0x00001aa0 str r0, [r3, 0x10] | *((r3 + 0x10)) = r0;
0x00001aa2 str.w r4, [r1, r5, lsl 2] | __asm ("str.w r4, [r1, r5, lsl 2]");
0x00001aa6 blx 0x13a4 | r0 = fcn_000013a4 ();
0x00001aaa cmp r0, 0 |
| if (r0 == 0) {
0x00001aac beq.w 0x17a6 | goto label_7;
| }
0x00001ab0 ldr r0, [pc, 0x264] |
0x00001ab2 add r0, pc | r0 = 0x37ce;
0x00001ab4 blx 0x1398 | fcn_00001398 ();
0x00001ab8 b 0x17a6 | goto label_7;
| label_40:
0x00001aba ldr r0, [pc, 0x260] |
0x00001abc add r0, pc | r0 = 0x37de;
0x00001abe blx 0x13d0 | fcn_000013d0 ();
0x00001ac2 cmp.w fp, 1 |
0x00001ac6 mov r7, r0 | r7 = r0;
| if (fp == 1) {
0x00001ac8 beq 0x1b36 | goto label_49;
| }
0x00001aca cmp r0, 0 |
| if (r0 == 0) {
0x00001acc beq 0x1b36 | goto label_49;
| }
0x00001ace bl 0x1ec0 | r0 = fcn_00001ec0 (r0);
0x00001ad2 mov r4, r0 | r4 = r0;
| label_9:
0x00001ad4 ldr r3, [sp, 0x18] | r3 = *(arg_18h);
0x00001ad6 subs r5, r3, 4 | r5 = r3 - 4;
0x00001ad8 b 0x1ae0 |
| while (r0 != 0) {
0x00001ada movs r1, 0 | r1 = 0;
0x00001adc bl 0x1ef8 | fcn_00001ef8 (r0, r1);
0x00001ae0 ldr r0, [r5, 4]! | r0 = *((r5 += 4));
0x00001ae4 cmp r0, 0 |
0x00001ae6 bne 0x1ada |
| }
| label_10:
0x00001ae8 ldr r3, [pc, 0x234] | r3 = *(0x1d20);
0x00001aea mov r1, r4 | r1 = r4;
0x00001aec mov r0, r7 | r0 = r7;
0x00001aee ldr.w r3, [r8, r3] | r3 = *((r8 + r3));
0x00001af2 ldr r2, [r3] | r2 = *(0x1d20);
0x00001af4 bl 0x2574 | r0 = fcn_00002574 (r0, r1, r2);
0x00001af8 cmp r0, 2 |
0x00001afa ite eq |
| if (r0 != 2) {
0x00001afc moveq r0, 0x7f | r0 = 0x7f;
| }
| if (r0 == 2) {
0x00001afe movne r0, 0x7e | r0 = 0x7e;
| }
0x00001b00 blx 0x1424 | fcn_00001424 ();
| label_39:
0x00001b04 ldr r0, [pc, 0x21c] |
0x00001b06 add r0, pc | r0 = 0x382e;
0x00001b08 blx 0x1398 | fcn_00001398 ();
0x00001b0c movs r0, 1 | r0 = 1;
0x00001b0e blx 0x1424 | fcn_00001424 ();
| label_30:
0x00001b12 movs r3, 1 | r3 = 1;
0x00001b14 str r3, [sp, 0x1c] | *(arg_1ch) = r3;
0x00001b16 b 0x16f0 | goto label_2;
| label_48:
0x00001b18 ldr r3, [sp, 0x14] | r3 = *(arg_14h);
0x00001b1a movs r2, 0x10 | r2 = 0x10;
0x00001b1c ldr r0, [pc, 0x208] |
0x00001b1e movs r1, 1 | r1 = 1;
0x00001b20 ldr r3, [r3] | r3 = *(r3);
0x00001b22 add r0, pc | r0 = 0x384e;
0x00001b24 blx 0x13b4 | strcpy (r0, r1)
0x00001b28 b 0x17a6 | goto label_7;
| label_44:
0x00001b2a cmp r0, 0 |
| if (r0 == 0) {
0x00001b2c beq 0x1c1e | goto label_50;
| }
0x00001b2e ldr r2, [pc, 0x1fc] |
0x00001b30 mov r3, r0 | r3 = r0;
0x00001b32 add r2, pc | r2 = 0x3864;
0x00001b34 b 0x1a68 | goto label_8;
| label_49:
0x00001b36 ldr r3, [sp, 0x10] | r3 = *(arg_10h);
0x00001b38 ldr r7, [r3, 0x18] | r7 = *((r3 + 0x18));
0x00001b3a cmp r7, 0 |
| if (r7 == 0) {
0x00001b3c beq 0x1c2a | goto label_51;
| }
0x00001b3e ldrb r3, [r7] | r3 = *(r7);
| if (r3 == 0) {
0x00001b40 cbnz r3, 0x1b46 |
0x00001b42 ldr r7, [pc, 0x1ec] |
0x00001b44 add r7, pc | r7 = 0x387a;
| }
| label_15:
0x00001b46 mov r0, r7 | r0 = r7;
0x00001b48 bl 0x1ec0 | r0 = fcn_00001ec0 (r0);
0x00001b4c mov r4, r0 | r4 = r0;
0x00001b4e cmp.w fp, 0 |
| if (fp == 0) {
0x00001b52 beq 0x1ad4 | goto label_9;
| }
0x00001b54 ldr r3, [sp, 0x10] | r3 = *(arg_10h);
0x00001b56 ldr r0, [r3, 0x14] | r0 = *((r3 + 0x14));
0x00001b58 blx 0x1380 | r0 = fcn_00001380 ();
0x00001b5c cmp r0, 0 |
| if (r0 != 0) {
0x00001b5e bne 0x1c5a | goto label_52;
| }
| label_16:
0x00001b60 ldr r6, [pc, 0x1d0] |
0x00001b62 ldr.w sb, [pc, 0x1d4] |
0x00001b66 ldr r3, [sp, 0x18] | r3 = *(arg_18h);
0x00001b68 ldr.w sl, [pc, 0x1d0] |
0x00001b6c add r6, pc | r6 = 0x38a4;
0x00001b6e add sb, pc | sb = 0x38ac;
0x00001b70 subs r5, r3, 4 | r5 = r3 - 4;
0x00001b72 add sl, pc | sl = 0x38b2;
0x00001b74 b 0x1bb0 |
| while (r4 != 0) {
0x00001b76 movs r2, 5 | r2 = 5;
0x00001b78 mov r1, r6 | r1 = r6;
0x00001b7a mov r0, r4 | r0 = r4;
0x00001b7c blx 0x15b0 | r0 = fcn_000015b0 ();
| if (r0 != 0) {
0x00001b80 cbz r0, 0x1ba8 |
0x00001b82 movs r2, 5 | r2 = 5;
0x00001b84 mov r1, sb | r1 = sb;
0x00001b86 mov r0, r4 | r0 = r4;
0x00001b88 blx 0x15b0 | r0 = fcn_000015b0 ();
| if (r0 == 0) {
0x00001b8c cbz r0, 0x1ba8 | goto label_53;
| }
0x00001b8e movs r2, 6 | r2 = 6;
0x00001b90 mov r1, sl | r1 = sl;
0x00001b92 mov r0, r4 | r0 = r4;
0x00001b94 blx 0x15b0 | r0 = fcn_000015b0 ();
| if (r0 == 0) {
0x00001b98 cbz r0, 0x1ba8 | goto label_53;
| }
0x00001b9a ldr r1, [pc, 0x1a4] |
0x00001b9c movs r2, 5 | r2 = 5;
0x00001b9e mov r0, r4 | r0 = r4;
0x00001ba0 add r1, pc | r1 = 0x38e6;
0x00001ba2 blx 0x15b0 | r0 = fcn_000015b0 ();
| if (r0 != 0) {
0x00001ba6 cbnz r0, 0x1bb0 | goto label_54;
| }
| }
| label_53:
0x00001ba8 mov r0, r4 | r0 = r4;
0x00001baa movs r1, 0 | r1 = 0;
0x00001bac bl 0x1ef8 | fcn_00001ef8 (r0, r1);
| label_54:
0x00001bb0 ldr r4, [r5, 4]! | r4 = *((r5 += 4));
0x00001bb4 cmp r4, 0 |
0x00001bb6 bne 0x1b76 |
| }
0x00001bb8 b 0x1ae8 | goto label_10;
| label_36:
0x00001bba ldr r1, [r1] | r1 = *(r1);
0x00001bbc ldr r0, [r5, 0xc] | r0 = *((r5 + 0xc));
0x00001bbe bl 0x244c | r0 = fcn_0000244c (r0, r1);
0x00001bc2 eor r3, r0, 1 | r3 = r0 ^ 1;
0x00001bc6 uxtb r4, r3 | r4 = (int8_t) r3;
0x00001bc8 b 0x191c | goto label_11;
| if (r0 == 0) {
| label_43:
0x00001bca cbz r0, 0x1c1e | goto label_50;
| }
0x00001bcc bl 0x2c70 | fcn_00002c70 (r0);
0x00001bd0 ldr r3, [pc, 0x170] |
0x00001bd2 mov r4, r0 | r4 = r0;
0x00001bd4 add r3, pc | r3 = 0x391c;
0x00001bd6 b 0x1a4a | goto label_12;
| label_47:
0x00001bd8 mov r2, r4 | r2 = r4;
0x00001bda b 0x1a68 | goto label_8;
| label_29:
0x00001bdc str.w sb, [sp, 0x1c] | __asm ("str.w sb, [arg_1ch]");
0x00001be0 b 0x16f0 | goto label_2;
| label_22:
0x00001be2 ldr r1, [sp, 0x14] | r1 = *(arg_14h);
0x00001be4 ldr r2, [pc, 0x160] |
0x00001be6 ldr r3, [r4, 4] | r3 = *((r4 + 4));
0x00001be8 ldr r0, [r1] | r0 = *(r1);
0x00001bea movs r1, 1 | r1 = 1;
0x00001bec add r2, pc | r2 = 0x3938;
0x00001bee str.w sl, [sp] | __asm ("str.w sl, [sp]");
0x00001bf2 blx 0x14f0 | fcn_000014f0 ();
0x00001bf6 b 0x1a0c | goto label_13;
| label_33:
0x00001bf8 blx 0x127c | endgrent ();
0x00001bfc mov r0, sl | r0 = sl;
0x00001bfe bl 0x28b4 | r0 = fcn_000028b4 (r0);
0x00001c02 mov r5, r0 | r5 = r0;
0x00001c04 cmp r0, 0 |
| if (r0 != 0) {
0x00001c06 bne.w 0x18fe | goto label_14;
| }
0x00001c0a ldr r3, [pc, 0x140] |
0x00001c0c mov.w r2, 0x29c | r2 = 0x29c;
0x00001c10 ldr r1, [pc, 0x13c] |
0x00001c12 ldr r0, [pc, 0x140] |
0x00001c14 add r3, pc | r3 = 0x3966;
0x00001c16 add r1, pc | r1 = 0x396a;
0x00001c18 add r0, pc | r0 = 0x3972;
0x00001c1a blx 0x15ec | fcn_000015ec ();
| label_50:
0x00001c1e ldr r3, [pc, 0x138] |
0x00001c20 movs r4, 0 | r4 = 0;
0x00001c22 mov sb, r4 | sb = r4;
0x00001c24 add r3, pc | r3 = 0x3982;
0x00001c26 mov r2, r3 | r2 = r3;
0x00001c28 b 0x1a68 | goto label_8;
| label_51:
0x00001c2a ldr r7, [pc, 0x130] |
0x00001c2c add r7, pc | r7 = 0x398e;
0x00001c2e b 0x1b46 | goto label_15;
| label_28:
0x00001c30 ldr r4, [sp, 0x10] | r4 = *(arg_10h);
0x00001c32 ldr r3, [pc, 0x12c] |
0x00001c34 ldr r0, [sp, 0x14] | r0 = *(arg_14h);
0x00001c36 ldr r1, [r4, 0xc] | r1 = *((r4 + 0xc));
0x00001c38 ldr r2, [pc, 0x128] |
0x00001c3a add r3, pc |
0x00001c3c ldr r3, [r3, 4] | r3 = *(0x39a4);
0x00001c3e ldr r0, [r0] | r0 = *(r0);
0x00001c40 add r2, pc | r2 = 0x39a8;
0x00001c42 str r1, [sp] | *(sp) = r1;
0x00001c44 movs r1, 1 | r1 = 1;
0x00001c46 blx 0x14f0 | fcn_000014f0 ();
0x00001c4a ldr r2, [pc, 0x11c] |
0x00001c4c movs r1, 1 | r1 = 1;
0x00001c4e ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x00001c50 movs r0, 2 | r0 = 2;
0x00001c52 add r2, pc | r2 = 0x39c0;
0x00001c54 blx 0x1514 | fcn_00001514 ();
0x00001c58 b 0x1a0c | goto label_13;
| label_52:
0x00001c5a ldr r0, [pc, 0x110] |
0x00001c5c add r0, pc | r0 = 0x39ce;
0x00001c5e blx 0x1398 | fcn_00001398 ();
0x00001c62 b 0x1b60 | goto label_16;
| label_45:
0x00001c64 ldr r3, [pc, 0x108] |
0x00001c66 add r3, pc | r3 = 0x39da;
0x00001c68 b 0x1a4a | goto label_12;
| label_41:
0x00001c6a ldr r3, [pc, 0x108] |
0x00001c6c ldr r2, [sp, 0x14] | r2 = *(arg_14h);
0x00001c6e add r3, pc | r3 = 0x39e8;
0x00001c70 ldr r4, [r2] | r4 = *(r2);
0x00001c72 ldr r5, [r3, 4] | r5 = *(0x39ec);
0x00001c74 blx 0x1490 | r0 = fcn_00001490 ();
0x00001c78 ldr r0, [r0] | r0 = *(r0);
0x00001c7a blx 0x13f4 | fcn_000013f4 ();
0x00001c7e ldr r2, [pc, 0xf8] |
0x00001c80 mov r1, r0 | r1 = r0;
0x00001c82 mov r3, r5 | r3 = r5;
0x00001c84 str r1, [sp] | *(sp) = r1;
0x00001c86 mov r0, r4 | r0 = r4;
0x00001c88 movs r1, 1 | r1 = 1;
0x00001c8a add r2, pc | r2 = ">%>3>";
0x00001c8c blx 0x14f0 | fcn_000014f0 ();
0x00001c90 ldr r2, [pc, 0xe8] |
0x00001c92 mov r3, sl | r3 = sl;
0x00001c94 movs r1, 1 | r1 = 1;
0x00001c96 movs r0, 6 | r0 = 6;
0x00001c98 add r2, pc | r2 = 0x3a18;
0x00001c9a blx 0x1514 | fcn_00001514 ();
0x00001c9e b 0x1a0c | goto label_13;
| label_46:
0x00001ca0 ldr r2, [pc, 0xdc] |
0x00001ca2 add r2, pc | r2 = 0x3a26;
0x00001ca4 b 0x1a68 | goto label_8;
0x00001db8 adds r0, 0x14 | r0 += 0x14;
0x00001dba b 0x18fc | goto label_17;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/bin/newgrp.shadow @ 0x1ef8 */
| #include <stdint.h>
|
; (fcn) fcn.00001ef8 () | void fcn_00001ef8 (int16_t arg1, uint32_t arg2) {
| int16_t var_0h;
| int32_t var_4h;
| int32_t var_4h_2;
| int16_t var_14h;
| int16_t var_18h;
| int16_t var_1ch;
| r0 = arg1;
| r1 = arg2;
0x00001ef8 push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00001efc sub sp, 0x24 |
0x00001efe ldr.w sl, [pc, 0x168] | sl = *(0x00002068);
0x00001f00 adr r1, 0x1a0 | r1 = 0x1a0;
0x00001f02 add sl, pc | sl += pc;
0x00001f04 cmp r1, 0 |
| if (r1 == 0) {
0x00001f06 beq 0x1fee | goto label_2;
| }
0x00001f08 mov r6, r1 | r6 = r1;
0x00001f0a mov r7, r0 | r7 = r0;
0x00001f0c blx 0x1454 | fcn_00001454 ();
0x00001f0e invalid |
0x00001f12 mov r0, r6 | r0 = r6;
0x00001f14 blx 0x1454 | fcn_00001454 ();
0x00001f16 eors.w r4, lr, r4, lsl 16 | r4 = lr ^ (r4 << 16);
0x00001f1a add.w r8, r4, 2 | r8 = r4 + 2;
0x00001f1e adds r4, 1 | r4++;
0x00001f20 mov r0, r8 | r0 = r8;
0x00001f22 bl 0x2c20 | fcn_00002c20 ();
0x00001f26 ldr r3, [pc, 0x144] |
0x00001f28 mov r1, r8 | r1 = r8;
0x00001f2a movs r2, 1 | r2 = 1;
0x00001f2c strd r7, r6, [sp, 4] | __asm ("strd r7, r6, [var_4h]");
0x00001f30 mov r5, r0 | r5 = r0;
0x00001f32 add r3, pc | r3 = 0x3fa4;
0x00001f34 str r3, [sp] | *(sp) = r3;
0x00001f36 mov.w r3, -1 | r3 = -1;
0x00001f3a blx 0x15d4 | r0 = fcn_000015d4 ();
0x00001f3e cmp r4, r0 |
| if (r4 != r0) {
0x00001f40 bne 0x2024 | goto label_3;
| }
| label_0:
0x00001f42 movs r1, 0x3d | r1 = 0x3d;
0x00001f44 mov r0, r5 | r0 = r5;
0x00001f46 blx 0x1460 | r0 = fcn_00001460 ();
0x00001f4a cmp r0, 0 |
| if (r0 == 0) {
0x00001f4c beq 0x200a | goto label_4;
| }
0x00001f4e ldr r3, [pc, 0x120] | r3 = *(0x2072);
0x00001f50 sub.w sb, r0, r5 | sb = r0 - r5;
0x00001f54 ldr.w r3, [sl, r3] | r3 = *((sl + r3));
0x00001f56 adds r0, 3 | r0 += 3;
0x00001f58 str r3, [sp, 0x18] | var_18h = r3;
0x00001f5a ldr r6, [r3] | r6 = *(0x2072);
0x00001f5c ldr r3, [pc, 0x114] |
0x00001f5e ldr.w r3, [sl, r3] | r3 = *((sl + r3));
0x00001f62 str r3, [sp, 0x1c] | var_1ch = r3;
0x00001f64 ldr r3, [r3] | r3 = *(0x2074);
0x00001f66 str r3, [sp, 0x14] | var_14h = r3;
0x00001f68 cmp r6, 0 |
| if (r6 == 0) {
0x00001f6a beq 0x2016 | goto label_5;
| }
0x00001f6c sub.w r8, r3, 4 | r8 = r3 - 4;
0x00001f70 movs r4, 0 | r4 = 0;
| do {
0x00001f72 ldr r7, [r8, 4]! | r7 = *((r8 += 4));
0x00001f76 mov r2, sb | r2 = sb;
0x00001f78 mov r0, r5 | r0 = r5;
0x00001f7a lsl.w fp, r4, 2 |
0x00001f7e mov r1, r7 | r1 = r7;
0x00001f80 blx 0x15b0 | r0 = fcn_000015b0 ();
| if (r0 == 0) {
0x00001f84 cbnz r0, 0x1f92 |
0x00001f86 ldrb.w r3, [r7, sb] | r3 = *((r7 + sb));
0x00001f8a cmp r3, 0 |
0x00001f8c it ne |
| if (r3 != 0) {
0x00001f8e cmpne r3, 0x3d | __asm ("cmpne r3, 0x3d");
| }
| if (r3 == 0) {
0x00001f90 beq 0x1ff6 | goto label_6;
| }
| }
0x00001f92 adds r4, 1 | r4++;
0x00001f94 cmp r4, r6 |
0x00001f96 bne 0x1f72 |
| } while (r4 != r6);
0x00001f98 ldr r2, [sp, 0x18] | r2 = var_18h;
0x00001f9a adds r3, r4, 1 | r3 = r4 + 1;
0x00001f9c str r3, [r2] | *(r2) = r3;
0x00001f9e lsls r3, r3, 0x1c | r3 <<= 0x1c;
0x00001fa0 ldr r2, [sp, 0x14] | r2 = var_14h;
0x00001fa2 str.w r5, [r2, r4, lsl 2] | __asm ("str.w r5, [r2, r4, lsl 2]");
0x00001fa6 lsl.w r4, r4, 2 | r4 <<= 2;
0x00001faa it ne |
| if (r3 == r3) {
0x00001fac addne r1, r4, 4 | r1 = r4 + 4;
| }
0x00001fae beq 0x1fbc |
| while (1) {
| label_1:
0x00001fb0 ldr r2, [sp, 0x14] | r2 = var_14h;
0x00001fb2 movs r3, 0 | r3 = 0;
0x00001fb4 str r3, [r2, r1] | *((r2 + r1)) = r3;
0x00001fb6 add sp, 0x24 |
0x00001fb8 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
0x00001fbc ldr r0, [sp, 0x14] | r0 = var_14h;
0x00001fbe add.w r1, r4, 0x44 | r1 = r4 + 0x44;
0x00001fc2 blx 0x1374 | fcn_00001374 ();
0x00001fc6 str r0, [sp, 0x14] | var_14h = r0;
0x00001fc8 cmp r0, 0 |
| if (r0 == 0) {
0x00001fca beq 0x2036 | goto label_7;
| }
0x00001fcc ldr r3, [pc, 0xa8] | r3 = *(0x2078);
0x00001fce ldr r2, [sp, 0x1c] | r2 = var_1ch;
0x00001fd0 ldr.w r3, [sl, r3] | r3 = *((sl + r3));
0x00001fd4 ldr r2, [r2] | r2 = *(r2);
0x00001fd6 ldr r1, [r3] | r1 = *(0x2078);
0x00001fd8 cmp r1, r2 |
0x00001fda itt eq |
| if (r1 != r2) {
0x00001fdc moveq r2, r0 | r2 = r0;
| }
| if (r1 != r2) {
0x00001fde streq r2, [r3] | *(r3) = r2;
| }
0x00001fe0 ldr r3, [sp, 0x18] | r3 = var_18h;
0x00001fe2 ldr r2, [sp, 0x14] | r2 = var_14h;
0x00001fe4 ldr r1, [r3] | r1 = *(0x2078);
0x00001fe6 ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x00001fe8 lsls r1, r1, 2 | r1 <<= 2;
0x00001fea str r2, [r3] | *(r3) = r2;
0x00001fec b 0x1fb0 |
| }
| label_2:
0x00001fee bl 0x2c70 | r0 = fcn_00002c70 (r0);
0x00001ff2 mov r5, r0 | r5 = r0;
0x00001ff4 b 0x1f42 | goto label_0;
| label_6:
0x00001ff6 mov r0, r7 | r0 = r7;
0x00001ff8 blx 0x12ec | fcn_000012ec ();
0x00001ffc ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x00001ffe ldr r3, [r3] | r3 = *(r3);
0x00002000 str.w r5, [r3, fp] | __asm ("str.w r5, [r3, fp]");
0x00002004 add sp, 0x24 |
0x00002006 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_4:
0x0000200a mov r0, r5 | r0 = r5;
0x0000200c add sp, 0x24 |
0x0000200e pop.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00002012 b.w 0x12e8 | void (*0x12e8)() ();
| label_5:
0x00002016 ldr r2, [sp, 0x18] | r2 = var_18h;
0x00002018 movs r3, 1 | r3 = 1;
0x0000201a movs r1, 4 | r1 = 4;
0x0000201c str r3, [r2] | *(r2) = r3;
0x0000201e ldr r3, [sp, 0x14] | r3 = var_14h;
0x00002020 str r5, [r3] | *(r3) = r5;
0x00002022 b 0x1fb0 | goto label_1;
| label_3:
0x00002024 ldr r3, [pc, 0x54] |
0x00002026 movs r2, 0x64 | r2 = 0x64;
0x00002028 ldr r1, [pc, 0x54] |
0x0000202a ldr r0, [pc, 0x58] |
0x0000202c add r3, pc | r3 = 0x40ac;
0x0000202e add r1, pc | r1 = 0x40b2;
0x00002030 add r0, pc | r0 = 0x40ba;
0x00002032 blx 0x15ec | fcn_000015ec ();
| label_7:
0x00002036 ldr r3, [pc, 0x50] |
0x00002038 movs r1, 1 | r1 = 1;
0x0000203a ldr r0, [pc, 0x50] |
0x0000203c movs r2, 0x15 | r2 = 0x15;
0x0000203e ldr.w r3, [sl, r3] | r3 = *((sl + r3));
0x00002042 add r0, pc | r0 = 0x40d4;
0x00002044 ldr r3, [r3] | r3 = *(0x208a);
0x00002046 blx 0x13b4 | strcpy (r0, r1)
0x0000204a ldr r4, [sp, 0x18] | r4 = var_18h;
0x0000204c ldr r5, [sp, 0x1c] | r5 = var_1ch;
0x0000204e ldr r3, [r4] | r3 = *(r4);
0x00002050 ldr r2, [r5] | r2 = *(r5);
0x00002052 subs r3, 1 | r3--;
0x00002054 ldr.w r0, [r2, r3, lsl 2] | offset_0 = r3 << 2;
| r0 = *((r2 + offset_0));
0x00002058 str r3, [r4] | *(r4) = r3;
0x0000205a blx 0x12ec | fcn_000012ec ();
0x0000205e ldr r1, [r4] | r1 = *(r4);
0x00002060 ldr r3, [r5] | r3 = *(r5);
0x00002062 lsls r1, r1, 2 | r1 <<= 2;
0x00002064 str r3, [sp, 0x14] | var_14h = r3;
0x00002066 b 0x1fb0 | 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/bin/newgrp.shadow @ 0x2de0 */
| #include <stdint.h>
|
; (fcn) fcn.00002de0 () | void fcn_00002de0 (int16_t arg1, int16_t arg2) {
| r0 = arg1;
| r1 = arg2;
0x00002de0 ldr r3, [pc, 0x60] |
0x00002de2 push {r4, r5, r6, lr} |
0x00002de4 mov r4, r0 | r4 = r0;
0x00002de6 ldr r6, [pc, 0x60] |
0x00002de8 mov r5, r1 | r5 = r1;
0x00002dea add r3, pc | r3 = 0x5c32;
0x00002dec ldrb r3, [r3] | r3 = *(r3);
0x00002dee add r6, pc | r6 = 0x5c3c;
0x00002df0 cbz r3, 0x2e14 |
| while (1) {
0x00002df2 mov r0, r4 | r0 = r4;
0x00002df4 bl 0x2d54 | r0 = fcn_00002d54 (r0);
0x00002df8 mov r4, r0 | r4 = r0;
| if (r0 == 0) {
0x00002dfa cbz r0, 0x2e1a | goto label_0;
| }
0x00002dfc mov r0, r5 | r0 = r5;
0x00002dfe blx 0x1340 | r0 = fcn_00001340 ();
0x00002e02 mov r5, r0 | r5 = r0;
| if (r0 == 0) {
0x00002e04 cbz r0, 0x2e20 | goto label_1;
| }
0x00002e06 ldr r0, [r4, 4] | r0 = *((r4 + 4));
| if (r0 != 0) {
0x00002e08 cbz r0, 0x2e0e |
0x00002e0a blx 0x12ec | fcn_000012ec ();
| }
0x00002e0e movs r0, 0 | r0 = 0;
0x00002e10 str r5, [r4, 4] | *((r4 + 4)) = r5;
0x00002e12 pop {r4, r5, r6, pc} |
0x00002e14 bl 0x2e58 | fcn_00002e58 (r0, r1);
0x00002e18 b 0x2df2 |
| }
| label_0:
0x00002e1a mov.w r0, -1 | r0 = -1;
0x00002e1e pop {r4, r5, r6, pc} |
| label_1:
0x00002e20 ldr r3, [pc, 0x28] |
0x00002e22 movs r2, 0x2a | r2 = 0x2a;
0x00002e24 ldr r0, [pc, 0x28] |
0x00002e26 movs r1, 1 | r1 = 1;
0x00002e28 ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x00002e2a add r0, pc | r0 = 0x5c7e;
0x00002e2c ldr r3, [r3] | r3 = *(0x2e4c);
0x00002e2e blx 0x13b4 | strcpy (r0, r1)
0x00002e32 ldr r2, [pc, 0x20] |
0x00002e34 movs r1, 1 | r1 = 1;
0x00002e36 movs r0, 3 | r0 = 3;
0x00002e38 add r2, pc | r2 = 0x5c92;
0x00002e3a blx 0x1514 | fcn_00001514 ();
0x00002e3e mov.w r0, -1 | r0 = -1;
0x00002e42 pop {r4, r5, r6, pc} |
| }
[*] Function strcpy used 5 times newgrp.shadow