[*] Binary protection state of libled_lib.so
Full RELRO Canary found NX enabled DSO No RPATH No RUNPATH No Symbols
[*] Function printf tear down of libled_lib.so
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/blinkenlights_plugins/libled_lib.so @ 0xee0 */
| #include <stdint.h>
|
; (fcn) sym.plugin_init () | void plugin_init (int16_t arg_8h, int16_t arg_ch, int16_t arg_14h, int16_t arg_18h, int16_t arg_20h, int16_t arg_24h, char * path, char * arg_30h, char * arg_38h, char * arg_3ch) {
| int16_t var_0h;
| int16_t var_5ch;
0x00000ee0 svcmi 0xf0e92d | __asm ("svcmi aav.0x000000ff");
0x00000ee4 movs r0, 0xff | r0 = 0xff;
0x00000ee6 ldr r5, [pc, 0x350] |
0x00000ee8 ldr r4, [pc, 0x350] | r4 = *(0x123c);
0x00000eea add r5, pc | r5 = 0x2128;
0x00000eec vpush {d8} | __asm ("vpush {d8}");
0x00000ef0 ldr r3, [pc, 0x34c] |
0x00000ef2 sub sp, 0x64 |
0x00000ef4 ldr r4, [r5, r4] |
0x00000ef6 ldr r1, [pc, 0x34c] |
0x00000ef8 ldr r2, [pc, 0x34c] | r2 = *(0x1248);
0x00000efa add r3, pc | r3 = 0x213e;
0x00000efc ldr r4, [r4] | r4 = *(0x2128);
0x00000efe str r4, [sp, 0x5c] | var_5ch = r4;
0x00000f00 mov.w r4, 0 | r4 = 0;
0x00000f04 add r1, pc | r1 = 0x214e;
0x00000f06 str r0, [r1] | *(r1) = r0;
0x00000f08 ldr r6, [r3, r2] | r6 = *(0x213e);
0x00000f0a ldr r1, [r6] | r1 = *(0x213e);
0x00000f0c cmp r1, 0 |
| if (r1 == 0) {
0x00000f0e beq.w 0x116a | goto label_11;
| }
0x00000f10 strh r4, [r5, 8] | *((r5 + 8)) = r4;
0x00000f12 ldr.w r8, [pc, 0x338] |
0x00000f16 add.w r4, r6, 0x5c | r4 = r6 + 0x5c;
0x00000f1a ldr.w sb, [pc, 0x334] |
0x00000f1e mov r7, sp | r7 = sp;
0x00000f20 vldr d8, [pc, 0x30c] | __asm ("vldr d8, aav.0x000000ff");
0x00000f24 add r8, pc | r8 = 0x2176;
0x00000f26 add sb, pc | sb = 0x217c;
0x00000f28 b 0x100a |
| while (r3 == 0) {
| label_0:
0x00000f2a add.w fp, r5, sl |
0x00000f2e add.w fp, r6, fp, lsl 5 |
0x00000f32 ldr.w r3, [fp, 0x24] | r3 = *(arg_24h);
0x00000f36 cmp r3, 0 |
| if (r3 != 0) {
0x00000f38 bne.w 0x11b4 | goto label_12;
| }
| label_8:
0x00000f3c add r5, sl | r5 += sl;
0x00000f3e add.w r5, r6, r5, lsl 5 | r5 = r6 + (r5 << 5);
0x00000f42 ldr r3, [r5, 0x28] | r3 = *((r5 + 0x28));
0x00000f44 cmp r3, 0 |
| if (r3 != 0) {
0x00000f46 bne.w 0x11e0 | goto label_13;
| }
| label_9:
0x00000f4a ldr r3, [r4, -0x3c] | r3 = *((r4 - 0x3c));
0x00000f4e cmp r3, 0 |
| if (r3 != 0) {
0x00000f50 bne.w 0x10d4 | goto label_14;
| }
| label_1:
0x00000f54 ldr r3, [r4, -0x38] | r3 = *((r4 - 0x38));
0x00000f58 cmp r3, 0 |
| if (r3 != 0) {
0x00000f5a bne.w 0x10ee | goto label_15;
| }
| label_2:
0x00000f5e ldr r3, [r4, -0x34] | r3 = *((r4 - 0x34));
0x00000f62 cmp r3, 0 |
| if (r3 != 0) {
0x00000f64 bne.w 0x1106 | goto label_16;
| }
| label_3:
0x00000f68 ldr.w sl, [pc, 0x2e8] |
0x00000f6c sub.w r0, r4, 0x18 | r0 = r4 - 0x18;
0x00000f70 ldr r5, [pc, 0x2e4] |
0x00000f72 mov.w fp, 0 |
0x00000f76 ldr r2, [pc, 0x2e4] |
0x00000f78 add sl, pc | sl = 0x21d0;
0x00000f7a ldr r1, [r4, -0x5c] | r1 = *((r4 - 0x5c));
0x00000f7e add r5, pc | r5 = 0x21da;
0x00000f80 mov r3, sl | r3 = sl;
0x00000f82 vst1.32 {d8}, [r0] | __asm ("vst1.32 {d8}, [r0]");
0x00000f86 add r2, pc | r2 = 0x21e8;
0x00000f88 mov r0, r5 | r0 = r5;
0x00000f8a str fp, [r4, -0xc] | *((r4 - 0xc)) = fp;
0x00000f8e blx 0x9d0 | g_strdup_printf ()
0x00000f92 ldr r2, [pc, 0x2cc] |
0x00000f94 mov ip, r0 |
0x00000f96 mov r3, sl | r3 = sl;
0x00000f98 ldr r1, [r4, -0x5c] | r1 = *((r4 - 0x5c));
0x00000f9c mov r0, r5 | r0 = r5;
0x00000f9e str ip, [r4, -0x24] | *((r4 - 0x24)) = ip;
0x00000fa2 add r2, pc | r2 = 0x2208;
0x00000fa4 blx 0x9d0 | g_strdup_printf ()
0x00000fa8 ldr r2, [pc, 0x2b8] |
0x00000faa mov ip, r0 |
0x00000fac mov r3, sl | r3 = sl;
0x00000fae mov r0, r5 | r0 = r5;
0x00000fb0 ldr r1, [r4, -0x5c] | r1 = *((r4 - 0x5c));
0x00000fb4 add r2, pc | r2 = 0x221c;
0x00000fb6 str ip, [r4, -0x20] | *((r4 - 0x20)) = ip;
0x00000fba blx 0x9d0 | g_strdup_printf ()
0x00000fbe ldr sl, [r4, -0x58] | sl = *((r4 - 0x58));
0x00000fc0 add r4, sp, 0x160 | r4 = sp + 0x160;
0x00000fc2 strb fp, [r4, -0x10] | *((r4 - 0x10)) = fp;
0x00000fc6 str r0, [r4, -0x1c] | *((r4 - 0x1c)) = r0;
0x00000fca lsl.w r5, sl, 1 | r5 = sl << 1;
0x00000fce add.w fp, r5, sl |
0x00000fd2 add.w fp, r6, fp, lsl 5 |
0x00000fd6 ldr.w r3, [fp, 0x20] | r3 = *(arg_20h);
0x00000fda cmp r3, 0 |
| if (r3 != 0) {
0x00000fdc bne.w 0x1116 | goto label_17;
| }
| label_4:
0x00000fe0 add.w fp, r5, sl |
0x00000fe4 add.w fp, r6, fp, lsl 5 |
0x00000fe8 ldr.w r3, [fp, 0x24] | r3 = *(arg_24h);
0x00000fec cmp r3, 0 |
| if (r3 != 0) {
0x00000fee bne.w 0x1188 | goto label_18;
| }
| label_6:
0x00000ff2 add r5, sl | r5 += sl;
0x00000ff4 add.w r5, r6, r5, lsl 5 | r5 = r6 + (r5 << 5);
0x00000ff8 ldr r3, [r5, 0x28] | r3 = *((r5 + 0x28));
0x00000ffa cmp r3, 0 |
| if (r3 != 0) {
0x00000ffc bne.w 0x1206 | goto label_19;
| }
| label_10:
0x00001000 ldr r1, [r4, 4] | r1 = *((r4 + 4));
0x00001002 adds r4, 0x60 | r4 += 0x60;
0x00001004 cmp r1, 0 |
| if (r1 == 0) {
0x00001006 beq.w 0x116a | goto label_11;
| }
| label_5:
0x0000100a ldr r5, [pc, 0x25c] |
0x0000100c mov r3, r8 | r3 = r8;
0x0000100e mov r2, sb | r2 = sb;
0x00001010 add r5, pc | r5 = 0x227e;
0x00001012 mov r0, r5 | r0 = r5;
0x00001014 blx 0x9d0 | g_strdup_printf ()
0x00001016 vldmia ip, {s9, s10, s11, s12, s13, s14, s15, s16, s17, s18, s19, s20, s21, s22, s23, s24, s25, s26, s27, s28, s29, s30, s31} | __asm ("vldmia ip, {s9, s10, s11, s12, s13, s14, s15, s16, s17, s18, s19, s20, s21, s22, s23, s24, s25, s26, s27, s28, s29, s30, s31}");
0x0000101a mov ip, r0 |
0x0000101c ldr r1, [r4, -0x5c] | r1 = *((r4 - 0x5c));
0x00001020 mov r3, r8 | r3 = r8;
0x00001022 mov r0, r5 | r0 = r5;
0x00001024 str ip, [r4, -0x30] | *((r4 - 0x30)) = ip;
0x00001028 add r2, pc | r2 += pc;
0x0000102a blx 0x9d0 | g_strdup_printf ()
0x0000102e ldr r2, [pc, 0x240] |
0x00001030 mov ip, r0 |
0x00001032 str ip, [r4, -0x2c] | *((r4 - 0x2c)) = ip;
0x00001036 mov r3, r8 | r3 = r8;
0x00001038 ldr r1, [r4, -0x5c] | r1 = *((r4 - 0x5c));
0x0000103c mov r0, r5 | r0 = r5;
0x0000103e add r2, pc | r2 = 0x22b4;
0x00001040 blx 0x9d0 | r0 = g_strdup_printf ()
0x00001044 mov r3, r0 | r3 = r0;
0x00001046 mov r1, r7 | r1 = r7;
0x00001048 str r3, [r4, -0x28] | *((r4 - 0x28)) = r3;
0x0000104c ldr r0, [r4, -0x30] | r0 = *((r4 - 0x30));
0x00001050 blx 0xa28 | r0 = fcn_00000a28 ();
0x00001054 clz r3, r0 | r3 &= r0;
0x00001058 mov r1, r7 | r1 = r7;
0x0000105a lsrs r3, r3, 5 | r3 >>= 5;
0x0000105c ldr r0, [r4, -0x2c] | r0 = *((r4 - 0x2c));
0x00001060 str r3, [r4, -0x3c] | *((r4 - 0x3c)) = r3;
0x00001064 blx 0xa28 | r0 = fcn_00000a28 ();
0x00001068 clz r3, r0 | r3 &= r0;
0x0000106c mov r1, r7 | r1 = r7;
0x0000106e lsrs r3, r3, 5 | r3 >>= 5;
0x00001070 ldr r0, [r4, -0x28] | r0 = *((r4 - 0x28));
0x00001074 str r3, [r4, -0x38] | *((r4 - 0x38)) = r3;
0x00001078 blx 0xa28 | fcn_00000a28 ();
0x0000107c ldr sl, [r4, -0x58] | sl = *((r4 - 0x58));
0x00001080 clz r0, r0 | r0 &= r0;
0x00001084 lsrs r0, r0, 5 | r0 >>= 5;
0x00001086 str r0, [r4, -0x34] | *((r4 - 0x34)) = r0;
0x0000108a lsl.w r5, sl, 1 | r5 = sl << 1;
0x0000108e add.w fp, r5, sl |
0x00001092 add.w fp, r6, fp, lsl 5 |
0x00001096 ldr.w r3, [fp, 0x20] | r3 = *(arg_20h);
0x0000109a cmp r3, 0 |
0x0000109c beq.w 0xf2a |
| }
0x000010a0 movw r1, 0x1001 |
0x000010a4 ldr.w r0, [fp, 0x2c] | r0 = *(path);
0x000010a8 movt r1, 0x10 | r1 = 0x101001;
0x000010ac blx 0x964 | r0 = open (r0, r1, r2);
0x000010b0 cmp r0, 0 |
0x000010b2 str.w r0, [fp, 8] | __asm ("str.w r0, [arg_8h]");
| if (r0 >= 0) {
0x000010b6 bge.w 0xf2a | goto label_0;
| }
0x000010ba ldr r2, [pc, 0x1b8] |
0x000010bc movs r1, 1 | r1 = 1;
0x000010be ldr.w r3, [fp, 0x2c] | r3 = *(path);
0x000010c2 movs r0, 3 | r0 = 3;
0x000010c4 add r2, pc | r2 = 0x233e;
0x000010c6 blx 0x9f8 | fcn_000009f8 ();
0x000010ca ldr r3, [r4, -0x3c] | r3 = *((r4 - 0x3c));
0x000010ce cmp r3, 0 |
| if (r3 == 0) {
0x000010d0 beq.w 0xf54 | goto label_1;
| }
| label_14:
0x000010d4 ldr r1, [pc, 0x1a0] |
0x000010d6 sub.w r2, r4, 8 | r2 = r4 - 8;
0x000010da ldr r0, [r4, -0x58] | r0 = *((r4 - 0x58));
0x000010de add r1, pc | r1 = 0x235a;
0x000010e0 bl 0xb18 | fcn_00000b18 (r0, r1, r2);
0x000010e4 ldr r3, [r4, -0x38] | r3 = *((r4 - 0x38));
0x000010e8 cmp r3, 0 |
| if (r3 == 0) {
0x000010ea beq.w 0xf5e | goto label_2;
| }
| label_15:
0x000010ee ldr r1, [pc, 0x18c] |
0x000010f0 subs r2, r4, 4 | r2 = r4 - 4;
0x000010f2 ldr r0, [r4, -0x58] | r0 = *((r4 - 0x58));
0x000010f6 add r1, pc | r1 = 0x2378;
0x000010f8 bl 0xb18 | fcn_00000b18 (r0, r1, r2);
0x000010fc ldr r3, [r4, -0x34] | r3 = *((r4 - 0x34));
0x00001100 cmp r3, 0 |
| if (r3 == 0) {
0x00001102 beq.w 0xf68 | goto label_3;
| }
| label_16:
0x00001106 ldr r1, [pc, 0x178] |
0x00001108 mov r2, r4 | r2 = r4;
0x0000110a ldr r0, [r4, -0x58] | r0 = *((r4 - 0x58));
0x0000110e add r1, pc | r1 = 0x2394;
0x00001110 bl 0xb18 | fcn_00000b18 (r0, r1, r2);
0x00001114 b 0xf68 | goto label_3;
| label_17:
0x00001116 movw r1, 0x1001 |
0x0000111a ldr.w r0, [fp, 0x38] | r0 = *(arg_38h);
0x0000111e movt r1, 0x10 | r1 = 0x101001;
0x00001122 blx 0x964 | r0 = open (r0, r1, r2);
0x00001126 cmp r0, 0 |
0x00001128 str.w r0, [fp, 0x14] | __asm ("str.w r0, [arg_14h]");
| if (r0 >= 0) {
0x0000112c bge.w 0xfe0 | goto label_4;
| }
0x00001130 ldr r2, [pc, 0x150] |
0x00001132 movs r1, 1 | r1 = 1;
0x00001134 ldr.w r3, [fp, 0x38] | r3 = *(arg_38h);
0x00001138 movs r0, 6 | r0 = 6;
0x0000113a add r2, pc | r2 = 0x23c2;
0x0000113c blx 0x9f8 | fcn_000009f8 ();
| label_7:
0x00001140 movs r3, 0 | r3 = 0;
0x00001142 ldr r0, [r4, -0x24] | r0 = *((r4 - 0x24));
0x00001146 str r3, [r4, -0x18] | *((r4 - 0x18)) = r3;
0x0000114a adds r4, 0x60 | r4 += 0x60;
0x0000114c blx 0x958 | g_free ();
0x00001150 ldr r0, [r4, -0x80] | r0 = *((r4 - 0x80));
0x00001154 blx 0x958 | g_free ();
0x00001158 ldr r0, [r4, -0x7c] | r0 = *((r4 - 0x7c));
0x0000115c blx 0x958 | g_free ();
0x00001160 ldr r1, [r4, -0x5c] | r1 = *((r4 - 0x5c));
0x00001164 cmp r1, 0 |
| if (r1 != 0) {
0x00001166 bne.w 0x100a | goto label_5;
| }
| label_11:
0x0000116a ldr r2, [pc, 0x11c] |
0x0000116c ldr r3, [pc, 0xcc] | r3 = *(0x123c);
0x0000116e add r2, pc | r2 = 0x23fc;
0x00001170 ldr r3, [r2, r3] | r3 = *(0x23fc);
0x00001172 ldr r2, [r3] | r2 = *(0x23fc);
0x00001174 ldr r3, [sp, 0x5c] | r3 = var_5ch;
0x00001176 eors r2, r3 | r2 ^= r3;
0x00001178 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x0000117c bne 0x122c | goto label_20;
| }
0x0000117e add sp, 0x64 |
0x00001180 vpop {d8} | __asm ("vpop {d8}");
0x00001184 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_18:
0x00001188 movw r1, 0x1001 |
0x0000118c ldr.w r0, [fp, 0x3c] | r0 = *(arg_3ch);
0x00001190 movt r1, 0x10 | r1 = 0x101001;
0x00001194 blx 0x964 | r0 = open (r0, r1, r2);
0x00001198 cmp r0, 0 |
0x0000119a str.w r0, [fp, 0x18] | __asm ("str.w r0, [arg_18h]");
| if (r0 >= 0) {
0x0000119e bge.w 0xff2 | goto label_6;
| }
0x000011a2 ldr r2, [pc, 0xe8] |
0x000011a4 movs r1, 1 | r1 = 1;
0x000011a6 ldr.w r3, [fp, 0x3c] | r3 = *(arg_3ch);
0x000011aa movs r0, 6 | r0 = 6;
0x000011ac add r2, pc | r2 = 0x243e;
0x000011ae blx 0x9f8 | fcn_000009f8 ();
0x000011b2 b 0x1140 | goto label_7;
| label_12:
0x000011b4 movw r1, 0x1001 |
0x000011b8 ldr.w r0, [fp, 0x30] | r0 = *(arg_30h);
0x000011bc movt r1, 0x10 | r1 = 0x101001;
0x000011c0 blx 0x964 | r0 = open (r0, r1, r2);
0x000011c4 cmp r0, 0 |
0x000011c6 str.w r0, [fp, 0xc] | __asm ("str.w r0, [arg_ch]");
| if (r0 >= 0) {
0x000011ca bge.w 0xf3c | goto label_8;
| }
0x000011ce ldr r2, [pc, 0xc0] |
0x000011d0 movs r1, 1 | r1 = 1;
0x000011d2 ldr.w r3, [fp, 0x30] | r3 = *(arg_30h);
0x000011d6 movs r0, 3 | r0 = 3;
0x000011d8 add r2, pc | r2 = 0x246e;
0x000011da blx 0x9f8 | fcn_000009f8 ();
0x000011de b 0xf4a | goto label_9;
| label_13:
0x000011e0 movw r1, 0x1001 |
0x000011e4 ldr r0, [r5, 0x34] | r0 = *((r5 + 0x34));
0x000011e6 movt r1, 0x10 | r1 = 0x101001;
0x000011ea blx 0x964 | r0 = open (r0, r1, r2);
0x000011ee cmp r0, 0 |
0x000011f0 str r0, [r5, 0x10] | *((r5 + 0x10)) = r0;
| if (r0 >= 0) {
0x000011f2 bge.w 0xf4a | goto label_9;
| }
0x000011f6 ldr r2, [pc, 0x9c] |
0x000011f8 movs r1, 1 | r1 = 1;
0x000011fa ldr r3, [r5, 0x34] | r3 = *((r5 + 0x34));
0x000011fc movs r0, 3 | r0 = 3;
0x000011fe add r2, pc | r2 = 0x2498;
0x00001200 blx 0x9f8 | fcn_000009f8 ();
0x00001204 b 0xf4a | goto label_9;
| label_19:
0x00001206 movw r1, 0x1001 |
0x0000120a ldr r0, [r5, 0x40] | r0 = *((r5 + 0x40));
0x0000120c movt r1, 0x10 | r1 = 0x101001;
0x00001210 blx 0x964 | r0 = open (r0, r1, r2);
0x00001214 cmp r0, 0 |
0x00001216 str r0, [r5, 0x1c] | *((r5 + 0x1c)) = r0;
| if (r0 >= 0) {
0x00001218 bge.w 0x1000 | goto label_10;
| }
0x0000121c ldr r2, [pc, 0x78] |
0x0000121e movs r1, 1 | r1 = 1;
0x00001220 ldr r3, [r5, 0x40] | r3 = *((r5 + 0x40));
0x00001222 movs r0, 6 | r0 = 6;
0x00001224 add r2, pc | r2 = 0x24c0;
0x00001226 blx 0x9f8 | fcn_000009f8 ();
0x0000122a b 0x1140 | goto label_7;
| label_20:
0x0000122c blx 0xa10 | r0 = fcn_00000a10 ();
0x00001230 movs r1, r0 | r1 = r0;
0x00001232 movs r0, r0 |
0x00001234 movs r0, r0 |
0x00001236 movs r0, r0 |
0x00001238 movs r0, 0x9e | r0 = 0x9e;
0x0000123a movs r0, r0 |
0x0000123c lsls r0, r5, 1 | r0 = r5 << 1;
0x0000123e movs r0, r0 |
0x00001240 movs r0, 0x8e | r0 = 0x8e;
0x00001242 movs r0, r0 |
0x00001244 movs r0, 0xfc | r0 = 0xfc;
0x00001246 movs r0, r0 |
0x00001248 lsls r4, r5, 1 | r4 = r5 << 1;
0x0000124a movs r0, r0 |
0x0000124c lsrs r4, r7, 0xd | r4 = r7 >> 0xd;
0x0000124e movs r0, r0 |
0x00001250 lsrs r6, r5, 0x12 | r6 = r5 >> 0x12;
0x00001252 movs r0, r0 |
0x00001254 lsrs r0, r3, 0xe | r0 = r3 >> 0xe;
0x00001256 movs r0, r0 |
0x00001258 lsrs r2, r0, 0xc | r2 = r0 >> 0xc;
0x0000125a movs r0, r0 |
0x0000125c lsrs r6, r1, 0x11 | r6 = r1 >> 0x11;
0x0000125e movs r0, r0 |
0x00001260 lsrs r2, r4, 0x10 | r2 = r4 >> 0x10;
0x00001262 movs r0, r0 |
0x00001264 lsrs r4, r5, 0x10 | r4 = r5 >> 0x10;
0x00001266 movs r0, r0 |
0x00001268 lsrs r0, r6, 9 | r0 = r6 >> 9;
0x0000126a movs r0, r0 |
0x0000126c lsrs r4, r3, 0xe | r4 = r3 >> 0xe;
0x0000126e movs r0, r0 |
0x00001270 lsrs r2, r4, 0xe | r2 = r4 >> 0xe;
0x00001272 movs r0, r0 |
0x00001274 lsrs r4, r6, 8 | r4 = r6 >> 8;
0x00001276 movs r0, r0 |
0x00001278 lsrs r6, r6, 0xb | r6 >>= 0xb;
0x0000127a movs r0, r0 |
0x0000127c lsrs r6, r1, 0xb | r6 = r1 >> 0xb;
0x0000127e movs r0, r0 |
0x00001280 lsrs r2, r2, 0xb | r2 >>= 0xb;
0x00001282 movs r0, r0 |
0x00001284 lsrs r6, r7, 6 | r6 = r7 >> 6;
0x00001286 movs r0, r0 |
0x00001288 subs r2, r3, 0 | r2 = r3 - 0;
0x0000128a movs r0, r0 |
0x0000128c lsrs r4, r1, 5 | r4 = r1 >> 5;
0x0000128e movs r0, r0 |
0x00001290 lsrs r0, r4, 4 | r0 = r4 >> 4;
0x00001292 movs r0, r0 |
0x00001294 lsrs r2, r7, 3 | r2 = r7 >> 3;
0x00001296 movs r0, r0 |
0x00001298 lsrs r4, r2, 3 | r4 = r2 >> 3;
0x0000129a movs r0, r0 |
| }
[*] Function printf used 7 times libled_lib.so