[*] Binary protection state of getparamdependencies.cgi
Full RELRO Canary found NX disabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function printf tear down of getparamdependencies.cgi
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/html/axis-cgi/imagecontrol/getparamdependencies.cgi @ 0x910 */
| #include <stdint.h>
|
; (fcn) main () | int32_t main () {
| /* [13] -r-x section size 944 named .text */
0x00000910 lui gp, 2 |
0x00000914 addiu gp, gp, -0x7900 |
0x00000918 addu gp, gp, t9 | gp += t9;
0x0000091c addiu sp, sp, -0x38 |
0x00000920 lw t9, -0x7fb4(gp) | t9 = sym.imp.g_file_test;
0x00000924 sw s0, 0x24(sp) | *(var_24h) = s0;
0x00000928 lw s0, -0x7f90(gp) | s0 = *((gp - 8164));
0x0000092c sw s1, 0x28(sp) | *(var_28h) = s1;
0x00000930 lw s1, -0x7fdc(gp) | s1 = *((gp - 8183));
0x00000934 lw v0, (s0) | v0 = *(s0);
0x00000938 sw gp, 0x10(sp) | *(var_10h) = gp;
0x0000093c sw ra, 0x34(sp) | *(var_34h) = ra;
0x00000940 sw s3, 0x30(sp) | *(var_30h) = s3;
0x00000944 sw s2, 0x2c(sp) | *(var_2ch) = s2;
0x00000948 addiu a1, zero, 0x10 | a1 = 0x10;
0x0000094c addiu a0, s1, 0xd88 | a0 = s1 + str.paramdependencies.json;
0x00000950 sw v0, 0x1c(sp) | *(var_1ch) = v0;
0x00000954 sw zero, 0x18(sp) | *(var_18h) = 0;
0x00000958 jalr t9 | t9 ();
0x0000095c nop |
0x00000960 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x00000964 beqz v0, 0xa38 | goto label_1;
| }
0x00000968 lw t9, -0x7f8c(gp) | t9 = sym.imp.g_mapped_file_new;
0x0000096c addiu a0, s1, 0xd88 | a0 = s1 + str.paramdependencies.json;
0x00000970 addiu a2, sp, 0x18 | a2 = sp + 0x18;
0x00000974 move a1, zero | a1 = 0;
0x00000978 jalr t9 | t9 ();
0x0000097c move s1, v0 | s1 = v0;
0x00000980 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x00000984 beqz v0, 0xa7c | goto label_2;
| }
0x00000988 lw t9, -0x7f80(gp) | t9 = sym.imp.g_mapped_file_get_contents;
0x0000098c move a0, v0 | a0 = v0;
0x00000990 jalr t9 | t9 ();
0x00000994 move s2, v0 | s2 = v0;
0x00000998 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 != 0) {
0x0000099c beqz v0, 0x9fc |
0x000009a0 lw t9, -0x7f98(gp) | t9 = sym.imp.g_mapped_file_get_length;
0x000009a4 move a0, s1 | a0 = s1;
0x000009a8 jalr t9 | t9 ();
0x000009ac lw gp, 0x10(sp) | gp = *(var_10h);
0x000009b0 move s3, v0 | s3 = v0;
0x000009b4 lw a0, -0x7fdc(gp) | a0 = *((gp - 8183));
0x000009b8 lw t9, -0x7f9c(gp) | t9 = sym.imp.puts;
0x000009bc addiu a0, a0, 0xda0 | a0 += str.Content_Type:_application_json_r;
0x000009c0 jalr t9 | t9 ();
0x000009c4 lw gp, 0x10(sp) | gp = *(var_10h);
0x000009c8 lw a0, -0x7fdc(gp) | a0 = *((gp - 8183));
0x000009cc lw t9, -0x7f9c(gp) | t9 = sym.imp.puts;
0x000009d0 addiu a0, a0, 0xdc0 | a0 += 0xdc0;
0x000009d4 jalr t9 | t9 ();
0x000009d8 lw gp, 0x10(sp) | gp = *(var_10h);
0x000009dc move a3, s2 | a3 = s2;
0x000009e0 move a2, s3 | a2 = s3;
0x000009e4 lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x000009e8 lw t9, -0x7fac(gp) | t9 = sym.imp.__printf_chk
0x000009ec addiu a1, a1, 0xdc4 | a1 += str._.s;
0x000009f0 addiu a0, zero, 1 | a0 = 1;
0x000009f4 jalr t9 | t9 ();
0x000009f8 lw gp, 0x10(sp) | gp = *(var_10h);
| }
0x000009fc lw t9, -0x7fa8(gp) | t9 = sym.imp.g_mapped_file_unref;
0x00000a00 move a0, s1 | a0 = s1;
0x00000a04 jalr t9 | t9 ();
0x00000a08 lw gp, 0x10(sp) | gp = *(var_10h);
| do {
| label_0:
0x00000a0c lw a0, 0x1c(sp) | a0 = *(var_1ch);
0x00000a10 lw v1, (s0) | v1 = *(s0);
0x00000a14 move v0, zero | v0 = 0;
| if (a0 != v1) {
0x00000a18 bne a0, v1, 0xa94 | goto label_3;
| }
0x00000a1c lw ra, 0x34(sp) | ra = *(var_34h);
0x00000a20 lw s3, 0x30(sp) | s3 = *(var_30h);
0x00000a24 lw s2, 0x2c(sp) | s2 = *(var_2ch);
0x00000a28 lw s1, 0x28(sp) | s1 = *(var_28h);
0x00000a2c lw s0, 0x24(sp) | s0 = *(var_24h);
0x00000a30 addiu sp, sp, 0x38 |
0x00000a34 jr ra | return v0;
| label_1:
0x00000a38 lw a0, -0x7fdc(gp) | a0 = *((gp - 8183));
0x00000a3c lw t9, -0x7f9c(gp) | t9 = sym.imp.puts;
0x00000a40 addiu a0, a0, 0xda0 | a0 += str.Content_Type:_application_json_r;
0x00000a44 jalr t9 | t9 ();
0x00000a48 lw gp, 0x10(sp) | gp = *(var_10h);
0x00000a4c lw a0, -0x7fdc(gp) | a0 = *((gp - 8183));
0x00000a50 lw t9, -0x7f9c(gp) | t9 = sym.imp.puts;
0x00000a54 addiu a0, a0, 0xdc0 | a0 += 0xdc0;
0x00000a58 jalr t9 | t9 ();
0x00000a5c lw gp, 0x10(sp) | gp = *(var_10h);
0x00000a60 addiu a0, zero, 1 | a0 = 1;
0x00000a64 lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x00000a68 lw t9, -0x7fac(gp) | t9 = sym.imp.__printf_chk
0x00000a6c addiu a1, a1, 0xdf4 | a1 += 0xdf4;
0x00000a70 jalr t9 | t9 ();
0x00000a74 lw gp, 0x10(sp) | gp = *(var_10h);
0x00000a78 b 0xa0c |
| } while (1);
| label_2:
0x00000a7c lw a0, -0x7fdc(gp) | a0 = *((gp - 8183));
0x00000a80 lw t9, -0x7f9c(gp) | t9 = sym.imp.puts;
0x00000a84 addiu a0, a0, 0xdcc | a0 += str.Status:_500_Internal_Server_Error_r_n_r;
0x00000a88 jalr t9 | t9 ();
0x00000a8c lw gp, 0x10(sp) | gp = *(var_10h);
0x00000a90 b 0xa0c | goto label_0;
| label_3:
0x00000a94 lw t9, -0x7f94(gp) | t9 = sym.imp.__stack_chk_fail;
0x00000a98 jalr t9 | t9 ();
0x00000a9c nop |
| }
[*] Function printf used 3 times getparamdependencies.cgi