[*] Binary protection state of busctl
Full RELRO Canary found NX disabled PIE enabled RPATH No RUNPATH No Symbols
[*] Function printf tear down of busctl
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/busctl @ 0x76dc */
| #include <stdint.h>
|
; (fcn) fcn.000076dc () | void fcn_000076dc () {
0x000076dc lui gp, 2 |
0x000076e0 addiu gp, gp, 0x4934 |
0x000076e4 addu gp, gp, t9 | gp += t9;
0x000076e8 addiu sp, sp, -0x60 |
0x000076ec sw s5, 0x4c(sp) | *(var_4ch) = s5;
0x000076f0 lw s5, -0x7e54(gp) | s5 = *((gp - 8085));
0x000076f4 sw fp, 0x58(sp) | *(var_58h) = fp;
0x000076f8 sw s4, 0x48(sp) | *(var_48h) = s4;
0x000076fc sw ra, 0x5c(sp) | *(var_5ch) = ra;
0x00007700 sw s7, 0x54(sp) | *(var_54h) = s7;
0x00007704 sw s6, 0x50(sp) | *(var_50h) = s6;
0x00007708 sw s3, 0x44(sp) | *(var_44h) = s3;
0x0000770c sw s2, 0x40(sp) | *(var_40h) = s2;
0x00007710 sw s1, 0x3c(sp) | *(var_3ch) = s1;
0x00007714 sw s0, 0x38(sp) | *(var_38h) = s0;
0x00007718 sw gp, 0x18(sp) | *(var_18h) = gp;
0x0000771c move fp, sp | fp = sp;
0x00007720 move s4, a0 | s4 = a0;
0x00007724 lw v0, (s5) | v0 = *(s5);
0x00007728 lw a0, (a2) | a0 = *(a2);
0x0000772c sw v0, 0x34(fp) | *(var_34h) = v0;
| if (a0 == 0) {
0x00007730 beqz a0, 0x7960 | goto label_6;
| }
0x00007734 nop |
0x00007738 move s1, a2 | s1 = a2;
0x0000773c move s2, a1 | s2 = a1;
0x00007740 b 0x7754 |
| while (v0 == 0) {
0x00007744 addiu s1, s1, 4 | s1 += 4;
0x00007748 lw a0, (s1) | a0 = *(s1);
| if (a0 == 0) {
0x0000774c beqz a0, 0x7960 | goto label_6;
| }
0x00007750 nop |
0x00007754 lw t9, -0x7f78(gp) | t9 = sym.imp.strcmp;
0x00007758 move a1, s2 | a1 = s2;
0x0000775c jalr t9 | t9 ();
0x00007760 lw gp, 0x18(fp) | gp = *(var_18h);
0x00007764 beqz v0, 0x7744 |
| }
0x00007768 lw t9, -0x7f98(gp) | t9 = sym.imp.special_glyph;
0x0000776c move a0, zero | a0 = 0;
0x00007770 jalr t9 | t9 ();
0x00007774 move s3, v0 | s3 = v0;
0x00007778 lw gp, 0x18(fp) | gp = *(var_18h);
| if (s4 == 0) {
0x0000777c beqz s4, 0x7a18 | goto label_7;
| }
0x00007780 lw t9, -0x7df8(gp) | t9 = sym.imp.strlen;
0x00007784 move a0, s4 | a0 = s4;
0x00007788 jalr t9 | t9 ();
0x0000778c move s0, v0 | s0 = v0;
0x00007790 lw gp, 0x18(fp) | gp = *(var_18h);
| if (s3 == 0) {
0x00007794 beqz s3, 0x7a3c | goto label_8;
| }
0x00007798 lw t9, -0x7df8(gp) | t9 = sym.imp.strlen;
0x0000779c move a0, s3 | a0 = s3;
0x000077a0 jalr t9 | t9 ();
0x000077a4 addu v0, s0, v0 | v0 = s0 + v0;
0x000077a8 lui a0, 0x40 | a0 = 0x400000;
0x000077ac addiu v1, v0, 1 | v1 = v0 + 1;
0x000077b0 addiu a0, a0, 1 | a0++;
0x000077b4 sltu v1, v1, a0 | v1 = (v1 < a0) ? 1 : 0;
0x000077b8 lw gp, 0x18(fp) | gp = *(var_18h);
| if (v1 == 0) {
0x000077bc beqz v1, 0x79d4 | goto label_3;
| }
0x000077c0 addiu v0, v0, 8 | v0 += 8;
0x000077c4 srl v0, v0, 3 | v0 >>= 3;
0x000077c8 sll v0, v0, 3 | v0 <<= 3;
0x000077cc subu sp, sp, v0 |
0x000077d0 lw t9, -0x7d64(gp) | t9 = sym.imp.stpcpy;
0x000077d4 addiu v0, sp, 0x18 | v0 = sp + 0x18;
0x000077d8 move a1, s4 | a1 = s4;
0x000077dc move a0, v0 | a0 = v0;
0x000077e0 sw v0, 0x28(fp) | *(var_28h) = v0;
0x000077e4 jalr t9 | t9 ();
0x000077e8 lw gp, 0x18(fp) | gp = *(var_18h);
0x000077ec move a1, s3 | a1 = s3;
0x000077f0 lw t9, -0x7d64(gp) | t9 = sym.imp.stpcpy;
0x000077f4 move a0, v0 | a0 = v0;
0x000077f8 jalr t9 | t9 ();
0x000077fc lw gp, 0x18(fp) | gp = *(var_18h);
| label_4:
0x00007800 lw t9, -0x7f98(gp) | t9 = sym.imp.special_glyph;
0x00007804 sb zero, (v0) | *(v0) = 0;
0x00007808 addiu a0, zero, 3 | a0 = 3;
0x0000780c jalr t9 | t9 ();
0x00007810 move s3, v0 | s3 = v0;
0x00007814 lw gp, 0x18(fp) | gp = *(var_18h);
| if (v0 == 0) {
0x00007818 beqz v0, 0x7a80 | goto label_9;
| }
0x0000781c lw t9, -0x7df8(gp) | t9 = sym.imp.strlen;
0x00007820 move a0, s3 | a0 = s3;
0x00007824 jalr t9 | t9 ();
0x00007828 addu v0, v0, s0 | v0 += s0;
0x0000782c lui a0, 0x40 | a0 = 0x400000;
0x00007830 addiu v1, v0, 1 | v1 = v0 + 1;
0x00007834 addiu a0, a0, 1 | a0++;
0x00007838 sltu v1, v1, a0 | v1 = (v1 < a0) ? 1 : 0;
0x0000783c lw gp, 0x18(fp) | gp = *(var_18h);
| if (v1 == 0) {
0x00007840 beqz v1, 0x7a00 | goto label_5;
| }
0x00007844 addiu v0, v0, 8 | v0 += 8;
0x00007848 srl v0, v0, 3 | v0 >>= 3;
0x0000784c sll v0, v0, 3 | v0 <<= 3;
0x00007850 subu sp, sp, v0 |
0x00007854 lw t9, -0x7d64(gp) | t9 = sym.imp.stpcpy;
0x00007858 addiu v0, sp, 0x18 | v0 = sp + 0x18;
0x0000785c move a1, s4 | a1 = s4;
0x00007860 move a0, v0 | a0 = v0;
0x00007864 sw v0, 0x24(fp) | *(var_24h) = v0;
0x00007868 jalr t9 | t9 ();
0x0000786c lw gp, 0x18(fp) | gp = *(var_18h);
0x00007870 move a1, s3 | a1 = s3;
0x00007874 lw t9, -0x7d64(gp) | t9 = sym.imp.stpcpy;
0x00007878 move a0, v0 | a0 = v0;
0x0000787c jalr t9 | t9 ();
0x00007880 lw gp, 0x18(fp) | gp = *(var_18h);
| label_2:
0x00007884 lw s3, (s1) | s3 = *(s1);
0x00007888 sb zero, (v0) | *(v0) = 0;
| if (s3 == 0) {
0x0000788c beqz s3, 0x7960 | goto label_6;
| }
0x00007890 lw v0, -0x7fd8(gp) | v0 = *((gp - 8182));
0x00007894 lw s6, -0x7fdc(gp) | s6 = sym.imp.sd_bus_message_new_signal;
0x00007898 addiu v0, v0, 0x76dc | v0 += fcn.000076dc;
| /* str._s_s_s_n */
0x0000789c addiu s6, s6, 0x15b0 | s6 += 0x15b0;
0x000078a0 sw v0, 0x2c(fp) | *(var_2ch) = v0;
| label_0:
0x000078a4 lw t9, -0x7de8(gp) | t9 = sym.imp.path_startswith;
0x000078a8 move a1, s2 | a1 = s2;
0x000078ac move a0, s3 | a0 = s3;
0x000078b0 jalr t9 | t9 ();
0x000078b4 lw gp, 0x18(fp) | gp = *(var_18h);
| if (v0 == 0) {
0x000078b8 beqz v0, 0x7960 | goto label_6;
| }
0x000078bc lw s7, 4(s1) | s7 = *((s1 + 1));
0x000078c0 addiu s0, s1, 4 | s0 = s1 + 4;
| if (s7 != 0) {
0x000078c4 bnez s7, 0x78f8 | goto label_10;
| }
0x000078c8 lw t9, -0x7f98(gp) | t9 = sym.imp.special_glyph;
0x000078cc b 0x7914 | goto label_11;
| do {
0x000078d0 lw t9, -0x7de8(gp) | t9 = sym.imp.path_startswith;
0x000078d4 move a1, s3 | a1 = s3;
0x000078d8 move a0, s7 | a0 = s7;
0x000078dc jalr t9 | t9 ();
0x000078e0 lw gp, 0x18(fp) | gp = *(var_18h);
| if (v0 == 0) {
0x000078e4 beqz v0, 0x79a0 | goto label_12;
| }
0x000078e8 addiu s0, s0, 4 | s0 += 4;
0x000078ec lw s7, (s0) | s7 = *(s0);
0x000078f0 lw t9, -0x7f98(gp) | t9 = sym.imp.special_glyph;
| if (s7 == 0) {
0x000078f4 beqz s7, 0x7914 | goto label_11;
| }
| label_10:
0x000078f8 lw t9, -0x7de8(gp) | t9 = sym.imp.path_startswith;
0x000078fc move a1, s2 | a1 = s2;
0x00007900 move a0, s7 | a0 = s7;
0x00007904 jalr t9 | t9 ();
0x00007908 lw gp, 0x18(fp) | gp = *(var_18h);
0x0000790c bnez v0, 0x78d0 |
| } while (v0 != 0);
0x00007910 lw t9, -0x7f98(gp) | t9 = sym.imp.special_glyph;
| label_11:
0x00007914 addiu a0, zero, 2 | a0 = 2;
0x00007918 jalr t9 | t9 ();
0x0000791c lw gp, 0x18(fp) | gp = *(var_18h);
0x00007920 addiu a0, zero, 1 | a0 = 1;
0x00007924 sw s3, 0x10(sp) | *(var_10h) = s3;
0x00007928 lw t9, -0x7d38(gp) | t9 = sym.imp.__printf_chk
0x0000792c move a3, v0 | a3 = v0;
0x00007930 move a2, s4 | a2 = s4;
0x00007934 move a1, s6 | a1 = s6;
0x00007938 jalr t9 | t9 ();
0x0000793c lw a0, 0x24(fp) | a0 = *(var_24h);
| label_1:
0x00007940 lw a1, (s1) | a1 = *(s1);
0x00007944 lw t9, 0x2c(fp) | t9 = *(var_2ch);
0x00007948 move a2, s1 | a2 = s1;
0x0000794c jalr t9 | t9 ();
0x00007950 lw s3, (s0) | s3 = *(s0);
0x00007954 lw gp, 0x18(fp) | gp = *(var_18h);
0x00007958 move s1, s0 | s1 = s0;
| if (s3 != 0) {
0x0000795c bnez s3, 0x78a4 | goto label_0;
| }
| label_6:
0x00007960 lw v1, 0x34(fp) | v1 = *(var_34h);
0x00007964 lw v0, (s5) | v0 = *(s5);
0x00007968 lw ra, 0x5c(fp) | ra = *(var_5ch);
| if (v1 != v0) {
0x0000796c bne v1, v0, 0x7ac4 | goto label_13;
| }
0x00007970 move sp, fp |
0x00007974 lw fp, 0x58(sp) | fp = *(var_58h);
0x00007978 lw s7, 0x54(sp) | s7 = *(var_54h);
0x0000797c lw s6, 0x50(sp) | s6 = *(var_50h);
0x00007980 lw s5, 0x4c(sp) | s5 = *(var_4ch);
0x00007984 lw s4, 0x48(sp) | s4 = *(var_48h);
0x00007988 lw s3, 0x44(sp) | s3 = *(var_44h);
0x0000798c lw s2, 0x40(sp) | s2 = *(var_40h);
0x00007990 lw s1, 0x3c(sp) | s1 = *(var_3ch);
0x00007994 lw s0, 0x38(sp) | s0 = *(var_38h);
0x00007998 addiu sp, sp, 0x60 |
0x0000799c jr ra | return v0;
| label_12:
0x000079a0 lw t9, -0x7f98(gp) | t9 = sym.imp.special_glyph;
0x000079a4 addiu a0, zero, 1 | a0 = 1;
0x000079a8 jalr t9 | t9 ();
0x000079ac lw gp, 0x18(fp) | gp = *(var_18h);
0x000079b0 addiu a0, zero, 1 | a0 = 1;
0x000079b4 sw s3, 0x10(sp) | *(var_10h) = s3;
0x000079b8 lw t9, -0x7d38(gp) | t9 = sym.imp.__printf_chk
0x000079bc move a3, v0 | a3 = v0;
0x000079c0 move a2, s4 | a2 = s4;
0x000079c4 move a1, s6 | a1 = s6;
0x000079c8 jalr t9 | t9 ();
0x000079cc lw a0, 0x28(fp) | a0 = *(var_28h);
0x000079d0 b 0x7940 | goto label_1;
| label_3:
0x000079d4 lw v0, -0x7fdc(gp) | v0 = sym.imp.sd_bus_message_new_signal;
0x000079d8 lw t9, -0x7d78(gp) | t9 = sym.imp.log_assert_failed_realm;
| /* str.print_subtree */
0x000079dc addiu v0, v0, 0x240c | v0 += 0x240c;
0x000079e0 sw v0, 0x10(sp) | *(var_18h_2) = v0;
0x000079e4 addiu a3, zero, 0x180 | a3 = 0x180;
| do {
0x000079e8 lw a2, -0x7fdc(gp) | a2 = sym.imp.sd_bus_message_new_signal;
0x000079ec lw a1, -0x7fdc(gp) | a1 = sym.imp.sd_bus_message_new_signal;
| /* esilref: 'src/busctl/busctl.c' */
0x000079f0 addiu a2, a2, 0x21b | a2 += 0x21b;
| /* str.sizeof_char__n____ALLOCA_MAX */
0x000079f4 addiu a1, a1, 0x1590 | a1 += 0x1590;
0x000079f8 move a0, zero | a0 = 0;
0x000079fc jalr t9 | t9 ();
| label_5:
0x00007a00 lw v0, -0x7fdc(gp) | v0 = sym.imp.sd_bus_message_new_signal;
0x00007a04 lw t9, -0x7d78(gp) | t9 = sym.imp.log_assert_failed_realm;
| /* str.print_subtree */
0x00007a08 addiu v0, v0, 0x240c | v0 += 0x240c;
0x00007a0c sw v0, 0x10(sp) | *(var_18h_2) = v0;
0x00007a10 addiu a3, zero, 0x181 | a3 = 0x181;
0x00007a14 b 0x79e8 |
| } while (1);
| label_7:
0x00007a18 addiu sp, sp, -8 |
0x00007a1c addiu v0, sp, 0x18 | v0 = sp + 0x18;
0x00007a20 move v1, v0 | v1 = v0;
0x00007a24 addiu sp, sp, -8 |
0x00007a28 sw v0, 0x28(fp) | *(var_28h) = v0;
0x00007a2c addiu v0, sp, 0x18 | v0 = sp + 0x18;
0x00007a30 sb zero, (v1) | *(v1) = 0;
0x00007a34 sw v0, 0x24(fp) | *(var_24h) = v0;
0x00007a38 b 0x7884 | goto label_2;
| label_8:
0x00007a3c lui v1, 0x40 | v1 = 0x400000;
0x00007a40 addiu v0, v0, 1 | v0++;
0x00007a44 addiu v1, v1, 1 | v1++;
0x00007a48 sltu v0, v0, v1 | v0 = (v0 < v1) ? 1 : 0;
0x00007a4c addiu v0, s0, 8 | v0 = s0 + 8;
| if (v0 == 0) {
0x00007a50 beqz v0, 0x79d4 | goto label_3;
| }
0x00007a54 srl v0, v0, 3 | v0 >>= 3;
0x00007a58 sll v0, v0, 3 | v0 <<= 3;
0x00007a5c subu sp, sp, v0 |
0x00007a60 lw t9, -0x7d64(gp) | t9 = sym.imp.stpcpy;
0x00007a64 addiu v0, sp, 0x18 | v0 = sp + 0x18;
0x00007a68 sw v0, 0x28(fp) | *(var_28h) = v0;
0x00007a6c move a1, s4 | a1 = s4;
0x00007a70 move a0, v0 | a0 = v0;
0x00007a74 jalr t9 | t9 ();
0x00007a78 lw gp, 0x18(fp) | gp = *(var_18h);
0x00007a7c b 0x7800 | goto label_4;
| label_9:
0x00007a80 lui v1, 0x40 | v1 = 0x400000;
0x00007a84 addiu v0, s0, 1 | v0 = s0 + 1;
0x00007a88 addiu v1, v1, 1 | v1++;
0x00007a8c sltu v0, v0, v1 | v0 = (v0 < v1) ? 1 : 0;
0x00007a90 addiu v0, s0, 8 | v0 = s0 + 8;
| if (v0 == 0) {
0x00007a94 beqz v0, 0x7a00 | goto label_5;
| }
0x00007a98 srl v0, v0, 3 | v0 >>= 3;
0x00007a9c sll v0, v0, 3 | v0 <<= 3;
0x00007aa0 subu sp, sp, v0 |
0x00007aa4 lw t9, -0x7d64(gp) | t9 = sym.imp.stpcpy;
0x00007aa8 addiu v0, sp, 0x18 | v0 = sp + 0x18;
0x00007aac sw v0, 0x24(fp) | *(var_24h) = v0;
0x00007ab0 move a1, s4 | a1 = s4;
0x00007ab4 move a0, v0 | a0 = v0;
0x00007ab8 jalr t9 | t9 ();
0x00007abc lw gp, 0x18(fp) | gp = *(var_18h);
0x00007ac0 b 0x7884 | goto label_2;
| label_13:
0x00007ac4 lw t9, -0x7ec0(gp) | t9 = sym.imp.__stack_chk_fail;
0x00007ac8 jalr t9 | t9 ();
0x00007acc nop |
0x00007ad0 lui gp, 2 |
0x00007ad4 addiu gp, gp, 0x4540 |
0x00007ad8 addu gp, gp, t9 | gp += t9;
0x00007adc lw v0, -0x7fd4(gp) | v0 = *((gp - 8181));
0x00007ae0 move a2, a1 | a2 = a1;
0x00007ae4 lw t9, -0x7dbc(gp) | t9 = sym.imp.bus_message_pcap_frame;
0x00007ae8 lw a1, 0x4004(v0) | a1 = *((v0 + 4097));
0x00007aec jr t9 | return t9 ();
| }
[*] Function printf used 3 times busctl