[*] Binary protection state of policykit_system
Full RELRO Canary found NX disabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function printf tear down of policykit_system
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/sbin/policykit_system @ 0x1bec8 */
| #include <stdint.h>
|
; (fcn) fcn.0001bec8 () | void fcn_0001bec8 () {
0x0001bec8 lui gp, 2 |
0x0001becc addiu gp, gp, -0xeb8 |
0x0001bed0 addu gp, gp, t9 | gp += t9;
0x0001bed4 addiu sp, sp, -0x50 |
0x0001bed8 sw gp, 0x18(sp) | *(var_18h) = gp;
0x0001bedc sw s6, 0x40(sp) | *(var_40h) = s6;
0x0001bee0 sw ra, 0x4c(sp) | *(var_4ch) = ra;
0x0001bee4 sw fp, 0x48(sp) | *(var_48h) = fp;
0x0001bee8 sw s7, 0x44(sp) | *(var_44h) = s7;
0x0001beec sw s5, 0x3c(sp) | *(var_3ch) = s5;
0x0001bef0 sw s4, 0x38(sp) | *(var_38h) = s4;
0x0001bef4 sw s3, 0x34(sp) | *(var_34h) = s3;
0x0001bef8 sw s2, 0x30(sp) | *(var_30h) = s2;
0x0001befc sw s1, 0x2c(sp) | *(var_2ch) = s1;
0x0001bf00 sw s0, 0x28(sp) | *(var_28h) = s0;
0x0001bf04 move s6, a0 | s6 = a0;
| if (a1 == 0) {
0x0001bf08 beqz a1, 0x1c0e8 | goto label_1;
| }
0x0001bf0c addiu s2, zero, 0xc4 | s2 = 0xc4;
0x0001bf10 mul v0, a1, s2 | __asm ("mul v0, a1, s2");
0x0001bf14 lw s3, -0x7fdc(gp) | s3 = *(gp);
0x0001bf18 lw s7, -0x7fdc(gp) | s7 = *(gp);
0x0001bf1c move s5, a2 | s5 = a2;
0x0001bf20 move s0, a0 | s0 = a0;
0x0001bf24 addu s2, v0, a0 | s2 = v0 + a0;
0x0001bf28 move s4, zero | s4 = 0;
0x0001bf2c move s1, zero | s1 = 0;
| /* fcn.0001be00 */
0x0001bf30 addiu s3, s3, -0x4200 | s3 += -0x4200;
| /* str._s:_ */
0x0001bf34 addiu s7, s7, 0x1a10 | s7 += 0x1a10;
| do {
0x0001bf38 lw v0, 0x20(s0) | v0 = *((s0 + 8));
0x0001bf3c lw t9, -0x7e34(gp) | t9 = sym.imp.g_prefix_error;
| if (v0 != 0) {
0x0001bf40 beqz v0, 0x1bf7c |
0x0001bf44 move a2, s0 | a2 = s0;
0x0001bf48 addiu a0, s0, 0x20 | a0 = s0 + 0x20;
0x0001bf4c move a1, s7 | a1 = s7;
0x0001bf50 addiu s1, s1, 1 | s1++;
| if (s5 == 0) {
0x0001bf54 beqz s5, 0x1bf7c | goto label_2;
| }
0x0001bf58 jalr t9 | t9 ();
0x0001bf5c nop |
0x0001bf60 lw gp, 0x18(sp) | gp = *(var_18h);
0x0001bf64 lw a1, 0x20(s0) | a1 = *((s0 + 8));
0x0001bf68 lw t9, -0x7dbc(gp) | t9 = sym.imp.g_list_prepend;
0x0001bf6c move a0, s4 | a0 = s4;
0x0001bf70 jalr t9 | t9 ();
0x0001bf74 move s4, v0 | s4 = v0;
0x0001bf78 sw zero, 0x20(s0) | *((s0 + 8)) = 0;
| }
| label_2:
0x0001bf7c move a0, s0 | a0 = s0;
0x0001bf80 move a1, zero | a1 = 0;
0x0001bf84 move t9, s3 | t9 = s3;
0x0001bf88 addiu s0, s0, 0xc4 | s0 += 0xc4;
0x0001bf8c bal 0x1be00 | fcn_0001be00 ();
0x0001bf90 lw gp, 0x18(sp) | gp = *(var_18h);
0x0001bf94 bne s2, s0, 0x1bf38 |
| } while (s2 != s0);
0x0001bf98 lw t9, -0x7bc4(gp) | t9 = sym.imp.g_list_free;
| if (s5 == 0) {
0x0001bf9c beqz s5, 0x1c09c | goto label_3;
| }
0x0001bfa0 lw t9, -0x7c5c(gp) | t9 = sym.imp.g_list_length;
| if (s4 == 0) {
0x0001bfa4 beqz s4, 0x1c098 | goto label_0;
| }
0x0001bfa8 move a0, s4 | a0 = s4;
0x0001bfac jalr t9 | t9 ();
0x0001bfb0 addiu v1, zero, 1 | v1 = 1;
0x0001bfb4 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == v1) {
0x0001bfb8 beq v0, v1, 0x1c0f4 | goto label_4;
| }
0x0001bfbc lw s2, -0x7fdc(gp) | s2 = *(gp);
0x0001bfc0 lw t9, -0x7c08(gp) | t9 = sym.imp.g_string_new;
0x0001bfc4 addiu a0, s2, -0x750 | a0 = s2 + -0x750;
0x0001bfc8 jalr t9 | t9 ();
0x0001bfcc lw gp, 0x18(sp) | gp = *(var_18h);
0x0001bfd0 move s3, v0 | s3 = v0;
0x0001bfd4 addiu v1, s2, -0x750 | v1 = s2 + -0x750;
0x0001bfd8 lw v0, -0x7fdc(gp) | v0 = *(gp);
0x0001bfdc lw s7, -0x7fdc(gp) | s7 = *(gp);
0x0001bfe0 addiu v0, v0, -0x1a98 | v0 += -0x1a98;
0x0001bfe4 sw v1, 0x20(sp) | *(var_20h) = v1;
0x0001bfe8 lw fp, (s4) | fp = *(s4);
0x0001bfec move s0, s4 | s0 = s4;
0x0001bff0 move s2, zero | s2 = 0;
0x0001bff4 move a2, v1 | a2 = v1;
| /* str._s_s */
0x0001bff8 addiu s7, s7, -0x2038 | s7 += -0x2038;
0x0001bffc sw v0, 0x24(sp) | *(var_24h) = v0;
0x0001c000 b 0x1c010 |
| while (s0 != 0) {
0x0001c004 lw v0, 0x24(sp) | v0 = *(var_24h);
0x0001c008 lw fp, (s0) | fp = *(s0);
| if (s2 == 0) {
0x0001c00c movn a2, v0, s2 | a2 = v0;
| }
0x0001c010 lw t9, -0x7e44(gp) | t9 = sym.imp.g_string_append_printf
0x0001c014 lw a3, 8(fp) | a3 = *(arg_8h);
0x0001c018 move a1, s7 | a1 = s7;
0x0001c01c move a0, s3 | a0 = s3;
0x0001c020 jalr t9 | t9 ();
0x0001c024 lw gp, 0x18(sp) | gp = *(var_18h);
0x0001c028 move a0, fp | a0 = fp;
0x0001c02c lw t9, -0x7df4(gp) | t9 = sym.imp.g_error_free;
0x0001c030 addiu s2, s2, 1 | s2++;
0x0001c034 jalr t9 | t9 ();
0x0001c038 lw gp, 0x18(sp) | gp = *(var_18h);
0x0001c03c sw zero, (s0) | *(s0) = 0;
0x0001c040 lw s0, 4(s0) | s0 = *((s0 + 1));
0x0001c044 lw a2, 0x20(sp) | a2 = *(var_20h);
0x0001c048 bnez s0, 0x1c004 |
| }
0x0001c04c lw t9, -0x7fc8(gp) | t9 = sym.policykit_system_error_quark;
0x0001c050 bal 0x6c14 | sym_policykit_system_error_quark ();
0x0001c054 nop |
0x0001c058 lw gp, 0x18(sp) | gp = *(var_18h);
0x0001c05c lw v1, (s3) | v1 = *(s3);
0x0001c060 move a1, v0 | a1 = v0;
0x0001c064 lw a3, -0x7fdc(gp) | a3 = *(gp);
0x0001c068 lw t9, -0x7d14(gp) | t9 = sym.imp.g_set_error;
| /* esilref: '&s' */
0x0001c06c addiu a3, a3, 0x1db0 | a3 += 0x1db0;
0x0001c070 move a2, zero | a2 = 0;
0x0001c074 move a0, s5 | a0 = s5;
0x0001c078 sw v1, 0x10(sp) | *(var_10h) = v1;
0x0001c07c jalr t9 | t9 ();
0x0001c080 lw gp, 0x18(sp) | gp = *(var_18h);
0x0001c084 addiu a1, zero, 1 | a1 = 1;
0x0001c088 lw t9, -0x7c88(gp) | t9 = sym.imp.g_string_free;
0x0001c08c move a0, s3 | a0 = s3;
0x0001c090 jalr t9 | t9 ();
0x0001c094 lw gp, 0x18(sp) | gp = *(var_18h);
| do {
| label_0:
0x0001c098 lw t9, -0x7bc4(gp) | t9 = sym.imp.g_list_free;
| label_3:
0x0001c09c move a0, s4 | a0 = s4;
0x0001c0a0 jalr t9 | t9 ();
0x0001c0a4 lw gp, 0x18(sp) | gp = *(var_18h);
0x0001c0a8 lw t9, -0x7b20(gp) | t9 = *((gp - 7880));
0x0001c0ac move a0, s6 | a0 = s6;
0x0001c0b0 jalr t9 | t9 ();
0x0001c0b4 lw ra, 0x4c(sp) | ra = *(var_4ch);
0x0001c0b8 move v0, s1 | v0 = s1;
0x0001c0bc lw fp, 0x48(sp) | fp = *(var_48h);
0x0001c0c0 lw s7, 0x44(sp) | s7 = *(var_44h);
0x0001c0c4 lw s6, 0x40(sp) | s6 = *(var_40h);
0x0001c0c8 lw s5, 0x3c(sp) | s5 = *(var_3ch);
0x0001c0cc lw s4, 0x38(sp) | s4 = *(var_38h);
0x0001c0d0 lw s3, 0x34(sp) | s3 = *(var_34h);
0x0001c0d4 lw s2, 0x30(sp) | s2 = *(var_30h);
0x0001c0d8 lw s1, 0x2c(sp) | s1 = *(var_2ch);
0x0001c0dc lw s0, 0x28(sp) | s0 = *(var_28h);
0x0001c0e0 addiu sp, sp, 0x50 |
0x0001c0e4 jr ra | return v0;
| label_1:
0x0001c0e8 move s1, zero | s1 = 0;
0x0001c0ec move s4, zero | s4 = 0;
0x0001c0f0 b 0x1c098 |
| } while (1);
| label_4:
0x0001c0f4 lw t9, -0x7ce4(gp) | t9 = sym.imp.g_propagate_error;
0x0001c0f8 lw a1, (s4) | a1 = *(s4);
0x0001c0fc move a0, s5 | a0 = s5;
0x0001c100 jalr t9 | t9 ();
0x0001c104 lw gp, 0x18(sp) | gp = *(var_18h);
0x0001c108 sw zero, (s4) | *(s4) = 0;
0x0001c10c b 0x1c098 | goto label_0;
| }
[*] Function printf used 2 times policykit_system