[*] Binary protection state of syslog-ng
Full RELRO Canary found NX disabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function fprintf tear down of syslog-ng
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/sbin/syslog-ng @ 0x12e0 */
| #include <stdint.h>
|
; (fcn) main () | int32_t main () {
| /* [13] -r-x section size 2576 named .text */
0x000012e0 lui gp, 2 |
0x000012e4 addiu gp, gp, -0x6190 |
0x000012e8 addu gp, gp, t9 | gp += t9;
0x000012ec addiu sp, sp, -0x48 |
0x000012f0 lw t9, -0x7f7c(gp) | t9 = sym.imp.main_loop_get_instance;
0x000012f4 sw s1, 0x30(sp) | *(var_30h) = s1;
0x000012f8 lw s1, -0x7ed8(gp) | s1 = *((gp - 8118));
0x000012fc sw ra, 0x44(sp) | *(var_44h) = ra;
0x00001300 sw gp, 0x10(sp) | *(var_10h) = gp;
0x00001304 lw v0, (s1) | v0 = *(s1);
0x00001308 sw a1, 0x1c(sp) | *(var_1ch) = a1;
0x0000130c sw s3, 0x38(sp) | *(var_38h) = s3;
0x00001310 sw s2, 0x34(sp) | *(var_34h) = s2;
0x00001314 sw s0, 0x2c(sp) | *(var_2ch) = s0;
0x00001318 sw a0, 0x48(sp) | *(arg_48h) = a0;
0x0000131c sw s5, 0x40(sp) | *(var_40h) = s5;
0x00001320 sw s4, 0x3c(sp) | *(var_3ch) = s4;
0x00001324 sw v0, 0x24(sp) | *(var_24h) = v0;
0x00001328 sw zero, 0x20(sp) | *(var_20h) = 0;
0x0000132c jalr t9 | t9 ();
0x00001330 nop |
0x00001334 lw gp, 0x10(sp) | gp = *(var_10h);
0x00001338 move s3, v0 | s3 = v0;
0x0000133c lw a0, -0x7fdc(gp) | a0 = *((gp - 8183));
0x00001340 lw t9, -0x7f5c(gp) | t9 = sym.imp.z_mem_trace_init;
0x00001344 addiu a0, a0, 0x21d4 | a0 += str.syslog_ng.trace;
0x00001348 jalr t9 | t9 ();
0x0000134c lw gp, 0x10(sp) | gp = *(var_10h);
0x00001350 lw a1, 0x1c(sp) | a1 = *(var_1ch);
0x00001354 lw t9, -0x7f0c(gp) | t9 = sym.imp.g_process_set_argv_space;
0x00001358 lw s2, -0x7fdc(gp) | s2 = *((gp - 8183));
0x0000135c lw a0, 0x48(sp) | a0 = *(arg_48h);
0x00001360 jalr t9 | t9 ();
0x00001364 lw gp, 0x10(sp) | gp = *(var_10h);
0x00001368 lw a0, -0x7ef0(gp) | a0 = *((gp - 8124));
0x0000136c lw t9, -0x7ee0(gp) | t9 = sym.imp.resolved_configurable_paths_init;
0x00001370 jalr t9 | t9 ();
0x00001374 nop |
0x00001378 lw gp, 0x10(sp) | gp = *(var_10h);
0x0000137c lw t9, -0x7ee4(gp) | t9 = sym.imp.g_option_context_new;
0x00001380 addiu a0, s2, 0x22c4 | a0 = s2 + 0x22c4;
0x00001384 jalr t9 | t9 ();
0x00001388 lw gp, 0x10(sp) | gp = *(var_10h);
0x0000138c move a0, v0 | a0 = v0;
0x00001390 lw t9, -0x7f14(gp) | t9 = sym.imp.g_process_add_option_group;
0x00001394 move s0, v0 | s0 = v0;
0x00001398 jalr t9 | t9 ();
0x0000139c lw gp, 0x10(sp) | gp = *(var_10h);
0x000013a0 lw t9, -0x7f70(gp) | t9 = sym.imp.msg_add_option_group;
0x000013a4 move a0, s0 | a0 = s0;
0x000013a8 jalr t9 | t9 ();
0x000013ac lw gp, 0x10(sp) | gp = *(var_10h);
0x000013b0 move a2, zero | a2 = 0;
0x000013b4 move a0, s0 | a0 = s0;
0x000013b8 lw a1, -0x7fd4(gp) | a1 = *((gp - 8181));
0x000013bc lw t9, -0x7f64(gp) | t9 = sym.imp.g_option_context_add_main_entries;
| /* esilref: ',"' */
0x000013c0 addiu a1, a1, 0x3010 | a1 += 0x3010;
0x000013c4 jalr t9 | t9 ();
0x000013c8 lw gp, 0x10(sp) | gp = *(var_10h);
0x000013cc lw t9, -0x7f8c(gp) | t9 = sym.imp.main_loop_add_options;
0x000013d0 move a0, s0 | a0 = s0;
0x000013d4 jalr t9 | t9 ();
0x000013d8 lw gp, 0x10(sp) | gp = *(var_10h);
0x000013dc addiu a3, sp, 0x20 | a3 = sp + 0x20;
0x000013e0 addiu a2, sp, 0x1c | a2 = sp + 0x1c;
0x000013e4 lw t9, -0x7ed4(gp) | t9 = sym.imp.g_option_context_parse;
0x000013e8 addiu a1, sp, 0x48 | a1 = sp + 0x48;
0x000013ec move a0, s0 | a0 = s0;
0x000013f0 jalr t9 | t9 ();
0x000013f4 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 != 0) {
0x000013f8 bnez v0, 0x146c | goto label_5;
| }
0x000013fc lw v1, -0x7f9c(gp) | v1 = *((gp - 8167));
0x00001400 lw v0, 0x20(sp) | v0 = *(var_20h);
0x00001404 lw a0, (v1) | a0 = *(v1);
| if (v0 == 0) {
0x00001408 beqz v0, 0x1614 | goto label_6;
| }
0x0000140c lw a3, 8(v0) | a3 = *((v0 + 2));
| label_0:
0x00001410 lw a2, -0x7fdc(gp) | a2 = *((gp - 8183));
0x00001414 lw t9, -0x7f80(gp) | t9 = sym.imp.__fprintf_chk
0x00001418 addiu a2, a2, 0x21e4 | a2 += str.Error_parsing_command_line_arguments:__s_n;
0x0000141c addiu a1, zero, 1 | a1 = 1;
0x00001420 jalr t9 | t9 ();
0x00001424 lw gp, 0x10(sp) | gp = *(var_10h);
0x00001428 lw t9, -0x7f40(gp) | t9 = sym.imp.g_option_context_free;
0x0000142c move a0, s0 | a0 = s0;
0x00001430 jalr t9 | t9 ();
0x00001434 lw gp, 0x10(sp) | gp = *(var_10h);
0x00001438 addiu v0, zero, 1 | v0 = 1;
| do {
| label_2:
0x0000143c lw a0, 0x24(sp) | a0 = *(var_24h);
0x00001440 lw v1, (s1) | v1 = *(s1);
0x00001444 lw ra, 0x44(sp) | ra = *(var_44h);
| if (a0 != v1) {
0x00001448 bne a0, v1, 0x17a0 | goto label_7;
| }
0x0000144c lw s5, 0x40(sp) | s5 = *(var_40h);
0x00001450 lw s4, 0x3c(sp) | s4 = *(var_3ch);
0x00001454 lw s3, 0x38(sp) | s3 = *(var_38h);
0x00001458 lw s2, 0x34(sp) | s2 = *(var_34h);
0x0000145c lw s1, 0x30(sp) | s1 = *(var_30h);
0x00001460 lw s0, 0x2c(sp) | s0 = *(var_2ch);
0x00001464 addiu sp, sp, 0x48 |
0x00001468 jr ra | return v0;
| label_5:
0x0000146c lw t9, -0x7f40(gp) | t9 = sym.imp.g_option_context_free;
0x00001470 move a0, s0 | a0 = s0;
0x00001474 jalr t9 | t9 ();
0x00001478 lw v0, 0x48(sp) | v0 = *(arg_48h);
0x0000147c slti v0, v0, 2 | v0 = (v0 < 2) ? 1 : 0;
0x00001480 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x00001484 beqz v0, 0x163c | goto label_8;
| }
0x00001488 lw v0, -0x7fd4(gp) | v0 = *((gp - 8181));
0x0000148c lw v0, 0x32b8(v0) | v0 = *((v0 + 3246));
0x00001490 lw v0, -0x7f54(gp) | v0 = *((gp - 8149));
| if (v0 != 0) {
0x00001494 bnez v0, 0x1670 | goto label_9;
| }
0x00001498 lw v0, -0x7fd4(gp) | v0 = *((gp - 8181));
0x0000149c lw v0, 0x32b4(v0) | v0 = *((v0 + 3245));
0x000014a0 lw s4, -0x7f6c(gp) | s4 = *((gp - 8155));
| if (v0 != 0) {
0x000014a4 bnez v0, 0x16a8 | goto label_10;
| }
0x000014a8 lw s5, -0x7f54(gp) | s5 = *((gp - 8149));
0x000014ac lw v1, (s4) | v1 = *(s4);
0x000014b0 lw v0, (s5) | v0 = *(s5);
| if (v1 != 0) {
0x000014b4 bnez v1, 0x1620 | goto label_11;
| }
0x000014b8 lw v1, -0x7f18(gp) | v1 = *((gp - 8134));
| if (v0 != 0) {
0x000014bc bnez v0, 0x1630 | goto label_12;
| }
| label_1:
0x000014c0 lw v1, -0x7fd4(gp) | v1 = *((gp - 8181));
0x000014c4 addiu s0, v1, 0x32a0 | s0 = v1 + 0x32a0;
0x000014c8 lw a0, 4(s0) | a0 = *((s0 + 1));
0x000014cc lw t9, -0x7f10(gp) | t9 = sym.imp.g_process_set_mode;
| if (a0 == 0) {
0x000014d0 bnez a0, 0x14e0 |
0x000014d4 lw v1, 0x32a0(v1) | v1 = *((v1 + 3240));
| if (v1 == 0) {
0x000014d8 beqz v1, 0x1710 | goto label_13;
| }
0x000014dc nop |
| }
0x000014e0 move a0, zero | a0 = 0;
0x000014e4 jalr t9 | t9 ();
0x000014e8 lw gp, 0x10(sp) | gp = *(var_10h);
0x000014ec lw t9, -0x7f94(gp) | t9 = sym.imp.g_process_set_name;
0x000014f0 addiu a0, s2, 0x22c4 | a0 = s2 + 0x22c4;
0x000014f4 jalr t9 | t9 ();
0x000014f8 lw gp, 0x10(sp) | gp = *(var_10h);
0x000014fc lw t9, -0x7f98(gp) | t9 = sym.imp.g_process_start;
0x00001500 jalr t9 | t9 ();
0x00001504 nop |
0x00001508 lw gp, 0x10(sp) | gp = *(var_10h);
0x0000150c lw t9, -0x7f1c(gp) | t9 = sym.imp.app_startup;
0x00001510 jalr t9 | t9 ();
0x00001514 nop |
0x00001518 lw gp, 0x10(sp) | gp = *(var_10h);
0x0000151c addiu v0, zero, 1 | v0 = 1;
0x00001520 move a1, s0 | a1 = s0;
0x00001524 lw t9, -0x7eec(gp) | t9 = sym.imp.main_loop_init;
0x00001528 move a0, s3 | a0 = s3;
0x0000152c sw v0, 0xc(s0) | *((s0 + 3)) = v0;
0x00001530 jalr t9 | t9 ();
0x00001534 lw gp, 0x10(sp) | gp = *(var_10h);
0x00001538 lw t9, -0x7f84(gp) | t9 = sym.imp.main_loop_read_and_init_config;
0x0000153c move a0, s3 | a0 = s3;
0x00001540 jalr t9 | t9 ();
0x00001544 lw gp, 0x10(sp) | gp = *(var_10h);
0x00001548 lw t9, -0x7f00(gp) | t9 = sym.imp.app_finish_app_startup_after_cfg_init;
0x0000154c sw v0, 0x18(sp) | *(var_18h) = v0;
0x00001550 jalr t9 | t9 ();
0x00001554 lw v0, 0x18(sp) | v0 = *(var_18h);
0x00001558 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 != 0) {
0x0000155c bnez v0, 0x16f0 | goto label_14;
| }
0x00001560 lw t9, -0x7f60(gp) | t9 = sym.imp.g_process_startup_failed;
0x00001564 addiu a1, zero, 1 | a1 = 1;
0x00001568 move a0, zero | a0 = 0;
0x0000156c jalr t9 | t9 ();
0x00001570 lw gp, 0x10(sp) | gp = *(var_10h);
| label_3:
0x00001574 lw t9, -0x7fac(gp) | t9 = sym.imp.app_post_daemonized;
0x00001578 jalr t9 | t9 ();
0x0000157c nop |
0x00001580 lw gp, 0x10(sp) | gp = *(var_10h);
0x00001584 lw t9, -0x7f68(gp) | t9 = sym.imp.app_post_config_loaded;
0x00001588 jalr t9 | t9 ();
0x0000158c nop |
0x00001590 lw v0, (s4) | v0 = *(s4);
0x00001594 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 != 0) {
0x00001598 beqz v0, 0x15a8 |
0x0000159c lw v0, -0x7f18(gp) | v0 = *((gp - 8134));
0x000015a0 sw zero, (s5) | *(s5) = 0;
0x000015a4 sw zero, (v0) | *(v0) = 0;
| }
0x000015a8 lw t9, -0x7f44(gp) | t9 = sym.imp.main_loop_run;
0x000015ac move a0, s3 | a0 = s3;
0x000015b0 jalr t9 | t9 ();
0x000015b4 lw gp, 0x10(sp) | gp = *(var_10h);
0x000015b8 lw t9, -0x7fa4(gp) | t9 = sym.imp.main_loop_deinit;
0x000015bc move a0, s3 | a0 = s3;
0x000015c0 jalr t9 | t9 ();
0x000015c4 lw gp, 0x10(sp) | gp = *(var_10h);
0x000015c8 move v0, zero | v0 = 0;
0x000015cc lw t9, -0x7f30(gp) | t9 = sym.imp.app_shutdown;
0x000015d0 sw v0, 0x18(sp) | *(var_18h) = v0;
0x000015d4 jalr t9 | t9 ();
0x000015d8 lw gp, 0x10(sp) | gp = *(var_10h);
0x000015dc lw t9, -0x7f78(gp) | t9 = sym.imp.z_mem_trace_dump;
0x000015e0 jalr t9 | t9 ();
0x000015e4 nop |
0x000015e8 lw gp, 0x10(sp) | gp = *(var_10h);
0x000015ec lw t9, -0x7f2c(gp) | t9 = sym.imp.g_process_finish;
0x000015f0 jalr t9 | t9 ();
0x000015f4 nop |
0x000015f8 lw gp, 0x10(sp) | gp = *(var_10h);
0x000015fc lw t9, -0x7ee8(gp) | t9 = sym.imp.reloc_deinit;
0x00001600 jalr t9 | t9 ();
0x00001604 nop |
0x00001608 lw gp, 0x10(sp) | gp = *(var_10h);
0x0000160c lw v0, 0x18(sp) | v0 = *(var_18h);
0x00001610 b 0x143c |
| } while (1);
| label_6:
0x00001614 lw a3, -0x7fdc(gp) | a3 = *((gp - 8183));
0x00001618 addiu a3, a3, 0x21c0 | a3 += str.Invalid_arguments;
0x0000161c b 0x1410 | goto label_0;
| if (v0 == 0) {
| label_11:
0x00001620 beql v0, zero, 0x1668 | goto label_15;
| }
0x00001624 addiu v0, zero, 1 | v0 = 1;
0x00001628 sw zero, (s4) | *(s4) = 0;
| do {
0x0000162c lw v1, -0x7f18(gp) | v1 = *((gp - 8134));
| label_12:
0x00001630 addiu a0, zero, 1 | a0 = 1;
0x00001634 sw a0, (v1) | *(v1) = a0;
0x00001638 b 0x14c0 | goto label_1;
| label_8:
0x0000163c lw v0, -0x7f9c(gp) | v0 = *((gp - 8167));
0x00001640 lw a0, -0x7fdc(gp) | a0 = *((gp - 8183));
0x00001644 lw t9, -0x7efc(gp) | t9 = sym.imp.fwrite;
0x00001648 lw a3, (v0) | a3 = *(v0);
0x0000164c addiu a2, zero, 0x1b | a2 = 0x1b;
0x00001650 addiu a1, zero, 1 | a1 = 1;
0x00001654 addiu a0, a0, 0x2210 | a0 += str.Excess_number_of_arguments_n;
0x00001658 jalr t9 | t9 ();
0x0000165c lw gp, 0x10(sp) | gp = *(var_10h);
0x00001660 addiu v0, zero, 1 | v0 = 1;
0x00001664 b 0x143c | goto label_2;
| label_15:
0x00001668 sw v0, (s5) | *(s5) = v0;
0x0000166c b 0x162c |
| } while (1);
| label_9:
0x00001670 lw t9, -0x7f24(gp) | t9 = sym.imp.msg_init;
0x00001674 addiu a0, zero, 1 | a0 = 1;
0x00001678 sw zero, (v0) | *(v0) = 0;
0x0000167c lw v0, -0x7f20(gp) | v0 = *((gp - 8136));
0x00001680 sw zero, (v0) | *(v0) = 0;
0x00001684 jalr t9 | t9 ();
0x00001688 lw gp, 0x10(sp) | gp = *(var_10h);
0x0000168c move v0, zero | v0 = 0;
0x00001690 lw t9, -0x7fd0(gp) | t9 = sym.version;
0x00001694 sw v0, 0x18(sp) | *(var_18h) = v0;
0x00001698 bal 0x1a74 | sym_version ();
0x0000169c lw gp, 0x10(sp) | gp = *(var_10h);
0x000016a0 lw v0, 0x18(sp) | v0 = *(var_18h);
0x000016a4 b 0x143c | goto label_2;
| label_10:
0x000016a8 lw v0, -0x7f54(gp) | v0 = *((gp - 8149));
0x000016ac lw t9, -0x7f24(gp) | t9 = sym.imp.msg_init;
0x000016b0 addiu a0, zero, 1 | a0 = 1;
0x000016b4 sw zero, (v0) | *(v0) = 0;
0x000016b8 lw v0, -0x7f20(gp) | v0 = *((gp - 8136));
0x000016bc sw zero, (v0) | *(v0) = 0;
0x000016c0 jalr t9 | t9 ();
0x000016c4 lw gp, 0x10(sp) | gp = *(var_10h);
0x000016c8 addiu a1, zero, 1 | a1 = 1;
0x000016cc lw v0, -0x7f08(gp) | v0 = *((gp - 8130));
0x000016d0 lw t9, -0x7f88(gp) | t9 = sym.imp.plugin_list_modules;
0x000016d4 lw a0, (v0) | a0 = *(v0);
0x000016d8 move v0, zero | v0 = 0;
0x000016dc sw v0, 0x18(sp) | *(var_18h) = v0;
0x000016e0 jalr t9 | t9 ();
0x000016e4 lw gp, 0x10(sp) | gp = *(var_10h);
0x000016e8 lw v0, 0x18(sp) | v0 = *(var_18h);
0x000016ec b 0x143c | goto label_2;
| do {
| label_14:
0x000016f0 lw t9, -0x7f60(gp) | t9 = sym.imp.g_process_startup_failed;
0x000016f4 move a0, v0 | a0 = v0;
0x000016f8 sw v0, 0x18(sp) | *(var_18h) = v0;
0x000016fc addiu a1, zero, 1 | a1 = 1;
0x00001700 jalr t9 | t9 ();
0x00001704 lw gp, 0x10(sp) | gp = *(var_10h);
0x00001708 lw v0, 0x18(sp) | v0 = *(var_18h);
0x0000170c b 0x143c | goto label_2;
| label_13:
0x00001710 lw t9, -0x7f10(gp) | t9 = sym.imp.g_process_set_mode;
| if (v0 != 0) {
0x00001714 bnez v0, 0x17ac | goto label_16;
| }
| label_4:
0x00001718 lw t9, -0x7f94(gp) | t9 = sym.imp.g_process_set_name;
0x0000171c addiu a0, s2, 0x22c4 | a0 = s2 + 0x22c4;
0x00001720 jalr t9 | t9 ();
0x00001724 lw gp, 0x10(sp) | gp = *(var_10h);
0x00001728 lw t9, -0x7f98(gp) | t9 = sym.imp.g_process_start;
0x0000172c jalr t9 | t9 ();
0x00001730 nop |
0x00001734 lw gp, 0x10(sp) | gp = *(var_10h);
0x00001738 lw t9, -0x7f1c(gp) | t9 = sym.imp.app_startup;
0x0000173c jalr t9 | t9 ();
0x00001740 nop |
0x00001744 lw gp, 0x10(sp) | gp = *(var_10h);
0x00001748 addiu v0, zero, 1 | v0 = 1;
0x0000174c move a1, s0 | a1 = s0;
0x00001750 lw t9, -0x7eec(gp) | t9 = sym.imp.main_loop_init;
0x00001754 move a0, s3 | a0 = s3;
0x00001758 sw v0, 0xc(s0) | *((s0 + 3)) = v0;
0x0000175c jalr t9 | t9 ();
0x00001760 lw gp, 0x10(sp) | gp = *(var_10h);
0x00001764 lw t9, -0x7f84(gp) | t9 = sym.imp.main_loop_read_and_init_config;
0x00001768 move a0, s3 | a0 = s3;
0x0000176c jalr t9 | t9 ();
0x00001770 lw gp, 0x10(sp) | gp = *(var_10h);
0x00001774 lw t9, -0x7f00(gp) | t9 = sym.imp.app_finish_app_startup_after_cfg_init;
0x00001778 sw v0, 0x18(sp) | *(var_18h) = v0;
0x0000177c jalr t9 | t9 ();
0x00001780 lw v0, 0x18(sp) | v0 = *(var_18h);
0x00001784 lw gp, 0x10(sp) | gp = *(var_10h);
0x00001788 bnez v0, 0x16f0 |
| } while (v0 != 0);
0x0000178c lw t9, -0x7f34(gp) | t9 = sym.imp.g_process_startup_ok;
0x00001790 jalr t9 | t9 ();
0x00001794 nop |
0x00001798 lw gp, 0x10(sp) | gp = *(var_10h);
0x0000179c b 0x1574 | goto label_3;
| label_7:
0x000017a0 lw t9, -0x7f48(gp) | t9 = sym.imp.__stack_chk_fail;
0x000017a4 jalr t9 | t9 ();
0x000017a8 nop |
| label_16:
0x000017ac move a0, zero | a0 = 0;
0x000017b0 jalr t9 | t9 ();
0x000017b4 lw gp, 0x10(sp) | gp = *(var_10h);
0x000017b8 b 0x1718 | goto label_4;
| }
[*] Function fprintf used 2 times syslog-ng