[*] Binary protection state of loggen
Full RELRO Canary found NX enabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function fprintf tear down of loggen
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/bin/loggen @ 0x1e30 */
| #include <stdint.h>
|
; (fcn) main () | int32_t main (int32_t argc, char ** argv) {
| int16_t var_0h;
| int16_t var_4h;
| int16_t var_18h;
| int16_t var_1ch;
| int16_t var_20h;
| int16_t var_24h;
| int16_t var_2ch;
| int16_t var_30h;
| int16_t var_34h;
| char ** var_38h;
| int16_t var_3ch;
| int16_t var_44h;
| int16_t var_48h;
| int16_t var_4ch;
| int16_t var_cch;
| int16_t var_d4h;
| r0 = argc;
| r1 = argv;
| /* [13] -r-x section size 11340 named .text */
0x00001e30 ldr.w r2, [pc, 0xaa4] | r2 = *(0x000028d8);
0x00001e34 ldr.w r3, [pc, 0xaa4] |
0x00001e38 push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00001e3c sub sp, 0xdc |
0x00001e3e add r2, pc | r2 += pc;
0x00001e40 str r1, [sp, 0x38] | var_38h = r1;
0x00001e42 str r0, [sp, 0x3c] | var_3ch = r0;
0x00001e44 movs r0, 0 | r0 = 0;
0x00001e46 ldr r3, [r2, r3] | r3 = *((r2 + r3));
0x00001e48 ldr.w r5, [pc, 0xa94] | r5 = *(0x000028e0);
0x00001e4c ldr r3, [r3] | r3 = *(0x28dc);
0x00001e4e str r3, [sp, 0xd4] | var_d4h = r3;
0x00001e50 mov.w r3, 0 | r3 = 0;
0x00001e54 blx 0x1c10 | r0 = feof (r0);
0x00001e58 blx 0x1dbc | r0 = fcn_00001dbc ();
0x00001e5c mov r4, r0 | r4 = r0;
0x00001e5e ldr.w r0, [pc, 0xa84] |
0x00001e62 add r5, pc | r5 += pc;
0x00001e64 add r0, pc | r0 = 0x474e;
0x00001e66 blx 0x1d70 | fcn_00001d70 ();
0x00001e6a ldr.w r1, [pc, 0xa7c] |
0x00001e6e mov sb, r0 | sb = r0;
0x00001e70 movs r0, 0xd | r0 = 0xd;
0x00001e72 str.w sb, [sp, 0x1c] | __asm ("str.w sb, [var_1ch]");
0x00001e76 add r1, pc | r1 = 0x4764;
0x00001e78 blx 0x1a7c | fcn_00001a7c ();
0x00001e7c ldr.w r3, [pc, 0xa6c] |
0x00001e80 add r0, sp, 0x4c | r0 += var_4ch;
0x00001e82 str r5, [sp, 0x18] | var_18h = r5;
0x00001e84 add r5, sp, 0x48 | r5 += var_48h;
0x00001e86 add r3, pc | r3 = 0x4776;
0x00001e88 str r3, [sp, 0x48] | var_48h = r3;
0x00001e8a blx 0x1a1c | fcn_00001a1c ();
0x00001e8e mov.w r3, 0x10000000 | r3 = 0x10000000;
0x00001e92 movs r2, 0 | r2 = 0;
0x00001e94 mov r1, r5 | r1 = r5;
0x00001e96 movs r0, 0xa | r0 = 0xa;
0x00001e98 str r3, [sp, 0xcc] | var_cch = r3;
0x00001e9a blx 0x1cc4 | fprintf_chk ()
0x00001e9e movs r2, 0 | r2 = 0;
0x00001ea0 mov r1, r5 | r1 = r5;
0x00001ea2 movs r0, 0xc | r0 = 0xc;
0x00001ea4 blx 0x1cc4 | fprintf_chk ()
0x00001ea8 ldr.w r0, [pc, 0xa44] |
0x00001eac add r0, pc | r0 = 0x47a0;
0x00001eae bl 0x441c | get_installation_path_for ();
0x00001eb0 invalid |
0x00001eb4 str r0, [sp, 0x20] | var_20h = r0;
0x00001eb6 mov r1, r2 | r1 = r2;
0x00001eb8 blx 0x1df8 | r0 = fcn_00001df8 ();
0x00001ebc cmp r0, 0 |
| if (r0 == 0) {
0x00001ebe beq.w 0x2684 | goto label_0;
| }
0x00001ec0 strh r1, [r4, 0x1e] | *((r4 + 0x1e)) = r1;
0x00001ec2 mov r8, r0 | r8 = r0;
0x00001ec4 blx 0x1c28 | r0 = g_option_context_add_group ();
0x00001ec8 cmp r0, 0 |
0x00001eca bne.w 0x24dc |
| while (1) {
0x00001ece ldr.w r1, [pc, 0xa24] | r1 = *(0x000028f4);
0x00001ed2 movs r2, 0 | r2 = 0;
0x00001ed4 ldr r0, [sp, 0x1c] | r0 = var_1ch;
0x00001ed6 ldr.w sl, [pc, 0xa20] |
0x00001eda add r1, pc | r1 += pc;
0x00001edc blx 0x1b40 | fcn_00001b40 ();
0x00001ee0 ldr.w r3, [pc, 0xa18] | r3 = *(0x000028fc);
0x00001ee4 add sl, pc | sl = 0x47e2;
0x00001ee6 add r3, pc | r3 += pc;
0x00001ee8 adds r3, 0x2c | r3 += 0x2c;
0x00001eea str r3, [sp, 0x30] | var_30h = r3;
0x00001eec ldr.w r3, [pc, 0xa10] |
0x00001ef0 add r3, pc |
0x00001ef2 adds r3, 0x2c | r3 += 0x2c;
0x00001ef4 str r3, [sp, 0x34] | var_34h = r3;
0x00001ef6 ldr.w r3, [pc, 0xa0c] | r3 = *(0x00002904);
0x00001efa add r3, pc | r3 = 0x66f2;
0x00001efc str r3, [sp, 0x2c] | var_2ch = r3;
0x00001efe add r3, sp, 0x44 | r3 += var_44h;
0x00001f00 str r3, [sp, 0x24] | var_24h = r3;
0x000024dc ldr.w r0, [pc, 0x500] |
0x000024e0 add r0, pc | r0 = 0x4ec4;
0x000024e2 blx 0x1a70 | fcn_00001a70 ();
0x000024e6 ldr r2, [sp, 0x18] | r2 = var_18h;
0x000024e8 mov r5, r0 | r5 = r0;
0x000024ea ldr.w r3, [pc, 0x428] |
0x000024ee movs r1, 1 | r1 = 1;
0x000024f0 ldr r6, [r2, r3] | r6 = *((r2 + r3));
0x000024f2 ldr.w r3, [pc, 0x4f0] | r3 = *(0x000029e4);
0x000024f6 ldr.w r2, [pc, 0x4f0] | r2 = *(0x000029e8);
0x000024fa add r3, pc | r3 = 0x4e14;
0x000024fc adds r3, 0x2c | r3 += 0x2c;
0x000024fe add r2, pc | r2 += pc;
0x00002500 str r3, [sp] | *(sp) = r3;
0x00002502 movs r3, 0xac | r3 = 0xac;
0x00002504 str r3, [sp, 4] | var_4h = r3;
0x00002506 mov r3, r5 | r3 = r5;
0x00002508 ldr r0, [r6] | r0 = *(r6);
0x0000250a blx 0x1cd0 | strnlen ();
0x0000250e ldr.w r2, [pc, 0x4dc] |
0x00002512 movs r1, 1 | r1 = 1;
0x00002514 ldr r3, [sp, 0x20] | r3 = var_20h;
0x00002516 ldr r0, [r6] | r0 = *(r6);
0x00002518 add r2, pc | r2 = 0x4f0a;
0x0000251a blx 0x1cd0 | strnlen ();
0x0000251e mov r0, r5 | r0 = r5;
0x00002520 blx 0x1a10 | fcn_00001a10 ();
0x00002524 b 0x1ece |
| }
| label_0:
0x00002684 ldr.w r8, [pc, 0x3ac] | r8 = *(0x00002a34);
0x00002688 add r3, sp, 0x44 | r3 += var_44h;
0x0000268a str r3, [sp, 0x24] | var_24h = r3;
0x0000268c ldr r7, [pc, 0x3a8] |
0x0000268e add r8, pc | r8 += pc;
0x00002690 ldr r6, [pc, 0x3a8] |
0x00002692 mov r0, r8 | r0 = r8;
0x00002694 blx 0x1a70 | fcn_00001a70 ();
0x00002698 ldr r2, [sp, 0x18] | r2 = var_18h;
0x0000269a add r7, pc | r7 = 0x50d6;
0x0000269c ldr r3, [pc, 0x2a4] | r3 = *(0x2944);
0x0000269e add r6, pc | r6 = 0x50de;
0x000026a0 adds r7, 0x2c | r7 += 0x2c;
0x000026a2 movs r1, 1 | r1 = 1;
0x000026a4 mov sl, r0 | sl = r0;
0x000026a6 ldr r5, [r2, r3] | r5 = *((r2 + r3));
0x000026a8 movs r3, 0xa7 | r3 = 0xa7;
0x000026aa mov r2, r6 | r2 = r6;
0x000026ac str r7, [sp] | *(sp) = r7;
0x000026ae str r3, [sp, 4] | var_4h = r3;
0x000026b0 mov r3, r0 | r3 = r0;
0x000026b2 ldr r0, [r5] | r0 = *(r5);
0x000026b4 blx 0x1cd0 | strnlen ();
0x000026b8 blx 0x1e04 | r0 = fcn_00001e04 ();
0x000026bc ldr r0, [r0] | r0 = *(r0);
0x000026be ldr.w sb, [r5] | sb = *(r5);
0x000026c2 blx 0x1a28 | fcn_00001a28 ();
0x000026c6 ldr r2, [pc, 0x378] |
0x000026c8 movs r1, 1 | r1 = 1;
0x000026ca ldr r3, [sp, 0x20] | r3 = var_20h;
0x000026cc str r0, [sp] | *(sp) = r0;
0x000026ce mov r0, sb | r0 = sb;
0x000026d0 add r2, pc | r2 = 0x5116;
0x000026d2 blx 0x1cd0 | strnlen ();
0x000026d6 mov r0, sl | r0 = sl;
0x000026d8 blx 0x1a10 | fcn_00001a10 ();
0x000026dc mov r0, r8 | r0 = r8;
0x000026de blx 0x1a70 | fcn_00001a70 ();
0x000026e2 movs r3, 0xa8 | r3 = 0xa8;
0x000026e4 str r7, [sp] | *(sp) = r7;
0x000026e6 str r3, [sp, 4] | var_4h = r3;
0x000026e8 mov r7, r0 | r7 = r0;
0x000026ea mov r2, r6 | r2 = r6;
0x000026ec mov r3, r0 | r3 = r0;
0x000026ee movs r1, 1 | r1 = 1;
0x000026f0 ldr r0, [r5] | r0 = *(r5);
0x000026f2 blx 0x1cd0 | strnlen ();
0x000026f6 ldr r3, [pc, 0x34c] |
0x000026f8 movs r1, 1 | r1 = 1;
0x000026fa ldr r2, [pc, 0x34c] |
0x000026fc ldr r0, [r5] | r0 = *(r5);
0x000026fe add r3, pc | r3 = 0x5148;
0x00002700 add r2, pc | r2 = 0x514e;
0x00002702 blx 0x1cd0 | strnlen ();
0x00002706 mov r0, r7 | r0 = r7;
0x00002708 blx 0x1a10 | fcn_00001a10 ();
0x0000270c b 0x2024 | return void (*0x2024)() ();
| }
[*] Function fprintf used 3 times loggen