[*] Binary protection state of restart.cgi
Full RELRO Canary found NX disabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function system tear down of restart.cgi
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/html/axis-cgi/restart.cgi @ 0x870 */
| #include <stdint.h>
|
; (fcn) main () | int32_t main () {
| /* [13] -r-x section size 848 named .text */
0x00000870 lui gp, 2 |
0x00000874 addiu gp, gp, -0x7860 |
0x00000878 addu gp, gp, t9 | gp += t9;
0x0000087c lw v0, -0x7f94(gp) | v0 = *((gp - 8165));
0x00000880 addiu sp, sp, -0x48 |
0x00000884 lw t9, -0x7fa0(gp) | t9 = sym.imp.sd_bus_open_system
0x00000888 lw v0, (v0) | v0 = *(v0);
0x0000088c addiu a0, sp, 0x28 | a0 = sp + 0x28;
0x00000890 sw gp, 0x20(sp) | *(var_20h) = gp;
0x00000894 sw ra, 0x44(sp) | *(var_44h) = ra;
0x00000898 sw s0, 0x40(sp) | *(var_40h) = s0;
0x0000089c sw zero, 0x28(sp) | *(var_28h) = 0;
0x000008a0 sw v0, 0x3c(sp) | *(var_3ch) = v0;
0x000008a4 jalr t9 | t9 ();
0x000008a8 nop |
0x000008ac lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 < 0) {
0x000008b0 bltz v0, 0x984 | goto label_1;
| }
0x000008b4 addiu v0, sp, 0x2c | v0 = sp + 0x2c;
0x000008b8 sw v0, 0x18(sp) | *(var_18h) = v0;
0x000008bc addiu v0, sp, 0x30 | v0 = sp + 0x30;
0x000008c0 lw s0, -0x7fdc(gp) | s0 = *((gp - 8183));
0x000008c4 lw a3, -0x7fdc(gp) | a3 = *((gp - 8183));
0x000008c8 sw v0, 0x14(sp) | *(var_14h) = v0;
0x000008cc lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
0x000008d0 lw a2, -0x7fdc(gp) | a2 = *((gp - 8183));
0x000008d4 lw t9, -0x7f98(gp) | t9 = sym.imp.sd_bus_call_method;
0x000008d8 addiu a3, a3, 0xcb8 | a3 += str.com.axis.FirmwareManager1;
0x000008dc addiu v0, v0, 0xcf0 | v0 += str.Reboot;
0x000008e0 addiu s0, s0, 0xcb4 | s0 += 0xcb4;
0x000008e4 lw a0, 0x28(sp) | a0 = *(var_28h);
0x000008e8 sw s0, 0x1c(sp) | *(var_1ch) = s0;
0x000008ec sw v0, 0x10(sp) | *(var_10h) = v0;
0x000008f0 addiu a2, a2, 0xcd4 | a2 += str._com_axis_FirmwareManager1;
0x000008f4 move a1, a3 | a1 = a3;
0x000008f8 sw zero, 0x30(sp) | *(var_30h) = 0;
0x000008fc sw zero, 0x34(sp) | *(var_34h) = 0;
0x00000900 sw zero, 0x38(sp) | *(var_38h) = 0;
0x00000904 sw zero, 0x2c(sp) | *(var_2ch) = 0;
0x00000908 jalr t9 | t9 ();
0x0000090c lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 >= 0) {
0x00000910 bltz v0, 0x954 |
0x00000914 lw a0, -0x7fdc(gp) | a0 = *((gp - 8183));
0x00000918 lw t9, -0x7f9c(gp) | t9 = sym.imp.getenv;
0x0000091c addiu a0, a0, 0xcf8 | a0 += str.SERVER_NAME;
0x00000920 jalr t9 | t9 ();
0x00000924 lw gp, 0x20(sp) | gp = *(var_20h);
0x00000928 move a2, s0 | a2 = s0;
0x0000092c addiu a0, zero, 1 | a0 = 1;
0x00000930 lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x00000934 lw t9, -0x7fb0(gp) | t9 = sym.imp.__printf_chk;
| if (v0 == 0) {
0x00000938 movn a2, v0, v0 | a2 = v0;
| }
0x0000093c addiu a1, a1, 0xd04 | a1 += str.Cache_Control:_no_cache_r_nPragma:_no_cache_r_nExpires:_Thu__01_Dec_1994_16:00:00_GMT_r_nContent_Type:_text_html_r_n_r_n_html__head__meta_http_equiv_refresh__content_0_URL_admin_restartMessage.shtml_server_s____head__body___body___html_;
0x00000940 jalr t9 | t9 ();
0x00000944 lw gp, 0x20(sp) | gp = *(var_20h);
0x00000948 lw t9, -0x7fa8(gp) | t9 = sym.imp.exit;
0x0000094c move a0, zero | a0 = 0;
0x00000950 jalr t9 | t9 ();
| }
0x00000954 lw a2, 0x34(sp) | a2 = *(var_34h);
| if (a2 == 0) {
0x00000958 beql a2, zero, 0x998 | goto label_2;
| }
0x0000095c lw a2, -0x7fdc(gp) | a2 = *((gp - 8183));
| label_0:
0x00000960 lw t9, -0x7fb0(gp) | t9 = sym.imp.__printf_chk;
0x00000964 addiu a0, zero, 1 | a0 = 1;
| do {
0x00000968 lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x0000096c addiu a1, a1, 0xc78 | a1 += str.Status:_500_Internal_Error_r_nContent_Type:_text_plain_r_n_r_n_s_r_n;
0x00000970 jalr t9 | t9 ();
0x00000974 lw gp, 0x20(sp) | gp = *(var_20h);
0x00000978 lw t9, -0x7fa8(gp) | t9 = sym.imp.exit;
0x0000097c addiu a0, zero, 1 | a0 = 1;
0x00000980 jalr t9 | t9 ();
| label_1:
0x00000984 lw a2, -0x7fdc(gp) | a2 = *((gp - 8183));
0x00000988 lw t9, -0x7fb0(gp) | t9 = sym.imp.__printf_chk;
0x0000098c addiu a0, zero, 1 | a0 = 1;
0x00000990 addiu a2, a2, 0xc58 | a2 += str.Unable_to_contact_DBus_service.;
0x00000994 b 0x968 |
| } while (1);
| label_2:
0x00000998 addiu a2, a2, 0xc58 | a2 += str.Unable_to_contact_DBus_service.;
0x0000099c b 0x960 | goto label_0;
| }
[*] Function system used 2 times restart.cgi