[*] Binary protection state of packagemanager.cgi
Full RELRO Canary found NX disabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function printf tear down of packagemanager.cgi
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/html/axis-cgi/packagemanager.cgi @ 0xdba0 */
| #include <stdint.h>
|
; (fcn) sym.pm_dispatcher_get_handler () | void pm_dispatcher_get_handler () {
0x0000dba0 lui gp, 2 |
0x0000dba4 addiu gp, gp, 0x3470 |
0x0000dba8 addu gp, gp, t9 | gp += t9;
0x0000dbac addiu sp, sp, -0x158 |
0x0000dbb0 sw s4, 0x144(sp) | *(var_144h) = s4;
0x0000dbb4 lw s4, -0x7db8(gp) | s4 = *((gp - 8046));
0x0000dbb8 sw gp, 0x20(sp) | *(var_20h) = gp;
0x0000dbbc sw ra, 0x154(sp) | *(var_154h) = ra;
0x0000dbc0 lw v0, (s4) | v0 = *(s4);
0x0000dbc4 sw s7, 0x150(sp) | *(var_150h) = s7;
0x0000dbc8 sw s6, 0x14c(sp) | *(var_14ch) = s6;
0x0000dbcc sw s5, 0x148(sp) | *(var_148h) = s5;
0x0000dbd0 sw s3, 0x140(sp) | *(var_140h) = s3;
0x0000dbd4 sw s2, 0x13c(sp) | *(var_13ch) = s2;
0x0000dbd8 sw s1, 0x138(sp) | *(var_138h) = s1;
0x0000dbdc sw s0, 0x134(sp) | *(var_134h) = s0;
0x0000dbe0 sw v0, 0x12c(sp) | *(var_12ch) = v0;
0x0000dbe4 lw v0, -0x7fb4(gp) | v0 = *(gp);
| if (a0 == 0) {
0x0000dbe8 beqz a0, 0xde9c | goto label_5;
| }
0x0000dbec lb v0, (a0) | v0 = *(a0);
0x0000dbf0 move s3, a0 | s3 = a0;
| if (v0 == 0) {
0x0000dbf4 beqz v0, 0xde98 | goto label_6;
| }
0x0000dbf8 lw t9, -0x7f28(gp) | t9 = sym.pm_request_parser_get_acap_gen;
0x0000dbfc move s6, a1 | s6 = a1;
0x0000dc00 bal 0xca60 | sym_pm_request_parser_get_acap_gen ();
0x0000dc04 lw gp, 0x20(sp) | gp = *(var_20h);
0x0000dc08 move a1, s3 | a1 = s3;
0x0000dc0c move s0, v0 | s0 = v0;
0x0000dc10 lw a0, -0x7fb4(gp) | a0 = *(gp);
0x0000dc14 lw t9, -0x7cbc(gp) | t9 = sym.imp.g_strcmp0;
| /* str.start */
0x0000dc18 addiu a0, a0, 0x71f4 | a0 += 0x71f4;
0x0000dc1c jalr t9 | t9 ();
0x0000dc20 lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 != 0) {
0x0000dc24 bnez v0, 0xddb0 | goto label_7;
| }
| label_0:
0x0000dc28 addiu v0, zero, 2 | v0 = 2;
| if (s0 == v0) {
0x0000dc2c beql s0, v0, 0xde78 | goto label_8;
| }
0x0000dc30 lw a0, -0x7fb4(gp) | a0 = *(gp);
| label_1:
0x0000dc34 lw a0, -0x7fb4(gp) | a0 = *(gp);
| label_3:
0x0000dc38 lw t9, -0x7cc4(gp) | t9 = sym.imp.g_strdup;
0x0000dc3c addiu a0, a0, 0x5df4 | a0 += 0x5df4;
0x0000dc40 jalr t9 | t9 ();
0x0000dc44 lw gp, 0x20(sp) | gp = *(var_20h);
0x0000dc48 move s5, v0 | s5 = v0;
| label_2:
0x0000dc4c lw a2, -0x7fb4(gp) | a2 = *(gp);
0x0000dc50 lw t9, -0x7d8c(gp) | t9 = sym.imp.g_snprintf
0x0000dc54 addiu s2, sp, 0x2c | s2 = sp + 0x2c;
0x0000dc58 move a0, s2 | a0 = s2;
0x0000dc5c sw s3, 0x10(sp) | *(var_10h) = s3;
0x0000dc60 move a3, s5 | a3 = s5;
| /* str._s_s */
0x0000dc64 addiu a2, a2, 0x724c | a2 += 0x724c;
0x0000dc68 addiu a1, zero, 0x100 | a1 = 0x100;
0x0000dc6c jalr t9 | t9 ();
0x0000dc70 lw gp, 0x20(sp) | gp = *(var_20h);
0x0000dc74 move s0, zero | s0 = 0;
0x0000dc78 addiu s7, zero, 0xf | s7 = 0xf;
0x0000dc7c lw s1, -0x7fa8(gp) | s1 = *((gp - 8170));
0x0000dc80 lw a0, -0x7fb4(gp) | a0 = *(gp);
| /* esilref: 'start' */
0x0000dc84 addiu s1, s1, -0x7070 | s1 += -0x7070;
| /* str.getSupportedVersions */
0x0000dc88 addiu a0, a0, 0x71a0 | a0 += 0x71a0;
0x0000dc8c b 0xdc94 |
| while (s0 == s7) {
0x0000dc90 addiu s1, s1, 8 | s1 += 8;
0x0000dc94 lw t9, -0x7cbc(gp) | t9 = sym.imp.g_strcmp0;
0x0000dc98 move a1, s2 | a1 = s2;
0x0000dc9c jalr t9 | t9 ();
0x0000dca0 lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 == 0) {
0x0000dca4 beqz v0, 0xdd54 | goto label_9;
| }
0x0000dca8 addiu s0, s0, 1 | s0++;
0x0000dcac lw a0, (s1) | a0 = *(s1);
0x0000dcb0 bnel s0, s7, 0xdc90 |
| }
0x0000dcb4 lw t9, -0x7cc8(gp) | t9 = sym.imp.g_clear_error;
0x0000dcb8 move a0, s6 | a0 = s6;
0x0000dcbc jalr t9 | t9 ();
0x0000dcc0 lw gp, 0x20(sp) | gp = *(var_20h);
0x0000dcc4 lw t9, -0x7fb0(gp) | t9 = sym.pm_error_quark;
0x0000dcc8 move s0, zero | s0 = 0;
0x0000dccc bal 0xdf30 | sym_pm_error_quark ();
0x0000dcd0 lw gp, 0x20(sp) | gp = *(var_20h);
0x0000dcd4 move a1, v0 | a1 = v0;
0x0000dcd8 addiu a2, zero, 0xa | a2 = 0xa;
0x0000dcdc lw a3, -0x7fb4(gp) | a3 = *(gp);
0x0000dce0 lw t9, -0x7db0(gp) | t9 = sym.imp.g_set_error;
| /* esilref: 'Unknown method &s' */
0x0000dce4 addiu a3, a3, 0x7260 | a3 += 0x7260;
0x0000dce8 move a0, s6 | a0 = s6;
0x0000dcec sw s3, 0x10(sp) | *(var_10h) = s3;
0x0000dcf0 jalr t9 | t9 ();
0x0000dcf4 lw gp, 0x20(sp) | gp = *(var_20h);
0x0000dcf8 addiu a1, zero, 0x10 | a1 = 0x10;
0x0000dcfc move a0, zero | a0 = 0;
0x0000dd00 lw v0, -0x7fb4(gp) | v0 = *(gp);
0x0000dd04 lw a3, -0x7fb4(gp) | a3 = *(gp);
| /* str.pm_dispatcher_get_handler */
0x0000dd08 addiu v0, v0, 0x72f0 | v0 += 0x72f0;
0x0000dd0c sw v0, 0x18(sp) | *(var_18h) = v0;
0x0000dd10 addiu v0, zero, 0x6f | v0 = 0x6f;
0x0000dd14 sw v0, 0x14(sp) | *(var_14h) = v0;
0x0000dd18 lw v0, -0x7fb4(gp) | v0 = *(gp);
0x0000dd1c lw a2, -0x7fb4(gp) | a2 = *(gp);
0x0000dd20 lw t9, -0x7ec4(gp) | t9 = sym.imp.g_log;
| /* str.pm_dispatcher.c */
0x0000dd24 addiu v0, v0, 0x71e4 | v0 += 0x71e4;
0x0000dd28 addiu a3, a3, 0x5df4 | a3 += 0x5df4;
| /* str._s_s:_d__s:_Unknown_method__s */
0x0000dd2c addiu a2, a2, 0x7254 | a2 += 0x7254;
0x0000dd30 sw v0, 0x10(sp) | *(var_10h) = v0;
0x0000dd34 sw s3, 0x1c(sp) | *(var_1ch) = s3;
0x0000dd38 jalr t9 | t9 ();
0x0000dd3c lw gp, 0x20(sp) | gp = *(var_20h);
0x0000dd40 lw t9, -0x7c54(gp) | t9 = sym.imp.g_free;
0x0000dd44 move a0, s5 | a0 = s5;
0x0000dd48 jalr t9 | t9 ();
0x0000dd4c lw gp, 0x20(sp) | gp = *(var_20h);
0x0000dd50 b 0xdd74 | goto label_4;
| label_9:
0x0000dd54 lw v0, -0x7fa8(gp) | v0 = *((gp - 8170));
0x0000dd58 lw t9, -0x7c54(gp) | t9 = sym.imp.g_free;
| /* esilref: 'getSupportedVersions' */
0x0000dd5c addiu v0, v0, -0x7078 | v0 += -0x7078;
0x0000dd60 sll s0, s0, 3 | s0 <<= 3;
0x0000dd64 move a0, s5 | a0 = s5;
0x0000dd68 addu s0, v0, s0 | s0 = v0 + s0;
0x0000dd6c jalr t9 | t9 ();
0x0000dd70 lw gp, 0x20(sp) | gp = *(var_20h);
| label_4:
0x0000dd74 lw a0, 0x12c(sp) | a0 = *(var_12ch);
0x0000dd78 lw v1, (s4) | v1 = *(s4);
0x0000dd7c move v0, s0 | v0 = s0;
| if (a0 != v1) {
0x0000dd80 bne a0, v1, 0xdee4 | goto label_10;
| }
0x0000dd84 lw ra, 0x154(sp) | ra = *(var_154h);
0x0000dd88 lw s7, 0x150(sp) | s7 = *(var_150h);
0x0000dd8c lw s6, 0x14c(sp) | s6 = *(var_14ch);
0x0000dd90 lw s5, 0x148(sp) | s5 = *(var_148h);
0x0000dd94 lw s4, 0x144(sp) | s4 = *(var_144h);
0x0000dd98 lw s3, 0x140(sp) | s3 = *(var_140h);
0x0000dd9c lw s2, 0x13c(sp) | s2 = *(var_13ch);
0x0000dda0 lw s1, 0x138(sp) | s1 = *(var_138h);
0x0000dda4 lw s0, 0x134(sp) | s0 = *(var_134h);
0x0000dda8 addiu sp, sp, 0x158 |
0x0000ddac jr ra | return v0;
| label_7:
0x0000ddb0 lw a0, -0x7fb4(gp) | a0 = *(gp);
0x0000ddb4 lw t9, -0x7cbc(gp) | t9 = sym.imp.g_strcmp0;
0x0000ddb8 move a1, s3 | a1 = s3;
| /* str.stop */
0x0000ddbc addiu a0, a0, 0x71fc | a0 += 0x71fc;
0x0000ddc0 jalr t9 | t9 ();
0x0000ddc4 lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 == 0) {
0x0000ddc8 beqz v0, 0xdc28 | goto label_0;
| }
0x0000ddcc lw a0, -0x7fb4(gp) | a0 = *(gp);
0x0000ddd0 lw t9, -0x7cbc(gp) | t9 = sym.imp.g_strcmp0;
0x0000ddd4 move a1, s3 | a1 = s3;
| /* str.uninstall */
0x0000ddd8 addiu a0, a0, 0x7204 | a0 += 0x7204;
0x0000dddc jalr t9 | t9 ();
0x0000dde0 lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 == 0) {
0x0000dde4 beqz v0, 0xdc28 | goto label_0;
| }
0x0000dde8 lw a0, -0x7fb4(gp) | a0 = *(gp);
0x0000ddec lw t9, -0x7cbc(gp) | t9 = sym.imp.g_strcmp0;
0x0000ddf0 move a1, s3 | a1 = s3;
| /* str.addLicenseKey */
0x0000ddf4 addiu a0, a0, 0x7210 | a0 += 0x7210;
0x0000ddf8 jalr t9 | t9 ();
0x0000ddfc lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 == 0) {
0x0000de00 beqz v0, 0xdc28 | goto label_0;
| }
0x0000de04 lw a0, -0x7fb4(gp) | a0 = *(gp);
0x0000de08 lw t9, -0x7cbc(gp) | t9 = sym.imp.g_strcmp0;
0x0000de0c move a1, s3 | a1 = s3;
| /* str.removeLicenseKey */
0x0000de10 addiu a0, a0, 0x7220 | a0 += 0x7220;
0x0000de14 jalr t9 | t9 ();
0x0000de18 lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 == 0) {
0x0000de1c beqz v0, 0xdc28 | goto label_0;
| }
0x0000de20 lw a0, -0x7fb4(gp) | a0 = *(gp);
0x0000de24 lw t9, -0x7cbc(gp) | t9 = sym.imp.g_strcmp0;
0x0000de28 move a1, s3 | a1 = s3;
| /* str.install */
0x0000de2c addiu a0, a0, 0x723c | a0 += 0x723c;
0x0000de30 jalr t9 | t9 ();
0x0000de34 lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 != 0) {
0x0000de38 bnez v0, 0xdc34 | goto label_1;
| }
0x0000de3c lw t9, -0x7f94(gp) | t9 = sym.pm_request_parser_get_file;
0x0000de40 move a0, s6 | a0 = s6;
0x0000de44 bal 0xa5dc | sym_pm_request_parser_get_file ();
0x0000de48 addiu v1, zero, 2 | v1 = 2;
0x0000de4c lw gp, 0x20(sp) | gp = *(var_20h);
| if (s0 == v1) {
0x0000de50 beq s0, v1, 0xde74 | goto label_11;
| }
0x0000de54 lw a1, -0x7fb4(gp) | a1 = *(gp);
| if (v0 == 0) {
0x0000de58 beqz v0, 0xdc34 | goto label_1;
| }
0x0000de5c lw t9, -0x7e84(gp) | t9 = sym.imp.g_str_has_suffix;
| /* str..eap */
0x0000de60 addiu a1, a1, 0x7244 | a1 += 0x7244;
0x0000de64 move a0, v0 | a0 = v0;
0x0000de68 jalr t9 | t9 ();
0x0000de6c lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 == 0) {
0x0000de70 beqz v0, 0xdc34 | goto label_1;
| }
| label_11:
0x0000de74 lw a0, -0x7fb4(gp) | a0 = *(gp);
| label_8:
0x0000de78 lw t9, -0x7cc4(gp) | t9 = sym.imp.g_strdup;
| /* str.acap_ */
0x0000de7c addiu a0, a0, 0x7234 | a0 += 0x7234;
0x0000de80 jalr t9 | t9 ();
0x0000de84 move s5, v0 | s5 = v0;
0x0000de88 lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 != 0) {
0x0000de8c bnez v0, 0xdc4c | goto label_2;
| }
0x0000de90 lw a0, -0x7fb4(gp) | a0 = *(gp);
0x0000de94 b 0xdc38 | goto label_3;
| label_6:
0x0000de98 lw v0, -0x7fb4(gp) | v0 = *(gp);
| label_5:
0x0000de9c lw a3, -0x7fb4(gp) | a3 = *(gp);
| /* str.pm_dispatcher_get_handler */
0x0000dea0 addiu v0, v0, 0x72f0 | v0 += 0x72f0;
0x0000dea4 sw v0, 0x18(sp) | *(var_18h) = v0;
0x0000dea8 addiu v0, zero, 0x49 | v0 = 0x49;
0x0000deac sw v0, 0x14(sp) | *(var_14h) = v0;
0x0000deb0 lw v0, -0x7fb4(gp) | v0 = *(gp);
0x0000deb4 lw a2, -0x7fb4(gp) | a2 = *(gp);
0x0000deb8 lw t9, -0x7ec4(gp) | t9 = sym.imp.g_log;
| /* str.pm_dispatcher.c */
0x0000debc addiu v0, v0, 0x71e4 | v0 += 0x71e4;
0x0000dec0 sw v0, 0x10(sp) | *(var_10h) = v0;
0x0000dec4 addiu a3, a3, 0x5df4 | a3 += 0x5df4;
| /* str._s_s:_d__s:_Method_name_is_NULL_or_empty */
0x0000dec8 addiu a2, a2, 0x71b8 | a2 += 0x71b8;
0x0000decc addiu a1, zero, 0x10 | a1 = 0x10;
0x0000ded0 move a0, zero | a0 = 0;
0x0000ded4 jalr t9 | t9 ();
0x0000ded8 move s0, zero | s0 = 0;
0x0000dedc lw gp, 0x20(sp) | gp = *(var_20h);
0x0000dee0 b 0xdd74 | goto label_4;
| label_10:
0x0000dee4 lw t9, -0x7e08(gp) | t9 = sym.imp.__stack_chk_fail;
0x0000dee8 jalr t9 | t9 ();
0x0000deec nop |
| }
[*] Function printf used 2 times packagemanager.cgi