[*] Binary protection state of shuttergain.cgi
Full RELRO Canary found NX disabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function printf tear down of shuttergain.cgi
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/html/axis-cgi/shuttergain.cgi @ 0x47bc */
| #include <stdint.h>
|
; (fcn) fcn.000047bc () | void fcn_000047bc () {
0x000047bc lui gp, 2 |
0x000047c0 addiu gp, gp, -0x76c |
0x000047c4 addu gp, gp, t9 | gp += t9;
0x000047c8 addiu sp, sp, -0x98 |
0x000047cc lw v0, (a2) | v0 = *(a2);
0x000047d0 sw s1, 0x74(sp) | *(var_74h) = s1;
0x000047d4 lw s1, -0x7e68(gp) | s1 = *((gp - 8090));
0x000047d8 sw gp, 0x20(sp) | *((sp + 8)) = gp;
0x000047dc sw ra, 0x94(sp) | *(var_94h) = ra;
0x000047e0 lw v1, (s1) | v1 = *(s1);
0x000047e4 sw fp, 0x90(sp) | *(var_90h) = fp;
0x000047e8 sw s7, 0x8c(sp) | *(var_8ch) = s7;
0x000047ec sw s6, 0x88(sp) | *(var_88h) = s6;
0x000047f0 sw s5, 0x84(sp) | *(var_84h) = s5;
0x000047f4 sw s4, 0x80(sp) | *(var_80h) = s4;
0x000047f8 sw s3, 0x7c(sp) | *(var_7ch) = s3;
0x000047fc sw s2, 0x78(sp) | *(var_78h) = s2;
0x00004800 sw s0, 0x70(sp) | *(var_70h) = s0;
0x00004804 sw a0, 0x30(sp) | *(var_30h) = a0;
0x00004808 sw v1, 0x6c(sp) | *(var_6ch) = v1;
0x0000480c move s3, zero | s3 = 0;
| if (v0 == 0) {
0x00004810 beqz v0, 0x48a0 | goto label_0;
| }
0x00004814 lw s4, -0x7fdc(gp) | s4 = *((gp - 8183));
0x00004818 lw s5, -0x7fdc(gp) | s5 = *((gp - 8183));
0x0000481c lw s3, -0x7fbc(gp) | s3 = *(gp);
0x00004820 lw v0, -0x47e0(s4) | v0 = *((s4 - 4600));
0x00004824 lw v1, -0x47dc(s4) | v1 = *((s4 - 4599));
0x00004828 sw v0, 0x28(sp) | *(var_28h) = v0;
0x0000482c lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
0x00004830 sw v1, 0x2c(sp) | *(var_2ch) = v1;
0x00004834 sw v0, 0x40(sp) | *(var_40h_2) = v0;
0x00004838 lw v0, -0x4b48(s5) | v0 = *((s5 - 4818));
0x0000483c lw v1, -0x4b44(s5) | v1 = *((s5 - 4817));
0x00004840 sw v0, 0x38(sp) | *(var_38h_2) = v0;
0x00004844 lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
0x00004848 move s7, a2 | s7 = a2;
0x0000484c sw v0, 0x34(sp) | *(var_34h_2) = v0;
0x00004850 lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
0x00004854 move fp, a1 | fp = a1;
0x00004858 addiu v0, v0, -0x4ffc | v0 += -0x4ffc;
0x0000485c move s0, a3 | s0 = a3;
0x00004860 sw v1, 0x3c(sp) | *(var_3ch_2) = v1;
0x00004864 move s2, zero | s2 = 0;
0x00004868 sw v0, 0x44(sp) | *(var_44h_2) = v0;
| do {
0x0000486c lw a3, (s3) | a3 = *(s3);
0x00004870 addiu v0, zero, 1 | v0 = 1;
| if (a3 != 0) {
0x00004874 beqz a3, 0x48e0 |
0x00004878 lw t9, -0x7fc0(gp) | t9 = *((gp - 8176));
| if (a3 == v0) {
0x0000487c beq a3, v0, 0x4a08 | goto label_6;
| }
0x00004880 lw a2, -0x7fdc(gp) | a2 = *((gp - 8183));
0x00004884 lw t9, -0x7e74(gp) | t9 = sym.imp.__syslog_chk;
0x00004888 addiu a2, a2, -0x4b18 | a2 += -0x4b18;
0x0000488c addiu a1, zero, 1 | a1 = 1;
0x00004890 addiu a0, zero, 3 | a0 = 3;
0x00004894 jalr t9 | t9 ();
0x00004898 lw gp, 0x20(sp) | gp = *((sp + 8));
0x0000489c addiu s3, zero, -1 | s3 = -1;
| label_0:
0x000048a0 lw a0, 0x6c(sp) | a0 = *(var_6ch);
0x000048a4 lw v1, (s1) | v1 = *(s1);
0x000048a8 move v0, s3 | v0 = s3;
| if (a0 != v1) {
0x000048ac bne a0, v1, 0x4e48 | goto label_7;
| }
0x000048b0 lw ra, 0x94(sp) | ra = *(var_94h);
0x000048b4 lw fp, 0x90(sp) | fp = *(var_90h);
0x000048b8 lw s7, 0x8c(sp) | s7 = *(var_8ch);
0x000048bc lw s6, 0x88(sp) | s6 = *(var_88h);
0x000048c0 lw s5, 0x84(sp) | s5 = *(var_84h);
0x000048c4 lw s4, 0x80(sp) | s4 = *(var_80h);
0x000048c8 lw s3, 0x7c(sp) | s3 = *(var_7ch);
0x000048cc lw s2, 0x78(sp) | s2 = *(var_78h);
0x000048d0 lw s1, 0x74(sp) | s1 = *(var_74h);
0x000048d4 lw s0, 0x70(sp) | s0 = *(var_70h);
0x000048d8 addiu sp, sp, 0x98 |
0x000048dc jr ra | return v0;
| }
0x000048e0 lw a0, (fp) | a0 = *(fp);
0x000048e4 sll v0, s2, 2 | v0 = s2 << 2;
0x000048e8 lwx a0, v0(a0) | __asm ("lwx a0, v0(a0)");
0x000048ec lui v0, 0xf | v0 = 0xf4240;
0x000048f0 addiu v0, v0, 0x4240 |
0x000048f4 slt v0, a0, v0 | v0 = (a0 < v0) ? 1 : 0;
0x000048f8 slti v0, a0, 0x208d | v0 = (a0 < 0x208d) ? 1 : 0;
| if (v0 == 0) {
0x000048fc beqz v0, 0x4b9c | goto label_8;
| }
0x00004900 slti v0, a0, 0x1f5 | v0 = (a0 < 0x1f5) ? 1 : 0;
| if (v0 != 0) {
0x00004904 bnez v0, 0x4acc | goto label_9;
| }
0x00004908 lw t9, -0x7fa8(gp) | t9 = *(gp);
0x0000490c bal 0xa530 | fcn_0000a530 ();
0x00004910 nop |
0x00004914 lw gp, 0x20(sp) | gp = *((sp + 8));
0x00004918 lw a0, 0x28(sp) | a0 = *(var_28h);
0x0000491c lw a1, 0x2c(sp) | a1 = *(var_2ch);
0x00004920 lw t9, -0x7fa4(gp) | t9 = *(gp);
0x00004924 move a2, v0 | a2 = v0;
0x00004928 move a3, v1 | a3 = v1;
0x0000492c bal 0x8ba0 | fcn_00008ba0 ();
0x00004930 lw gp, 0x20(sp) | gp = *((sp + 8));
0x00004934 move a2, zero | a2 = 0;
0x00004938 move a3, zero | a3 = 0;
0x0000493c lw t9, -0x7f9c(gp) | t9 = *(gp);
0x00004940 move a0, v0 | a0 = v0;
0x00004944 move a1, v1 | a1 = v1;
0x00004948 sw v0, 0x48(sp) | *(var_48h) = v0;
0x0000494c sw v1, 0x4c(sp) | *(var_4ch_2) = v1;
0x00004950 bal 0x9360 | fcn_00009360 ();
0x00004954 lw gp, 0x20(sp) | gp = *((sp + 8));
0x00004958 lw t0, 0x48(sp) | t0 = *(var_48h);
0x0000495c lw t1, 0x4c(sp) | t1 = *(var_4ch_2);
| if (v0 < 0) {
0x00004960 bltz v0, 0x4d30 | goto label_10;
| }
0x00004964 lw t9, -0x7fb0(gp) | t9 = *(gp);
0x00004968 lw a2, -0x4b48(s5) | a2 = *((s5 - 4818));
0x0000496c lw a3, -0x4b44(s5) | a3 = *((s5 - 4817));
| label_3:
0x00004970 move a0, t0 | a0 = t0;
0x00004974 move a1, t1 | a1 = t1;
0x00004978 jalr t9 | t9 ();
0x0000497c lw gp, 0x20(sp) | gp = *((sp + 8));
0x00004980 move a1, v1 | a1 = v1;
0x00004984 move a0, v0 | a0 = v0;
0x00004988 lw t9, -0x7fac(gp) | t9 = *(gp);
0x0000498c addiu s6, sp, 0x54 | s6 = sp + 0x54;
0x00004990 bal 0xa4b0 | fcn_0000a4b0 ();
0x00004994 lw gp, 0x20(sp) | gp = *((sp + 8));
0x00004998 addiu v1, zero, 1 | v1 = 1;
0x0000499c lw t9, -0x7eb4(gp) | t9 = sym.imp.__snprintf_chk
| if (v0 == v1) {
0x000049a0 beq v0, v1, 0x4d40 | goto label_11;
| }
0x000049a4 lw v1, 0x40(sp) | v1 = *(var_40h_2);
0x000049a8 addiu v1, v1, -0x4954 | v1 += -0x4954;
| label_2:
0x000049ac sw v0, 0x14(sp) | *(var_14h) = v0;
0x000049b0 sw v1, 0x10(sp) | *(var_10h_4) = v1;
| label_4:
0x000049b4 addiu a3, zero, 0x17 | a3 = 0x17;
0x000049b8 addiu a2, zero, 1 | a2 = 1;
0x000049bc addiu a1, zero, 0x17 | a1 = 0x17;
0x000049c0 move a0, s6 | a0 = s6;
0x000049c4 jalr t9 | t9 ();
0x000049c8 lw gp, 0x20(sp) | gp = *((sp + 8));
| label_1:
0x000049cc lw t9, -0x7dd0(gp) | t9 = sym.imp.g_strdup;
0x000049d0 move a0, s6 | a0 = s6;
0x000049d4 jalr t9 | t9 ();
0x000049d8 lw gp, 0x20(sp) | gp = *((sp + 8));
0x000049dc move a1, v0 | a1 = v0;
0x000049e0 move a0, s0 | a0 = s0;
0x000049e4 lw t9, -0x7e14(gp) | t9 = sym.imp.g_ptr_array_add;
0x000049e8 addiu s2, s2, 1 | s2++;
0x000049ec jalr t9 | t9 ();
0x000049f0 lw v0, (s7) | v0 = *(s7);
0x000049f4 sltu v0, s2, v0 | v0 = (s2 < v0) ? 1 : 0;
0x000049f8 lw gp, 0x20(sp) | gp = *((sp + 8));
0x000049fc bnez v0, 0x486c |
| } while (v0 != 0);
0x00004a00 move s3, zero | s3 = 0;
0x00004a04 b 0x48a0 | goto label_0;
| label_6:
0x00004a08 lw a0, 0x30(sp) | a0 = *(var_30h);
0x00004a0c addiu t9, t9, 0x407c | t9 += fcn.0000407c;
0x00004a10 addiu a1, zero, 1 | a1 = 1;
0x00004a14 bal 0x407c | fcn_0000407c ();
0x00004a18 move s4, v0 | s4 = v0;
0x00004a1c lw gp, 0x20(sp) | gp = *((sp + 8));
| if (v0 == 0) {
0x00004a20 beqz v0, 0x4ab4 | goto label_12;
| }
0x00004a24 lw t9, -0x7f8c(gp) | t9 = sym.split_parhand_option_list;
0x00004a28 move a2, s0 | a2 = s0;
0x00004a2c move a1, zero | a1 = 0;
0x00004a30 move a0, v0 | a0 = v0;
0x00004a34 bal 0x29ec | sym_split_parhand_option_list ();
0x00004a38 move s3, v0 | s3 = v0;
0x00004a3c lw gp, 0x20(sp) | gp = *((sp + 8));
| if (v0 != 0) {
0x00004a40 bnez v0, 0x4ab4 | goto label_12;
| }
0x00004a44 lw v0, 4(s0) | v0 = *((s0 + 1));
0x00004a48 lw t9, -0x7da0(gp) | t9 = *((gp - 8040));
| if (v0 == 0) {
0x00004a4c beqz v0, 0x4abc | goto label_13;
| }
0x00004a50 lw s5, -0x7fdc(gp) | s5 = *((gp - 8183));
0x00004a54 move s2, zero | s2 = 0;
0x00004a58 addiu s5, s5, -0x4bec | s5 += -0x4bec;
| do {
0x00004a5c lw a0, (s0) | a0 = *(s0);
0x00004a60 sll v0, s2, 2 | v0 = s2 << 2;
0x00004a64 lw t9, -0x7ef4(gp) | t9 = sym.imp.g_strcanon;
0x00004a68 lwx a0, v0(a0) | __asm ("lwx a0, v0(a0)");
0x00004a6c addiu a2, zero, 0x20 | a2 = 0x20;
0x00004a70 move a1, s5 | a1 = s5;
0x00004a74 jalr t9 | t9 ();
0x00004a78 lw gp, 0x20(sp) | gp = *((sp + 8));
0x00004a7c move a0, v0 | a0 = v0;
0x00004a80 lw t9, -0x7e88(gp) | t9 = sym.imp.g_strchug;
0x00004a84 addiu s2, s2, 1 | s2++;
0x00004a88 jalr t9 | t9 ();
0x00004a8c lw gp, 0x20(sp) | gp = *((sp + 8));
0x00004a90 lw t9, -0x7e70(gp) | t9 = sym.imp.g_strchomp;
0x00004a94 move a0, v0 | a0 = v0;
0x00004a98 jalr t9 | t9 ();
0x00004a9c lw v0, 4(s0) | v0 = *((s0 + 1));
0x00004aa0 sltu v0, s2, v0 | v0 = (s2 < v0) ? 1 : 0;
0x00004aa4 lw gp, 0x20(sp) | gp = *((sp + 8));
0x00004aa8 bnez v0, 0x4a5c |
| } while (v0 != 0);
0x00004aac lw t9, -0x7da0(gp) | t9 = *((gp - 8040));
0x00004ab0 b 0x4abc | goto label_13;
| label_12:
0x00004ab4 addiu s3, zero, -1 | s3 = -1;
0x00004ab8 lw t9, -0x7da0(gp) | t9 = *((gp - 8040));
| label_13:
0x00004abc move a0, s4 | a0 = s4;
0x00004ac0 jalr t9 | t9 ();
0x00004ac4 lw gp, 0x20(sp) | gp = *((sp + 8));
0x00004ac8 b 0x48a0 | goto label_0;
| label_9:
0x00004acc lw t9, -0x7fa8(gp) | t9 = *(gp);
| if (v0 != 0) {
0x00004ad0 bnez v0, 0x4c6c | goto label_14;
| }
0x00004ad4 lui s6, 0x1062 | s6 = 0x10620000;
0x00004ad8 addiu v0, a0, 0x1f4 | v0 = a0 + aav.0x000001f4;
0x00004adc addiu s6, s6, 0x4dd3 | s6 += 0x4dd3;
0x00004ae0 multu v0, s6 | __asm ("multu v0, s6");
0x00004ae4 mfhi v0 | __asm ("mfhi v0");
0x00004ae8 addiu a0, zero, 0x3e8 | a0 = aav.0x000003e8;
0x00004aec srl v0, v0, 6 | v0 >>= 6;
0x00004af0 mul a0, v0, a0 | __asm ("mul a0, v0, a0");
0x00004af4 bal 0xa530 | fcn_0000a530 ();
0x00004af8 lw gp, 0x20(sp) | gp = *((sp + 8));
0x00004afc lw a0, -0x47e0(s4) | a0 = *((s4 - 4600));
0x00004b00 lw a1, -0x47dc(s4) | a1 = *((s4 - 4599));
0x00004b04 lw t9, -0x7fa4(gp) | t9 = *(gp);
0x00004b08 move a2, v0 | a2 = v0;
0x00004b0c move a3, v1 | a3 = v1;
0x00004b10 bal 0x8ba0 | fcn_00008ba0 ();
0x00004b14 lw gp, 0x20(sp) | gp = *((sp + 8));
0x00004b18 move a2, zero | a2 = 0;
0x00004b1c move a3, zero | a3 = 0;
0x00004b20 lw t9, -0x7f9c(gp) | t9 = *(gp);
0x00004b24 move a0, v0 | a0 = v0;
0x00004b28 move a1, v1 | a1 = v1;
0x00004b2c sw v0, 0x48(sp) | *(var_48h) = v0;
0x00004b30 sw v1, 0x4c(sp) | *(var_4ch_2) = v1;
0x00004b34 bal 0x9360 | fcn_00009360 ();
0x00004b38 lw gp, 0x20(sp) | gp = *((sp + 8));
0x00004b3c lw t0, 0x48(sp) | t0 = *(var_48h);
0x00004b40 lw t1, 0x4c(sp) | t1 = *(var_4ch_2);
| if (v0 < 0) {
0x00004b44 bltz v0, 0x4d50 | goto label_15;
| }
0x00004b48 lw t9, -0x7fb0(gp) | t9 = *(gp);
0x00004b4c lw a2, -0x4b48(s5) | a2 = *((s5 - 4818));
0x00004b50 lw a3, -0x4b44(s5) | a3 = *((s5 - 4817));
0x00004b54 move a0, t0 | a0 = t0;
0x00004b58 move a1, t1 | a1 = t1;
0x00004b5c bal 0x8230 | fcn_00008230 ();
0x00004b60 lw gp, 0x20(sp) | gp = *((sp + 8));
0x00004b64 move a0, v0 | a0 = v0;
0x00004b68 lw t9, -0x7fac(gp) | t9 = *(gp);
0x00004b6c move a1, v1 | a1 = v1;
0x00004b70 bal 0xa4b0 | fcn_0000a4b0 ();
0x00004b74 addiu v0, v0, 0x7d | v0 += 0x7d;
0x00004b78 mult v0, s6 | __asm ("mult v0, s6");
0x00004b7c mfhi s6 | __asm ("mfhi s6");
0x00004b80 sra v0, v0, 0x1f | v0 >>= 0x1f;
0x00004b84 lw gp, 0x20(sp) | gp = *((sp + 8));
0x00004b88 sra s6, s6, 4 | s6 >>= 4;
0x00004b8c subu s6, s6, v0 | __asm ("subu s6, s6, v0");
0x00004b90 addiu v0, zero, 0xfa | v0 = 0xfa;
0x00004b94 mul v0, s6, v0 | __asm ("mul v0, s6, v0");
0x00004b98 b 0x4d1c | goto label_5;
| label_8:
0x00004b9c lw t9, -0x7fa8(gp) | t9 = *(gp);
0x00004ba0 addiu s6, sp, 0x54 | s6 = sp + 0x54;
0x00004ba4 bal 0xa530 | fcn_0000a530 ();
0x00004ba8 lw gp, 0x20(sp) | gp = *((sp + 8));
0x00004bac lw a2, -0x47e0(s4) | a2 = *((s4 - 4600));
0x00004bb0 lw a3, -0x47dc(s4) | a3 = *((s4 - 4599));
0x00004bb4 lw t9, -0x7fa4(gp) | t9 = *(gp);
0x00004bb8 move a0, v0 | a0 = v0;
0x00004bbc move a1, v1 | a1 = v1;
0x00004bc0 bal 0x8ba0 | fcn_00008ba0 ();
0x00004bc4 lw gp, 0x20(sp) | gp = *((sp + 8));
0x00004bc8 move a1, v1 | a1 = v1;
0x00004bcc lw t9, -0x7f60(gp) | t9 = *(gp);
0x00004bd0 move a0, v0 | a0 = v0;
0x00004bd4 bal 0xa7f0 | fcn_0000a7f0 ();
0x00004bd8 lw gp, 0x20(sp) | gp = *((sp + 8));
0x00004bdc lw t9, -0x7f68(gp) | t9 = *(gp);
0x00004be0 move a0, v0 | a0 = v0;
0x00004be4 bal 0xa6b0 | fcn_0000a6b0 ();
0x00004be8 lw gp, 0x20(sp) | gp = *((sp + 8));
0x00004bec sw v0, 0x18(sp) | *(var_18h_3) = v0;
0x00004bf0 sw v0, 0x48(sp) | *(var_48h) = v0;
0x00004bf4 lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
0x00004bf8 lw t9, -0x7eb4(gp) | t9 = sym.imp.__snprintf_chk
0x00004bfc addiu v0, v0, -0x4974 | v0 += -0x4974;
0x00004c00 addiu a3, zero, 0x17 | a3 = 0x17;
0x00004c04 addiu a2, zero, 1 | a2 = 1;
0x00004c08 addiu a1, zero, 0x17 | a1 = 0x17;
0x00004c0c move a0, s6 | a0 = s6;
0x00004c10 sw v1, 0x1c(sp) | *(var_1ch_4) = v1;
0x00004c14 sw v1, 0x4c(sp) | *(var_4ch_2) = v1;
0x00004c18 sw v0, 0x10(sp) | *(var_10h_4) = v0;
0x00004c1c jalr t9 | t9 ();
0x00004c20 lw gp, 0x20(sp) | gp = *((sp + 8));
0x00004c24 addiu a1, zero, 0x2e | a1 = 0x2e;
0x00004c28 lw t9, -0x7dd4(gp) | t9 = sym.imp.strchr;
0x00004c2c move a0, s6 | a0 = s6;
0x00004c30 jalr t9 | t9 ();
0x00004c34 lw gp, 0x20(sp) | gp = *((sp + 8));
| if (v0 == 0) {
0x00004c38 beqz v0, 0x49cc | goto label_1;
| }
0x00004c3c lb v1, 1(v0) | v1 = *((v0 + 1));
0x00004c40 addiu a0, zero, 0x35 | a0 = 0x35;
0x00004c44 lw t0, 0x48(sp) | t0 = *(var_48h);
0x00004c48 lw t1, 0x4c(sp) | t1 = *(var_4ch_2);
| if (v1 == a0) {
0x00004c4c beq v1, a0, 0x4e30 | goto label_16;
| }
0x00004c50 lb v1, 2(v0) | v1 = *((v0 + 2));
0x00004c54 slti v1, v1, 0x35 | v1 = (v1 < 0x35) ? 1 : 0;
0x00004c58 lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
| if (v1 == 0) {
0x00004c5c bnel v1, zero, 0x4e00 | goto label_17;
| }
0x00004c60 sb a0, 1(v0) | *((v0 + 1)) = a0;
0x00004c64 sb zero, 2(v0) | *((v0 + 2)) = 0;
0x00004c68 b 0x49cc | goto label_1;
| label_14:
0x00004c6c bal 0xa530 | fcn_0000a530 ();
0x00004c70 nop |
0x00004c74 lw gp, 0x20(sp) | gp = *((sp + 8));
0x00004c78 lw a0, -0x47e0(s4) | a0 = *((s4 - 4600));
0x00004c7c lw a1, -0x47dc(s4) | a1 = *((s4 - 4599));
0x00004c80 lw t9, -0x7fa4(gp) | t9 = *(gp);
0x00004c84 move a2, v0 | a2 = v0;
0x00004c88 move a3, v1 | a3 = v1;
0x00004c8c bal 0x8ba0 | fcn_00008ba0 ();
0x00004c90 lw gp, 0x20(sp) | gp = *((sp + 8));
0x00004c94 move a2, zero | a2 = 0;
0x00004c98 move a3, zero | a3 = 0;
0x00004c9c lw t9, -0x7f9c(gp) | t9 = *(gp);
0x00004ca0 move a0, v0 | a0 = v0;
0x00004ca4 move a1, v1 | a1 = v1;
0x00004ca8 sw v0, 0x48(sp) | *(var_48h) = v0;
0x00004cac sw v1, 0x4c(sp) | *(var_4ch_2) = v1;
0x00004cb0 bal 0x9360 | fcn_00009360 ();
0x00004cb4 lw gp, 0x20(sp) | gp = *((sp + 8));
0x00004cb8 lw t0, 0x48(sp) | t0 = *(var_48h);
0x00004cbc lw t1, 0x4c(sp) | t1 = *(var_4ch_2);
| if (v0 < 0) {
0x00004cc0 bltz v0, 0x4da4 | goto label_18;
| }
0x00004cc4 lw t9, -0x7fb0(gp) | t9 = *(gp);
0x00004cc8 lw a2, -0x4b48(s5) | a2 = *((s5 - 4818));
0x00004ccc lw a3, -0x4b44(s5) | a3 = *((s5 - 4817));
0x00004cd0 move a0, t0 | a0 = t0;
0x00004cd4 move a1, t1 | a1 = t1;
0x00004cd8 bal 0x8230 | fcn_00008230 ();
0x00004cdc lw gp, 0x20(sp) | gp = *((sp + 8));
0x00004ce0 move a1, v1 | a1 = v1;
0x00004ce4 lw t9, -0x7fac(gp) | t9 = *(gp);
0x00004ce8 move a0, v0 | a0 = v0;
0x00004cec bal 0xa4b0 | fcn_0000a4b0 ();
0x00004cf0 lui v1, 0x1062 | v1 = 0x10620000;
0x00004cf4 addiu v0, v0, 0xfa | v0 += 0xfa;
0x00004cf8 addiu v1, v1, 0x4dd3 | v1 += 0x4dd3;
0x00004cfc mult v0, v1 | __asm ("mult v0, v1");
0x00004d00 mfhi v1 | __asm ("mfhi v1");
0x00004d04 sra v0, v0, 0x1f | v0 >>= 0x1f;
0x00004d08 lw gp, 0x20(sp) | gp = *((sp + 8));
0x00004d0c sra v1, v1, 5 | v1 >>= 5;
0x00004d10 subu v0, v1, v0 | __asm ("subu v0, v1, v0");
0x00004d14 addiu v1, zero, 0x1f4 | v1 = aav.0x000001f4;
0x00004d18 mul v0, v0, v1 | __asm ("mul v0, v0, v1");
| do {
| label_5:
0x00004d1c lw v1, 0x34(sp) | v1 = *(var_34h_2);
0x00004d20 lw t9, -0x7eb4(gp) | t9 = sym.imp.__snprintf_chk
0x00004d24 addiu s6, sp, 0x54 | s6 = sp + 0x54;
0x00004d28 addiu v1, v1, -0x495c | v1 += -0x495c;
0x00004d2c b 0x49ac | goto label_2;
| label_10:
0x00004d30 lw t9, -0x7f98(gp) | t9 = *(gp);
0x00004d34 lw a2, 0x38(sp) | a2 = *(var_38h_2);
0x00004d38 lw a3, 0x3c(sp) | a3 = *(var_3ch_2);
0x00004d3c b 0x4970 | goto label_3;
| label_11:
0x00004d40 sw v0, 0x14(sp) | *(var_14h) = v0;
0x00004d44 lw v0, 0x44(sp) | v0 = *(var_44h_2);
0x00004d48 sw v0, 0x10(sp) | *(var_10h_4) = v0;
0x00004d4c b 0x49b4 | goto label_4;
| label_15:
0x00004d50 lw t9, -0x7f98(gp) | t9 = *(gp);
0x00004d54 lw a2, -0x4b48(s5) | a2 = *((s5 - 4818));
0x00004d58 lw a3, -0x4b44(s5) | a3 = *((s5 - 4817));
0x00004d5c move a0, t0 | a0 = t0;
0x00004d60 move a1, t1 | a1 = t1;
0x00004d64 bal 0x9ba0 | fcn_00009ba0 ();
0x00004d68 lw gp, 0x20(sp) | gp = *((sp + 8));
0x00004d6c move a0, v0 | a0 = v0;
0x00004d70 lw t9, -0x7fac(gp) | t9 = *(gp);
0x00004d74 move a1, v1 | a1 = v1;
0x00004d78 bal 0xa4b0 | fcn_0000a4b0 ();
0x00004d7c addiu v0, v0, 0x7d | v0 += 0x7d;
0x00004d80 mult v0, s6 | __asm ("mult v0, s6");
0x00004d84 mfhi s6 | __asm ("mfhi s6");
0x00004d88 sra v0, v0, 0x1f | v0 >>= 0x1f;
0x00004d8c lw gp, 0x20(sp) | gp = *((sp + 8));
0x00004d90 sra s6, s6, 4 | s6 >>= 4;
0x00004d94 subu s6, s6, v0 | __asm ("subu s6, s6, v0");
0x00004d98 addiu v0, zero, 0xfa | v0 = 0xfa;
0x00004d9c mul v0, s6, v0 | __asm ("mul v0, s6, v0");
0x00004da0 b 0x4d1c |
| } while (1);
| label_18:
0x00004da4 lw t9, -0x7f98(gp) | t9 = *(gp);
0x00004da8 lw a2, -0x4b48(s5) | a2 = *((s5 - 4818));
0x00004dac lw a3, -0x4b44(s5) | a3 = *((s5 - 4817));
0x00004db0 move a0, t0 | a0 = t0;
0x00004db4 move a1, t1 | a1 = t1;
0x00004db8 bal 0x9ba0 | fcn_00009ba0 ();
0x00004dbc lw gp, 0x20(sp) | gp = *((sp + 8));
0x00004dc0 move a1, v1 | a1 = v1;
0x00004dc4 lw t9, -0x7fac(gp) | t9 = *(gp);
0x00004dc8 move a0, v0 | a0 = v0;
0x00004dcc bal 0xa4b0 | fcn_0000a4b0 ();
0x00004dd0 lui v1, 0x1062 | v1 = 0x10620000;
0x00004dd4 addiu v0, v0, 0xfa | v0 += 0xfa;
0x00004dd8 addiu v1, v1, 0x4dd3 | v1 += 0x4dd3;
0x00004ddc mult v0, v1 | __asm ("mult v0, v1");
0x00004de0 mfhi v1 | __asm ("mfhi v1");
0x00004de4 sra v0, v0, 0x1f | v0 >>= 0x1f;
0x00004de8 lw gp, 0x20(sp) | gp = *((sp + 8));
0x00004dec sra v1, v1, 5 | v1 >>= 5;
0x00004df0 subu v0, v1, v0 | __asm ("subu v0, v1, v0");
0x00004df4 addiu v1, zero, 0x1f4 | v1 = aav.0x000001f4;
0x00004df8 mul v0, v0, v1 | __asm ("mul v0, v0, v1");
0x00004dfc b 0x4d1c | goto label_5;
| label_17:
0x00004e00 lw t9, -0x7eb4(gp) | t9 = sym.imp.__snprintf_chk
0x00004e04 sw t0, 0x18(sp) | *(var_18h_3) = t0;
0x00004e08 sw t1, 0x1c(sp) | *(var_1ch_4) = t1;
0x00004e0c addiu v0, v0, -0x496c | v0 += -0x496c;
| do {
0x00004e10 sw v0, 0x10(sp) | *(var_10h_4) = v0;
0x00004e14 addiu a3, zero, 0x17 | a3 = 0x17;
0x00004e18 addiu a2, zero, 1 | a2 = 1;
0x00004e1c addiu a1, zero, 0x17 | a1 = 0x17;
0x00004e20 move a0, s6 | a0 = s6;
0x00004e24 jalr t9 | t9 ();
0x00004e28 lw gp, 0x20(sp) | gp = *((sp + 8));
0x00004e2c b 0x49cc | goto label_1;
| label_16:
0x00004e30 lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
0x00004e34 lw t9, -0x7eb4(gp) | t9 = sym.imp.__snprintf_chk
0x00004e38 sw t0, 0x18(sp) | *(var_18h_3) = t0;
0x00004e3c sw t1, 0x1c(sp) | *(var_1ch_4) = t1;
0x00004e40 addiu v0, v0, -0x4964 | v0 += -0x4964;
0x00004e44 b 0x4e10 |
| } while (1);
| label_7:
0x00004e48 lw t9, -0x7e94(gp) | t9 = sym.imp.__stack_chk_fail;
0x00004e4c jalr t9 | t9 ();
0x00004e50 nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/html/axis-cgi/shuttergain.cgi @ 0x2bf4 */
| #include <stdint.h>
|
; (fcn) sym.setup_sensor_data () | void setup_sensor_data () {
0x00002bf4 lui gp, 2 |
0x00002bf8 addiu gp, gp, 0x145c |
0x00002bfc addu gp, gp, t9 | gp += t9;
0x00002c00 addiu sp, sp, -0xa0 |
0x00002c04 lw v0, -0x7e68(gp) | v0 = *((gp - 8090));
0x00002c08 sw fp, 0x98(sp) | *(var_98h) = fp;
0x00002c0c move fp, sp | fp = sp;
0x00002c10 sw ra, 0x9c(sp) | *(var_9ch) = ra;
0x00002c14 sw s7, 0x94(sp) | *(var_94h) = s7;
0x00002c18 sw s6, 0x90(sp) | *(var_90h) = s6;
0x00002c1c sw s5, 0x8c(sp) | *(var_8ch) = s5;
0x00002c20 sw s4, 0x88(sp) | *(var_88h) = s4;
0x00002c24 sw s3, 0x84(sp) | *(var_84h) = s3;
0x00002c28 sw s2, 0x80(sp) | *(var_80h) = s2;
0x00002c2c sw s1, 0x7c(sp) | *(var_7ch) = s1;
0x00002c30 sw s0, 0x78(sp) | *(var_78h) = s0;
0x00002c34 sw gp, 0x18(sp) | *(var_18h_3) = gp;
0x00002c38 sw v0, 0x48(fp) | *(arg_48h) = v0;
0x00002c3c lw v0, (v0) | v0 = *(v0);
0x00002c40 sw v0, 0x74(fp) | *(arg_74h) = v0;
0x00002c44 addiu v0, zero, -1 | v0 = -1;
| if (a0 < 0) {
0x00002c48 bltz a0, 0x2e38 | goto label_0;
| }
0x00002c4c lw s5, -0x7fc8(gp) | s5 = *((gp - 8178));
0x00002c50 lw v0, -0x3ff0(s5) | v0 = *((s5 - 4092));
0x00002c54 move s3, a0 | s3 = a0;
| if (v0 == a0) {
0x00002c58 beq v0, a0, 0x2e80 | goto label_4;
| }
0x00002c5c lw t9, -0x7ddc(gp) | t9 = sym.imp.calloc;
0x00002c60 addiu a1, zero, 0x10 | a1 = 0x10;
0x00002c64 addiu a0, zero, 1 | a0 = 1;
0x00002c68 jalr t9 | t9 ();
0x00002c6c lw gp, 0x18(fp) | gp = *(var_18h_3);
0x00002c70 addiu s2, fp, 0x5c | s2 = fp + 0x5c;
0x00002c74 addiu a3, zero, 0x16 | a3 = 0x16;
0x00002c78 lw v1, -0x7fdc(gp) | v1 = *((gp - 8183));
0x00002c7c lw t9, -0x7eb4(gp) | t9 = sym.imp.__snprintf_chk
0x00002c80 addiu v1, v1, -0x4d94 | v1 += -0x4d94;
0x00002c84 addiu a2, zero, 1 | a2 = 1;
0x00002c88 addiu a1, zero, 0x16 | a1 = 0x16;
0x00002c8c move a0, s2 | a0 = s2;
0x00002c90 sw v1, 0x10(sp) | *(var_10h_5) = v1;
0x00002c94 sw s3, 0x14(sp) | *(var_14h) = s3;
0x00002c98 move s1, v0 | s1 = v0;
0x00002c9c jalr t9 | t9 ();
0x00002ca0 lw gp, 0x18(fp) | gp = *(var_18h_3);
0x00002ca4 addiu a1, zero, 4 | a1 = 4;
0x00002ca8 move a0, s2 | a0 = s2;
0x00002cac lw s4, -0x7fc0(gp) | s4 = *((gp - 8176));
0x00002cb0 addiu t9, s4, 0x20ec | t9 = s4 + fcn.000020ec;
0x00002cb4 sw t9, 0x4c(fp) | *(arg_4ch) = t9;
0x00002cb8 bal 0x20ec | fcn_000020ec ();
0x00002cbc lw gp, 0x18(fp) | gp = *(var_18h_3);
| if (v0 == 0) {
0x00002cc0 beqz v0, 0x3100 | goto label_5;
| }
0x00002cc4 lw t9, -0x7ebc(gp) | t9 = sym.imp.munmap;
0x00002cc8 lw s0, (v0) | s0 = *(v0);
0x00002ccc addiu a1, zero, 4 | a1 = 4;
0x00002cd0 move a0, v0 | a0 = v0;
0x00002cd4 jalr t9 | t9 ();
0x00002cd8 lw t9, 0x4c(fp) | t9 = *(arg_4ch);
0x00002cdc move a1, s0 | a1 = s0;
0x00002ce0 move a0, s2 | a0 = s2;
0x00002ce4 jalr t9 | t9 ();
0x00002ce8 lw gp, 0x18(fp) | gp = *(var_18h_3);
| if (v0 == 0) {
0x00002cec beqz v0, 0x3164 | goto label_6;
| }
0x00002cf0 sll s6, s0, 2 | s6 = s0 << 2;
0x00002cf4 addiu s6, s6, -4 | s6 += -4;
0x00002cf8 lw t9, -0x7ebc(gp) | t9 = sym.imp.munmap;
0x00002cfc lwx s7, s6(v0) | __asm ("lwx s7, s6(v0)");
0x00002d00 move a1, s0 | a1 = s0;
0x00002d04 move a0, v0 | a0 = v0;
0x00002d08 addiu s6, s6, 4 | s6 += 4;
0x00002d0c jalr t9 | t9 ();
0x00002d10 addu s0, s7, s6 | s0 = s7 + s6;
0x00002d14 lw t9, 0x4c(fp) | t9 = *(arg_4ch);
0x00002d18 move a1, s0 | a1 = s0;
0x00002d1c move a0, s2 | a0 = s2;
0x00002d20 jalr t9 | t9 ();
0x00002d24 move s4, v0 | s4 = v0;
0x00002d28 lw gp, 0x18(fp) | gp = *(var_18h_3);
0x00002d2c srl s7, s7, 2 | s7 >>= 2;
| if (v0 == 0) {
0x00002d30 beqz v0, 0x3180 | goto label_7;
| }
0x00002d34 lw t9, -0x7e8c(gp) | t9 = sym.imp.malloc;
0x00002d38 addiu a0, s7, 1 | a0 = s7 + 1;
0x00002d3c jalr t9 | t9 ();
0x00002d40 move a1, v0 | a1 = v0;
0x00002d44 lw gp, 0x18(fp) | gp = *(var_18h_3);
| if (s7 == 0) {
0x00002d48 beqz s7, 0x2d6c | goto label_8;
| }
0x00002d4c move v1, v0 | v1 = v0;
0x00002d50 addu s6, s4, s6 | s6 = s4 + s6;
0x00002d54 addu v0, s7, v0 | v0 = s7 + v0;
| do {
0x00002d58 lw a0, (s6) | a0 = *(s6);
0x00002d5c addiu v1, v1, 1 | v1++;
0x00002d60 addiu s6, s6, 4 | s6 += 4;
0x00002d64 sb a0, -1(v1) | *((v1 - 1)) = a0;
0x00002d68 bne v0, v1, 0x2d58 |
| } while (v0 != v1);
| label_8:
0x00002d6c lw t9, -0x7ecc(gp) | t9 = sym.imp.strdup;
0x00002d70 move a0, a1 | a0 = a1;
0x00002d74 sw a1, 0x44(fp) | *(arg_44h) = a1;
0x00002d78 sb zero, (v0) | *(v0) = 0;
0x00002d7c jalr t9 | t9 ();
0x00002d80 lw gp, 0x18(fp) | gp = *(var_18h_3);
0x00002d84 lw a1, 0x44(fp) | a1 = *(arg_44h);
0x00002d88 sw v0, (s1) | *(s1) = v0;
0x00002d8c lw t9, -0x7e20(gp) | t9 = sym.imp.free;
0x00002d90 move a0, a1 | a0 = a1;
0x00002d94 jalr t9 | t9 ();
0x00002d98 lw gp, 0x18(fp) | gp = *(var_18h_3);
0x00002d9c lw v0, 4(s4) | v0 = *((s4 + 1));
0x00002da0 lw s6, 8(s4) | s6 = *((s4 + 2));
0x00002da4 sw v0, 0x38(fp) | *(arg_38h) = v0;
0x00002da8 lw v0, 0xc(s4) | v0 = *((s4 + 3));
0x00002dac lw t9, -0x7ebc(gp) | t9 = sym.imp.munmap;
0x00002db0 sw s6, 0x3c(fp) | *(arg_3ch) = s6;
0x00002db4 move a1, s0 | a1 = s0;
0x00002db8 move a0, s4 | a0 = s4;
0x00002dbc sw v0, 0x24(fp) | *(arg_24h) = v0;
0x00002dc0 jalr t9 | t9 ();
0x00002dc4 lw gp, 0x18(fp) | gp = *(var_18h_3);
| if (s6 != 0) {
0x00002dc8 bnez s6, 0x2eb4 | goto label_9;
| }
| label_2:
0x00002dcc lw t9, -0x7fc0(gp) | t9 = *((gp - 8176));
0x00002dd0 addiu t9, t9, 0x1ff0 | t9 += fcn.00001ff0;
0x00002dd4 bal 0x1ff0 | fcn_00001ff0 ();
0x00002dd8 nop |
0x00002ddc lw gp, 0x18(fp) | gp = *(var_18h_3);
0x00002de0 lw s0, (s1) | s0 = *(s1);
0x00002de4 addiu v0, s5, -0x3ff0 | v0 = s5 + -0x3ff0;
0x00002de8 lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x00002dec lw t9, -0x7ed0(gp) | t9 = sym.imp.strcmp;
0x00002df0 addiu a1, a1, -0x4cdc | a1 += -0x4cdc;
0x00002df4 move a0, s0 | a0 = s0;
0x00002df8 sw s1, 4(v0) | *((v0 + 1)) = s1;
0x00002dfc sw s3, -0x3ff0(s5) | *((s5 - 4092)) = s3;
0x00002e00 jalr t9 | t9 ();
0x00002e04 lw gp, 0x18(fp) | gp = *(var_18h_3);
| if (v0 != 0) {
0x00002e08 beqz v0, 0x2e28 |
0x00002e0c lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x00002e10 lw t9, -0x7ed0(gp) | t9 = sym.imp.strcmp;
0x00002e14 addiu a1, a1, -0x4ea0 | a1 += -0x4ea0;
0x00002e18 move a0, s0 | a0 = s0;
0x00002e1c jalr t9 | t9 ();
0x00002e20 lw gp, 0x18(fp) | gp = *(var_18h_3);
| if (v0 != 0) {
0x00002e24 bnez v0, 0x2e88 | goto label_10;
| }
| }
0x00002e28 lw v1, -0x7fbc(gp) | v1 = *(gp);
0x00002e2c addiu a0, zero, 1 | a0 = 1;
0x00002e30 move v0, zero | v0 = 0;
0x00002e34 sw a0, (v1) | *(v1) = a0;
| do {
| label_0:
0x00002e38 lw v1, 0x48(fp) | v1 = *(arg_48h);
0x00002e3c lw a0, 0x74(fp) | a0 = *(arg_74h);
0x00002e40 lw v1, (v1) | v1 = *(v1);
0x00002e44 lw t9, -0x7e94(gp) | t9 = sym.imp.__stack_chk_fail;
| if (a0 != v1) {
0x00002e48 bne a0, v1, 0x319c | goto label_11;
| }
0x00002e4c move sp, fp |
0x00002e50 lw ra, 0x9c(sp) | ra = *(var_9ch);
0x00002e54 lw fp, 0x98(sp) | fp = *(var_98h);
0x00002e58 lw s7, 0x94(sp) | s7 = *(var_94h);
0x00002e5c lw s6, 0x90(sp) | s6 = *(var_90h);
0x00002e60 lw s5, 0x8c(sp) | s5 = *(var_8ch);
0x00002e64 lw s4, 0x88(sp) | s4 = *(var_88h);
0x00002e68 lw s3, 0x84(sp) | s3 = *(var_84h);
0x00002e6c lw s2, 0x80(sp) | s2 = *(var_80h);
0x00002e70 lw s1, 0x7c(sp) | s1 = *(var_7ch);
0x00002e74 lw s0, 0x78(sp) | s0 = *(var_78h);
0x00002e78 addiu sp, sp, 0xa0 |
0x00002e7c jr ra | return v0;
| label_4:
0x00002e80 move v0, zero | v0 = 0;
0x00002e84 b 0x2e38 |
| } while (1);
| label_10:
0x00002e88 lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x00002e8c lw t9, -0x7ed0(gp) | t9 = sym.imp.strcmp;
0x00002e90 addiu a1, a1, -0x4cd4 | a1 += -0x4cd4;
0x00002e94 move a0, s0 | a0 = s0;
0x00002e98 jalr t9 | t9 ();
0x00002e9c lw gp, 0x18(fp) | gp = *(var_18h_3);
| if (v0 != 0) {
0x00002ea0 bnez v0, 0x30d8 | goto label_12;
| }
0x00002ea4 lw v1, -0x7fbc(gp) | v1 = *(gp);
0x00002ea8 addiu a0, zero, 2 | a0 = 2;
0x00002eac sw a0, (v1) | *(v1) = a0;
0x00002eb0 b 0x2e38 | goto label_0;
| label_9:
0x00002eb4 lw v0, 0x3c(fp) | v0 = *(arg_3ch);
0x00002eb8 lw t9, -0x7e8c(gp) | t9 = sym.imp.malloc;
0x00002ebc sll a0, v0, 2 | a0 = v0 << 2;
0x00002ec0 sw v0, 8(s1) | *((s1 + 2)) = v0;
0x00002ec4 jalr t9 | t9 ();
0x00002ec8 lw a1, 0x24(fp) | a1 = *(arg_24h);
0x00002ecc lw t9, 0x4c(fp) | t9 = *(arg_4ch);
0x00002ed0 move a0, s2 | a0 = s2;
0x00002ed4 sw v0, 0xc(s1) | *((s1 + 3)) = v0;
0x00002ed8 jalr t9 | t9 ();
0x00002edc sw v0, 0x20(fp) | *(arg_20h) = v0;
0x00002ee0 lw gp, 0x18(fp) | gp = *(var_18h_3);
| if (v0 == 0) {
0x00002ee4 beqz v0, 0x31cc | goto label_13;
| }
0x00002ee8 lw v0, 0x20(fp) | v0 = *(arg_20h);
0x00002eec addu s0, v0, s0 | s0 = v0 + s0;
0x00002ef0 lw v0, 0x3c(fp) | v0 = *(arg_3ch);
0x00002ef4 lw v0, 0x38(fp) | v0 = *(arg_38h);
| if (v0 <= 0) {
0x00002ef8 blez v0, 0x30c0 | goto label_14;
| }
0x00002efc addiu v1, fp, 0x54 | v1 = fp + 0x54;
0x00002f00 addiu v0, v0, 7 | v0 += 7;
0x00002f04 srl v0, v0, 3 | v0 >>= 3;
0x00002f08 sll v0, v0, 3 | v0 <<= 3;
0x00002f0c sw v0, 0x34(fp) | *(arg_34h) = v0;
0x00002f10 lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
0x00002f14 sw v1, 0x30(fp) | *(arg_30h) = v1;
0x00002f18 addiu v0, v0, -0x4f3c | v0 += -0x4f3c;
0x00002f1c addiu v1, fp, 0x58 | v1 = fp + 0x58;
0x00002f20 move s7, zero | s7 = 0;
0x00002f24 move s6, zero | s6 = 0;
0x00002f28 sw v1, 0x2c(fp) | *(arg_2ch) = v1;
0x00002f2c sw v0, 0x28(fp) | *(arg_28h) = v0;
0x00002f30 b 0x2f94 |
| while (v0 != 0) {
0x00002f34 lw t9, -0x7e8c(gp) | t9 = sym.imp.malloc;
0x00002f38 addiu a0, zero, 0x10 | a0 = 0x10;
0x00002f3c jalr t9 | t9 ();
0x00002f40 lw gp, 0x18(fp) | gp = *(var_18h_3);
0x00002f44 move a0, s4 | a0 = s4;
0x00002f48 move s4, v0 | s4 = v0;
0x00002f4c lw t9, -0x7ecc(gp) | t9 = sym.imp.strdup;
0x00002f50 addiu s7, s7, 1 | s7++;
0x00002f54 jalr t9 | t9 ();
0x00002f58 lw gp, 0x18(fp) | gp = *(var_18h_3);
0x00002f5c lw v1, 0xc(s1) | v1 = *((s1 + 3));
0x00002f60 sw v0, (s4) | *(s4) = v0;
0x00002f64 lw v0, 0x54(fp) | v0 = *(arg_54h);
0x00002f68 sll a0, s6, 2 | a0 = s6 << 2;
0x00002f6c sw v0, 4(s4) | *((s4 + 1)) = v0;
0x00002f70 addu v1, v1, a0 | v1 += a0;
0x00002f74 lw v0, 0x58(fp) | v0 = *(arg_58h);
0x00002f78 sw s2, 0xc(s4) | *((s4 + 3)) = s2;
0x00002f7c sw v0, 8(s4) | *((s4 + 2)) = v0;
0x00002f80 sw s4, (v1) | *(v1) = s4;
0x00002f84 lw v0, 0x3c(fp) | v0 = *(arg_3ch);
0x00002f88 addiu s6, s6, 1 | s6++;
0x00002f8c lw sp, 0x4c(fp) |
| if (v0 == s7) {
0x00002f90 beq v0, s7, 0x30c0 | goto label_14;
| }
| label_1:
0x00002f94 lw v0, 0x34(fp) | v0 = *(arg_34h);
0x00002f98 lw s2, 0x38(fp) | s2 = *(arg_38h);
0x00002f9c sw sp, 0x4c(fp) |
0x00002fa0 subu sp, sp, v0 |
0x00002fa4 lw t9, -0x7e48(gp) | t9 = sym.imp.memcpy;
0x00002fa8 addiu s4, sp, 0x18 | s4 = sp + 0x18;
0x00002fac move a1, s0 | a1 = s0;
0x00002fb0 move a2, s2 | a2 = s2;
0x00002fb4 addu s0, s0, s2 | s0 += s2;
0x00002fb8 move a0, s4 | a0 = s4;
0x00002fbc jalr t9 | t9 ();
0x00002fc0 addiu v1, s0, 4 | v1 = s0 + 4;
0x00002fc4 lwl a0, 3(s0) | __asm ("lwl a0, 3(s0)");
0x00002fc8 lwl v0, 3(v1) | __asm ("lwl v0, 3(v1)");
0x00002fcc lw gp, 0x18(fp) | gp = *(var_18h_3);
0x00002fd0 lwr a0, (s0) | __asm ("lwr a0, (s0)");
0x00002fd4 lwr v0, (v1) | __asm ("lwr v0, (v1)");
0x00002fd8 lw v1, 0x30(fp) | v1 = *(arg_30h);
0x00002fdc lw t9, -0x7e8c(gp) | t9 = sym.imp.malloc;
0x00002fe0 addiu s0, s0, 8 | s0 += 8;
0x00002fe4 sw a0, (v1) | *(v1) = a0;
0x00002fe8 lw v1, 0x2c(fp) | v1 = *(arg_2ch);
0x00002fec sll a0, v0, 2 | a0 = v0 << 2;
0x00002ff0 sw v0, (v1) | *(v1) = v0;
0x00002ff4 jalr t9 | t9 ();
0x00002ff8 lw gp, 0x18(fp) | gp = *(var_18h_3);
0x00002ffc lw a3, 0x58(fp) | a3 = *(arg_58h);
0x00003000 move a1, s0 | a1 = s0;
0x00003004 sll v1, a3, 2 | v1 = a3 << 2;
0x00003008 lw t9, -0x7e48(gp) | t9 = sym.imp.memcpy;
0x0000300c sw a3, 0x40(fp) | *(arg_40h) = a3;
0x00003010 move a2, v1 | a2 = v1;
0x00003014 sw v1, 0x44(fp) | *(arg_44h) = v1;
0x00003018 move a0, v0 | a0 = v0;
0x0000301c move s2, v0 | s2 = v0;
0x00003020 jalr t9 | t9 ();
0x00003024 lw gp, 0x18(fp) | gp = *(var_18h_3);
0x00003028 lw a1, 0x28(fp) | a1 = *(arg_28h);
0x0000302c lw t9, -0x7ed0(gp) | t9 = sym.imp.strcmp;
0x00003030 move a0, s4 | a0 = s4;
0x00003034 jalr t9 | t9 ();
0x00003038 lw v1, 0x44(fp) | v1 = *(arg_44h);
0x0000303c lw gp, 0x18(fp) | gp = *(var_18h_3);
0x00003040 addu s0, s0, v1 | s0 += v1;
0x00003044 lw a3, 0x40(fp) | a3 = *(arg_40h);
0x00003048 bnez v0, 0x2f34 |
| }
0x0000304c lw v0, 8(s1) | v0 = *((s1 + 2));
0x00003050 lw t9, -0x7e8c(gp) | t9 = sym.imp.malloc;
0x00003054 addiu v0, v0, -1 | v0 += -1;
0x00003058 sw v0, 8(s1) | *((s1 + 2)) = v0;
0x0000305c addiu a0, a3, 1 | a0 = a3 + 1;
0x00003060 jalr t9 | t9 ();
0x00003064 lw a2, 0x58(fp) | a2 = *(arg_58h);
0x00003068 lw gp, 0x18(fp) | gp = *(var_18h_3);
| if (a2 <= 0) {
0x0000306c blez a2, 0x3094 | goto label_15;
| }
0x00003070 sll a1, a2, 2 | a1 = a2 << 2;
0x00003074 move v1, s2 | v1 = s2;
0x00003078 move a0, v0 | a0 = v0;
0x0000307c addu a1, a1, s2 | a1 += s2;
| do {
0x00003080 lw a3, (v1) | a3 = *(v1);
0x00003084 addiu v1, v1, 4 | v1 += 4;
0x00003088 sb a3, (a0) | *(a0) = a3;
0x0000308c addiu a0, a0, 1 | a0++;
0x00003090 bne a1, v1, 0x3080 |
| } while (a1 != v1);
| label_15:
0x00003094 addu a2, v0, a2 | a2 = v0 + a2;
0x00003098 lw t9, -0x7e20(gp) | t9 = sym.imp.free;
0x0000309c sw v0, 4(s1) | *((s1 + 1)) = v0;
0x000030a0 sb zero, (a2) | *(a2) = 0;
0x000030a4 move a0, s2 | a0 = s2;
0x000030a8 jalr t9 | t9 ();
0x000030ac lw gp, 0x18(fp) | gp = *(var_18h_3);
0x000030b0 lw v0, 0x3c(fp) | v0 = *(arg_3ch);
0x000030b4 addiu s7, s7, 1 | s7++;
0x000030b8 lw sp, 0x4c(fp) |
| if (v0 != s7) {
0x000030bc bne v0, s7, 0x2f94 | goto label_1;
| }
| label_14:
0x000030c0 lw t9, -0x7ebc(gp) | t9 = sym.imp.munmap;
0x000030c4 lw a1, 0x24(fp) | a1 = *(arg_24h);
0x000030c8 lw a0, 0x20(fp) | a0 = *(arg_20h);
0x000030cc jalr t9 | t9 ();
0x000030d0 lw gp, 0x18(fp) | gp = *(var_18h_3);
0x000030d4 b 0x2dcc | goto label_2;
| label_12:
0x000030d8 lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x000030dc lw t9, -0x7ed0(gp) | t9 = sym.imp.strcmp;
0x000030e0 addiu a1, a1, -0x4ccc | a1 += -0x4ccc;
0x000030e4 move a0, s0 | a0 = s0;
0x000030e8 jalr t9 | t9 ();
0x000030ec lw gp, 0x18(fp) | gp = *(var_18h_3);
| if (v0 != 0) {
0x000030f0 bnez v0, 0x31a4 | goto label_16;
| }
0x000030f4 lw v1, -0x7fbc(gp) | v1 = *(gp);
0x000030f8 sw zero, (v1) | *(v1) = 0;
0x000030fc b 0x2e38 | goto label_0;
| label_5:
0x00003100 lw a0, -0x7fdc(gp) | a0 = *((gp - 8183));
0x00003104 lw t9, -0x7ecc(gp) | t9 = sym.imp.strdup;
0x00003108 addiu a0, a0, -0x4d84 | a0 += -0x4d84;
0x0000310c jalr t9 | t9 ();
0x00003110 lw gp, 0x18(fp) | gp = *(var_18h_3);
0x00003114 move s0, v0 | s0 = v0;
| do {
| label_3:
0x00003118 lw a2, -0x7fdc(gp) | a2 = *((gp - 8183));
0x0000311c lw t9, -0x7e74(gp) | t9 = sym.imp.__syslog_chk;
0x00003120 move a3, s3 | a3 = s3;
0x00003124 addiu a2, a2, -0x4d0c | a2 += -0x4d0c;
0x00003128 addiu a1, zero, 1 | a1 = 1;
0x0000312c addiu a0, zero, 3 | a0 = 3;
0x00003130 sw s0, 0x10(sp) | *(var_10h_5) = s0;
0x00003134 jalr t9 | t9 ();
0x00003138 lw gp, 0x18(fp) | gp = *(var_18h_3);
0x0000313c lw t9, -0x7e20(gp) | t9 = sym.imp.free;
0x00003140 move a0, s0 | a0 = s0;
0x00003144 jalr t9 | t9 ();
0x00003148 lw gp, 0x18(fp) | gp = *(var_18h_3);
0x0000314c lw t9, -0x7e20(gp) | t9 = sym.imp.free;
0x00003150 move a0, s1 | a0 = s1;
0x00003154 jalr t9 | t9 ();
0x00003158 lw gp, 0x18(fp) | gp = *(var_18h_3);
0x0000315c addiu v0, zero, -1 | v0 = -1;
0x00003160 b 0x2e38 | goto label_0;
| label_6:
0x00003164 lw a0, -0x7fdc(gp) | a0 = *((gp - 8183));
0x00003168 lw t9, -0x7ecc(gp) | t9 = sym.imp.strdup;
0x0000316c addiu a0, a0, -0x4d64 | a0 += -0x4d64;
0x00003170 jalr t9 | t9 ();
0x00003174 move s0, v0 | s0 = v0;
0x00003178 lw gp, 0x18(fp) | gp = *(var_18h_3);
0x0000317c b 0x3118 |
| } while (1);
| label_7:
0x00003180 lw a0, -0x7fdc(gp) | a0 = *((gp - 8183));
0x00003184 lw t9, -0x7ecc(gp) | t9 = sym.imp.strdup;
0x00003188 addiu a0, a0, -0x4d44 | a0 += -0x4d44;
0x0000318c jalr t9 | t9 ();
0x00003190 move s0, v0 | s0 = v0;
0x00003194 lw gp, 0x18(fp) | gp = *(var_18h_3);
0x00003198 b 0x3118 | goto label_3;
| label_11:
0x0000319c jalr t9 | t9 ();
0x000031a0 nop |
| label_16:
0x000031a4 lw a2, -0x7fdc(gp) | a2 = *((gp - 8183));
0x000031a8 lw t9, -0x7e74(gp) | t9 = sym.imp.__syslog_chk;
0x000031ac move a3, s0 | a3 = s0;
0x000031b0 addiu a2, a2, -0x4cc4 | a2 += -0x4cc4;
0x000031b4 addiu a1, zero, 1 | a1 = 1;
0x000031b8 addiu a0, zero, 3 | a0 = 3;
0x000031bc jalr t9 | t9 ();
0x000031c0 lw gp, 0x18(fp) | gp = *(var_18h_3);
0x000031c4 addiu v0, zero, -1 | v0 = -1;
0x000031c8 b 0x2e38 | goto label_0;
| label_13:
0x000031cc lw a0, -0x7fdc(gp) | a0 = *((gp - 8183));
0x000031d0 lw t9, -0x7ecc(gp) | t9 = sym.imp.strdup;
0x000031d4 addiu a0, a0, -0x4d24 | a0 += -0x4d24;
0x000031d8 jalr t9 | t9 ();
0x000031dc move s0, v0 | s0 = v0;
0x000031e0 lw gp, 0x18(fp) | gp = *(var_18h_3);
0x000031e4 b 0x3118 | goto label_3;
| }
[*] Function printf used 7 times shuttergain.cgi