[*] Binary protection state of basic-device-info
Full RELRO Canary found NX disabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function printf tear down of basic-device-info
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/sbin/basic-device-info @ 0x31cc */
| #include <stdint.h>
|
; (fcn) sym.bdi_dbus_fini () | void bdi_dbus_fini () {
0x000031cc lui gp, 2 |
0x000031d0 addiu gp, gp, -0x419c |
0x000031d4 addu gp, gp, t9 | gp += t9;
0x000031d8 addiu sp, sp, -0x48 |
0x000031dc lw v1, -0x7fd0(gp) | v1 = *((gp - 8180));
0x000031e0 sw s1, 0x3c(sp) | *(var_3ch) = s1;
0x000031e4 lw s1, -0x7edc(gp) | s1 = *((gp - 8119));
0x000031e8 sw s0, 0x38(sp) | *(var_38h) = s0;
0x000031ec lw s0, -0x7fd0(gp) | s0 = *((gp - 8180));
0x000031f0 lw v0, (s1) | v0 = *(s1);
0x000031f4 lw t9, -0x7ee0(gp) | t9 = sym.imp.sd_bus_get_unique_name;
0x000031f8 sw a0, 0x7250(v1) | *((v1 + 7316)) = a0;
0x000031fc lw a0, 0x7254(s0) | a0 = *((s0 + 7317));
0x00003200 sw gp, 0x18(sp) | *(var_18h) = gp;
0x00003204 sw ra, 0x44(sp) | *(var_44h) = ra;
0x00003208 sw s2, 0x40(sp) | *(var_40h) = s2;
0x0000320c addiu a1, sp, 0x30 | a1 = sp + 0x30;
0x00003210 sw v0, 0x34(sp) | *(var_34h) = v0;
0x00003214 sw zero, 0x2c(sp) | *(var_2ch) = 0;
0x00003218 jalr t9 | t9 ();
0x0000321c nop |
0x00003220 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 < 0) {
0x00003224 bltz v0, 0x32d8 | goto label_2;
| }
0x00003228 lw s2, -0x7fd8(gp) | s2 = *((gp - 8182));
0x0000322c lw a2, -0x7fd8(gp) | a2 = *((gp - 8182));
0x00003230 lw v0, 0x30(sp) | v0 = *(var_30h);
0x00003234 lw t9, -0x7ea4(gp) | t9 = sym.imp.__asprintf_chk
0x00003238 sw v0, 0x10(sp) | *(var_10h_3) = v0;
0x0000323c addiu a3, s2, 0x5af0 | a3 = s2 + str.com.axis.BasicDeviceInfo1;
0x00003240 addiu a2, a2, 0x5c20 | a2 += str.senderorg.freedesktop.DBus_typesignal_interfaceorg.freedesktop.DBus_memberNameOwnerChanged_path_org_freedesktop_DBus_arg0_s_arg1_s_arg2;
0x00003244 addiu a1, zero, 1 | a1 = 1;
0x00003248 addiu a0, sp, 0x2c | a0 = sp + 0x2c;
0x0000324c jalr t9 | t9 ();
0x00003250 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 < 0) {
0x00003254 bltz v0, 0x333c | goto label_3;
| }
0x00003258 lw a3, -0x7fd8(gp) | a3 = *((gp - 8182));
0x0000325c lw t9, -0x7e90(gp) | t9 = sym.imp.sd_bus_add_match;
0x00003260 lw a2, 0x2c(sp) | a2 = *(var_2ch);
0x00003264 lw a0, 0x7254(s0) | a0 = *((s0 + 7317));
0x00003268 addiu a3, a3, 0x2954 | a3 += 0x2954;
0x0000326c move a1, zero | a1 = 0;
0x00003270 sw zero, 0x10(sp) | *(var_10h_3) = 0;
0x00003274 jalr t9 | t9 ();
0x00003278 lw gp, 0x18(sp) | gp = *(var_18h);
0x0000327c lw a0, 0x2c(sp) | a0 = *(var_2ch);
0x00003280 lw t9, -0x7e10(gp) | t9 = *((gp - 8068));
0x00003284 sw v0, 0x24(sp) | *(var_24h) = v0;
0x00003288 jalr t9 | t9 ();
0x0000328c lw v0, 0x24(sp) | v0 = *(var_24h);
0x00003290 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 < 0) {
0x00003294 bltz v0, 0x3324 | goto label_4;
| }
0x00003298 lw t9, -0x7f70(gp) | t9 = sym.imp.sd_bus_release_name;
0x0000329c lw a0, 0x7254(s0) | a0 = *((s0 + 7317));
0x000032a0 addiu a1, s2, 0x5af0 | a1 = s2 + str.com.axis.BasicDeviceInfo1;
0x000032a4 jalr t9 | t9 ();
0x000032a8 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 < 0) {
0x000032ac bltz v0, 0x3308 | goto label_5;
| }
0x000032b0 move v0, zero | v0 = 0;
| do {
| label_1:
0x000032b4 lw a0, 0x34(sp) | a0 = *(var_34h);
0x000032b8 lw v1, (s1) | v1 = *(s1);
0x000032bc lw ra, 0x44(sp) | ra = *(var_44h);
| if (a0 != v1) {
0x000032c0 bne a0, v1, 0x3368 | goto label_6;
| }
0x000032c4 lw s2, 0x40(sp) | s2 = *(var_40h);
0x000032c8 lw s1, 0x3c(sp) | s1 = *(var_3ch);
0x000032cc lw s0, 0x38(sp) | s0 = *(var_38h);
0x000032d0 addiu sp, sp, 0x48 |
0x000032d4 jr ra | return v0;
| label_2:
0x000032d8 lw a3, -0x7fd8(gp) | a3 = *((gp - 8182));
0x000032dc lw a2, -0x7fd8(gp) | a2 = *((gp - 8182));
0x000032e0 lw t9, -0x7f5c(gp) | t9 = sym.imp.g_log;
0x000032e4 sw v0, 0x24(sp) | *(var_24h) = v0;
0x000032e8 addiu a3, a3, 0x62cc | a3 += 0x62cc;
0x000032ec addiu a2, a2, 0x5c04 | a2 += str._sFailed_to_get_unique_name;
| label_0:
0x000032f0 addiu a1, zero, 0x100 | a1 = 0x100;
0x000032f4 move a0, zero | a0 = 0;
0x000032f8 jalr t9 | t9 ();
0x000032fc lw gp, 0x18(sp) | gp = *(var_18h);
0x00003300 lw v0, 0x24(sp) | v0 = *(var_24h);
0x00003304 b 0x32b4 |
| } while (1);
| label_5:
0x00003308 lw a3, -0x7fd8(gp) | a3 = *((gp - 8182));
0x0000330c lw a2, -0x7fd8(gp) | a2 = *((gp - 8182));
0x00003310 sw v0, 0x24(sp) | *(var_24h) = v0;
0x00003314 lw t9, -0x7f5c(gp) | t9 = sym.imp.g_log;
0x00003318 addiu a3, a3, 0x62cc | a3 += 0x62cc;
0x0000331c addiu a2, a2, 0x5d08 | a2 += str._sFailed_to_release_DBus_name;
0x00003320 b 0x32f0 | goto label_0;
| label_4:
0x00003324 lw a3, -0x7fd8(gp) | a3 = *((gp - 8182));
0x00003328 lw a2, -0x7fd8(gp) | a2 = *((gp - 8182));
0x0000332c lw t9, -0x7f5c(gp) | t9 = sym.imp.g_log;
0x00003330 addiu a3, a3, 0x62cc | a3 += 0x62cc;
0x00003334 addiu a2, a2, 0x5ce8 | a2 += str._sFailed_to_add_match_callback;
0x00003338 b 0x32f0 | goto label_0;
| label_3:
0x0000333c lw a3, -0x7fd8(gp) | a3 = *((gp - 8182));
0x00003340 lw a2, -0x7fd8(gp) | a2 = *((gp - 8182));
0x00003344 lw t9, -0x7f5c(gp) | t9 = sym.imp.g_log;
0x00003348 addiu a3, a3, 0x62cc | a3 += 0x62cc;
0x0000334c addiu a2, a2, 0x5cc0 | a2 += str._sFailed_to_create_dbus_match_string;
0x00003350 addiu a1, zero, 0x100 | a1 = 0x100;
0x00003354 move a0, zero | a0 = 0;
0x00003358 jalr t9 | t9 ();
0x0000335c lw gp, 0x18(sp) | gp = *(var_18h);
0x00003360 addiu v0, zero, -0xc | v0 = -0xc;
0x00003364 b 0x32b4 | goto label_1;
| label_6:
0x00003368 lw t9, -0x7f0c(gp) | t9 = sym.imp.__stack_chk_fail;
0x0000336c jalr t9 | t9 ();
0x00003370 nop |
| }
[*] Function printf used 2 times basic-device-info