[*] Binary protection state of tempname2id
Full RELRO Canary found NX disabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function printf tear down of tempname2id
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/tempname2id @ 0xb10 */
| #include <stdint.h>
|
; (fcn) main () | int32_t main () {
| /* [13] -r-x section size 1712 named .text */
0x00000b10 lui gp, 2 |
0x00000b14 addiu gp, gp, -0x6ac0 |
0x00000b18 addu gp, gp, t9 | gp += t9;
0x00000b1c addiu sp, sp, -0xb0 |
0x00000b20 lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
0x00000b24 sw s2, 0x90(sp) | *(var_90h) = s2;
0x00000b28 lw s2, -0x7f74(gp) | s2 = *((gp - 8157));
0x00000b2c sw s1, 0x8c(sp) | *(var_8ch) = s1;
| /* esilref: 'debug-all' */
0x00000b30 addiu v0, v0, 0x2010 | v0 += 0x2010;
0x00000b34 lw v1, (s2) | v1 = *(s2);
0x00000b38 addiu s1, sp, 0x4c | s1 = sp + 0x4c;
0x00000b3c sw gp, 0x20(sp) | *(var_20h) = gp;
0x00000b40 sw a0, 0xb0(sp) | *(arg_b0h) = a0;
0x00000b44 sw v1, 0x84(sp) | *(var_84h) = v1;
0x00000b48 sw ra, 0xac(sp) | *(var_ach) = ra;
0x00000b4c sw fp, 0xa8(sp) | *(var_a8h) = fp;
0x00000b50 sw s7, 0xa4(sp) | *(var_a4h) = s7;
0x00000b54 sw s6, 0xa0(sp) | *(var_a0h) = s6;
0x00000b58 sw s5, 0x9c(sp) | *(var_9ch) = s5;
0x00000b5c sw s4, 0x98(sp) | *(var_98h) = s4;
0x00000b60 sw s3, 0x94(sp) | *(var_94h) = s3;
0x00000b64 sw s0, 0x88(sp) | *(var_88h) = s0;
0x00000b68 sw a1, 0x34(sp) | *(var_34h) = a1;
0x00000b6c sw zero, 0x3c(sp) | *(var_3ch) = 0;
0x00000b70 move v1, s1 | v1 = s1;
0x00000b74 addiu a0, v0, 0x30 | a0 = v0 + 0x30;
| do {
0x00000b78 lw t0, (v0) | t0 = *(v0);
0x00000b7c lw a3, 4(v0) | a3 = *((v0 + 1));
0x00000b80 lw a2, 8(v0) | a2 = *((v0 + 2));
0x00000b84 lw a1, 0xc(v0) | a1 = *((v0 + 3));
0x00000b88 addiu v0, v0, 0x10 | v0 += 0x10;
0x00000b8c sw t0, (v1) | *(v1) = t0;
0x00000b90 sw a3, 4(v1) | *((v1 + 1)) = a3;
0x00000b94 sw a2, 8(v1) | *((v1 + 2)) = a2;
0x00000b98 sw a1, 0xc(v1) | *((v1 + 3)) = a1;
0x00000b9c addiu v1, v1, 0x10 | v1 += 0x10;
0x00000ba0 bne v0, a0, 0xb78 |
| } while (v0 != a0);
0x00000ba4 lw a1, (v0) | a1 = *(v0);
0x00000ba8 lw v0, 4(v0) | v0 = *((v0 + 1));
0x00000bac lw t9, -0x7f98(gp) | t9 = sym.imp.g_option_context_new;
0x00000bb0 sw a1, (v1) | *(v1) = a1;
0x00000bb4 sw v0, 4(v1) | *((v1 + 1)) = v0;
0x00000bb8 move a0, zero | a0 = 0;
0x00000bbc jalr t9 | t9 ();
0x00000bc0 lw gp, 0x20(sp) | gp = *(var_20h);
0x00000bc4 move a0, v0 | a0 = v0;
0x00000bc8 move a2, zero | a2 = 0;
0x00000bcc lw t9, -0x7f5c(gp) | t9 = sym.imp.g_option_context_add_main_entries;
0x00000bd0 move a1, s1 | a1 = s1;
0x00000bd4 move s0, v0 | s0 = v0;
0x00000bd8 jalr t9 | t9 ();
0x00000bdc lw gp, 0x20(sp) | gp = *(var_20h);
0x00000be0 addiu a3, sp, 0x3c | a3 = sp + 0x3c;
0x00000be4 addiu a2, sp, 0x34 | a2 = sp + 0x34;
0x00000be8 lw t9, -0x7f94(gp) | t9 = sym.imp.g_option_context_parse;
0x00000bec addiu a1, sp, 0xb0 | a1 = sp + 0xb0;
0x00000bf0 move a0, s0 | a0 = s0;
0x00000bf4 jalr t9 | t9 ();
0x00000bf8 lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 == 0) {
0x00000bfc beqz v0, 0xedc | goto label_9;
| }
0x00000c00 lw v1, 0xb0(sp) | v1 = *(arg_b0h);
0x00000c04 addiu v0, zero, 2 | v0 = 2;
0x00000c08 lw t9, -0x7f54(gp) | t9 = sym.imp.g_option_context_get_help;
| if (v1 != v0) {
0x00000c0c bne v1, v0, 0xde0 | goto label_10;
| }
0x00000c10 lw s1, -0x7fd8(gp) | s1 = *(gp);
0x00000c14 lw t9, -0x7f6c(gp) | t9 = sym.imp.g_option_context_free;
0x00000c18 move a0, s0 | a0 = s0;
0x00000c1c jalr t9 | t9 ();
0x00000c20 lw v0, (s1) | v0 = *(s1);
0x00000c24 lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 != 0) {
0x00000c28 bnez v0, 0xf10 | goto label_11;
| }
| label_6:
0x00000c2c lw v0, -0x7fd4(gp) | v0 = *((gp - 8181));
0x00000c30 lw v1, 0x34(sp) | v1 = *(var_34h);
0x00000c34 addiu v0, v0, 0x136c | v0 += str.com.axis.TemperatureController;
0x00000c38 move a3, v0 | a3 = v0;
0x00000c3c lw s5, 4(v1) | s5 = *((v1 + 1));
0x00000c40 sw v0, 0x14(sp) | *(var_14h_2) = v0;
0x00000c44 lw v0, -0x7fd4(gp) | v0 = *((gp - 8181));
0x00000c48 lw t9, -0x7fa8(gp) | t9 = sym.imp.g_dbus_proxy_new_for_bus_sync;
0x00000c4c addiu v1, sp, 0x40 | v1 = sp + 0x40;
0x00000c50 addiu v0, v0, 0x138c | v0 += str._com_axis_TemperatureController;
0x00000c54 addiu a0, zero, 1 | a0 = 1;
0x00000c58 sw v1, 0x1c(sp) | *(var_1ch) = v1;
0x00000c5c sw zero, 0x18(sp) | *(var_18h_2) = 0;
0x00000c60 sw v0, 0x10(sp) | *(var_10h_2) = v0;
0x00000c64 move a2, zero | a2 = 0;
0x00000c68 move a1, zero | a1 = 0;
0x00000c6c sw zero, 0x40(sp) | *(var_40h) = 0;
0x00000c70 jalr t9 | t9 ();
0x00000c74 lw a0, 0x40(sp) | a0 = *(var_40h);
0x00000c78 lw gp, 0x20(sp) | gp = *(var_20h);
0x00000c7c move s4, v0 | s4 = v0;
| if (a0 != 0) {
0x00000c80 bnez a0, 0xf50 | goto label_12;
| }
0x00000c84 lw v0, -0x7fd4(gp) | v0 = *((gp - 8181));
0x00000c88 lw s3, -0x7fd4(gp) | s3 = *((gp - 8181));
0x00000c8c sw v0, 0x30(sp) | *(var_30h) = v0;
0x00000c90 addiu v0, sp, 0x44 | v0 = sp + 0x44;
0x00000c94 sw v0, 0x28(sp) | *(var_28h) = v0;
0x00000c98 lw v0, -0x7fd4(gp) | v0 = *((gp - 8181));
0x00000c9c lw fp, -0x7fd4(gp) | fp = *((gp - 8181));
0x00000ca0 addiu v0, v0, 0x1400 | v0 += 0x1400;
0x00000ca4 lw s7, -0x7fd4(gp) | s7 = *((gp - 8181));
0x00000ca8 move s0, zero | s0 = 0;
0x00000cac addiu s3, s3, 0x13d0 | s3 += str.Trying_sensor_id__d_n;
0x00000cb0 sw v0, 0x2c(sp) | *(var_2ch) = v0;
0x00000cb4 b 0xd24 |
| while (a0 == 0) {
0x00000cb8 lw t9, -0x7fa0(gp) | t9 = sym.imp.g_variant_get;
0x00000cbc lw a1, 0x2c(sp) | a1 = *(var_2ch);
0x00000cc0 move a0, v0 | a0 = v0;
0x00000cc4 addiu a2, sp, 0x48 | a2 = sp + 0x48;
0x00000cc8 jalr t9 | t9 ();
0x00000ccc lw gp, 0x20(sp) | gp = *(var_20h);
0x00000cd0 lw t9, -0x7f70(gp) | t9 = sym.imp.g_variant_unref;
0x00000cd4 move a0, s6 | a0 = s6;
0x00000cd8 jalr t9 | t9 ();
0x00000cdc lw s6, 0x48(sp) | s6 = *(var_48h);
0x00000ce0 lw gp, 0x20(sp) | gp = *(var_20h);
| if (s6 == 0) {
0x00000ce4 beqz s6, 0xda4 | goto label_13;
| }
0x00000ce8 lw v0, (s1) | v0 = *(s1);
0x00000cec lw t9, -0x7f84(gp) | t9 = sym.imp.g_strcmp0;
| if (v0 != 0) {
0x00000cf0 bnez v0, 0xe60 | goto label_14;
| }
0x00000cf4 move a1, s6 | a1 = s6;
0x00000cf8 move a0, s5 | a0 = s5;
0x00000cfc jalr t9 | t9 ();
0x00000d00 lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 == 0) {
0x00000d04 beqz v0, 0xe94 | goto label_15;
| }
| label_1:
0x00000d08 lw t9, -0x7f68(gp) | t9 = sym.imp.g_free;
0x00000d0c move a0, s6 | a0 = s6;
0x00000d10 jalr t9 | t9 ();
0x00000d14 addiu s0, s0, 1 | s0++;
0x00000d18 addiu v0, zero, 0x64 | v0 = 0x64;
0x00000d1c lw gp, 0x20(sp) | gp = *(var_20h);
| if (s0 == v0) {
0x00000d20 beq s0, v0, 0xda4 | goto label_13;
| }
0x00000d24 lw v0, (s1) | v0 = *(s1);
0x00000d28 lw t9, -0x7f78(gp) | t9 = sym.imp.g_print;
| if (v0 != 0) {
0x00000d2c bnez v0, 0xe4c | goto label_16;
| }
| label_0:
0x00000d30 lw t9, -0x7f9c(gp) | t9 = sym.imp.g_variant_new;
0x00000d34 move a1, s0 | a1 = s0;
0x00000d38 addiu a0, fp, 0x13e8 | a0 = fp + 0x13e8;
0x00000d3c sw zero, 0x44(sp) | *(var_44h) = 0;
0x00000d40 sw zero, 0x48(sp) | *(var_48h) = 0;
0x00000d44 jalr t9 | t9 ();
0x00000d48 lw gp, 0x20(sp) | gp = *(var_20h);
0x00000d4c lw v1, 0x28(sp) | v1 = *(var_28h);
0x00000d50 move a0, s4 | a0 = s4;
0x00000d54 lw t9, -0x7fa4(gp) | t9 = sym.imp.g_dbus_proxy_call_sync;
0x00000d58 sw v1, 0x18(sp) | *(var_18h_2) = v1;
0x00000d5c addiu v1, zero, -1 | v1 = -1;
0x00000d60 sw zero, 0x14(sp) | *(var_14h_2) = 0;
0x00000d64 sw v1, 0x10(sp) | *(var_10h_2) = v1;
0x00000d68 move a3, zero | a3 = 0;
0x00000d6c move a2, v0 | a2 = v0;
0x00000d70 addiu a1, s7, 0x13ec | a1 = s7 + str.GetTemperatureName;
0x00000d74 jalr t9 | t9 ();
0x00000d78 lw a0, 0x44(sp) | a0 = *(var_44h);
0x00000d7c lw gp, 0x20(sp) | gp = *(var_20h);
0x00000d80 move s6, v0 | s6 = v0;
0x00000d84 beqz a0, 0xcb8 |
| }
0x00000d88 lw v0, (s1) | v0 = *(s1);
0x00000d8c lw a2, 8(a0) | a2 = *((a0 + 2));
| if (v0 == 0) {
0x00000d90 bnel v0, zero, 0xebc | goto label_17;
| }
| label_4:
0x00000d94 lw t9, -0x7fb0(gp) | t9 = sym.imp.g_error_free;
0x00000d98 jalr t9 | t9 ();
0x00000d9c nop |
0x00000da0 lw gp, 0x20(sp) | gp = *(var_20h);
| label_13:
0x00000da4 addiu s0, zero, -1 | s0 = -1;
| if (s4 != 0) {
0x00000da8 beqz s4, 0xdbc |
0x00000dac lw t9, -0x7f64(gp) | t9 = sym.imp.g_object_unref;
| label_2:
0x00000db0 move a0, s4 | a0 = s4;
0x00000db4 jalr t9 | t9 ();
0x00000db8 lw gp, 0x20(sp) | gp = *(var_20h);
| }
| label_8:
0x00000dbc lw a1, -0x7fd4(gp) | a1 = *((gp - 8181));
| label_3:
0x00000dc0 lw t9, -0x7f90(gp) | t9 = sym.imp.__printf_chk
0x00000dc4 move a2, s0 | a2 = s0;
0x00000dc8 addiu a1, a1, 0x1468 | a1 += 0x1468;
0x00000dcc addiu a0, zero, 1 | a0 = 1;
0x00000dd0 jalr t9 | t9 ();
0x00000dd4 lw gp, 0x20(sp) | gp = *(var_20h);
0x00000dd8 move v0, zero | v0 = 0;
0x00000ddc b 0xe10 | goto label_5;
| label_10:
0x00000de0 move a2, zero | a2 = 0;
0x00000de4 addiu a1, zero, 1 | a1 = 1;
0x00000de8 move a0, s0 | a0 = s0;
0x00000dec jalr t9 | t9 ();
0x00000df0 lw gp, 0x20(sp) | gp = *(var_20h);
0x00000df4 move a1, v0 | a1 = v0;
0x00000df8 lw a0, -0x7fd4(gp) | a0 = *((gp - 8181));
0x00000dfc lw t9, -0x7f7c(gp) | t9 = sym.imp.g_printerr;
0x00000e00 addiu a0, a0, 0x13cc | a0 += 0x13cc;
0x00000e04 jalr t9 | t9 ();
0x00000e08 lw gp, 0x20(sp) | gp = *(var_20h);
0x00000e0c addiu v0, zero, 1 | v0 = 1;
| label_5:
0x00000e10 lw a0, 0x84(sp) | a0 = *(var_84h);
0x00000e14 lw v1, (s2) | v1 = *(s2);
0x00000e18 lw ra, 0xac(sp) | ra = *(var_ach);
| if (a0 != v1) {
0x00000e1c bne a0, v1, 0xf8c | goto label_18;
| }
0x00000e20 lw fp, 0xa8(sp) | fp = *(var_a8h);
0x00000e24 lw s7, 0xa4(sp) | s7 = *(var_a4h);
0x00000e28 lw s6, 0xa0(sp) | s6 = *(var_a0h);
0x00000e2c lw s5, 0x9c(sp) | s5 = *(var_9ch);
0x00000e30 lw s4, 0x98(sp) | s4 = *(var_98h);
0x00000e34 lw s3, 0x94(sp) | s3 = *(var_94h);
0x00000e38 lw s2, 0x90(sp) | s2 = *(var_90h);
0x00000e3c lw s1, 0x8c(sp) | s1 = *(var_8ch);
0x00000e40 lw s0, 0x88(sp) | s0 = *(var_88h);
0x00000e44 addiu sp, sp, 0xb0 |
0x00000e48 jr ra | return v0;
| label_16:
0x00000e4c move a1, s0 | a1 = s0;
0x00000e50 move a0, s3 | a0 = s3;
0x00000e54 jalr t9 | t9 ();
0x00000e58 lw gp, 0x20(sp) | gp = *(var_20h);
0x00000e5c b 0xd30 | goto label_0;
| label_14:
0x00000e60 lw v0, 0x30(sp) | v0 = *(var_30h);
0x00000e64 lw t9, -0x7f78(gp) | t9 = sym.imp.g_print;
0x00000e68 addiu a0, v0, 0x1434 | a0 = v0 + str.sensor_id__d___s_n;
0x00000e6c move a2, s6 | a2 = s6;
0x00000e70 move a1, s0 | a1 = s0;
0x00000e74 jalr t9 | t9 ();
0x00000e78 lw gp, 0x20(sp) | gp = *(var_20h);
0x00000e7c move a1, s6 | a1 = s6;
0x00000e80 lw t9, -0x7f84(gp) | t9 = sym.imp.g_strcmp0;
0x00000e84 move a0, s5 | a0 = s5;
0x00000e88 jalr t9 | t9 ();
0x00000e8c lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 != 0) {
0x00000e90 bnez v0, 0xd08 | goto label_1;
| }
| label_15:
0x00000e94 lw t9, -0x7f68(gp) | t9 = sym.imp.g_free;
0x00000e98 move a0, s6 | a0 = s6;
0x00000e9c jalr t9 | t9 ();
0x00000ea0 lw v0, (s1) | v0 = *(s1);
0x00000ea4 lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 != 0) {
0x00000ea8 bnez v0, 0xf34 | goto label_19;
| }
| label_7:
0x00000eac lw t9, -0x7f64(gp) | t9 = sym.imp.g_object_unref;
| if (s4 != 0) {
0x00000eb0 bnez s4, 0xdb0 | goto label_2;
| }
0x00000eb4 lw a1, -0x7fd4(gp) | a1 = *((gp - 8181));
0x00000eb8 b 0xdc0 | goto label_3;
| label_17:
0x00000ebc lw a0, -0x7fd4(gp) | a0 = *((gp - 8181));
0x00000ec0 lw t9, -0x7f78(gp) | t9 = sym.imp.g_print;
0x00000ec4 addiu a0, a0, 0x1404 | a0 += str.Failed_to_get_temperature_name_for_id__d___s__n;
0x00000ec8 move a1, s0 | a1 = s0;
0x00000ecc jalr t9 | t9 ();
0x00000ed0 lw gp, 0x20(sp) | gp = *(var_20h);
0x00000ed4 lw a0, 0x44(sp) | a0 = *(var_44h);
0x00000ed8 b 0xd94 | goto label_4;
| label_9:
0x00000edc lw v0, 0x3c(sp) | v0 = *(var_3ch);
0x00000ee0 lw a0, -0x7fd4(gp) | a0 = *((gp - 8181));
0x00000ee4 lw t9, -0x7f7c(gp) | t9 = sym.imp.g_printerr;
0x00000ee8 lw a1, 8(v0) | a1 = *((v0 + 2));
0x00000eec addiu a0, a0, 0x1328 | a0 += str._s_nTry____or___help_for_more_information._n;
0x00000ef0 jalr t9 | t9 ();
0x00000ef4 lw gp, 0x20(sp) | gp = *(var_20h);
0x00000ef8 lw t9, -0x7fb0(gp) | t9 = sym.imp.g_error_free;
0x00000efc lw a0, 0x3c(sp) | a0 = *(var_3ch);
0x00000f00 jalr t9 | t9 ();
0x00000f04 lw gp, 0x20(sp) | gp = *(var_20h);
0x00000f08 addiu v0, zero, 1 | v0 = 1;
0x00000f0c b 0xe10 | goto label_5;
| label_11:
0x00000f10 lw v0, 0x34(sp) | v0 = *(var_34h);
0x00000f14 lw a1, -0x7fd4(gp) | a1 = *((gp - 8181));
0x00000f18 lw t9, -0x7f90(gp) | t9 = sym.imp.__printf_chk
0x00000f1c lw a2, 4(v0) | a2 = *((v0 + 1));
0x00000f20 addiu a1, a1, 0x1354 | a1 += str.Converting__s_to_id_n;
0x00000f24 addiu a0, zero, 1 | a0 = 1;
0x00000f28 jalr t9 | t9 ();
0x00000f2c lw gp, 0x20(sp) | gp = *(var_20h);
0x00000f30 b 0xc2c | goto label_6;
| label_19:
0x00000f34 lw a0, -0x7fd4(gp) | a0 = *((gp - 8181));
0x00000f38 lw t9, -0x7f78(gp) | t9 = sym.imp.g_print;
0x00000f3c move a1, s0 | a1 = s0;
0x00000f40 addiu a0, a0, 0x1448 | a0 += str.Found_matching_sensor_id__d_n;
0x00000f44 jalr t9 | t9 ();
0x00000f48 lw gp, 0x20(sp) | gp = *(var_20h);
0x00000f4c b 0xeac | goto label_7;
| label_12:
0x00000f50 lw v0, (s1) | v0 = *(s1);
0x00000f54 lw a1, 8(a0) | a1 = *((a0 + 2));
0x00000f58 bnel v0, zero, 0xf70 |
| while (1) {
0x00000f5c lw t9, -0x7fb0(gp) | t9 = sym.imp.g_error_free;
0x00000f60 addiu s0, zero, -1 | s0 = -1;
0x00000f64 jalr t9 | t9 ();
0x00000f68 lw gp, 0x20(sp) | gp = *(var_20h);
0x00000f6c b 0xdbc | goto label_8;
0x00000f70 lw a0, -0x7fd4(gp) | a0 = *((gp - 8181));
0x00000f74 lw t9, -0x7f78(gp) | t9 = sym.imp.g_print;
0x00000f78 addiu a0, a0, 0x13ac | a0 += str.Could_not_open_dbus_connection:__s_n;
0x00000f7c jalr t9 | t9 ();
0x00000f80 lw gp, 0x20(sp) | gp = *(var_20h);
0x00000f84 lw a0, 0x40(sp) | a0 = *(var_40h);
0x00000f88 b 0xf5c |
| }
| label_18:
0x00000f8c lw t9, -0x7f80(gp) | t9 = sym.imp.__stack_chk_fail;
0x00000f90 jalr t9 | t9 ();
0x00000f94 nop |
0x00000f98 nop |
0x00000f9c nop |
| }
[*] Function printf used 3 times tempname2id