[*] Binary protection state of libbootblock.so.2.4
Full RELRO Canary found NX enabled DSO No RPATH No RUNPATH No Symbols
[*] Function system tear down of libbootblock.so.2.4
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/lib/libbootblock.so.2.4 @ 0x13b0 */
| #include <stdint.h>
|
; (fcn) sym.bootblock_clear () | void bootblock_clear () {
| int16_t var_0h;
| int16_t var_4h;
| int32_t var_8h;
| int32_t var_8h_2;
| int16_t var_10h;
| int16_t var_14h;
| char * s1;
| int32_t var_18h_2;
| int16_t var_20h;
| int16_t var_24h;
0x000013b0 blmi 0x9d3c50 | __asm ("blmi 0x9d3c50");
0x000013b4 push {r4, r5, lr} |
0x000013b6 sub sp, 0x2c |
0x000013b8 add r2, pc | r2 += pc;
0x000013ba add r0, sp, 0x10 | r0 += var_10h;
0x000013bc ldr r3, [r2, r3] | r3 = *((r2 + r3));
0x000013be ldr r3, [r3] | r3 = *(r3);
0x000013c0 str r3, [sp, 0x24] | var_24h = r3;
0x000013c2 mov.w r3, 0 | r3 = 0;
0x000013c6 blx 0xab4 | r0 = sd_bus_open_system ()
0x000013ca mov r4, r0 | r4 = r0;
0x000013cc blx 0xb08 | errno_location ();
0x000013d0 cmp r4, 0 |
0x000013d2 mov r5, r0 | r5 = r0;
0x000013d4 it lt |
| if (r4 >= 0) {
0x000013d6 movlt r4, 0x46 | r4 = 0x46;
| }
| if (r4 < 0) {
0x000013d8 blt 0x1424 | goto label_0;
| }
0x000013da ldr r2, [pc, 0x78] |
0x000013dc add r0, sp, 0x14 | r0 += var_14h;
0x000013de ldr r1, [pc, 0x78] |
0x000013e0 movs r4, 0 | r4 = 0;
0x000013e2 ldr r3, [pc, 0x78] |
0x000013e4 add r2, pc | r2 = 0x283e;
0x000013e6 strd r4, r4, [sp, 0x18] | __asm ("strd r4, r4, [s1]");
0x000013ea str r2, [sp] | *(sp) = r2;
0x000013ec add r1, pc | r1 = 0x284a;
0x000013ee ldr r2, [pc, 0x70] |
0x000013f0 add r3, pc | r3 = 0x2852;
0x000013f2 strd r0, r1, [sp, 8] | __asm ("strd r0, r1, [var_8h]");
0x000013f6 add r0, sp, 0x18 | r0 += s1;
0x000013f8 str r0, [sp, 4] | var_4h = r0;
0x000013fa mov r1, r3 | r1 = r3;
0x000013fc ldr r0, [sp, 0x10] | r0 = var_10h;
0x000013fe add r2, pc | r2 = 0x2864;
0x00001400 str r4, [sp, 0x20] | var_20h = r4;
0x00001402 str r4, [sp, 0x14] | var_14h = r4;
0x00001404 blx 0xa84 | r0 = sd_bus_call_method ();
0x00001408 cmp r0, r4 |
| if (r0 >= r4) {
0x0000140a bge 0x1440 | goto label_1;
| }
0x0000140c ldr r1, [pc, 0x54] |
0x0000140e ldr r0, [sp, 0x18] | r0 = s1;
0x00001410 add r1, pc | r1 = 0x2878;
0x00001412 blx 0xa24 | r0 = strcmp (r0, r1);
0x00001416 cmp r0, r4 |
0x00001418 ite eq |
| if (r0 != r4) {
0x0000141a moveq r4, 5 | r4 = 5;
| }
0x0000141c movne r4, 0x46 | r4 = 0x46;
| while (1) {
0x0000141e ldr r0, [sp, 0x10] | r0 = var_10h;
0x00001420 blx 0xb44 | sd_bus_unref ();
| label_0:
0x00001424 ldr r2, [pc, 0x40] |
0x00001426 ldr r3, [pc, 0x28] | r3 = *(0x1452);
0x00001428 str r4, [r5] | *(r5) = r4;
0x0000142a add r2, pc | r2 = 0x2896;
0x0000142c ldr r3, [r2, r3] | r3 = *(0x2896);
0x0000142e ldr r2, [r3] | r2 = *(0x2896);
0x00001430 ldr r3, [sp, 0x24] | r3 = var_24h;
0x00001432 eors r2, r3 | r2 ^= r3;
0x00001434 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00001438 bne 0x1448 | goto label_2;
| }
0x0000143a mov r0, r4 | r0 = r4;
0x0000143c add sp, 0x2c |
0x0000143e pop {r4, r5, pc} |
| label_1:
0x00001440 ldr r0, [sp, 0x14] | r0 = var_14h;
0x00001442 blx 0xb20 | sd_bus_message_unref ();
0x00001446 b 0x141e |
| }
| label_2:
0x00001448 blx 0xa6c | stack_chk_fail ();
0x0000144c lsrs r0, r2, 0xe | r0 = r2 >> 0xe;
0x0000144e movs r1, r0 | r1 = r0;
0x00001450 lsls r0, r5, 2 | r0 = r5 << 2;
0x00001452 movs r0, r0 |
0x00001454 lsls r4, r5, 0xb | r4 = r5 << 0xb;
0x00001456 movs r0, r0 |
0x00001458 lsls r0, r3, 6 | r0 = r3 << 6;
0x0000145a movs r0, r0 |
0x0000145c lsls r4, r4, 7 | r4 <<= 7;
0x0000145e movs r0, r0 |
0x00001460 lsls r6, r6, 6 | r6 <<= 6;
0x00001462 movs r0, r0 |
0x00001464 lsls r0, r5, 9 | r0 = r5 << 9;
0x00001466 movs r0, r0 |
0x00001468 lsrs r6, r3, 0xc | r6 = r3 >> 0xc;
0x0000146a movs r1, r0 | r1 = r0;
| /* [12] -r-x section size 8 named .fini */
0x0000146c ands r0, r1 | r0 &= r1;
0x0000146e invalid |
| }
[*] Function system used 2 times libbootblock.so.2.4