[*] Binary protection state of newgrp.shadow
Full RELRO Canary found NX disabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function fprintf tear down of newgrp.shadow
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/newgrp.shadow @ 0x45e0 */
| #include <stdint.h>
|
; (fcn) fcn.000045e0 () | void fcn_000045e0 () {
0x000045e0 lui gp, 2 |
0x000045e4 addiu gp, gp, -0x4310 |
0x000045e8 addu gp, gp, t9 | gp += t9;
0x000045ec addiu sp, sp, -0x28 |
0x000045f0 sw s0, 0x1c(sp) | *(var_1ch) = s0;
0x000045f4 lw s0, -0x7fdc(gp) | s0 = *((gp - 8183));
0x000045f8 sw s1, 0x20(sp) | *(var_20h) = s1;
0x000045fc move s1, a0 | s1 = a0;
0x00004600 lw a0, -0x7f8c(s0) | a0 = *((s0 - 8163));
0x00004604 sw gp, 0x10(sp) | *(var_10h) = gp;
0x00004608 sw ra, 0x24(sp) | *(var_24h) = ra;
| /* esilref: '\n' */
0x0000460c addiu s0, s0, -0x7f8c | s0 += -0x7f8c;
| if (a0 == 0) {
0x00004610 beqz a0, 0x4658 | goto label_0;
| }
0x00004614 lw t9, -0x7e00(gp) | t9 = sym.imp.strcmp;
0x00004618 b 0x4630 |
| while (v0 != 0) {
0x0000461c addiu s0, s0, 8 | s0 += 8;
0x00004620 lw a0, (s0) | a0 = *(s0);
| if (a0 == 0) {
0x00004624 beql a0, zero, 0x465c | goto label_1;
| }
0x00004628 lw s0, -0x7fdc(gp) | s0 = *((gp - 8183));
0x0000462c lw t9, -0x7e00(gp) | t9 = sym.imp.strcmp;
0x00004630 move a1, s1 | a1 = s1;
0x00004634 jalr t9 | t9 ();
0x00004638 lw gp, 0x10(sp) | gp = *(var_10h);
0x0000463c bnez v0, 0x461c |
| }
0x00004640 lw ra, 0x24(sp) | ra = *(var_24h);
0x00004644 move v0, s0 | v0 = s0;
0x00004648 lw s1, 0x20(sp) | s1 = *(var_20h);
0x0000464c lw s0, 0x1c(sp) | s0 = *(var_1ch);
0x00004650 addiu sp, sp, 0x28 |
0x00004654 jr ra | return v0;
| label_0:
0x00004658 lw s0, -0x7fdc(gp) | s0 = *((gp - 8183));
| label_1:
0x0000465c lw a0, -0x7a5c(s0) | a0 = *((s0 - 7831));
0x00004660 addiu s0, s0, -0x7a5c | s0 += -0x7a5c;
| if (a0 == 0) {
0x00004664 beqz a0, 0x46b0 | goto label_2;
| }
0x00004668 lw t9, -0x7e00(gp) | t9 = sym.imp.strcmp;
0x0000466c b 0x4680 |
| while (v0 != 0) {
0x00004670 lw a0, (s0) | a0 = *(s0);
0x00004674 lw v0, -0x7e14(gp) | v0 = *((gp - 8069));
| if (a0 == 0) {
0x00004678 beqz a0, 0x46b4 | goto label_3;
| }
0x0000467c lw t9, -0x7e00(gp) | t9 = sym.imp.strcmp;
0x00004680 move a1, s1 | a1 = s1;
0x00004684 jalr t9 | t9 ();
0x00004688 addiu s0, s0, 8 | s0 += 8;
0x0000468c lw gp, 0x10(sp) | gp = *(var_10h);
0x00004690 bnez v0, 0x4670 |
| }
0x00004694 lw ra, 0x24(sp) | ra = *(var_24h);
0x00004698 move s0, zero | s0 = 0;
0x0000469c move v0, s0 | v0 = s0;
0x000046a0 lw s1, 0x20(sp) | s1 = *(var_20h);
0x000046a4 lw s0, 0x1c(sp) | s0 = *(var_1ch);
0x000046a8 addiu sp, sp, 0x28 |
0x000046ac jr ra | return v0;
| label_2:
0x000046b0 lw v0, -0x7e14(gp) | v0 = *((gp - 8069));
| label_3:
0x000046b4 lw a2, -0x7fd8(gp) | a2 = *((gp - 8182));
0x000046b8 lw t9, -0x7f04(gp) | t9 = sym.imp.__fprintf_chk
0x000046bc lw a0, (v0) | a0 = *(v0);
0x000046c0 move a3, s1 | a3 = s1;
0x000046c4 addiu a2, a2, 0x6d00 | a2 += str.configuration_error___unknown_item__s__notify_administrator__n;
0x000046c8 addiu a1, zero, 1 | a1 = 1;
0x000046cc jalr t9 | t9 ();
0x000046d0 lw gp, 0x10(sp) | gp = *(var_10h);
0x000046d4 move a3, s1 | a3 = s1;
0x000046d8 addiu a1, zero, 1 | a1 = 1;
0x000046dc lw a2, -0x7fd8(gp) | a2 = *((gp - 8182));
0x000046e0 lw t9, -0x7ed8(gp) | t9 = sym.imp.__syslog_chk;
0x000046e4 addiu a2, a2, 0x6d40 | a2 += str.unknown_configuration_item___s;
0x000046e8 addiu a0, zero, 2 | a0 = 2;
0x000046ec jalr t9 | t9 ();
0x000046f0 lw ra, 0x24(sp) | ra = *(var_24h);
0x000046f4 move s0, zero | s0 = 0;
0x000046f8 move v0, s0 | v0 = s0;
0x000046fc lw s1, 0x20(sp) | s1 = *(var_20h);
0x00004700 lw s0, 0x1c(sp) | s0 = *(var_1ch);
0x00004704 addiu sp, sp, 0x28 |
0x00004708 jr ra | return v0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/newgrp.shadow @ 0x1a10 */
| #include <stdint.h>
|
; (fcn) main () | int32_t main () {
| /* [13] -r-x section size 18672 named .text */
0x00001a10 lui gp, 2 |
0x00001a14 addiu gp, gp, -0x1740 |
0x00001a18 addu gp, gp, t9 | gp += t9;
0x00001a1c addiu sp, sp, -0x68 |
0x00001a20 lw v0, -0x7f10(gp) | v0 = *((gp - 8132));
0x00001a24 sw s0, 0x40(sp) | *(var_40h) = s0;
0x00001a28 move s0, a1 | s0 = a1;
0x00001a2c lw a1, -0x7fd8(gp) | a1 = *((gp - 8182));
0x00001a30 lw t9, -0x7ee0(gp) | t9 = sym.imp.setlocale;
0x00001a34 sw ra, 0x64(sp) | *(var_64h) = ra;
0x00001a38 sw gp, 0x20(sp) | *(var_20h) = gp;
0x00001a3c addiu a1, a1, 0x6958 | a1 += 0x6958;
0x00001a40 sw s7, 0x5c(sp) | *(var_5ch) = s7;
0x00001a44 sw s4, 0x50(sp) | *(var_50h) = s4;
0x00001a48 sw s3, 0x4c(sp) | *(var_4ch) = s3;
0x00001a4c sw s2, 0x48(sp) | *(var_48h) = s2;
0x00001a50 sw s1, 0x44(sp) | *(var_44h) = s1;
0x00001a54 sw fp, 0x60(sp) | *(var_60h) = fp;
0x00001a58 sw s6, 0x58(sp) | *(var_58h) = s6;
0x00001a5c sw s5, 0x54(sp) | *(var_54h) = s5;
0x00001a60 move s3, a0 | s3 = a0;
0x00001a64 addiu a0, zero, 6 | a0 = 6;
0x00001a68 lw s7, (v0) | s7 = *(v0);
0x00001a6c jalr t9 | t9 ();
0x00001a70 lw gp, 0x20(sp) | gp = *(var_20h);
0x00001a74 lw a0, (s0) | a0 = *(s0);
0x00001a78 lw s2, -0x7fd4(gp) | s2 = *(gp);
0x00001a7c lw t9, -0x7fd0(gp) | t9 = sym.Basename;
0x00001a80 sw s2, 0x34(sp) | *(var_34h) = s2;
0x00001a84 bal 0x28f0 | sym_Basename ();
0x00001a88 lw gp, 0x20(sp) | gp = *(var_20h);
0x00001a8c move a0, v0 | a0 = v0;
0x00001a90 sw v0, (s2) | *(s2) = v0;
0x00001a94 lw s1, -0x7fd8(gp) | s1 = *((gp - 8182));
0x00001a98 lw t9, -0x7e00(gp) | t9 = sym.imp.strcmp;
0x00001a9c lw s4, -0x7fdc(gp) | s4 = *((gp - 8183));
0x00001aa0 addiu a1, s1, 0x6800 | a1 = s1 + str.newgrp;
0x00001aa4 jalr t9 | t9 ();
0x00001aa8 sltiu v1, v0, 1 | v1 = (v0 < 1) ? 1 : 0;
0x00001aac lw gp, 0x20(sp) | gp = *(var_20h);
0x00001ab0 sb v1, -0x7b00(s4) | *((s4 - 31488)) = v1;
| if (v0 == 0) {
0x00001ab4 beqz v0, 0x1bd0 | goto label_24;
| }
0x00001ab8 lw a0, -0x7fd8(gp) | a0 = *((gp - 8182));
0x00001abc addiu a0, a0, 0x6808 | a0 += 0x6808;
| do {
0x00001ac0 lw t9, -0x7ef8(gp) | t9 = sym.imp.openlog;
0x00001ac4 addiu a2, zero, 0x50 | a2 = 0x50;
0x00001ac8 addiu a1, zero, 1 | a1 = 1;
0x00001acc jalr t9 | t9 ();
0x00001ad0 lw gp, 0x20(sp) | gp = *(var_20h);
0x00001ad4 addiu s2, s3, -1 | s2 = s3 + -1;
0x00001ad8 lw t9, -0x7ea8(gp) | t9 = sym.imp.getgid;
0x00001adc addiu s1, s0, 4 | s1 = s0 + 4;
0x00001ae0 jalr t9 | t9 ();
0x00001ae4 lw gp, 0x20(sp) | gp = *(var_20h);
0x00001ae8 lw t9, -0x7fcc(gp) | t9 = sym.initenv;
0x00001aec bal 0x2950 | sym_initenv ();
0x00001af0 nop |
0x00001af4 lw gp, 0x20(sp) | gp = *(var_20h);
0x00001af8 lw t9, -0x7fc8(gp) | t9 = sym.get_my_pwent;
0x00001afc bal 0x3690 | sym_get_my_pwent ();
0x00001b00 nop |
0x00001b04 move s5, v0 | s5 = v0;
0x00001b08 lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 == 0) {
0x00001b0c beqz v0, 0x1ea8 | goto label_25;
| }
0x00001b10 lw v0, (v0) | v0 = *(v0);
0x00001b14 sw v0, 0x30(sp) | *(var_30h) = v0;
0x00001b18 lbu v0, -0x7b00(s4) | v0 = *((s4 - 31488));
0x00001b1c sw v0, 0x2c(sp) | *(var_2ch) = v0;
| if (s2 <= 0) {
0x00001b20 blez s2, 0x1bd8 | goto label_26;
| }
0x00001b24 lw a1, -0x7fd8(gp) | a1 = *((gp - 8182));
0x00001b28 lw s4, 4(s0) | s4 = *((s0 + 1));
0x00001b2c lw t9, -0x7e00(gp) | t9 = sym.imp.strcmp;
0x00001b30 addiu a1, a1, 0x6878 | a1 += 0x6878;
0x00001b34 move a0, s4 | a0 = s4;
0x00001b38 jalr t9 | t9 ();
0x00001b3c lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 != 0) {
0x00001b40 beqz v0, 0x1b60 |
0x00001b44 lw a1, -0x7fd8(gp) | a1 = *((gp - 8182));
0x00001b48 lw t9, -0x7e00(gp) | t9 = sym.imp.strcmp;
0x00001b4c addiu a1, a1, 0x687c | a1 += 0x687c;
0x00001b50 move a0, s4 | a0 = s4;
0x00001b54 jalr t9 | t9 ();
0x00001b58 lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 != 0) {
0x00001b5c bnez v0, 0x1e30 | goto label_27;
| }
| }
0x00001b60 lw v0, 0x2c(sp) | v0 = *(var_2ch);
0x00001b64 addiu s2, s3, -2 | s2 = s3 + -2;
0x00001b68 addiu s1, s0, 8 | s1 = s0 + 8;
| if (v0 != 0) {
0x00001b6c bnez v0, 0x1e98 | goto label_28;
| }
0x00001b70 addiu v0, zero, 1 | v0 = 1;
| if (s2 <= 0) {
0x00001b74 blez s2, 0x1e00 | goto label_29;
| }
0x00001b78 sw v0, 0x2c(sp) | *(var_2ch) = v0;
0x00001b7c lw s6, (s1) | s6 = *(s1);
| label_2:
0x00001b80 addiu v0, zero, 0x2d | v0 = 0x2d;
0x00001b84 lb v1, (s6) | v1 = *(s6);
0x00001b88 addiu s2, s2, -1 | s2 += -1;
| if (v1 == v0) {
0x00001b8c beq v1, v0, 0x1e00 | goto label_29;
| }
0x00001b90 addiu v0, zero, 1 | v0 = 1;
| if (s2 == 0) {
0x00001b94 beqz s2, 0x1bf4 | goto label_30;
| }
0x00001b98 lw a0, 4(s1) | a0 = *((s1 + 1));
0x00001b9c sw a0, 0x3c(sp) | *(var_3ch) = a0;
| if (s2 == v0) {
0x00001ba0 beq s2, v0, 0x1e90 | goto label_31;
| }
0x00001ba4 lw a1, -0x7fd8(gp) | a1 = *((gp - 8182));
0x00001ba8 lw t9, -0x7e00(gp) | t9 = sym.imp.strcmp;
0x00001bac addiu a1, a1, 0x6880 | a1 += 0x6880;
0x00001bb0 jalr t9 | t9 ();
0x00001bb4 lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 != 0) {
0x00001bb8 bnez v0, 0x1e8c | goto label_32;
| }
0x00001bbc lw v0, 8(s1) | v0 = *((s1 + 2));
0x00001bc0 sw v0, 0x3c(sp) | *(var_3ch) = v0;
0x00001bc4 addiu v0, zero, 1 | v0 = 1;
0x00001bc8 sw v0, 0x38(sp) | *(var_38h) = v0;
0x00001bcc b 0x1bfc | goto label_5;
| label_24:
0x00001bd0 addiu a0, s1, 0x6800 | a0 = s1 + str.newgrp;
0x00001bd4 b 0x1ac0 |
| } while (1);
| label_26:
0x00001bd8 lw v0, 0x2c(sp) | v0 = *(var_2ch);
0x00001bdc lw t9, -0x7fd8(gp) | t9 = *((gp - 8182));
| if (v0 == 0) {
0x00001be0 beqz v0, 0x1e04 | goto label_33;
| }
0x00001be4 sw zero, 0x2c(sp) | *(var_2ch) = 0;
0x00001be8 lw s6, (s1) | s6 = *(s1);
| label_7:
0x00001bec lw t9, -0x7fc4(gp) | t9 = sym.xgetgrgid;
| if (s6 == 0) {
0x00001bf0 beqz s6, 0x1e6c | goto label_34;
| }
| label_30:
0x00001bf4 sw zero, 0x3c(sp) | *(var_3ch) = 0;
| label_3:
0x00001bf8 sw zero, 0x38(sp) | *(var_38h) = 0;
| label_5:
0x00001bfc lw s2, -0x7fdc(gp) | s2 = *((gp - 8183));
0x00001c00 lw s1, -0x7fdc(gp) | s1 = *((gp - 8183));
0x00001c04 addiu s0, zero, 0x10 | s0 = 0x10;
0x00001c08 addiu s3, zero, -1 | s3 = -1;
0x00001c0c addiu s4, zero, 0x16 | s4 = 0x16;
0x00001c10 b 0x1c3c | goto label_35;
| label_0:
0x00001c14 jalr t9 | t9 ();
0x00001c18 nop |
0x00001c1c lw v0, (v0) | v0 = *(v0);
0x00001c20 lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 != s4) {
0x00001c24 bne v0, s4, 0x1ddc | goto label_36;
| }
| do {
0x00001c28 lw t9, -0x7e18(gp) | t9 = sym.imp.free;
0x00001c2c move a0, fp | a0 = fp;
0x00001c30 jalr t9 | t9 ();
0x00001c34 lw gp, 0x20(sp) | gp = *(var_20h);
0x00001c38 sll s0, s0, 1 | s0 <<= 1;
| label_35:
0x00001c3c lw t9, -0x7fc0(gp) | t9 = sym.xmalloc;
0x00001c40 sll a0, s0, 2 | a0 = s0 << 2;
0x00001c44 bal 0x4380 | sym_xmalloc ();
0x00001c48 lw gp, 0x20(sp) | gp = *(var_20h);
0x00001c4c move a0, s0 | a0 = s0;
0x00001c50 move a1, v0 | a1 = v0;
0x00001c54 lw t9, -0x7eec(gp) | t9 = sym.imp.getgroups;
0x00001c58 sw v0, -0x7afc(s2) | *((s2 - 7871)) = v0;
0x00001c5c move fp, v0 | fp = v0;
0x00001c60 jalr t9 | t9 ();
0x00001c64 slt a0, v0, s0 | a0 = (v0 < s0) ? 1 : 0;
0x00001c68 lw gp, 0x20(sp) | gp = *(var_20h);
0x00001c6c sw v0, -0x7af8(s1) | *((s1 - 7870)) = v0;
0x00001c70 beqz a0, 0x1c28 |
| } while (a0 == 0);
0x00001c74 lw t9, -0x7eb0(gp) | t9 = sym.imp.__errno_location;
| if (v0 == s3) {
0x00001c78 beq v0, s3, 0x1c14 | goto label_0;
| }
0x00001c7c lw t9, -0x7f1c(gp) | t9 = sym.imp.getgrnam;
| if (v0 < 0) {
0x00001c80 bltz v0, 0x1ddc | goto label_36;
| }
0x00001c84 move a0, s6 | a0 = s6;
0x00001c88 jalr t9 | t9 ();
0x00001c8c move s3, v0 | s3 = v0;
0x00001c90 lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 == 0) {
0x00001c94 beqz v0, 0x24c0 | goto label_37;
| }
0x00001c98 lw a1, -0x7af8(s1) | a1 = *((s1 - 7870));
0x00001c9c lw s4, 8(v0) | s4 = *((v0 + 2));
| if (a1 <= 0) {
0x00001ca0 blez a1, 0x1cd4 | goto label_38;
| }
0x00001ca4 lw v0, -0x7afc(s2) | v0 = *((s2 - 7871));
0x00001ca8 lw v1, (v0) | v1 = *(v0);
0x00001cac addiu v0, v0, 4 | v0 += 4;
| if (s4 == v1) {
0x00001cb0 beq s4, v1, 0x1f04 | goto label_39;
| }
0x00001cb4 move v1, zero | v1 = 0;
0x00001cb8 b 0x1cc8 |
| while (v1 != a1) {
0x00001cbc lw a0, -4(v0) | a0 = *((v0 - 1));
0x00001cc0 lw t9, -0x7fbc(gp) | t9 = sym.getsgnam;
| if (s4 == a0) {
0x00001cc4 beq s4, a0, 0x1f08 | goto label_40;
| }
0x00001cc8 addiu v1, v1, 1 | v1++;
0x00001ccc addiu v0, v0, 4 | v0 += 4;
0x00001cd0 bne v1, a1, 0x1cbc |
| }
| label_38:
0x00001cd4 lw s0, -0x7fd8(gp) | s0 = *((gp - 8182));
0x00001cd8 lw a1, 0xc(s3) | a1 = *((s3 + 3));
0x00001cdc addiu s0, s0, 0x2810 | s0 += fcn.00002810;
0x00001ce0 move t9, s0 | t9 = s0;
0x00001ce4 lw a0, 0x30(sp) | a0 = *(var_30h);
0x00001ce8 bal 0x2810 | fcn_00002810 ();
0x00001cec lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 != 0) {
0x00001cf0 bnez v0, 0x1d50 | goto label_18;
| }
0x00001cf4 lw t9, -0x7ed0(gp) | t9 = sym.imp.setgrent;
0x00001cf8 jalr t9 | t9 ();
0x00001cfc nop |
0x00001d00 lw gp, 0x20(sp) | gp = *(var_20h);
| label_1:
0x00001d04 lw t9, -0x7ebc(gp) | t9 = sym.imp.getgrent;
| do {
0x00001d08 jalr t9 | t9 ();
0x00001d0c nop |
0x00001d10 move s3, v0 | s3 = v0;
0x00001d14 lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 == 0) {
0x00001d18 beqz v0, 0x24f0 | goto label_41;
| }
0x00001d1c lw v0, 8(s3) | v0 = *((s3 + 2));
0x00001d20 lw t9, -0x7ebc(gp) | t9 = sym.imp.getgrent;
0x00001d24 bne s4, v0, 0x1d08 |
| } while (s4 != v0);
0x00001d28 lw a1, 0xc(s3) | a1 = *((s3 + 3));
0x00001d2c move t9, s0 | t9 = s0;
0x00001d30 lw a0, 0x30(sp) | a0 = *(var_30h);
0x00001d34 bal 0x2810 | fcn_00002810 ();
0x00001d38 lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 == 0) {
0x00001d3c beqz v0, 0x1d04 | goto label_1;
| }
0x00001d40 lw t9, -0x7df8(gp) | t9 = sym.imp.endgrent;
0x00001d44 jalr t9 | t9 ();
0x00001d48 nop |
0x00001d4c lw gp, 0x20(sp) | gp = *(var_20h);
| label_18:
0x00001d50 lw t9, -0x7fbc(gp) | t9 = sym.getsgnam;
0x00001d54 move a0, s6 | a0 = s6;
0x00001d58 bal 0x5a70 | sym_getsgnam ();
0x00001d5c lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 != 0) {
0x00001d60 beqz v0, 0x1d74 |
0x00001d64 lw v1, 4(v0) | v1 = *((v0 + 1));
0x00001d68 lw v0, 0xc(v0) | v0 = *((v0 + 3));
0x00001d6c sw v1, 4(s3) | *((s3 + 1)) = v1;
0x00001d70 sw v0, 0xc(s3) | *((s3 + 3)) = v0;
| }
0x00001d74 lw v1, 8(s3) | v1 = *((s3 + 2));
0x00001d78 lw v0, 0xc(s5) | v0 = *((s5 + 3));
0x00001d7c lw t9, -0x7fb8(gp) | t9 = sym.is_on_list;
| if (v1 != v0) {
0x00001d80 bne v1, v0, 0x2480 | goto label_42;
| }
0x00001d84 move s0, zero | s0 = 0;
| label_17:
0x00001d88 lw t9, -0x7fb4(gp) | t9 = sym.xgetspnam;
0x00001d8c lw a0, (s5) | a0 = *(s5);
0x00001d90 bal 0x4160 | sym_xgetspnam ();
0x00001d94 lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 != 0) {
0x00001d98 beqz v0, 0x1da4 |
0x00001d9c lw v0, 4(v0) | v0 = *((v0 + 1));
0x00001da0 sw v0, 4(s5) | *((s5 + 1)) = v0;
| }
0x00001da4 lw v0, 4(s5) | v0 = *((s5 + 1));
0x00001da8 lb v0, (v0) | v0 = *(v0);
0x00001dac lw t9, -0x7e48(gp) | t9 = sym.imp.getuid;
| if (v0 != 0) {
0x00001db0 bnez v0, 0x20e0 | goto label_43;
| }
0x00001db4 lw v0, 4(s3) | v0 = *((s3 + 1));
0x00001db8 lb v0, (v0) | v0 = *(v0);
| if (v0 == 0) {
0x00001dbc beqz v0, 0x20e0 | goto label_43;
| }
0x00001dc0 nop |
0x00001dc4 jalr t9 | t9 ();
0x00001dc8 nop |
0x00001dcc lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 != 0) {
0x00001dd0 bnez v0, 0x20f8 | goto label_44;
| }
0x00001dd4 lw a0, -0x7fd8(gp) | a0 = *((gp - 8182));
0x00001dd8 b 0x1f2c | goto label_10;
| label_36:
0x00001ddc lw a0, -0x7fd8(gp) | a0 = *((gp - 8182));
0x00001de0 lw t9, -0x7e54(gp) | t9 = sym.imp.perror;
0x00001de4 addiu a0, a0, 0x68c0 | a0 += str.getgroups;
| label_8:
0x00001de8 jalr t9 | t9 ();
0x00001dec nop |
0x00001df0 lw gp, 0x20(sp) | gp = *(var_20h);
0x00001df4 lw t9, -0x7e78(gp) | t9 = sym.imp.exit;
0x00001df8 addiu a0, zero, 1 | a0 = 1;
0x00001dfc jalr t9 | t9 ();
| label_29:
0x00001e00 lw t9, -0x7fd8(gp) | t9 = *((gp - 8182));
| label_33:
0x00001e04 addiu t9, t9, 0x28a0 | t9 += fcn.000028a0;
0x00001e08 bal 0x28a0 | fcn_000028a0 ();
0x00001e0c nop |
0x00001e10 lw gp, 0x20(sp) | gp = *(var_20h);
| label_4:
0x00001e14 lw t9, -0x7e80(gp) | t9 = sym.imp.closelog;
0x00001e18 jalr t9 | t9 ();
0x00001e1c nop |
0x00001e20 lw gp, 0x20(sp) | gp = *(var_20h);
0x00001e24 lw t9, -0x7e78(gp) | t9 = sym.imp.exit;
0x00001e28 addiu a0, zero, 1 | a0 = 1;
0x00001e2c jalr t9 | t9 ();
| label_27:
0x00001e30 lw v0, 0x2c(sp) | v0 = *(var_2ch);
| if (v0 == 0) {
0x00001e34 beql v0, zero, 0x1b80 | goto label_2;
| }
0x00001e38 lw s6, (s1) | s6 = *(s1);
0x00001e3c sw zero, 0x2c(sp) | *(var_2ch) = 0;
0x00001e40 lw s6, (s1) | s6 = *(s1);
| label_6:
0x00001e44 addiu v0, zero, 0x2d | v0 = 0x2d;
0x00001e48 lb v1, (s6) | v1 = *(s6);
0x00001e4c sw zero, 0x3c(sp) | *(var_3ch) = 0;
| if (v1 == v0) {
0x00001e50 bnel v1, v0, 0x1bf8 | goto label_3;
| }
0x00001e54 lw t9, -0x7fd8(gp) | t9 = *((gp - 8182));
0x00001e58 addiu t9, t9, 0x28a0 | t9 += fcn.000028a0;
0x00001e5c bal 0x28a0 | fcn_000028a0 ();
0x00001e60 nop |
0x00001e64 lw gp, 0x20(sp) | gp = *(var_20h);
0x00001e68 b 0x1e14 | goto label_4;
| label_34:
0x00001e6c lw a0, 0xc(s5) | a0 = *((s5 + 3));
0x00001e70 bal 0x3f40 | sym_xgetgrgid ();
0x00001e74 lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 == 0) {
0x00001e78 beqz v0, 0x259c | goto label_45;
| }
0x00001e7c sw zero, 0x3c(sp) | *(var_3ch) = 0;
0x00001e80 lw s6, (v0) | s6 = *(v0);
0x00001e84 sw zero, 0x38(sp) | *(var_38h) = 0;
0x00001e88 b 0x1bfc | goto label_5;
| label_32:
0x00001e8c addiu v0, zero, 1 | v0 = 1;
| label_31:
0x00001e90 sw v0, 0x38(sp) | *(var_38h) = v0;
0x00001e94 b 0x1bfc | goto label_5;
| label_28:
0x00001e98 lw s6, (s1) | s6 = *(s1);
| if (s2 > 0) {
0x00001e9c bgtz s2, 0x1e44 | goto label_6;
| }
0x00001ea0 b 0x1bec | goto label_7;
0x00001ea4 nop |
| label_25:
0x00001ea8 lw v0, 0x34(sp) | v0 = *(var_34h);
0x00001eac lw a2, -0x7fd8(gp) | a2 = *((gp - 8182));
0x00001eb0 lw t9, -0x7f04(gp) | t9 = sym.imp.__fprintf_chk
0x00001eb4 lw a3, (v0) | a3 = *(v0);
0x00001eb8 lw v0, -0x7e14(gp) | v0 = *((gp - 8069));
0x00001ebc addiu a2, a2, 0x6818 | a2 += str._s:_Cannot_determine_your_user_name._n;
0x00001ec0 addiu a1, zero, 1 | a1 = 1;
0x00001ec4 lw a0, (v0) | a0 = *(v0);
0x00001ec8 jalr t9 | t9 ();
0x00001ecc lw gp, 0x20(sp) | gp = *(var_20h);
0x00001ed0 lw t9, -0x7e48(gp) | t9 = sym.imp.getuid;
0x00001ed4 jalr t9 | t9 ();
0x00001ed8 nop |
0x00001edc lw gp, 0x20(sp) | gp = *(var_20h);
0x00001ee0 addiu a0, zero, 4 | a0 = 4;
0x00001ee4 move a3, v0 | a3 = v0;
0x00001ee8 lw a2, -0x7fd8(gp) | a2 = *((gp - 8182));
0x00001eec lw t9, -0x7ed8(gp) | t9 = sym.imp.__syslog_chk;
0x00001ef0 addiu a2, a2, 0x6840 | a2 += str.Cannot_determine_the_user_name_of_the_caller__UID__lu_;
0x00001ef4 addiu a1, zero, 1 | a1 = 1;
0x00001ef8 jalr t9 | t9 ();
0x00001efc lw gp, 0x20(sp) | gp = *(var_20h);
0x00001f00 b 0x1e14 | goto label_4;
| label_39:
0x00001f04 lw t9, -0x7fbc(gp) | t9 = sym.getsgnam;
| label_40:
0x00001f08 move a0, s6 | a0 = s6;
0x00001f0c bal 0x5a70 | sym_getsgnam ();
0x00001f10 lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 != 0) {
0x00001f14 beqz v0, 0x1f28 |
0x00001f18 lw v1, 4(v0) | v1 = *((v0 + 1));
0x00001f1c lw v0, 0xc(v0) | v0 = *((v0 + 3));
0x00001f20 sw v1, 4(s3) | *((s3 + 1)) = v1;
0x00001f24 sw v0, 0xc(s3) | *((s3 + 3)) = v0;
| }
| label_9:
0x00001f28 lw a0, -0x7fd8(gp) | a0 = *((gp - 8182));
| label_10:
0x00001f2c lw t9, -0x7fb0(gp) | t9 = sym.getdef_bool;
0x00001f30 addiu a0, a0, 0x69d8 | a0 += str.SYSLOG_SG_ENAB;
0x00001f34 bal 0x4b68 | sym_getdef_bool ();
0x00001f38 lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 != 0) {
0x00001f3c bnez v0, 0x21d8 | goto label_46;
| }
| label_11:
0x00001f40 lw s0, -0x7af8(s1) | s0 = *((s1 - 7870));
0x00001f44 lw s3, 8(s3) | s3 = *((s3 + 2));
| if (s0 <= 0) {
0x00001f48 blez s0, 0x22b0 | goto label_47;
| }
0x00001f4c lw v0, -0x7afc(s2) | v0 = *((s2 - 7871));
0x00001f50 lw v1, (v0) | v1 = *(v0);
0x00001f54 addiu v0, v0, 4 | v0 += 4;
| if (s3 == v1) {
0x00001f58 beq s3, v1, 0x1fd4 | goto label_14;
| }
0x00001f5c move v1, zero | v1 = 0;
0x00001f60 b 0x1f70 |
| while (v1 != s0) {
0x00001f64 lw a0, -4(v0) | a0 = *((v0 - 1));
0x00001f68 lw t9, -0x7eb8(gp) | t9 = sym.imp.endspent;
| if (a0 == s3) {
0x00001f6c beq a0, s3, 0x1fd8 | goto label_12;
| }
0x00001f70 addiu v1, v1, 1 | v1++;
0x00001f74 addiu v0, v0, 4 | v0 += 4;
0x00001f78 bne v1, s0, 0x1f64 |
| }
0x00001f7c lw t9, -0x7e44(gp) | t9 = sym.imp.sysconf;
| label_13:
0x00001f80 addiu a0, zero, 3 | a0 = 3;
0x00001f84 jalr t9 | t9 ();
0x00001f88 slt v0, s0, v0 | v0 = (s0 < v0) ? 1 : 0;
0x00001f8c lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 == 0) {
0x00001f90 beqz v0, 0x23e4 | goto label_48;
| }
0x00001f94 lw a1, -0x7afc(s2) | a1 = *((s2 - 7871));
0x00001f98 sll v0, s0, 2 | v0 = s0 << 2;
0x00001f9c addu v0, a1, v0 | v0 = a1 + v0;
0x00001fa0 lw t9, -0x7e50(gp) | t9 = sym.imp.setgroups;
0x00001fa4 addiu s0, s0, 1 | s0++;
0x00001fa8 sw s3, (v0) | *(v0) = s3;
0x00001fac move a0, s0 | a0 = s0;
0x00001fb0 sw s0, -0x7af8(s1) | *((s1 - 7870)) = s0;
0x00001fb4 jalr t9 | t9 ();
0x00001fb8 lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 != 0) {
0x00001fbc beqz v0, 0x1fd4 |
0x00001fc0 lw a0, -0x7fd8(gp) | a0 = *((gp - 8182));
0x00001fc4 lw t9, -0x7e54(gp) | t9 = sym.imp.perror;
0x00001fc8 addiu a0, a0, 0x6a38 | a0 += str.setgroups;
0x00001fcc jalr t9 | t9 ();
0x00001fd0 lw gp, 0x20(sp) | gp = *(var_20h);
| }
| label_14:
0x00001fd4 lw t9, -0x7eb8(gp) | t9 = sym.imp.endspent;
| label_12:
0x00001fd8 jalr t9 | t9 ();
0x00001fdc nop |
0x00001fe0 lw gp, 0x20(sp) | gp = *(var_20h);
0x00001fe4 lw t9, -0x7fac(gp) | t9 = sym.endsgent;
0x00001fe8 bal 0x55dc | sym_endsgent ();
0x00001fec nop |
0x00001ff0 lw gp, 0x20(sp) | gp = *(var_20h);
0x00001ff4 lw t9, -0x7ef0(gp) | t9 = sym.imp.endpwent;
0x00001ff8 jalr t9 | t9 ();
0x00001ffc nop |
0x00002000 lw gp, (sp) | gp = *(sp);
0x00002004 lw t9, -0x7df8(gp) | t9 = sym.imp.endgrent;
0x00002008 jalr t9 | t9 ();
0x0000200c nop |
0x00002010 lw gp, 0x20(sp) | gp = *(var_20h);
0x00002014 lw t9, -0x7e6c(gp) | t9 = sym.imp.setgid;
0x00002018 move a0, s3 | a0 = s3;
0x0000201c jalr t9 | t9 ();
0x00002020 lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 != 0) {
0x00002024 beqz v0, 0x2038 |
0x00002028 lw a0, -0x7fd8(gp) | a0 = *((gp - 8182));
0x0000202c lw t9, -0x7e54(gp) | t9 = sym.imp.perror;
0x00002030 addiu a0, a0, 0x6a44 | a0 += str.setgid;
0x00002034 b 0x1de8 | goto label_8;
| }
0x00002038 lw t9, -0x7e48(gp) | t9 = sym.imp.getuid;
0x0000203c jalr t9 | t9 ();
0x00002040 nop |
0x00002044 lw gp, 0x20(sp) | gp = *(var_20h);
0x00002048 lw t9, -0x7ef4(gp) | t9 = sym.imp.setuid;
0x0000204c move a0, v0 | a0 = v0;
0x00002050 jalr t9 | t9 ();
0x00002054 lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 != 0) {
0x00002058 bnez v0, 0x23d4 | goto label_49;
| }
0x0000205c lw v0, 0x38(sp) | v0 = *(var_38h);
| if (v0 == 0) {
0x00002060 beql v0, zero, 0x22c0 | goto label_50;
| }
0x00002064 lw a0, -0x7fd8(gp) | a0 = *((gp - 8182));
0x00002068 lw t9, -0x7e80(gp) | t9 = sym.imp.closelog;
0x0000206c lw s0, -0x7fd8(gp) | s0 = *((gp - 8182));
0x00002070 jalr t9 | t9 ();
0x00002074 nop |
0x00002078 lw gp, 0x20(sp) | gp = *(var_20h);
0x0000207c lw a3, 0x3c(sp) | a3 = *(var_3ch);
0x00002080 addiu a0, s0, 0x6810 | a0 = s0 + str._bin_sh;
0x00002084 lw a2, -0x7fd8(gp) | a2 = *((gp - 8182));
0x00002088 lw a1, -0x7fd8(gp) | a1 = *((gp - 8182));
0x0000208c lw t9, -0x7ec0(gp) | t9 = sym.imp.execl;
0x00002090 addiu a2, a2, 0x6880 | a2 += 0x6880;
0x00002094 addiu a1, a1, 0x6a54 | a1 += 0x6a54;
0x00002098 sw zero, 0x10(sp) | *(var_10h) = 0;
0x0000209c jalr t9 | t9 ();
0x000020a0 lw gp, 0x20(sp) | gp = *(var_20h);
0x000020a4 lw t9, -0x7e54(gp) | t9 = sym.imp.perror;
0x000020a8 addiu a0, s0, 0x6810 | a0 = s0 + str._bin_sh;
0x000020ac jalr t9 | t9 ();
0x000020b0 lw gp, 0x20(sp) | gp = *(var_20h);
0x000020b4 lw t9, -0x7eb0(gp) | t9 = sym.imp.__errno_location;
0x000020b8 jalr t9 | t9 ();
0x000020bc nop |
0x000020c0 lw v0, (v0) | v0 = *(v0);
0x000020c4 lw gp, 0x20(sp) | gp = *(var_20h);
0x000020c8 xori v0, v0, 2 | v0 ^= 2;
| label_15:
0x000020cc addiu a0, zero, 0x7f | a0 = 0x7f;
0x000020d0 addiu v1, zero, 0x7e | v1 = 0x7e;
0x000020d4 lw t9, -0x7e78(gp) | t9 = sym.imp.exit;
| if (v0 == 0) {
0x000020d8 movn a0, v1, v0 | a0 = v1;
| }
0x000020dc jalr t9 | t9 ();
| label_43:
0x000020e0 jalr t9 | t9 ();
0x000020e4 nop |
0x000020e8 lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 == 0) {
0x000020ec beqz v0, 0x1f28 | goto label_9;
| }
| if (s0 == 0) {
0x000020f0 beql s0, zero, 0x1f2c | goto label_10;
| }
0x000020f4 lw a0, -0x7fd8(gp) | a0 = *((gp - 8182));
| label_44:
0x000020f8 lw a0, -0x7fd8(gp) | a0 = *((gp - 8182));
0x000020fc lw t9, -0x7e98(gp) | t9 = sym.imp.getpass;
0x00002100 addiu a0, a0, 0x6918 | a0 += str.Password:_;
0x00002104 jalr t9 | t9 ();
0x00002108 move s0, v0 | s0 = v0;
0x0000210c lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 == 0) {
0x00002110 beqz v0, 0x1e14 | goto label_4;
| }
0x00002114 lw t9, -0x7fa8(gp) | t9 = sym.pw_encrypt;
0x00002118 lw a1, 4(s3) | a1 = *((s3 + 1));
0x0000211c move a0, v0 | a0 = v0;
0x00002120 bal 0x4480 | sym_pw_encrypt ();
0x00002124 lw gp, 0x20(sp) | gp = *(var_20h);
0x00002128 move a0, s0 | a0 = s0;
0x0000212c lw t9, -0x7e90(gp) | t9 = sym.imp.strlen;
0x00002130 move s4, v0 | s4 = v0;
0x00002134 jalr t9 | t9 ();
0x00002138 lw gp, 0x20(sp) | gp = *(var_20h);
0x0000213c move a2, v0 | a2 = v0;
0x00002140 move a1, zero | a1 = 0;
0x00002144 lw t9, -0x7eac(gp) | t9 = sym.imp.memset;
0x00002148 move a0, s0 | a0 = s0;
0x0000214c jalr t9 | t9 ();
0x00002150 lw gp, 0x20(sp) | gp = *(var_20h);
| if (s4 == 0) {
0x00002154 beqz s4, 0x2608 | goto label_51;
| }
0x00002158 lw a1, 4(s3) | a1 = *((s3 + 1));
0x0000215c lb v0, (a1) | v0 = *(a1);
0x00002160 lw t9, -0x7e00(gp) | t9 = sym.imp.strcmp;
| if (v0 == 0) {
0x00002164 beqz v0, 0x2178 | goto label_52;
| }
0x00002168 move a0, s4 | a0 = s4;
0x0000216c jalr t9 | t9 ();
0x00002170 lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 == 0) {
0x00002174 beqz v0, 0x1f28 | goto label_9;
| }
| label_52:
0x00002178 lw v0, (s5) | v0 = *(s5);
0x0000217c lw a2, -0x7fd8(gp) | a2 = *((gp - 8182));
0x00002180 lw t9, -0x7ed8(gp) | t9 = sym.imp.__syslog_chk;
0x00002184 move a3, s6 | a3 = s6;
0x00002188 addiu a2, a2, 0x6998 | a2 += str.Invalid_password_for_group__s_from__s;
0x0000218c addiu a1, zero, 1 | a1 = 1;
0x00002190 addiu a0, zero, 6 | a0 = 6;
0x00002194 sw v0, 0x10(sp) | *(var_10h) = v0;
0x00002198 jalr t9 | t9 ();
0x0000219c lw gp, 0x20(sp) | gp = *(var_20h);
0x000021a0 lw t9, -0x7e30(gp) | t9 = sym.imp.sleep;
0x000021a4 addiu a0, zero, 1 | a0 = 1;
0x000021a8 jalr t9 | t9 ();
0x000021ac lw gp, 0x20(sp) | gp = *(var_20h);
0x000021b0 addiu a2, zero, 0x12 | a2 = 0x12;
0x000021b4 addiu a1, zero, 1 | a1 = 1;
0x000021b8 lw v0, -0x7e14(gp) | v0 = *((gp - 8069));
0x000021bc lw a0, -0x7fd8(gp) | a0 = *((gp - 8182));
0x000021c0 lw t9, -0x7e58(gp) | t9 = sym.imp.fwrite;
0x000021c4 lw a3, (v0) | a3 = *(v0);
0x000021c8 addiu a0, a0, 0x69c4 | a0 += str.Invalid_password._n;
0x000021cc jalr t9 | t9 ();
0x000021d0 lw gp, 0x20(sp) | gp = *(var_20h);
0x000021d4 b 0x1e14 | goto label_4;
| label_46:
0x000021d8 lw t9, -0x7e08(gp) | t9 = sym.imp.getlogin;
0x000021dc jalr t9 | t9 ();
0x000021e0 nop |
0x000021e4 lw gp, 0x20(sp) | gp = *(var_20h);
0x000021e8 move a0, zero | a0 = 0;
0x000021ec lw t9, -0x7e8c(gp) | t9 = sym.imp.ttyname;
0x000021f0 move s0, v0 | s0 = v0;
0x000021f4 jalr t9 | t9 ();
0x000021f8 move s4, v0 | s4 = v0;
0x000021fc lw gp, 0x20(sp) | gp = *(var_20h);
| if (s0 == 0) {
0x00002200 beqz s0, 0x249c | goto label_53;
| }
0x00002204 lw t9, -0x7fa4(gp) | t9 = sym.xstrdup;
0x00002208 move a0, s0 | a0 = s0;
0x0000220c bal 0x4424 | sym_xstrdup ();
0x00002210 move s0, v0 | s0 = v0;
0x00002214 lw gp, 0x20(sp) | gp = *(var_20h);
| if (s4 == 0) {
0x00002218 beqz s4, 0x246c | goto label_54;
| }
0x0000221c lw t9, -0x7fa4(gp) | t9 = sym.xstrdup;
0x00002220 move a0, s4 | a0 = s4;
0x00002224 bal 0x4424 | sym_xstrdup ();
0x00002228 move s4, v0 | s4 = v0;
0x0000222c lw gp, 0x20(sp) | gp = *(var_20h);
0x00002230 move fp, s0 | fp = s0;
| if (s0 == 0) {
0x00002234 beqz s0, 0x2690 | goto label_55;
| }
| label_19:
0x00002238 lw a1, -0x7fd8(gp) | a1 = *((gp - 8182));
| if (s4 == 0) {
0x0000223c beqz s4, 0x2474 | goto label_56;
| }
0x00002240 lw t9, -0x7f0c(gp) | t9 = sym.imp.strncmp;
0x00002244 addiu a2, zero, 5 | a2 = 5;
0x00002248 addiu a1, a1, 0x69e8 | a1 += str._dev_;
0x0000224c move a0, s4 | a0 = s4;
0x00002250 jalr t9 | t9 ();
0x00002254 lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 != 0) {
0x00002258 bnez v0, 0x24b8 | goto label_57;
| }
0x0000225c addiu v0, s4, 5 | v0 = s4 + 5;
| label_16:
0x00002260 lw a2, -0x7fd8(gp) | a2 = *((gp - 8182));
0x00002264 lw t9, -0x7ed8(gp) | t9 = sym.imp.__syslog_chk;
0x00002268 lw a3, 0x30(sp) | a3 = *(var_30h);
0x0000226c addiu a2, a2, 0x69f0 | a2 += str.user__s__login__s_on__s__switched_to_group__s;
0x00002270 addiu a1, zero, 1 | a1 = 1;
0x00002274 sw v0, 0x14(sp) | *(var_14h) = v0;
0x00002278 addiu a0, zero, 6 | a0 = 6;
0x0000227c sw s6, 0x18(sp) | *(var_18h) = s6;
0x00002280 sw fp, 0x10(sp) | *(var_10h) = fp;
0x00002284 jalr t9 | t9 ();
0x00002288 lw gp, 0x20(sp) | gp = *(var_20h);
0x0000228c lw t9, -0x7e18(gp) | t9 = sym.imp.free;
0x00002290 move a0, s0 | a0 = s0;
0x00002294 jalr t9 | t9 ();
0x00002298 lw gp, 0x20(sp) | gp = *(var_20h);
0x0000229c lw t9, -0x7e18(gp) | t9 = sym.imp.free;
0x000022a0 move a0, s4 | a0 = s4;
0x000022a4 jalr t9 | t9 ();
0x000022a8 lw gp, 0x20(sp) | gp = *(var_20h);
0x000022ac b 0x1f40 | goto label_11;
| label_47:
0x000022b0 lw t9, -0x7eb8(gp) | t9 = sym.imp.endspent;
| if (s0 == 0) {
0x000022b4 bnel s0, zero, 0x1fd8 | goto label_12;
| }
0x000022b8 lw t9, -0x7e44(gp) | t9 = sym.imp.sysconf;
0x000022bc b 0x1f80 | goto label_13;
| label_50:
0x000022c0 lw t9, -0x7e60(gp) | t9 = sym.imp.getenv;
0x000022c4 addiu a0, a0, 0x6a58 | a0 += 0x6a58;
0x000022c8 jalr t9 | t9 ();
0x000022cc move s1, v0 | s1 = v0;
0x000022d0 lw v0, 0x2c(sp) | v0 = *(var_2ch);
0x000022d4 lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 == 0) {
0x000022d8 beqz v0, 0x240c | goto label_58;
| }
0x000022dc lw s1, 0x18(s5) | s1 = *((s5 + 6));
| if (s1 != 0) {
0x000022e0 beql s1, zero, 0x22f8 |
0x000022e4 lw s1, -0x7fd8(gp) | s1 = *((gp - 8182));
0x000022e8 lb v0, (s1) | v0 = *(s1);
0x000022ec lw t9, -0x7fd0(gp) | t9 = sym.Basename;
| if (v0 != 0) {
0x000022f0 bnez v0, 0x2558 | goto label_59;
| }
0x000022f4 lw s1, -0x7fd8(gp) | s1 = *((gp - 8182));
| }
0x000022f8 lw t9, -0x7fd0(gp) | t9 = sym.Basename;
0x000022fc addiu a0, s1, 0x6810 | a0 = s1 + str._bin_sh;
0x00002300 bal 0x28f0 | sym_Basename ();
0x00002304 lw gp, 0x20(sp) | gp = *(var_20h);
0x00002308 addiu s1, s1, 0x6810 | s1 += str._bin_sh;
| label_20:
0x0000230c lw t9, -0x7e34(gp) | t9 = sym.imp.chdir;
0x00002310 lw a0, 0x14(s5) | a0 = *((s5 + 5));
0x00002314 jalr t9 | t9 ();
0x00002318 lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 != 0) {
0x0000231c bnez v0, 0x25f0 | goto label_60;
| }
| label_23:
0x00002320 lw s2, -0x7fd8(gp) | s2 = *((gp - 8182));
0x00002324 lw s3, -0x7fd8(gp) | s3 = *((gp - 8182));
0x00002328 lw s4, -0x7fd8(gp) | s4 = *((gp - 8182));
0x0000232c lw s5, -0x7fd8(gp) | s5 = *((gp - 8182));
0x00002330 addiu s2, s2, 0x6a68 | s2 += str.PATH;
0x00002334 addiu s3, s3, 0x6a70 | s3 += str.HOME;
0x00002338 addiu s4, s4, 0x6a78 | s4 += str.SHELL;
0x0000233c addiu s5, s5, 0x6a80 | s5 += str.TERM;
| do {
0x00002340 lw s0, (s7) | s0 = *(s7);
0x00002344 lw t9, -0x7f0c(gp) | t9 = sym.imp.strncmp;
| if (s0 == 0) {
0x00002348 beqz s0, 0x2448 | goto label_61;
| }
0x0000234c addiu a2, zero, 5 | a2 = 5;
0x00002350 move a1, s2 | a1 = s2;
0x00002354 move a0, s0 | a0 = s0;
0x00002358 jalr t9 | t9 ();
0x0000235c lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 != 0) {
0x00002360 beqz v0, 0x23b8 |
0x00002364 lw t9, -0x7f0c(gp) | t9 = sym.imp.strncmp;
0x00002368 addiu a2, zero, 5 | a2 = 5;
0x0000236c move a1, s3 | a1 = s3;
0x00002370 move a0, s0 | a0 = s0;
0x00002374 jalr t9 | t9 ();
0x00002378 lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 == 0) {
0x0000237c beqz v0, 0x23b8 | goto label_62;
| }
0x00002380 lw t9, -0x7f0c(gp) | t9 = sym.imp.strncmp;
0x00002384 addiu a2, zero, 6 | a2 = 6;
0x00002388 move a1, s4 | a1 = s4;
0x0000238c move a0, s0 | a0 = s0;
0x00002390 jalr t9 | t9 ();
0x00002394 lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 == 0) {
0x00002398 beqz v0, 0x23b8 | goto label_62;
| }
0x0000239c lw t9, -0x7f0c(gp) | t9 = sym.imp.strncmp;
0x000023a0 addiu a2, zero, 5 | a2 = 5;
0x000023a4 move a1, s5 | a1 = s5;
0x000023a8 move a0, s0 | a0 = s0;
0x000023ac jalr t9 | t9 ();
0x000023b0 lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 != 0) {
0x000023b4 bnez v0, 0x23cc | goto label_63;
| }
| }
| label_62:
0x000023b8 lw t9, -0x7fa0(gp) | t9 = sym.addenv;
0x000023bc move a1, zero | a1 = 0;
0x000023c0 move a0, s0 | a0 = s0;
0x000023c4 bal 0x2990 | sym_addenv ();
0x000023c8 lw gp, 0x20(sp) | gp = *(var_20h);
| label_63:
0x000023cc addiu s7, s7, 4 | s7 += 4;
0x000023d0 b 0x2340 |
| } while (1);
| label_49:
0x000023d4 lw a0, -0x7fd8(gp) | a0 = *((gp - 8182));
0x000023d8 lw t9, -0x7e54(gp) | t9 = sym.imp.perror;
0x000023dc addiu a0, a0, 0x6a4c | a0 += str.setuid;
0x000023e0 b 0x1de8 | goto label_8;
| label_48:
0x000023e4 lw v0, -0x7e14(gp) | v0 = *((gp - 8069));
0x000023e8 lw a0, -0x7fd8(gp) | a0 = *((gp - 8182));
0x000023ec lw t9, -0x7e58(gp) | t9 = sym.imp.fwrite;
0x000023f0 lw a3, (v0) | a3 = *(v0);
0x000023f4 addiu a2, zero, 0x10 | a2 = 0x10;
0x000023f8 addiu a1, zero, 1 | a1 = 1;
0x000023fc addiu a0, a0, 0x6a24 | a0 += str.too_many_groups_n;
0x00002400 jalr t9 | t9 ();
0x00002404 lw gp, 0x20(sp) | gp = *(var_20h);
0x00002408 b 0x1fd4 | goto label_14;
| if (s1 == 0) {
| label_58:
0x0000240c beql s1, zero, 0x2568 | goto label_64;
| }
0x00002410 lw s1, 0x18(s5) | s1 = *((s5 + 6));
0x00002414 lw t9, -0x7fd0(gp) | t9 = sym.Basename;
| label_21:
0x00002418 move a0, s1 | a0 = s1;
0x0000241c bal 0x28f0 | sym_Basename ();
0x00002420 move s0, v0 | s0 = v0;
0x00002424 lw gp, 0x20(sp) | gp = *(var_20h);
0x00002428 b 0x243c |
| while (a0 != 0) {
0x0000242c move a1, zero | a1 = 0;
0x00002430 bal 0x2990 | sym_addenv ();
0x00002434 lw gp, 0x20(sp) | gp = *(var_20h);
0x00002438 addiu s7, s7, 4 | s7 += 4;
| label_22:
0x0000243c lw a0, (s7) | a0 = *(s7);
0x00002440 lw t9, -0x7fa0(gp) | t9 = sym.addenv;
0x00002444 bnez a0, 0x242c |
| }
| label_61:
0x00002448 lw v0, -0x7f9c(gp) | v0 = *(gp);
0x0000244c lw t9, -0x7f98(gp) | t9 = sym.shell;
0x00002450 move a0, s1 | a0 = s1;
0x00002454 lw a2, (v0) | a2 = *(v0);
0x00002458 move a1, s0 | a1 = s0;
0x0000245c bal 0x3730 | sym_shell ();
0x00002460 xori v0, v0, 2 | v0 ^= 2;
0x00002464 lw gp, 0x20(sp) | gp = *(var_20h);
0x00002468 b 0x20cc | goto label_15;
| label_54:
0x0000246c move fp, v0 | fp = v0;
| if (v0 == 0) {
0x00002470 beqz v0, 0x267c | goto label_65;
| }
| label_56:
0x00002474 lw v0, -0x7fd8(gp) | v0 = *((gp - 8182));
0x00002478 addiu v0, v0, 0x680c | v0 += 0x680c;
0x0000247c b 0x2260 | goto label_16;
| label_42:
0x00002480 lw a1, (s5) | a1 = *(s5);
0x00002484 lw a0, 0xc(s3) | a0 = *((s3 + 3));
0x00002488 bal 0x347c | sym_is_on_list ();
0x0000248c xori v0, v0, 1 | v0 ^= 1;
0x00002490 lw gp, 0x20(sp) | gp = *(var_20h);
0x00002494 andi s0, v0, 0xff | s0 = v0 & 0xff;
0x00002498 b 0x1d88 | goto label_17;
| label_53:
0x0000249c lw t9, -0x7fa4(gp) | t9 = sym.xstrdup;
| if (v0 != 0) {
0x000024a0 bnez v0, 0x253c | goto label_66;
| }
0x000024a4 lw fp, -0x7fd8(gp) | fp = *((gp - 8182));
0x000024a8 move s0, v0 | s0 = v0;
0x000024ac addiu fp, fp, 0x680c | fp += 0x680c;
0x000024b0 move v0, fp | v0 = fp;
0x000024b4 b 0x2260 | goto label_16;
| label_57:
0x000024b8 move v0, s4 | v0 = s4;
0x000024bc b 0x2260 | goto label_16;
| label_37:
0x000024c0 lw v0, 0x34(sp) | v0 = *(var_34h);
0x000024c4 lw a2, -0x7fd8(gp) | a2 = *((gp - 8182));
0x000024c8 lw t9, -0x7f04(gp) | t9 = sym.imp.__fprintf_chk
0x000024cc lw a3, (v0) | a3 = *(v0);
0x000024d0 lw v0, -0x7e14(gp) | v0 = *((gp - 8069));
0x000024d4 addiu a2, a2, 0x68cc | a2 += str._s:_group__s_does_not_exist_n;
0x000024d8 addiu a1, zero, 1 | a1 = 1;
0x000024dc lw a0, (v0) | a0 = *(v0);
0x000024e0 sw s6, 0x10(sp) | *(var_10h) = s6;
0x000024e4 jalr t9 | t9 ();
0x000024e8 lw gp, 0x20(sp) | gp = *(var_20h);
0x000024ec b 0x1e14 | goto label_4;
| label_41:
0x000024f0 lw t9, -0x7df8(gp) | t9 = sym.imp.endgrent;
0x000024f4 jalr t9 | t9 ();
0x000024f8 nop |
0x000024fc lw gp, 0x20(sp) | gp = *(var_20h);
0x00002500 lw t9, -0x7f94(gp) | t9 = sym.xgetgrnam;
0x00002504 move a0, s6 | a0 = s6;
0x00002508 bal 0x3d20 | sym_xgetgrnam ();
0x0000250c move s3, v0 | s3 = v0;
0x00002510 lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 != 0) {
0x00002514 bnez v0, 0x1d50 | goto label_18;
| }
0x00002518 lw a3, -0x7fd8(gp) | a3 = *((gp - 8182));
0x0000251c lw a1, -0x7fd8(gp) | a1 = *((gp - 8182));
0x00002520 lw a0, -0x7fd8(gp) | a0 = *((gp - 8182));
0x00002524 lw t9, -0x7f24(gp) | t9 = sym.imp.__assert_fail;
0x00002528 addiu a3, a3, 0x6a90 | a3 += str.main;
0x0000252c addiu a2, zero, 0x299 | a2 = 0x299;
0x00002530 addiu a1, a1, 0x68ec | a1 += str..._.._shadow_4.6_src_newgrp.c;
0x00002534 addiu a0, a0, 0x690c | a0 += str.NULL___grp;
0x00002538 jalr t9 | t9 ();
| label_66:
0x0000253c move a0, s4 | a0 = s4;
0x00002540 bal 0x4424 | sym_xstrdup ();
0x00002544 lw gp, 0x20(sp) | gp = *(var_20h);
0x00002548 move s4, v0 | s4 = v0;
0x0000254c lw fp, -0x7fd8(gp) | fp = *((gp - 8182));
0x00002550 addiu fp, fp, 0x680c | fp += 0x680c;
0x00002554 b 0x2238 | goto label_19;
| label_59:
0x00002558 move a0, s1 | a0 = s1;
0x0000255c bal 0x28f0 | sym_Basename ();
0x00002560 lw gp, 0x20(sp) | gp = *(var_20h);
0x00002564 b 0x230c | goto label_20;
| if (s1 == 0) {
| label_64:
0x00002568 beql s1, zero, 0x2580 | goto label_67;
| }
0x0000256c lw s1, -0x7fd8(gp) | s1 = *((gp - 8182));
0x00002570 lb v0, (s1) | v0 = *(s1);
0x00002574 lw t9, -0x7fd0(gp) | t9 = sym.Basename;
| if (v0 != 0) {
0x00002578 bnez v0, 0x2418 | goto label_21;
| }
0x0000257c lw s1, -0x7fd8(gp) | s1 = *((gp - 8182));
| label_67:
0x00002580 lw t9, -0x7fd0(gp) | t9 = sym.Basename;
0x00002584 addiu a0, s1, 0x6810 | a0 = s1 + str._bin_sh;
0x00002588 bal 0x28f0 | sym_Basename ();
0x0000258c move s0, v0 | s0 = v0;
0x00002590 lw gp, 0x20(sp) | gp = *(var_20h);
0x00002594 addiu s1, s1, 0x6810 | s1 += str._bin_sh;
0x00002598 b 0x243c | goto label_22;
| label_45:
0x0000259c lw v1, 0x34(sp) | v1 = *(var_34h);
0x000025a0 lw a2, -0x7fd8(gp) | a2 = *((gp - 8182));
0x000025a4 lw v0, 0xc(s5) | v0 = *((s5 + 3));
0x000025a8 lw a3, (v1) | a3 = *(v1);
0x000025ac lw v1, -0x7e14(gp) | v1 = *((gp - 8069));
0x000025b0 lw t9, -0x7f04(gp) | t9 = sym.imp.__fprintf_chk
0x000025b4 addiu a2, a2, 0x6884 | a2 += str._s:_GID__lu_does_not_exist_n;
0x000025b8 lw a0, (v1) | a0 = *(v1);
0x000025bc addiu a1, zero, 1 | a1 = 1;
0x000025c0 sw v0, 0x10(sp) | *(var_10h) = v0;
0x000025c4 jalr t9 | t9 ();
0x000025c8 lw gp, 0x20(sp) | gp = *(var_20h);
0x000025cc lw a3, 0xc(s5) | a3 = *((s5 + 3));
0x000025d0 addiu a1, zero, 1 | a1 = 1;
0x000025d4 lw a2, -0x7fd8(gp) | a2 = *((gp - 8182));
0x000025d8 lw t9, -0x7ed8(gp) | t9 = sym.imp.__syslog_chk;
0x000025dc addiu a2, a2, 0x68a4 | a2 += str.GID__lu_does_not_exist;
0x000025e0 addiu a0, zero, 2 | a0 = 2;
0x000025e4 jalr t9 | t9 ();
0x000025e8 lw gp, 0x20(sp) | gp = *(var_20h);
0x000025ec b 0x1e14 | goto label_4;
| label_60:
0x000025f0 lw a0, -0x7fd8(gp) | a0 = *((gp - 8182));
0x000025f4 lw t9, -0x7e54(gp) | t9 = sym.imp.perror;
0x000025f8 addiu a0, a0, 0x6a60 | a0 += str.chdir;
0x000025fc jalr t9 | t9 ();
0x00002600 lw gp, 0x20(sp) | gp = *(var_20h);
0x00002604 b 0x2320 | goto label_23;
| label_51:
0x00002608 lw v0, 0x34(sp) | v0 = *(var_34h);
0x0000260c lw t9, -0x7eb0(gp) | t9 = sym.imp.__errno_location;
0x00002610 lw s1, (v0) | s1 = *(v0);
0x00002614 lw v0, -0x7e14(gp) | v0 = *((gp - 8069));
0x00002618 lw s0, (v0) | s0 = *(v0);
0x0000261c jalr t9 | t9 ();
0x00002620 lw gp, 0x20(sp) | gp = *(var_20h);
0x00002624 lw t9, -0x7e70(gp) | t9 = sym.imp.strerror;
0x00002628 lw a0, (v0) | a0 = *(v0);
0x0000262c jalr t9 | t9 ();
0x00002630 lw gp, 0x20(sp) | gp = *(var_20h);
0x00002634 move a3, s1 | a3 = s1;
0x00002638 addiu a1, zero, 1 | a1 = 1;
0x0000263c lw a2, -0x7fd8(gp) | a2 = *((gp - 8182));
0x00002640 lw t9, -0x7f04(gp) | t9 = sym.imp.__fprintf_chk
0x00002644 addiu a2, a2, 0x6924 | a2 += str._s:_failed_to_crypt_password_with_previous_salt:__s_n;
0x00002648 move a0, s0 | a0 = s0;
0x0000264c sw v0, 0x10(sp) | *(var_10h) = v0;
0x00002650 jalr t9 | t9 ();
0x00002654 lw gp, 0x20(sp) | gp = *(var_20h);
0x00002658 move a3, s6 | a3 = s6;
0x0000265c addiu a1, zero, 1 | a1 = 1;
0x00002660 lw a2, -0x7fd8(gp) | a2 = *((gp - 8182));
0x00002664 lw t9, -0x7ed8(gp) | t9 = sym.imp.__syslog_chk;
0x00002668 addiu a2, a2, 0x695c | a2 += str.Failed_to_crypt_password_with_previous_salt_of_group__s;
0x0000266c addiu a0, zero, 6 | a0 = 6;
0x00002670 jalr t9 | t9 ();
0x00002674 lw gp, 0x20(sp) | gp = *(var_20h);
0x00002678 b 0x1e14 | goto label_4;
| label_65:
0x0000267c lw fp, -0x7fd8(gp) | fp = *((gp - 8182));
0x00002680 move s4, v0 | s4 = v0;
0x00002684 addiu fp, fp, 0x680c | fp += 0x680c;
0x00002688 move v0, fp | v0 = fp;
0x0000268c b 0x2260 | goto label_16;
| label_55:
0x00002690 lw fp, -0x7fd8(gp) | fp = *((gp - 8182));
0x00002694 addiu fp, fp, 0x680c | fp += 0x680c;
0x00002698 b 0x2238 | goto label_19;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/newgrp.shadow @ 0x4480 */
| #include <stdint.h>
|
; (fcn) sym.pw_encrypt () | void pw_encrypt () {
0x00004480 lui gp, 2 |
0x00004484 addiu gp, gp, -0x41b0 |
0x00004488 addu gp, gp, t9 | gp += t9;
0x0000448c addiu sp, sp, -0x28 |
0x00004490 lw t9, -0x7ee4(gp) | t9 = sym.imp.crypt;
0x00004494 sw gp, 0x10(sp) | *(var_10h) = gp;
0x00004498 sw s1, 0x20(sp) | *(var_20h) = s1;
0x0000449c sw s0, 0x1c(sp) | *(var_1ch) = s0;
0x000044a0 sw ra, 0x24(sp) | *(var_24h) = ra;
0x000044a4 move s1, a1 | s1 = a1;
0x000044a8 jalr t9 | t9 ();
0x000044ac move s0, v0 | s0 = v0;
0x000044b0 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 != 0) {
0x000044b4 beqz v0, 0x44e0 |
0x000044b8 lw t9, -0x7e90(gp) | t9 = sym.imp.strlen;
0x000044bc move a0, v0 | a0 = v0;
0x000044c0 jalr t9 | t9 ();
0x000044c4 lb a0, (s1) | a0 = *(s1);
0x000044c8 addiu v1, zero, 0x24 | v1 = 0x24;
0x000044cc lw gp, 0x10(sp) | gp = *(var_10h);
| if (a0 == v1) {
0x000044d0 beq a0, v1, 0x454c | goto label_1;
| }
0x000044d4 addiu v1, zero, 0xd | v1 = 0xd;
| if (v0 == v1) {
0x000044d8 beql v0, v1, 0x44f8 | goto label_2;
| }
0x000044dc lwl a1, 3(s0) | __asm ("lwl a1, 3(s0)");
| }
0x000044e0 lw ra, 0x24(sp) | ra = *(var_24h);
| do {
0x000044e4 move v0, s0 | v0 = s0;
0x000044e8 lw s1, 0x20(sp) | s1 = *(var_20h);
0x000044ec lw s0, 0x1c(sp) | s0 = *(var_1ch);
0x000044f0 addiu sp, sp, 0x28 |
0x000044f4 jr ra | return v0;
| label_2:
0x000044f8 lwl a0, 7(s0) | __asm ("lwl a0, 7(s0)");
0x000044fc lwl v1, 0xb(s0) | __asm ("lwl v1, 0xb(s0)");
0x00004500 lw a2, -0x7fdc(gp) | a2 = *((gp - 8183));
0x00004504 lwr a1, (s0) | __asm ("lwr a1, (s0)");
0x00004508 lwr v1, 8(s0) | __asm ("lwr v1, 8(s0)");
0x0000450c lwr a0, 4(s0) | __asm ("lwr a0, 4(s0)");
0x00004510 addiu v0, a2, -0x7ae0 | v0 = a2 + -0x7ae0;
0x00004514 sw a1, -0x7ae0(a2) | *((a2 - 7864)) = a1;
0x00004518 sw a0, 4(v0) | *((v0 + 1)) = a0;
0x0000451c sw v1, 8(v0) | *((v0 + 2)) = v1;
0x00004520 lbu v1, 0xc(s0) | v1 = *((s0 + 12));
0x00004524 sb v1, 0xc(v0) | *((v0 + 12)) = v1;
0x00004528 lbu v1, 0xd(s0) | v1 = *((s0 + 13));
0x0000452c move s0, v0 | s0 = v0;
0x00004530 sb v1, 0xd(v0) | *((v0 + 13)) = v1;
0x00004534 lw ra, 0x24(sp) | ra = *(var_24h);
0x00004538 move v0, s0 | v0 = s0;
0x0000453c lw s1, 0x20(sp) | s1 = *(var_20h);
0x00004540 lw s0, 0x1c(sp) | s0 = *(var_1ch);
0x00004544 addiu sp, sp, 0x28 |
0x00004548 jr ra | return v0;
| label_1:
0x0000454c sltiu v0, v0, 0xe | v0 = (v0 < 0xe) ? 1 : 0;
0x00004550 lw ra, 0x24(sp) | ra = *(var_24h);
0x00004554 beqz v0, 0x44e4 |
| } while (v0 == 0);
0x00004558 lb v1, 1(s1) | v1 = *((s1 + 1));
0x0000455c addiu v0, zero, 0x35 | v0 = 0x35;
0x00004560 addiu v0, zero, 0x36 | v0 = 0x36;
| if (v1 == v0) {
0x00004564 beq v1, v0, 0x45b0 | goto label_3;
| }
0x00004568 addiu v0, zero, 0x31 | v0 = 0x31;
| if (v1 == v0) {
0x0000456c beq v1, v0, 0x45c8 | goto label_4;
| }
0x00004570 lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
| if (v1 == v0) {
0x00004574 beq v1, v0, 0x45bc | goto label_5;
| }
| /* esilref: '$x$' */
0x00004578 addiu v0, v0, -0x7fa0 | v0 += -0x7fa0;
0x0000457c move a3, v0 | a3 = v0;
0x00004580 sb v1, 1(v0) | *((v0 + 1)) = v1;
| do {
| label_0:
0x00004584 lw v0, -0x7e14(gp) | v0 = *((gp - 8069));
0x00004588 lw a2, -0x7fd8(gp) | a2 = *((gp - 8182));
0x0000458c lw t9, -0x7f04(gp) | t9 = sym.imp.__fprintf_chk
0x00004590 lw a0, (v0) | a0 = *(v0);
0x00004594 addiu a2, a2, 0x6cd0 | a2 += str.crypt_method_not_supported_by_libcrypt____s__n;
0x00004598 addiu a1, zero, 1 | a1 = 1;
0x0000459c jalr t9 | t9 ();
0x000045a0 lw gp, 0x10(sp) | gp = *(var_10h);
0x000045a4 lw t9, -0x7e78(gp) | t9 = sym.imp.exit;
0x000045a8 addiu a0, zero, 1 | a0 = 1;
0x000045ac jalr t9 | t9 ();
| label_3:
0x000045b0 lw a3, -0x7fd8(gp) | a3 = *((gp - 8182));
0x000045b4 addiu a3, a3, 0x6cc8 | a3 += str.SHA256;
0x000045b8 b 0x4584 |
| } while (1);
| label_5:
0x000045bc lw a3, -0x7fd8(gp) | a3 = *((gp - 8182));
0x000045c0 addiu a3, a3, 0x6cbc | a3 += 0x6cbc;
0x000045c4 b 0x4584 | goto label_0;
| label_4:
0x000045c8 lw a3, -0x7fd8(gp) | a3 = *((gp - 8182));
0x000045cc addiu a3, a3, 0x6cc0 | a3 += str.SHA512;
0x000045d0 b 0x4584 | goto label_0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/newgrp.shadow @ 0x3f40 */
| #include <stdint.h>
|
; (fcn) sym.xgetgrgid () | void xgetgrgid () {
0x00003f40 lui gp, 2 |
0x00003f44 addiu gp, gp, -0x3c70 |
0x00003f48 addu gp, gp, t9 | gp += t9;
0x00003f4c lw v0, -0x7e24(gp) | v0 = *((gp - 8073));
0x00003f50 addiu sp, sp, -0x58 |
0x00003f54 lw t9, -0x7e68(gp) | t9 = sym.imp.malloc;
0x00003f58 sw v0, 0x20(sp) | *(var_20h_2) = v0;
0x00003f5c lw v0, (v0) | v0 = *(v0);
0x00003f60 sw gp, 0x18(sp) | *(var_18h_2) = gp;
0x00003f64 sw s4, 0x40(sp) | *(var_40h_2) = s4;
0x00003f68 sw ra, 0x54(sp) | *(var_54h_2) = ra;
0x00003f6c sw fp, 0x50(sp) | *(var_50h_2) = fp;
0x00003f70 sw s7, 0x4c(sp) | *(var_4ch_2) = s7;
0x00003f74 sw s6, 0x48(sp) | *(var_48h_2) = s6;
0x00003f78 sw s5, 0x44(sp) | *(var_44h_2) = s5;
0x00003f7c sw s3, 0x3c(sp) | *(var_3ch_2) = s3;
0x00003f80 sw s2, 0x38(sp) | *(var_38h_2) = s2;
0x00003f84 sw s1, 0x34(sp) | *(var_34h_2) = s1;
0x00003f88 sw s0, 0x30(sp) | *(var_30h_2) = s0;
0x00003f8c move s4, a0 | s4 = a0;
0x00003f90 sw v0, 0x2c(sp) | *(var_2ch_2) = v0;
0x00003f94 addiu a0, zero, 0x10 | a0 = 0x10;
0x00003f98 jalr t9 | t9 ();
0x00003f9c lw gp, 0x18(sp) | gp = *(var_18h_2);
| if (v0 == 0) {
0x00003fa0 beqz v0, 0x4120 | goto label_2;
| }
0x00003fa4 move s2, v0 | s2 = v0;
0x00003fa8 addiu s0, zero, 0x100 | s0 = 0x100;
0x00003fac move s1, zero | s1 = 0;
0x00003fb0 addiu s3, sp, 0x28 | s3 = sp + 0x28;
0x00003fb4 addiu s5, zero, 0x22 | s5 = 0x22;
0x00003fb8 lui s6, 0x4000 | s6 = 0x40000000;
0x00003fbc addiu s7, zero, -1 | s7 = -1;
| do {
0x00003fc0 lw t9, -0x7e64(gp) | t9 = sym.imp.realloc;
| label_0:
0x00003fc4 move a0, s1 | a0 = s1;
0x00003fc8 move a1, s0 | a1 = s0;
0x00003fcc sw zero, 0x28(sp) | *(var_28h_3) = 0;
0x00003fd0 jalr t9 | t9 ();
0x00003fd4 move s1, v0 | s1 = v0;
0x00003fd8 lw gp, 0x18(sp) | gp = *(var_18h_2);
| if (v0 == 0) {
0x00003fdc beqz v0, 0x4120 | goto label_2;
| }
0x00003fe0 lw t9, -0x7eb0(gp) | t9 = sym.imp.__errno_location;
0x00003fe4 jalr t9 | t9 ();
0x00003fe8 nop |
0x00003fec lw gp, 0x18(sp) | gp = *(var_18h_2);
0x00003ff0 sw zero, (v0) | *(v0) = 0;
0x00003ff4 move a3, s0 | a3 = s0;
0x00003ff8 lw t9, -0x7ec4(gp) | t9 = sym.imp.getgrgid_r;
0x00003ffc sw s3, 0x10(sp) | *(var_10h_4) = s3;
0x00004000 move a2, s1 | a2 = s1;
0x00004004 move a1, s2 | a1 = s2;
0x00004008 move a0, s4 | a0 = s4;
0x0000400c move fp, v0 | fp = v0;
0x00004010 jalr t9 | t9 ();
0x00004014 lw gp, 0x18(sp) | gp = *(var_18h_2);
| if (v0 == 0) {
0x00004018 bnez v0, 0x4028 |
0x0000401c lw v0, 0x28(sp) | v0 = *(var_28h_3);
0x00004020 lw t9, -0x7f78(gp) | t9 = sym.__gr_dup;
| if (v0 == s2) {
0x00004024 beq v0, s2, 0x40b8 | goto label_3;
| }
| }
0x00004028 lw v0, (fp) | v0 = *(fp);
0x0000402c sltu v0, s0, s6 | v0 = (s0 < s6) ? 1 : 0;
| if (v0 != s5) {
0x00004030 bne v0, s5, 0x4054 | goto label_4;
| }
| if (v0 == 0) {
0x00004034 beqz v0, 0x4044 | goto label_5;
| }
0x00004038 nop |
0x0000403c sll s0, s0, 2 | s0 <<= 2;
0x00004040 b 0x3fc0 |
| } while (1);
| label_5:
0x00004044 addiu s0, zero, -1 | s0 = -1;
| if (s0 == s7) {
0x00004048 beq s0, s7, 0x40f0 | goto label_6;
| }
0x0000404c lw t9, -0x7e64(gp) | t9 = sym.imp.realloc;
0x00004050 b 0x3fc4 | goto label_0;
| label_4:
0x00004054 lw t9, -0x7e18(gp) | t9 = sym.imp.free;
0x00004058 move a0, s1 | a0 = s1;
0x0000405c jalr t9 | t9 ();
0x00004060 lw gp, 0x18(sp) | gp = *(var_18h_2);
0x00004064 lw t9, -0x7e18(gp) | t9 = sym.imp.free;
0x00004068 move a0, s2 | a0 = s2;
0x0000406c jalr t9 | t9 ();
0x00004070 lw gp, 0x18(sp) | gp = *(var_18h_2);
0x00004074 move v0, zero | v0 = 0;
| do {
| label_1:
0x00004078 lw v1, 0x20(sp) | v1 = *(var_20h_2);
0x0000407c lw a0, 0x2c(sp) | a0 = *(var_2ch_2);
0x00004080 lw v1, (v1) | v1 = *(v1);
0x00004084 lw ra, 0x54(sp) | ra = *(var_54h_2);
| if (a0 != v1) {
0x00004088 bne a0, v1, 0x4154 | goto label_7;
| }
0x0000408c lw fp, 0x50(sp) | fp = *(var_50h_2);
0x00004090 lw s7, 0x4c(sp) | s7 = *(var_4ch_2);
0x00004094 lw s6, 0x48(sp) | s6 = *(var_48h_2);
0x00004098 lw s5, 0x44(sp) | s5 = *(var_44h_2);
0x0000409c lw s4, 0x40(sp) | s4 = *(var_40h_2);
0x000040a0 lw s3, 0x3c(sp) | s3 = *(var_3ch_2);
0x000040a4 lw s2, 0x38(sp) | s2 = *(var_38h_2);
0x000040a8 lw s1, 0x34(sp) | s1 = *(var_34h_2);
0x000040ac lw s0, 0x30(sp) | s0 = *(var_30h_2);
0x000040b0 addiu sp, sp, 0x58 |
0x000040b4 jr ra | return v0;
| label_3:
0x000040b8 move a0, s2 | a0 = s2;
0x000040bc bal 0x52dc | sym_gr_dup ();
0x000040c0 lw gp, 0x18(sp) | gp = *(var_18h_2);
0x000040c4 sw v0, 0x24(sp) | *(var_24h_3) = v0;
0x000040c8 lw t9, -0x7e18(gp) | t9 = sym.imp.free;
0x000040cc move a0, s1 | a0 = s1;
0x000040d0 jalr t9 | t9 ();
0x000040d4 lw gp, 0x18(sp) | gp = *(var_18h_2);
0x000040d8 lw t9, -0x7e18(gp) | t9 = sym.imp.free;
0x000040dc move a0, s2 | a0 = s2;
0x000040e0 jalr t9 | t9 ();
0x000040e4 lw gp, 0x18(sp) | gp = *(var_18h_2);
0x000040e8 lw v0, 0x24(sp) | v0 = *(var_24h_3);
0x000040ec b 0x4078 |
| } while (1);
| label_6:
0x000040f0 lw t9, -0x7e18(gp) | t9 = sym.imp.free;
0x000040f4 move a0, s1 | a0 = s1;
0x000040f8 jalr t9 | t9 ();
0x000040fc lw gp, 0x18(sp) | gp = *(var_18h_2);
0x00004100 move v0, zero | v0 = 0;
0x00004104 sw v0, 0x24(sp) | *(var_24h_3) = v0;
0x00004108 lw t9, -0x7e18(gp) | t9 = sym.imp.free;
0x0000410c move a0, s2 | a0 = s2;
0x00004110 jalr t9 | t9 ();
0x00004114 lw gp, 0x18(sp) | gp = *(var_18h_2);
0x00004118 lw v0, 0x24(sp) | v0 = *(var_24h_3);
0x0000411c b 0x4078 | goto label_1;
| label_2:
0x00004120 lw v0, -0x7e14(gp) | v0 = *((gp - 8069));
0x00004124 lw a3, -0x7fd8(gp) | a3 = *((gp - 8182));
0x00004128 lw a2, -0x7fd8(gp) | a2 = *((gp - 8182));
0x0000412c lw t9, -0x7f04(gp) | t9 = sym.imp.__fprintf_chk
0x00004130 lw a0, (v0) | a0 = *(v0);
0x00004134 addiu a3, a3, 0x6c80 | a3 += str.xgetgrgid;
0x00004138 addiu a2, a2, 0x6c54 | a2 += str._s:_out_of_memory_n;
0x0000413c addiu a1, zero, 1 | a1 = 1;
0x00004140 jalr t9 | t9 ();
0x00004144 lw gp, 0x18(sp) | gp = *(var_18h_2);
0x00004148 lw t9, -0x7e78(gp) | t9 = sym.imp.exit;
0x0000414c addiu a0, zero, 0xd | a0 = 0xd;
0x00004150 jalr t9 | t9 ();
| label_7:
0x00004154 lw t9, -0x7e3c(gp) | t9 = sym.imp.__stack_chk_fail;
0x00004158 jalr t9 | t9 ();
0x0000415c nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/newgrp.shadow @ 0x3d20 */
| #include <stdint.h>
|
; (fcn) sym.xgetgrnam () | void xgetgrnam () {
0x00003d20 lui gp, 2 |
0x00003d24 addiu gp, gp, -0x3a50 |
0x00003d28 addu gp, gp, t9 | gp += t9;
0x00003d2c lw v0, -0x7e24(gp) | v0 = *((gp - 8073));
0x00003d30 addiu sp, sp, -0x58 |
0x00003d34 lw t9, -0x7e68(gp) | t9 = sym.imp.malloc;
0x00003d38 sw v0, 0x20(sp) | *(var_20h) = v0;
0x00003d3c lw v0, (v0) | v0 = *(v0);
0x00003d40 sw gp, 0x18(sp) | *(var_18h) = gp;
0x00003d44 sw s4, 0x40(sp) | *(var_40h) = s4;
0x00003d48 sw ra, 0x54(sp) | *(var_54h) = ra;
0x00003d4c sw fp, 0x50(sp) | *(var_50h) = fp;
0x00003d50 sw s7, 0x4c(sp) | *(var_4ch) = s7;
0x00003d54 sw s6, 0x48(sp) | *(var_48h) = s6;
0x00003d58 sw s5, 0x44(sp) | *(var_44h) = s5;
0x00003d5c sw s3, 0x3c(sp) | *(var_3ch) = s3;
0x00003d60 sw s2, 0x38(sp) | *(var_38h) = s2;
0x00003d64 sw s1, 0x34(sp) | *(var_34h) = s1;
0x00003d68 sw s0, 0x30(sp) | *(var_30h) = s0;
0x00003d6c move s4, a0 | s4 = a0;
0x00003d70 sw v0, 0x2c(sp) | *(var_2ch) = v0;
0x00003d74 addiu a0, zero, 0x10 | a0 = 0x10;
0x00003d78 jalr t9 | t9 ();
0x00003d7c lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00003d80 beqz v0, 0x3f00 | goto label_2;
| }
0x00003d84 move s2, v0 | s2 = v0;
0x00003d88 addiu s0, zero, 0x100 | s0 = 0x100;
0x00003d8c move s1, zero | s1 = 0;
0x00003d90 addiu s3, sp, 0x28 | s3 = sp + 0x28;
0x00003d94 addiu s5, zero, 0x22 | s5 = 0x22;
0x00003d98 lui s6, 0x4000 | s6 = 0x40000000;
0x00003d9c addiu s7, zero, -1 | s7 = -1;
| do {
0x00003da0 lw t9, -0x7e64(gp) | t9 = sym.imp.realloc;
| label_0:
0x00003da4 move a0, s1 | a0 = s1;
0x00003da8 move a1, s0 | a1 = s0;
0x00003dac sw zero, 0x28(sp) | *(var_28h_4) = 0;
0x00003db0 jalr t9 | t9 ();
0x00003db4 move s1, v0 | s1 = v0;
0x00003db8 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00003dbc beqz v0, 0x3f00 | goto label_2;
| }
0x00003dc0 lw t9, -0x7eb0(gp) | t9 = sym.imp.__errno_location;
0x00003dc4 jalr t9 | t9 ();
0x00003dc8 nop |
0x00003dcc lw gp, 0x18(sp) | gp = *(var_18h);
0x00003dd0 sw zero, (v0) | *(v0) = 0;
0x00003dd4 move a3, s0 | a3 = s0;
0x00003dd8 lw t9, -0x7ea4(gp) | t9 = sym.imp.getgrnam_r;
0x00003ddc sw s3, 0x10(sp) | *(var_10h_5) = s3;
0x00003de0 move a2, s1 | a2 = s1;
0x00003de4 move a1, s2 | a1 = s2;
0x00003de8 move a0, s4 | a0 = s4;
0x00003dec move fp, v0 | fp = v0;
0x00003df0 jalr t9 | t9 ();
0x00003df4 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00003df8 bnez v0, 0x3e08 |
0x00003dfc lw v0, 0x28(sp) | v0 = *(var_28h_4);
0x00003e00 lw t9, -0x7f78(gp) | t9 = sym.__gr_dup;
| if (v0 == s2) {
0x00003e04 beq v0, s2, 0x3e98 | goto label_3;
| }
| }
0x00003e08 lw v0, (fp) | v0 = *(fp);
0x00003e0c sltu v0, s0, s6 | v0 = (s0 < s6) ? 1 : 0;
| if (v0 != s5) {
0x00003e10 bne v0, s5, 0x3e34 | goto label_4;
| }
| if (v0 == 0) {
0x00003e14 beqz v0, 0x3e24 | goto label_5;
| }
0x00003e18 nop |
0x00003e1c sll s0, s0, 2 | s0 <<= 2;
0x00003e20 b 0x3da0 |
| } while (1);
| label_5:
0x00003e24 addiu s0, zero, -1 | s0 = -1;
| if (s0 == s7) {
0x00003e28 beq s0, s7, 0x3ed0 | goto label_6;
| }
0x00003e2c lw t9, -0x7e64(gp) | t9 = sym.imp.realloc;
0x00003e30 b 0x3da4 | goto label_0;
| label_4:
0x00003e34 lw t9, -0x7e18(gp) | t9 = sym.imp.free;
0x00003e38 move a0, s1 | a0 = s1;
0x00003e3c jalr t9 | t9 ();
0x00003e40 lw gp, 0x18(sp) | gp = *(var_18h);
0x00003e44 lw t9, -0x7e18(gp) | t9 = sym.imp.free;
0x00003e48 move a0, s2 | a0 = s2;
0x00003e4c jalr t9 | t9 ();
0x00003e50 lw gp, 0x18(sp) | gp = *(var_18h);
0x00003e54 move v0, zero | v0 = 0;
| do {
| label_1:
0x00003e58 lw v1, 0x20(sp) | v1 = *(var_20h);
0x00003e5c lw a0, 0x2c(sp) | a0 = *(var_2ch);
0x00003e60 lw v1, (v1) | v1 = *(v1);
0x00003e64 lw ra, 0x54(sp) | ra = *(var_54h);
| if (a0 != v1) {
0x00003e68 bne a0, v1, 0x3f34 | goto label_7;
| }
0x00003e6c lw fp, 0x50(sp) | fp = *(var_50h);
0x00003e70 lw s7, 0x4c(sp) | s7 = *(var_4ch);
0x00003e74 lw s6, 0x48(sp) | s6 = *(var_48h);
0x00003e78 lw s5, 0x44(sp) | s5 = *(var_44h);
0x00003e7c lw s4, 0x40(sp) | s4 = *(var_40h);
0x00003e80 lw s3, 0x3c(sp) | s3 = *(var_3ch);
0x00003e84 lw s2, 0x38(sp) | s2 = *(var_38h);
0x00003e88 lw s1, 0x34(sp) | s1 = *(var_34h);
0x00003e8c lw s0, 0x30(sp) | s0 = *(var_30h);
0x00003e90 addiu sp, sp, 0x58 |
0x00003e94 jr ra | return v0;
| label_3:
0x00003e98 move a0, s2 | a0 = s2;
0x00003e9c bal 0x52dc | sym_gr_dup ();
0x00003ea0 lw gp, 0x18(sp) | gp = *(var_18h);
0x00003ea4 sw v0, 0x24(sp) | *(var_24h_4) = v0;
0x00003ea8 lw t9, -0x7e18(gp) | t9 = sym.imp.free;
0x00003eac move a0, s1 | a0 = s1;
0x00003eb0 jalr t9 | t9 ();
0x00003eb4 lw gp, 0x18(sp) | gp = *(var_18h);
0x00003eb8 lw t9, -0x7e18(gp) | t9 = sym.imp.free;
0x00003ebc move a0, s2 | a0 = s2;
0x00003ec0 jalr t9 | t9 ();
0x00003ec4 lw gp, 0x18(sp) | gp = *(var_18h);
0x00003ec8 lw v0, 0x24(sp) | v0 = *(var_24h_4);
0x00003ecc b 0x3e58 |
| } while (1);
| label_6:
0x00003ed0 lw t9, -0x7e18(gp) | t9 = sym.imp.free;
0x00003ed4 move a0, s1 | a0 = s1;
0x00003ed8 jalr t9 | t9 ();
0x00003edc lw gp, 0x18(sp) | gp = *(var_18h);
0x00003ee0 move v0, zero | v0 = 0;
0x00003ee4 sw v0, 0x24(sp) | *(var_24h_4) = v0;
0x00003ee8 lw t9, -0x7e18(gp) | t9 = sym.imp.free;
0x00003eec move a0, s2 | a0 = s2;
0x00003ef0 jalr t9 | t9 ();
0x00003ef4 lw gp, 0x18(sp) | gp = *(var_18h);
0x00003ef8 lw v0, 0x24(sp) | v0 = *(var_24h_4);
0x00003efc b 0x3e58 | goto label_1;
| label_2:
0x00003f00 lw v0, -0x7e14(gp) | v0 = *((gp - 8069));
0x00003f04 lw a3, -0x7fd8(gp) | a3 = *((gp - 8182));
0x00003f08 lw a2, -0x7fd8(gp) | a2 = *((gp - 8182));
0x00003f0c lw t9, -0x7f04(gp) | t9 = sym.imp.__fprintf_chk
0x00003f10 lw a0, (v0) | a0 = *(v0);
0x00003f14 addiu a3, a3, 0x6c74 | a3 += str.xgetgrnam;
0x00003f18 addiu a2, a2, 0x6c54 | a2 += str._s:_out_of_memory_n;
0x00003f1c addiu a1, zero, 1 | a1 = 1;
0x00003f20 jalr t9 | t9 ();
0x00003f24 lw gp, 0x18(sp) | gp = *(var_18h);
0x00003f28 lw t9, -0x7e78(gp) | t9 = sym.imp.exit;
0x00003f2c addiu a0, zero, 0xd | a0 = 0xd;
0x00003f30 jalr t9 | t9 ();
| label_7:
0x00003f34 lw t9, -0x7e3c(gp) | t9 = sym.imp.__stack_chk_fail;
0x00003f38 jalr t9 | t9 ();
0x00003f3c nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/newgrp.shadow @ 0x38e0 */
| #include <stdint.h>
|
; (fcn) sym.xgetpwnam () | void xgetpwnam () {
0x000038e0 lui gp, 2 |
0x000038e4 addiu gp, gp, -0x3610 |
0x000038e8 addu gp, gp, t9 | gp += t9;
0x000038ec lw v0, -0x7e24(gp) | v0 = *((gp - 8073));
0x000038f0 addiu sp, sp, -0x58 |
0x000038f4 lw t9, -0x7e68(gp) | t9 = sym.imp.malloc;
0x000038f8 sw v0, 0x20(sp) | *(var_20h) = v0;
0x000038fc lw v0, (v0) | v0 = *(v0);
0x00003900 sw gp, 0x18(sp) | *(var_18h_2) = gp;
0x00003904 sw s4, 0x40(sp) | *(var_40h) = s4;
0x00003908 sw ra, 0x54(sp) | *(var_54h) = ra;
0x0000390c sw fp, 0x50(sp) | *(var_50h) = fp;
0x00003910 sw s7, 0x4c(sp) | *(var_4ch) = s7;
0x00003914 sw s6, 0x48(sp) | *(var_48h) = s6;
0x00003918 sw s5, 0x44(sp) | *(var_44h) = s5;
0x0000391c sw s3, 0x3c(sp) | *(var_3ch) = s3;
0x00003920 sw s2, 0x38(sp) | *(var_38h) = s2;
0x00003924 sw s1, 0x34(sp) | *(var_34h) = s1;
0x00003928 sw s0, 0x30(sp) | *(var_30h) = s0;
0x0000392c move s4, a0 | s4 = a0;
0x00003930 sw v0, 0x2c(sp) | *(var_2ch) = v0;
0x00003934 addiu a0, zero, 0x1c | a0 = 0x1c;
0x00003938 jalr t9 | t9 ();
0x0000393c lw gp, 0x18(sp) | gp = *(var_18h_2);
| if (v0 == 0) {
0x00003940 beqz v0, 0x3ac0 | goto label_2;
| }
0x00003944 move s2, v0 | s2 = v0;
0x00003948 addiu s0, zero, 0x100 | s0 = 0x100;
0x0000394c move s1, zero | s1 = 0;
0x00003950 addiu s3, sp, 0x28 | s3 = sp + 0x28;
0x00003954 addiu s5, zero, 0x22 | s5 = 0x22;
0x00003958 lui s6, 0x4000 | s6 = 0x40000000;
0x0000395c addiu s7, zero, -1 | s7 = -1;
| do {
0x00003960 lw t9, -0x7e64(gp) | t9 = sym.imp.realloc;
| label_0:
0x00003964 move a0, s1 | a0 = s1;
0x00003968 move a1, s0 | a1 = s0;
0x0000396c sw zero, 0x28(sp) | *(var_28h_2) = 0;
0x00003970 jalr t9 | t9 ();
0x00003974 move s1, v0 | s1 = v0;
0x00003978 lw gp, 0x18(sp) | gp = *(var_18h_2);
| if (v0 == 0) {
0x0000397c beqz v0, 0x3ac0 | goto label_2;
| }
0x00003980 lw t9, -0x7eb0(gp) | t9 = sym.imp.__errno_location;
0x00003984 jalr t9 | t9 ();
0x00003988 nop |
0x0000398c lw gp, 0x18(sp) | gp = *(var_18h_2);
0x00003990 sw zero, (v0) | *(v0) = 0;
0x00003994 move a3, s0 | a3 = s0;
0x00003998 lw t9, -0x7e9c(gp) | t9 = sym.imp.getpwnam_r;
0x0000399c sw s3, 0x10(sp) | *(var_10h_2) = s3;
0x000039a0 move a2, s1 | a2 = s1;
0x000039a4 move a1, s2 | a1 = s2;
0x000039a8 move a0, s4 | a0 = s4;
0x000039ac move fp, v0 | fp = v0;
0x000039b0 jalr t9 | t9 ();
0x000039b4 lw gp, 0x18(sp) | gp = *(var_18h_2);
| if (v0 == 0) {
0x000039b8 bnez v0, 0x39c8 |
0x000039bc lw v0, 0x28(sp) | v0 = *(var_28h_2);
0x000039c0 lw t9, -0x7f7c(gp) | t9 = sym.__pw_dup;
| if (v0 == s2) {
0x000039c4 beq v0, s2, 0x3a58 | goto label_3;
| }
| }
0x000039c8 lw v0, (fp) | v0 = *(fp);
0x000039cc sltu v0, s0, s6 | v0 = (s0 < s6) ? 1 : 0;
| if (v0 != s5) {
0x000039d0 bne v0, s5, 0x39f4 | goto label_4;
| }
| if (v0 == 0) {
0x000039d4 beqz v0, 0x39e4 | goto label_5;
| }
0x000039d8 nop |
0x000039dc sll s0, s0, 2 | s0 <<= 2;
0x000039e0 b 0x3960 |
| } while (1);
| label_5:
0x000039e4 addiu s0, zero, -1 | s0 = -1;
| if (s0 == s7) {
0x000039e8 beq s0, s7, 0x3a90 | goto label_6;
| }
0x000039ec lw t9, -0x7e64(gp) | t9 = sym.imp.realloc;
0x000039f0 b 0x3964 | goto label_0;
| label_4:
0x000039f4 lw t9, -0x7e18(gp) | t9 = sym.imp.free;
0x000039f8 move a0, s1 | a0 = s1;
0x000039fc jalr t9 | t9 ();
0x00003a00 lw gp, 0x18(sp) | gp = *(var_18h_2);
0x00003a04 lw t9, -0x7e18(gp) | t9 = sym.imp.free;
0x00003a08 move a0, s2 | a0 = s2;
0x00003a0c jalr t9 | t9 ();
0x00003a10 lw gp, 0x18(sp) | gp = *(var_18h_2);
0x00003a14 move v0, zero | v0 = 0;
| do {
| label_1:
0x00003a18 lw v1, 0x20(sp) | v1 = *(var_20h);
0x00003a1c lw a0, 0x2c(sp) | a0 = *(var_2ch);
0x00003a20 lw v1, (v1) | v1 = *(v1);
0x00003a24 lw ra, 0x54(sp) | ra = *(var_54h);
| if (a0 != v1) {
0x00003a28 bne a0, v1, 0x3af4 | goto label_7;
| }
0x00003a2c lw fp, 0x50(sp) | fp = *(var_50h);
0x00003a30 lw s7, 0x4c(sp) | s7 = *(var_4ch);
0x00003a34 lw s6, 0x48(sp) | s6 = *(var_48h);
0x00003a38 lw s5, 0x44(sp) | s5 = *(var_44h);
0x00003a3c lw s4, 0x40(sp) | s4 = *(var_40h);
0x00003a40 lw s3, 0x3c(sp) | s3 = *(var_3ch);
0x00003a44 lw s2, 0x38(sp) | s2 = *(var_38h);
0x00003a48 lw s1, 0x34(sp) | s1 = *(var_34h);
0x00003a4c lw s0, 0x30(sp) | s0 = *(var_30h);
0x00003a50 addiu sp, sp, 0x58 |
0x00003a54 jr ra | return v0;
| label_3:
0x00003a58 move a0, s2 | a0 = s2;
0x00003a5c bal 0x5e34 | sym_pw_dup ();
0x00003a60 lw gp, 0x18(sp) | gp = *(var_18h_2);
0x00003a64 sw v0, 0x24(sp) | *(var_24h_2) = v0;
0x00003a68 lw t9, -0x7e18(gp) | t9 = sym.imp.free;
0x00003a6c move a0, s1 | a0 = s1;
0x00003a70 jalr t9 | t9 ();
0x00003a74 lw gp, 0x18(sp) | gp = *(var_18h_2);
0x00003a78 lw t9, -0x7e18(gp) | t9 = sym.imp.free;
0x00003a7c move a0, s2 | a0 = s2;
0x00003a80 jalr t9 | t9 ();
0x00003a84 lw gp, 0x18(sp) | gp = *(var_18h_2);
0x00003a88 lw v0, 0x24(sp) | v0 = *(var_24h_2);
0x00003a8c b 0x3a18 |
| } while (1);
| label_6:
0x00003a90 lw t9, -0x7e18(gp) | t9 = sym.imp.free;
0x00003a94 move a0, s1 | a0 = s1;
0x00003a98 jalr t9 | t9 ();
0x00003a9c lw gp, 0x18(sp) | gp = *(var_18h_2);
0x00003aa0 move v0, zero | v0 = 0;
0x00003aa4 sw v0, 0x24(sp) | *(var_24h_2) = v0;
0x00003aa8 lw t9, -0x7e18(gp) | t9 = sym.imp.free;
0x00003aac move a0, s2 | a0 = s2;
0x00003ab0 jalr t9 | t9 ();
0x00003ab4 lw gp, 0x18(sp) | gp = *(var_18h_2);
0x00003ab8 lw v0, 0x24(sp) | v0 = *(var_24h_2);
0x00003abc b 0x3a18 | goto label_1;
| label_2:
0x00003ac0 lw v0, -0x7e14(gp) | v0 = *((gp - 8069));
0x00003ac4 lw a3, -0x7fd8(gp) | a3 = *((gp - 8182));
0x00003ac8 lw a2, -0x7fd8(gp) | a2 = *((gp - 8182));
0x00003acc lw t9, -0x7f04(gp) | t9 = sym.imp.__fprintf_chk
0x00003ad0 lw a0, (v0) | a0 = *(v0);
0x00003ad4 addiu a3, a3, 0x6c48 | a3 += str.xgetpwnam;
0x00003ad8 addiu a2, a2, 0x6c54 | a2 += str._s:_out_of_memory_n;
0x00003adc addiu a1, zero, 1 | a1 = 1;
0x00003ae0 jalr t9 | t9 ();
0x00003ae4 lw gp, 0x18(sp) | gp = *(var_18h_2);
0x00003ae8 lw t9, -0x7e78(gp) | t9 = sym.imp.exit;
0x00003aec addiu a0, zero, 0xd | a0 = 0xd;
0x00003af0 jalr t9 | t9 ();
| label_7:
0x00003af4 lw t9, -0x7e3c(gp) | t9 = sym.imp.__stack_chk_fail;
0x00003af8 jalr t9 | t9 ();
0x00003afc nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/newgrp.shadow @ 0x3b00 */
| #include <stdint.h>
|
; (fcn) sym.xgetpwuid () | void xgetpwuid () {
0x00003b00 lui gp, 2 |
0x00003b04 addiu gp, gp, -0x3830 |
0x00003b08 addu gp, gp, t9 | gp += t9;
0x00003b0c lw v0, -0x7e24(gp) | v0 = *((gp - 8073));
0x00003b10 addiu sp, sp, -0x58 |
0x00003b14 lw t9, -0x7e68(gp) | t9 = sym.imp.malloc;
0x00003b18 sw v0, 0x20(sp) | *(var_20h_2) = v0;
0x00003b1c lw v0, (v0) | v0 = *(v0);
0x00003b20 sw gp, 0x18(sp) | *(var_18h_3) = gp;
0x00003b24 sw s4, 0x40(sp) | *(var_40h_2) = s4;
0x00003b28 sw ra, 0x54(sp) | *(var_54h_2) = ra;
0x00003b2c sw fp, 0x50(sp) | *(var_50h_2) = fp;
0x00003b30 sw s7, 0x4c(sp) | *(var_4ch_2) = s7;
0x00003b34 sw s6, 0x48(sp) | *(var_48h_2) = s6;
0x00003b38 sw s5, 0x44(sp) | *(var_44h_2) = s5;
0x00003b3c sw s3, 0x3c(sp) | *(var_3ch_2) = s3;
0x00003b40 sw s2, 0x38(sp) | *(var_38h_2) = s2;
0x00003b44 sw s1, 0x34(sp) | *(var_34h_2) = s1;
0x00003b48 sw s0, 0x30(sp) | *(var_30h_2) = s0;
0x00003b4c move s4, a0 | s4 = a0;
0x00003b50 sw v0, 0x2c(sp) | *(var_2ch_2) = v0;
0x00003b54 addiu a0, zero, 0x1c | a0 = 0x1c;
0x00003b58 jalr t9 | t9 ();
0x00003b5c lw gp, 0x18(sp) | gp = *(var_18h_3);
| if (v0 == 0) {
0x00003b60 beqz v0, 0x3ce0 | goto label_2;
| }
0x00003b64 move s2, v0 | s2 = v0;
0x00003b68 addiu s0, zero, 0x100 | s0 = 0x100;
0x00003b6c move s1, zero | s1 = 0;
0x00003b70 addiu s3, sp, 0x28 | s3 = sp + 0x28;
0x00003b74 addiu s5, zero, 0x22 | s5 = 0x22;
0x00003b78 lui s6, 0x4000 | s6 = 0x40000000;
0x00003b7c addiu s7, zero, -1 | s7 = -1;
| do {
0x00003b80 lw t9, -0x7e64(gp) | t9 = sym.imp.realloc;
| label_0:
0x00003b84 move a0, s1 | a0 = s1;
0x00003b88 move a1, s0 | a1 = s0;
0x00003b8c sw zero, 0x28(sp) | *(var_28h) = 0;
0x00003b90 jalr t9 | t9 ();
0x00003b94 move s1, v0 | s1 = v0;
0x00003b98 lw gp, 0x18(sp) | gp = *(var_18h_3);
| if (v0 == 0) {
0x00003b9c beqz v0, 0x3ce0 | goto label_2;
| }
0x00003ba0 lw t9, -0x7eb0(gp) | t9 = sym.imp.__errno_location;
0x00003ba4 jalr t9 | t9 ();
0x00003ba8 nop |
0x00003bac lw gp, 0x18(sp) | gp = *(var_18h_3);
0x00003bb0 sw zero, (v0) | *(v0) = 0;
0x00003bb4 move a3, s0 | a3 = s0;
0x00003bb8 lw t9, -0x7df4(gp) | t9 = sym.imp.getpwuid_r;
0x00003bbc sw s3, 0x10(sp) | *(var_10h) = s3;
0x00003bc0 move a2, s1 | a2 = s1;
0x00003bc4 move a1, s2 | a1 = s2;
0x00003bc8 move a0, s4 | a0 = s4;
0x00003bcc move fp, v0 | fp = v0;
0x00003bd0 jalr t9 | t9 ();
0x00003bd4 lw gp, 0x18(sp) | gp = *(var_18h_3);
| if (v0 == 0) {
0x00003bd8 bnez v0, 0x3be8 |
0x00003bdc lw v0, 0x28(sp) | v0 = *(var_28h);
0x00003be0 lw t9, -0x7f7c(gp) | t9 = sym.__pw_dup;
| if (v0 == s2) {
0x00003be4 beq v0, s2, 0x3c78 | goto label_3;
| }
| }
0x00003be8 lw v0, (fp) | v0 = *(fp);
0x00003bec sltu v0, s0, s6 | v0 = (s0 < s6) ? 1 : 0;
| if (v0 != s5) {
0x00003bf0 bne v0, s5, 0x3c14 | goto label_4;
| }
| if (v0 == 0) {
0x00003bf4 beqz v0, 0x3c04 | goto label_5;
| }
0x00003bf8 nop |
0x00003bfc sll s0, s0, 2 | s0 <<= 2;
0x00003c00 b 0x3b80 |
| } while (1);
| label_5:
0x00003c04 addiu s0, zero, -1 | s0 = -1;
| if (s0 == s7) {
0x00003c08 beq s0, s7, 0x3cb0 | goto label_6;
| }
0x00003c0c lw t9, -0x7e64(gp) | t9 = sym.imp.realloc;
0x00003c10 b 0x3b84 | goto label_0;
| label_4:
0x00003c14 lw t9, -0x7e18(gp) | t9 = sym.imp.free;
0x00003c18 move a0, s1 | a0 = s1;
0x00003c1c jalr t9 | t9 ();
0x00003c20 lw gp, 0x18(sp) | gp = *(var_18h_3);
0x00003c24 lw t9, -0x7e18(gp) | t9 = sym.imp.free;
0x00003c28 move a0, s2 | a0 = s2;
0x00003c2c jalr t9 | t9 ();
0x00003c30 lw gp, 0x18(sp) | gp = *(var_18h_3);
0x00003c34 move v0, zero | v0 = 0;
| do {
| label_1:
0x00003c38 lw v1, 0x20(sp) | v1 = *(var_20h_2);
0x00003c3c lw a0, 0x2c(sp) | a0 = *(var_2ch_2);
0x00003c40 lw v1, (v1) | v1 = *(v1);
0x00003c44 lw ra, 0x54(sp) | ra = *(var_54h_2);
| if (a0 != v1) {
0x00003c48 bne a0, v1, 0x3d14 | goto label_7;
| }
0x00003c4c lw fp, 0x50(sp) | fp = *(var_50h_2);
0x00003c50 lw s7, 0x4c(sp) | s7 = *(var_4ch_2);
0x00003c54 lw s6, 0x48(sp) | s6 = *(var_48h_2);
0x00003c58 lw s5, 0x44(sp) | s5 = *(var_44h_2);
0x00003c5c lw s4, 0x40(sp) | s4 = *(var_40h_2);
0x00003c60 lw s3, 0x3c(sp) | s3 = *(var_3ch_2);
0x00003c64 lw s2, 0x38(sp) | s2 = *(var_38h_2);
0x00003c68 lw s1, 0x34(sp) | s1 = *(var_34h_2);
0x00003c6c lw s0, 0x30(sp) | s0 = *(var_30h_2);
0x00003c70 addiu sp, sp, 0x58 |
0x00003c74 jr ra | return v0;
| label_3:
0x00003c78 move a0, s2 | a0 = s2;
0x00003c7c bal 0x5e34 | sym_pw_dup ();
0x00003c80 lw gp, 0x18(sp) | gp = *(var_18h_3);
0x00003c84 sw v0, 0x24(sp) | *(var_24h) = v0;
0x00003c88 lw t9, -0x7e18(gp) | t9 = sym.imp.free;
0x00003c8c move a0, s1 | a0 = s1;
0x00003c90 jalr t9 | t9 ();
0x00003c94 lw gp, 0x18(sp) | gp = *(var_18h_3);
0x00003c98 lw t9, -0x7e18(gp) | t9 = sym.imp.free;
0x00003c9c move a0, s2 | a0 = s2;
0x00003ca0 jalr t9 | t9 ();
0x00003ca4 lw gp, 0x18(sp) | gp = *(var_18h_3);
0x00003ca8 lw v0, 0x24(sp) | v0 = *(var_24h);
0x00003cac b 0x3c38 |
| } while (1);
| label_6:
0x00003cb0 lw t9, -0x7e18(gp) | t9 = sym.imp.free;
0x00003cb4 move a0, s1 | a0 = s1;
0x00003cb8 jalr t9 | t9 ();
0x00003cbc lw gp, 0x18(sp) | gp = *(var_18h_3);
0x00003cc0 move v0, zero | v0 = 0;
0x00003cc4 sw v0, 0x24(sp) | *(var_24h) = v0;
0x00003cc8 lw t9, -0x7e18(gp) | t9 = sym.imp.free;
0x00003ccc move a0, s2 | a0 = s2;
0x00003cd0 jalr t9 | t9 ();
0x00003cd4 lw gp, 0x18(sp) | gp = *(var_18h_3);
0x00003cd8 lw v0, 0x24(sp) | v0 = *(var_24h);
0x00003cdc b 0x3c38 | goto label_1;
| label_2:
0x00003ce0 lw v0, -0x7e14(gp) | v0 = *((gp - 8069));
0x00003ce4 lw a3, -0x7fd8(gp) | a3 = *((gp - 8182));
0x00003ce8 lw a2, -0x7fd8(gp) | a2 = *((gp - 8182));
0x00003cec lw t9, -0x7f04(gp) | t9 = sym.imp.__fprintf_chk
0x00003cf0 lw a0, (v0) | a0 = *(v0);
0x00003cf4 addiu a3, a3, 0x6c68 | a3 += str.xgetpwuid;
0x00003cf8 addiu a2, a2, 0x6c54 | a2 += str._s:_out_of_memory_n;
0x00003cfc addiu a1, zero, 1 | a1 = 1;
0x00003d00 jalr t9 | t9 ();
0x00003d04 lw gp, 0x18(sp) | gp = *(var_18h_3);
0x00003d08 lw t9, -0x7e78(gp) | t9 = sym.imp.exit;
0x00003d0c addiu a0, zero, 0xd | a0 = 0xd;
0x00003d10 jalr t9 | t9 ();
| label_7:
0x00003d14 lw t9, -0x7e3c(gp) | t9 = sym.imp.__stack_chk_fail;
0x00003d18 jalr t9 | t9 ();
0x00003d1c nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/newgrp.shadow @ 0x4160 */
| #include <stdint.h>
|
; (fcn) sym.xgetspnam () | void xgetspnam () {
0x00004160 lui gp, 2 |
0x00004164 addiu gp, gp, -0x3e90 |
0x00004168 addu gp, gp, t9 | gp += t9;
0x0000416c lw v0, -0x7e24(gp) | v0 = *((gp - 8073));
0x00004170 addiu sp, sp, -0x58 |
0x00004174 lw t9, -0x7e68(gp) | t9 = sym.imp.malloc;
0x00004178 sw v0, 0x20(sp) | *(var_20h_3) = v0;
0x0000417c lw v0, (v0) | v0 = *(v0);
0x00004180 sw gp, 0x18(sp) | *(var_18h_3) = gp;
0x00004184 sw s4, 0x40(sp) | *(var_40h_3) = s4;
0x00004188 sw ra, 0x54(sp) | *(var_54h_3) = ra;
0x0000418c sw fp, 0x50(sp) | *(var_50h_3) = fp;
0x00004190 sw s7, 0x4c(sp) | *(var_4ch_3) = s7;
0x00004194 sw s6, 0x48(sp) | *(var_48h_3) = s6;
0x00004198 sw s5, 0x44(sp) | *(var_44h_3) = s5;
0x0000419c sw s3, 0x3c(sp) | *(var_3ch_3) = s3;
0x000041a0 sw s2, 0x38(sp) | *(var_38h_3) = s2;
0x000041a4 sw s1, 0x34(sp) | *(var_34h_3) = s1;
0x000041a8 sw s0, 0x30(sp) | *(var_30h_3) = s0;
0x000041ac move s4, a0 | s4 = a0;
0x000041b0 sw v0, 0x2c(sp) | *(var_2ch_3) = v0;
0x000041b4 addiu a0, zero, 0x24 | a0 = 0x24;
0x000041b8 jalr t9 | t9 ();
0x000041bc lw gp, 0x18(sp) | gp = *(var_18h_3);
| if (v0 == 0) {
0x000041c0 beqz v0, 0x4340 | goto label_2;
| }
0x000041c4 move s2, v0 | s2 = v0;
0x000041c8 addiu s0, zero, 0x100 | s0 = 0x100;
0x000041cc move s1, zero | s1 = 0;
0x000041d0 addiu s3, sp, 0x28 | s3 = sp + 0x28;
0x000041d4 addiu s5, zero, 0x22 | s5 = 0x22;
0x000041d8 lui s6, 0x4000 | s6 = 0x40000000;
0x000041dc addiu s7, zero, -1 | s7 = -1;
| do {
0x000041e0 lw t9, -0x7e64(gp) | t9 = sym.imp.realloc;
| label_0:
0x000041e4 move a0, s1 | a0 = s1;
0x000041e8 move a1, s0 | a1 = s0;
0x000041ec sw zero, 0x28(sp) | *(var_28h_2) = 0;
0x000041f0 jalr t9 | t9 ();
0x000041f4 move s1, v0 | s1 = v0;
0x000041f8 lw gp, 0x18(sp) | gp = *(var_18h_3);
| if (v0 == 0) {
0x000041fc beqz v0, 0x4340 | goto label_2;
| }
0x00004200 lw t9, -0x7eb0(gp) | t9 = sym.imp.__errno_location;
0x00004204 jalr t9 | t9 ();
0x00004208 nop |
0x0000420c lw gp, 0x18(sp) | gp = *(var_18h_3);
0x00004210 sw zero, (v0) | *(v0) = 0;
0x00004214 move a3, s0 | a3 = s0;
0x00004218 lw t9, -0x7f14(gp) | t9 = sym.imp.getspnam_r;
0x0000421c sw s3, 0x10(sp) | *(var_10h_3) = s3;
0x00004220 move a2, s1 | a2 = s1;
0x00004224 move a1, s2 | a1 = s2;
0x00004228 move a0, s4 | a0 = s4;
0x0000422c move fp, v0 | fp = v0;
0x00004230 jalr t9 | t9 ();
0x00004234 lw gp, 0x18(sp) | gp = *(var_18h_3);
| if (v0 == 0) {
0x00004238 bnez v0, 0x4248 |
0x0000423c lw v0, 0x28(sp) | v0 = *(var_28h_2);
0x00004240 lw t9, -0x7f74(gp) | t9 = sym.__spw_dup;
| if (v0 == s2) {
0x00004244 beq v0, s2, 0x42d8 | goto label_3;
| }
| }
0x00004248 lw v0, (fp) | v0 = *(fp);
0x0000424c sltu v0, s0, s6 | v0 = (s0 < s6) ? 1 : 0;
| if (v0 != s5) {
0x00004250 bne v0, s5, 0x4274 | goto label_4;
| }
| if (v0 == 0) {
0x00004254 beqz v0, 0x4264 | goto label_5;
| }
0x00004258 nop |
0x0000425c sll s0, s0, 2 | s0 <<= 2;
0x00004260 b 0x41e0 |
| } while (1);
| label_5:
0x00004264 addiu s0, zero, -1 | s0 = -1;
| if (s0 == s7) {
0x00004268 beq s0, s7, 0x4310 | goto label_6;
| }
0x0000426c lw t9, -0x7e64(gp) | t9 = sym.imp.realloc;
0x00004270 b 0x41e4 | goto label_0;
| label_4:
0x00004274 lw t9, -0x7e18(gp) | t9 = sym.imp.free;
0x00004278 move a0, s1 | a0 = s1;
0x0000427c jalr t9 | t9 ();
0x00004280 lw gp, 0x18(sp) | gp = *(var_18h_3);
0x00004284 lw t9, -0x7e18(gp) | t9 = sym.imp.free;
0x00004288 move a0, s2 | a0 = s2;
0x0000428c jalr t9 | t9 ();
0x00004290 lw gp, 0x18(sp) | gp = *(var_18h_3);
0x00004294 move v0, zero | v0 = 0;
| do {
| label_1:
0x00004298 lw v1, 0x20(sp) | v1 = *(var_20h_3);
0x0000429c lw a0, 0x2c(sp) | a0 = *(var_2ch_3);
0x000042a0 lw v1, (v1) | v1 = *(v1);
0x000042a4 lw ra, 0x54(sp) | ra = *(var_54h_3);
| if (a0 != v1) {
0x000042a8 bne a0, v1, 0x4374 | goto label_7;
| }
0x000042ac lw fp, 0x50(sp) | fp = *(var_50h_3);
0x000042b0 lw s7, 0x4c(sp) | s7 = *(var_4ch_3);
0x000042b4 lw s6, 0x48(sp) | s6 = *(var_48h_3);
0x000042b8 lw s5, 0x44(sp) | s5 = *(var_44h_3);
0x000042bc lw s4, 0x40(sp) | s4 = *(var_40h_3);
0x000042c0 lw s3, 0x3c(sp) | s3 = *(var_3ch_3);
0x000042c4 lw s2, 0x38(sp) | s2 = *(var_38h_3);
0x000042c8 lw s1, 0x34(sp) | s1 = *(var_34h_3);
0x000042cc lw s0, 0x30(sp) | s0 = *(var_30h_3);
0x000042d0 addiu sp, sp, 0x58 |
0x000042d4 jr ra | return v0;
| label_3:
0x000042d8 move a0, s2 | a0 = s2;
0x000042dc bal 0x5f50 | sym_spw_dup ();
0x000042e0 lw gp, 0x18(sp) | gp = *(var_18h_3);
0x000042e4 sw v0, 0x24(sp) | *(var_24h_2) = v0;
0x000042e8 lw t9, -0x7e18(gp) | t9 = sym.imp.free;
0x000042ec move a0, s1 | a0 = s1;
0x000042f0 jalr t9 | t9 ();
0x000042f4 lw gp, 0x18(sp) | gp = *(var_18h_3);
0x000042f8 lw t9, -0x7e18(gp) | t9 = sym.imp.free;
0x000042fc move a0, s2 | a0 = s2;
0x00004300 jalr t9 | t9 ();
0x00004304 lw gp, 0x18(sp) | gp = *(var_18h_3);
0x00004308 lw v0, 0x24(sp) | v0 = *(var_24h_2);
0x0000430c b 0x4298 |
| } while (1);
| label_6:
0x00004310 lw t9, -0x7e18(gp) | t9 = sym.imp.free;
0x00004314 move a0, s1 | a0 = s1;
0x00004318 jalr t9 | t9 ();
0x0000431c lw gp, 0x18(sp) | gp = *(var_18h_3);
0x00004320 move v0, zero | v0 = 0;
0x00004324 sw v0, 0x24(sp) | *(var_24h_2) = v0;
0x00004328 lw t9, -0x7e18(gp) | t9 = sym.imp.free;
0x0000432c move a0, s2 | a0 = s2;
0x00004330 jalr t9 | t9 ();
0x00004334 lw gp, 0x18(sp) | gp = *(var_18h_3);
0x00004338 lw v0, 0x24(sp) | v0 = *(var_24h_2);
0x0000433c b 0x4298 | goto label_1;
| label_2:
0x00004340 lw v0, -0x7e14(gp) | v0 = *((gp - 8069));
0x00004344 lw a3, -0x7fd8(gp) | a3 = *((gp - 8182));
0x00004348 lw a2, -0x7fd8(gp) | a2 = *((gp - 8182));
0x0000434c lw t9, -0x7f04(gp) | t9 = sym.imp.__fprintf_chk
0x00004350 lw a0, (v0) | a0 = *(v0);
0x00004354 addiu a3, a3, 0x6c8c | a3 += str.xgetspnam;
0x00004358 addiu a2, a2, 0x6c54 | a2 += str._s:_out_of_memory_n;
0x0000435c addiu a1, zero, 1 | a1 = 1;
0x00004360 jalr t9 | t9 ();
0x00004364 lw gp, 0x18(sp) | gp = *(var_18h_3);
0x00004368 lw t9, -0x7e78(gp) | t9 = sym.imp.exit;
0x0000436c addiu a0, zero, 0xd | a0 = 0xd;
0x00004370 jalr t9 | t9 ();
| label_7:
0x00004374 lw t9, -0x7e3c(gp) | t9 = sym.imp.__stack_chk_fail;
0x00004378 jalr t9 | t9 ();
0x0000437c nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/newgrp.shadow @ 0x4380 */
| #include <stdint.h>
|
; (fcn) sym.xmalloc () | void xmalloc () {
0x00004380 lui gp, 2 |
0x00004384 addiu gp, gp, -0x40b0 |
0x00004388 addu gp, gp, t9 | gp += t9;
0x0000438c addiu sp, sp, -0x30 |
0x00004390 lw t9, -0x7e68(gp) | t9 = sym.imp.malloc;
0x00004394 sw gp, 0x18(sp) | *(var_18h_4) = gp;
0x00004398 sw ra, 0x2c(sp) | *(var_2ch_4) = ra;
0x0000439c sw s1, 0x28(sp) | *(var_28h) = s1;
0x000043a0 sw s0, 0x24(sp) | *(var_24h) = s0;
0x000043a4 jalr t9 | t9 ();
0x000043a8 nop |
0x000043ac lw gp, 0x18(sp) | gp = *(var_18h_4);
| if (v0 != 0) {
0x000043b0 beqz v0, 0x43c8 |
0x000043b4 lw ra, 0x2c(sp) | ra = *(var_2ch_4);
0x000043b8 lw s1, 0x28(sp) | s1 = *(var_28h);
0x000043bc lw s0, 0x24(sp) | s0 = *(var_24h);
0x000043c0 addiu sp, sp, 0x30 |
0x000043c4 jr ra | return v0;
| }
0x000043c8 lw v0, -0x7e14(gp) | v0 = *((gp - 8069));
0x000043cc lw t9, -0x7eb0(gp) | t9 = sym.imp.__errno_location;
0x000043d0 lw s0, (v0) | s0 = *(v0);
0x000043d4 lw v0, -0x7fd4(gp) | v0 = *(gp);
0x000043d8 lw s1, (v0) | s1 = *(v0);
0x000043dc jalr t9 | t9 ();
0x000043e0 lw gp, 0x18(sp) | gp = *(var_18h_4);
0x000043e4 lw t9, -0x7e70(gp) | t9 = sym.imp.strerror;
0x000043e8 lw a0, (v0) | a0 = *(v0);
0x000043ec jalr t9 | t9 ();
0x000043f0 lw gp, 0x18(sp) | gp = *(var_18h_4);
0x000043f4 move a0, s0 | a0 = s0;
0x000043f8 sw v0, 0x10(sp) | *(var_10h) = v0;
0x000043fc lw a2, -0x7fd8(gp) | a2 = *((gp - 8182));
0x00004400 lw t9, -0x7f04(gp) | t9 = sym.imp.__fprintf_chk
0x00004404 move a3, s1 | a3 = s1;
0x00004408 addiu a2, a2, 0x6c98 | a2 += str._s:_failed_to_allocate_memory:__s_n;
0x0000440c addiu a1, zero, 1 | a1 = 1;
0x00004410 jalr t9 | t9 ();
0x00004414 lw gp, 0x18(sp) | gp = *(var_18h_4);
0x00004418 lw t9, -0x7e78(gp) | t9 = sym.imp.exit;
0x0000441c addiu a0, zero, 0xd | a0 = 0xd;
0x00004420 jalr t9 | return t9 ();
| }
[*] Function fprintf used 13 times newgrp.shadow