[*] Binary protection state of handle_eventdecl
Full RELRO Canary found NX disabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function printf tear down of handle_eventdecl
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/handle_eventdecl @ 0xfa0 */
| #include <stdint.h>
|
; (fcn) main () | int32_t main () {
| /* [13] -r-x section size 4816 named .text */
0x00000fa0 lui gp, 2 |
0x00000fa4 addiu gp, gp, -0x5f90 |
0x00000fa8 addu gp, gp, t9 | gp += t9;
0x00000fac addiu sp, sp, -0xe8 |
0x00000fb0 lw t9, -0x7f3c(gp) | t9 = sym.imp.g_type_init;
0x00000fb4 sw s1, 0xdc(sp) | *(var_dch) = s1;
0x00000fb8 lw s1, -0x7f20(gp) | s1 = *((gp - 8136));
0x00000fbc sw s0, 0xd8(sp) | *(var_d8h) = s0;
0x00000fc0 addiu s0, zero, 1 | s0 = 1;
0x00000fc4 lw v0, (s1) | v0 = *(s1);
0x00000fc8 sw ra, 0xe4(sp) | *(var_e4h) = ra;
0x00000fcc sw gp, 0x10(sp) | *(var_10h) = gp;
0x00000fd0 sw v0, 0xd4(sp) | *(var_d4h) = v0;
0x00000fd4 sw s2, 0xe0(sp) | *(var_e0h) = s2;
0x00000fd8 sw a0, 0xe8(sp) | *(arg_e8h) = a0;
0x00000fdc sw a1, 0x1c(sp) | *(var_1ch) = a1;
0x00000fe0 sw s0, 0x44(sp) | *(var_44h) = s0;
0x00000fe4 sw zero, 0x20(sp) | *(var_20h) = 0;
0x00000fe8 sw zero, 0x24(sp) | *(var_24h) = 0;
0x00000fec sw zero, 0x28(sp) | *(var_28h) = 0;
0x00000ff0 sw zero, 0x30(sp) | *(var_30h) = 0;
0x00000ff4 sw zero, 0x2c(sp) | *(var_2ch) = 0;
0x00000ff8 sw zero, 0x38(sp) | *(var_38h) = 0;
0x00000ffc sw zero, 0x34(sp) | *(var_34h) = 0;
0x00001000 addiu s2, sp, 0x2c | s2 = sp + 0x2c;
0x00001004 jalr t9 | t9 ();
0x00001008 lw gp, 0x10(sp) | gp = *(var_10h);
0x0000100c addiu a2, zero, 8 | a2 = 8;
0x00001010 move a1, zero | a1 = 0;
0x00001014 lw a0, -0x7fdc(gp) | a0 = *((gp - 8183));
0x00001018 lw t9, -0x7f90(gp) | t9 = sym.imp.openlog;
0x0000101c addiu a0, a0, 0x25e4 | a0 += str.Event_declaration_handler;
0x00001020 jalr t9 | t9 ();
0x00001024 lw gp, 0x10(sp) | gp = *(var_10h);
0x00001028 lw a0, -0x7fdc(gp) | a0 = *((gp - 8183));
0x0000102c lw t9, -0x7f70(gp) | t9 = sym.imp.event_producer_new;
0x00001030 addiu a0, a0, 0x2600 | a0 += str.adp_install;
0x00001034 jalr t9 | t9 ();
0x00001038 lw gp, 0x10(sp) | gp = *(var_10h);
0x0000103c sw v0, 0x34(sp) | *(var_34h) = v0;
0x00001040 addiu v1, zero, 2 | v1 = 2;
0x00001044 lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
0x00001048 lw a0, -0x7fdc(gp) | a0 = *((gp - 8183));
0x0000104c addiu v0, v0, 0x260c | v0 += str.app_directory;
0x00001050 sw v0, 0x48(sp) | *(var_48h) = v0;
0x00001054 addiu v0, zero, 0x64 | v0 = 0x64;
0x00001058 sb v0, 0x4c(sp) | *(var_4ch) = v0;
0x0000105c addiu v0, sp, 0x30 | v0 = sp + 0x30;
0x00001060 sw v0, 0x58(sp) | *(var_58h) = v0;
0x00001064 lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
0x00001068 lw t9, -0x7f88(gp) | t9 = sym.imp.g_option_context_new;
0x0000106c addiu v0, v0, 0x261c | v0 += str.The_directory_of_the_application___d__app_directory_;
0x00001070 sw v0, 0x5c(sp) | *(var_5ch) = v0;
0x00001074 lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
0x00001078 sw v1, 0x50(sp) | *(var_50h) = v1;
0x0000107c addiu v0, v0, 0x2654 | v0 += str.app_name;
0x00001080 sw v0, 0x64(sp) | *(var_64h) = v0;
0x00001084 addiu v0, zero, 0x6e | v0 = 0x6e;
0x00001088 sb v0, 0x68(sp) | *(var_68h) = v0;
0x0000108c lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
0x00001090 sw v1, 0x6c(sp) | *(var_6ch) = v1;
0x00001094 addiu v0, v0, 0x2660 | v0 += str.The_name_of_the_application___n__app_name_;
0x00001098 sw v0, 0x78(sp) | *(var_78h) = v0;
0x0000109c lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
0x000010a0 sw v1, 0x88(sp) | *(var_88h) = v1;
0x000010a4 addiu v0, v0, 0x268c | v0 += 0x268c;
0x000010a8 sw v0, 0x80(sp) | *(var_80h) = v0;
0x000010ac addiu v0, zero, 0x61 | v0 = 0x61;
0x000010b0 sb v0, 0x84(sp) | *(var_84h) = v0;
0x000010b4 addiu v0, sp, 0x24 | v0 = sp + 0x24;
0x000010b8 sw v0, 0x90(sp) | *(var_90h) = v0;
0x000010bc lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
0x000010c0 sw v1, 0xa4(sp) | *(var_a4h) = v1;
0x000010c4 addiu v0, v0, 0x2690 | v0 += str.add___a___;
0x000010c8 sw v0, 0x94(sp) | *(var_94h) = v0;
0x000010cc lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
0x000010d0 addiu a0, a0, 0x2718 | a0 += 0x2718;
0x000010d4 addiu v0, v0, 0x269c | v0 += str.remove;
0x000010d8 sw v0, 0x9c(sp) | *(var_9ch) = v0;
0x000010dc addiu v0, zero, 0x72 | v0 = 0x72;
0x000010e0 sb v0, 0xa0(sp) | *(var_a0h) = v0;
0x000010e4 addiu v0, sp, 0x28 | v0 = sp + 0x28;
0x000010e8 sw v0, 0xac(sp) | *(var_ach) = v0;
0x000010ec lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
0x000010f0 sw s0, 0x54(sp) | *(var_54h) = s0;
0x000010f4 addiu v0, v0, 0x26a4 | v0 += str.remove___r___;
0x000010f8 sw v0, 0xb0(sp) | *(var_b0h) = v0;
0x000010fc sw s0, 0x70(sp) | *(var_70h) = s0;
0x00001100 sw zero, 0x60(sp) | *(var_60h) = 0;
0x00001104 sw s2, 0x74(sp) | *(var_74h) = s2;
0x00001108 sw zero, 0x7c(sp) | *(var_7ch) = 0;
0x0000110c sw zero, 0x8c(sp) | *(var_8ch) = 0;
0x00001110 sw zero, 0x98(sp) | *(var_98h) = 0;
0x00001114 sw zero, 0xa8(sp) | *(var_a8h) = 0;
0x00001118 sw zero, 0xb4(sp) | *(var_b4h) = 0;
0x0000111c sw zero, 0xb8(sp) | *(var_b8h) = 0;
0x00001120 sb zero, 0xbc(sp) | *(var_bch) = 0;
0x00001124 sw zero, 0xc0(sp) | *(var_c0h) = 0;
0x00001128 sw zero, 0xc4(sp) | *(var_c4h) = 0;
0x0000112c sw zero, 0xc8(sp) | *(var_c8h) = 0;
0x00001130 sw zero, 0xcc(sp) | *(var_cch) = 0;
0x00001134 sw zero, 0xd0(sp) | *(var_d0h) = 0;
0x00001138 jalr t9 | t9 ();
0x0000113c lw gp, 0x10(sp) | gp = *(var_10h);
0x00001140 move a0, v0 | a0 = v0;
0x00001144 move a2, zero | a2 = 0;
0x00001148 lw t9, -0x7f04(gp) | t9 = sym.imp.g_option_context_add_main_entries;
0x0000114c addiu a1, sp, 0x48 | a1 = sp + 0x48;
0x00001150 move s0, v0 | s0 = v0;
0x00001154 jalr t9 | t9 ();
0x00001158 lw gp, 0x10(sp) | gp = *(var_10h);
0x0000115c addiu a3, sp, 0x20 | a3 = sp + 0x20;
0x00001160 addiu a2, sp, 0x1c | a2 = sp + 0x1c;
0x00001164 lw t9, -0x7f7c(gp) | t9 = sym.imp.g_option_context_parse;
0x00001168 addiu a1, sp, 0xe8 | a1 = sp + 0xe8;
0x0000116c move a0, s0 | a0 = s0;
0x00001170 jalr t9 | t9 ();
0x00001174 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x00001178 beqz v0, 0x1248 | goto label_3;
| }
0x0000117c lw t9, -0x7f18(gp) | t9 = sym.imp.g_option_context_free;
0x00001180 move a0, s0 | a0 = s0;
0x00001184 jalr t9 | t9 ();
0x00001188 lw v0, 0x30(sp) | v0 = *(var_30h);
0x0000118c lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x00001190 beqz v0, 0x12cc | goto label_4;
| }
0x00001194 lw v0, 0x2c(sp) | v0 = *(var_2ch);
0x00001198 lw v1, 0x28(sp) | v1 = *(var_28h);
| if (v0 == 0) {
0x0000119c beqz v0, 0x12e8 | goto label_5;
| }
0x000011a0 lw v0, 0x24(sp) | v0 = *(var_24h);
0x000011a4 lw t9, -0x7f5c(gp) | t9 = sym.imp.g_main_loop_new;
| if (v0 == v1) {
0x000011a8 beq v0, v1, 0x127c | goto label_6;
| }
0x000011ac move a1, zero | a1 = 0;
0x000011b0 move a0, zero | a0 = 0;
0x000011b4 sw v0, 0x40(sp) | *(var_40h) = v0;
0x000011b8 jalr t9 | t9 ();
0x000011bc lw gp, 0x10(sp) | gp = *(var_10h);
0x000011c0 move a2, s2 | a2 = s2;
0x000011c4 addiu a0, zero, 0xbb8 | a0 = 0xbb8;
0x000011c8 lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x000011cc lw t9, -0x7fa8(gp) | t9 = sym.imp.g_timeout_add;
0x000011d0 addiu a1, a1, 0x15ec | a1 += 0x15ec;
0x000011d4 sw v0, 0x3c(sp) | *(var_3ch) = v0;
0x000011d8 jalr t9 | t9 ();
0x000011dc lw v0, 0x24(sp) | v0 = *(var_24h);
0x000011e0 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 != 0) {
0x000011e4 bnez v0, 0x12b0 | goto label_7;
| }
| label_2:
0x000011e8 lw v0, 0x28(sp) | v0 = *(var_28h);
0x000011ec lw a0, -0x7fdc(gp) | a0 = *((gp - 8183));
| if (v0 != 0) {
0x000011f0 bnez v0, 0x1298 | goto label_8;
| }
| label_1:
0x000011f4 lw t9, -0x7f64(gp) | t9 = sym.imp.g_main_loop_run;
0x000011f8 lw a0, 0x3c(sp) | a0 = *(var_3ch);
0x000011fc jalr t9 | t9 ();
0x00001200 lw a0, 0x34(sp) | a0 = *(var_34h);
0x00001204 lw gp, 0x10(sp) | gp = *(var_10h);
| if (a0 != 0) {
0x00001208 beqz a0, 0x121c |
0x0000120c lw t9, -0x7ef4(gp) | t9 = sym.imp.event_producer_free;
0x00001210 jalr t9 | t9 ();
0x00001214 nop |
0x00001218 lw gp, 0x10(sp) | gp = *(var_10h);
| }
0x0000121c lw v0, 0x44(sp) | v0 = *(var_44h);
0x00001220 sltiu v0, v0, 1 | v0 = (v0 < 1) ? 1 : 0;
| do {
| label_0:
0x00001224 lw a0, 0xd4(sp) | a0 = *(var_d4h);
0x00001228 lw v1, (s1) | v1 = *(s1);
0x0000122c lw ra, 0xe4(sp) | ra = *(var_e4h);
| if (a0 != v1) {
0x00001230 bne a0, v1, 0x1304 | goto label_9;
| }
0x00001234 lw s2, 0xe0(sp) | s2 = *(var_e0h);
0x00001238 lw s1, 0xdc(sp) | s1 = *(var_dch);
0x0000123c lw s0, 0xd8(sp) | s0 = *(var_d8h);
0x00001240 addiu sp, sp, 0xe8 |
0x00001244 jr ra | return v0;
| label_3:
0x00001248 lw v0, 0x20(sp) | v0 = *(var_20h);
0x0000124c lw a0, -0x7fdc(gp) | a0 = *((gp - 8183));
0x00001250 lw t9, -0x7f74(gp) | t9 = sym.imp.g_printf
0x00001254 lw a1, 8(v0) | a1 = *((v0 + 2));
0x00001258 addiu a0, a0, 0x26b4 | a0 += 0x26b4;
0x0000125c jalr t9 | t9 ();
0x00001260 lw gp, 0x10(sp) | gp = *(var_10h);
0x00001264 lw t9, -0x7fb0(gp) | t9 = sym.imp.g_error_free;
0x00001268 lw a0, 0x20(sp) | a0 = *(var_20h);
0x0000126c jalr t9 | t9 ();
0x00001270 lw gp, 0x10(sp) | gp = *(var_10h);
0x00001274 addiu v0, zero, 1 | v0 = 1;
0x00001278 b 0x1224 |
| } while (1);
| label_6:
0x0000127c lw a0, -0x7fdc(gp) | a0 = *((gp - 8183));
0x00001280 lw t9, -0x7f74(gp) | t9 = sym.imp.g_printf
0x00001284 addiu a0, a0, 0x26f8 | a0 += str._a_and__r_are_not_correctly_set_n;
0x00001288 jalr t9 | t9 ();
0x0000128c lw gp, 0x10(sp) | gp = *(var_10h);
0x00001290 addiu v0, zero, 1 | v0 = 1;
0x00001294 b 0x1224 | goto label_0;
| label_8:
0x00001298 lw t9, -0x7f34(gp) | t9 = sym.imp.g_idle_add;
0x0000129c move a1, s2 | a1 = s2;
0x000012a0 addiu a0, a0, 0x1480 | a0 += 0x1480;
0x000012a4 jalr t9 | t9 ();
0x000012a8 lw gp, 0x10(sp) | gp = *(var_10h);
0x000012ac b 0x11f4 | goto label_1;
| label_7:
0x000012b0 lw a0, -0x7fdc(gp) | a0 = *((gp - 8183));
0x000012b4 lw t9, -0x7f34(gp) | t9 = sym.imp.g_idle_add;
0x000012b8 move a1, s2 | a1 = s2;
0x000012bc addiu a0, a0, 0x16d0 | a0 += 0x16d0;
0x000012c0 jalr t9 | t9 ();
0x000012c4 lw gp, 0x10(sp) | gp = *(var_10h);
0x000012c8 b 0x11e8 | goto label_2;
| label_4:
0x000012cc lw a0, -0x7fdc(gp) | a0 = *((gp - 8183));
0x000012d0 lw t9, -0x7f74(gp) | t9 = sym.imp.g_printf
0x000012d4 addiu a0, a0, 0x26b8 | a0 += str._d__app_directory__is_mandatory_n;
0x000012d8 jalr t9 | t9 ();
0x000012dc lw gp, 0x10(sp) | gp = *(var_10h);
0x000012e0 addiu v0, zero, 1 | v0 = 1;
0x000012e4 b 0x1224 | goto label_0;
| label_5:
0x000012e8 lw a0, -0x7fdc(gp) | a0 = *((gp - 8183));
0x000012ec lw t9, -0x7f74(gp) | t9 = sym.imp.g_printf
0x000012f0 addiu a0, a0, 0x26dc | a0 += str._n__app_name__is_mandatory_n;
0x000012f4 jalr t9 | t9 ();
0x000012f8 lw gp, 0x10(sp) | gp = *(var_10h);
0x000012fc addiu v0, zero, 1 | v0 = 1;
0x00001300 b 0x1224 | goto label_0;
| label_9:
0x00001304 lw t9, -0x7f2c(gp) | t9 = sym.imp.__stack_chk_fail;
0x00001308 jalr t9 | t9 ();
0x0000130c nop |
| }
[*] Function printf used 5 times handle_eventdecl