[*] Binary protection state of systemd-creds
Full RELRO Canary found NX enabled PIE enabled RPATH No RUNPATH No Symbols
[*] Function printf tear down of systemd-creds
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/systemd-creds @ 0x20f4 */
| #include <stdint.h>
|
; (fcn) fcn.000020f4 () | void fcn_000020f4 () {
| int16_t var_0h;
| int16_t var_4h;
| int32_t var_0h_2;
| int32_t var_0h_3;
| int16_t var_8h;
| int16_t var_ch;
| void * ptr;
| int16_t var_14h;
0x000020f4 push.w {r4, r5, r6, r7, r8, lr} |
0x000020f8 sub sp, 0x18 |
0x000020fa ldr r5, [pc, 0xf4] |
0x000020fc movs r3, 0 | r3 = 0;
0x000020fe add r2, sp, 0x10 | r2 += ptr;
0x00002100 ldr r4, [pc, 0xf0] | r4 = *(0x21f4);
0x00002102 add r5, pc | r5 = 0x42f8;
0x00002104 ldr r1, [pc, 0xf0] |
0x00002106 ldr r0, [pc, 0xf4] |
0x00002108 ldr r4, [r5, r4] |
0x0000210a add r1, pc | r1 = 0x4306;
0x0000210c add r0, pc | r0 = 0x430e;
0x0000210e ldr r4, [r4] | r4 = *(0x42f8);
0x00002110 str r4, [sp, 0x14] | var_14h = r4;
0x00002112 mov.w r4, 0 | r4 = 0;
0x00002116 str r3, [sp, 0x10] | ptr = r3;
0x00002118 blx 0x1704 | terminal_urlify_man ();
0x0000211c ldr r2, [pc, 0xe0] |
0x0000211e cmp r0, 0 |
0x00002120 add r2, pc | r2 = "partial";
| if (r0 < 0) {
0x00002122 blt 0x21ca | goto label_9;
| }
0x00002124 ldr r3, [pc, 0xdc] | r3 = *(0x2204);
0x00002126 ldr r7, [sp, 0x10] | r7 = ptr;
0x00002128 ldr r3, [r2, r3] | r3 = *((r2 + r3));
0x0000212a ldr r6, [r3] | r6 = *(0x2204);
0x0000212c blx 0x16bc | r0 = underline_enabled ();
0x00002130 cmp r0, 0 |
| if (r0 == 0) {
0x00002132 beq 0x2198 | goto label_10;
| }
0x00002134 ldr.w r8, [pc, 0xd0] |
0x00002138 add r8, pc | r8 = 0x4344;
| label_4:
0x0000213a blx 0x156c | r0 = get_color_mode ();
0x0000213e cmp r0, 0 |
| if (r0 == 0) {
0x00002140 beq 0x21ac | goto label_11;
| }
| do {
0x00002142 ldr r5, [pc, 0xc8] |
0x00002144 add r5, pc | r5 = 0x4356;
0x00002146 blx 0x156c | r0 = get_color_mode ();
0x0000214a cmp r0, 0 |
| if (r0 == 0) {
0x0000214c beq 0x21b8 | goto label_12;
| }
| label_0:
0x0000214e ldr r4, [pc, 0xc0] |
0x00002150 add r4, pc | r4 = 0x4366;
0x00002152 blx 0x156c | r0 = get_color_mode ();
0x00002156 cmp r0, 0 |
| if (r0 == 0) {
0x00002158 beq 0x21c4 | goto label_13;
| }
| label_1:
0x0000215a ldr r3, [pc, 0xb8] |
0x0000215c add r3, pc | r3 = 0x4376;
| label_2:
0x0000215e ldr r1, [pc, 0xb8] |
0x00002160 mov r2, r6 | r2 = r6;
0x00002162 str r3, [sp, 0xc] | var_ch = r3;
0x00002164 movs r0, 1 | r0 = 1;
0x00002166 str r4, [sp, 8] | var_8h = r4;
0x00002168 mov r3, r7 | r3 = r7;
0x0000216a add r1, pc | r1 = 0x4388;
0x0000216c strd r8, r5, [sp] | __asm ("strd r8, r5, [sp]");
0x00002170 movs r4, 0 | r4 = 0;
0x00002172 blx 0x18b4 | printf_chk ()
| label_3:
0x00002176 ldr r0, [sp, 0x10] | r0 = ptr;
0x00002178 blx 0x1530 | free (r0);
0x0000217c ldr r2, [pc, 0x9c] |
0x0000217e ldr r3, [pc, 0x74] | r3 = *(0x21f6);
0x00002180 add r2, pc | r2 = 0x43a0;
0x00002182 ldr r3, [r2, r3] | r3 = *(0x43a0);
0x00002184 ldr r2, [r3] | r2 = *(0x43a0);
0x00002186 ldr r3, [sp, 0x14] | r3 = var_14h;
0x00002188 eors r2, r3 | r2 ^= r3;
0x0000218a mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x0000218e bne 0x21ea | goto label_14;
| }
0x00002190 mov r0, r4 | r0 = r4;
0x00002192 add sp, 0x18 |
0x00002194 pop.w {r4, r5, r6, r7, r8, pc} |
| label_10:
0x00002198 blx 0x156c | r0 = get_color_mode ();
| if (r0 == 0) {
0x0000219c cbz r0, 0x21e2 | goto label_15;
| }
0x0000219e ldr.w r8, [pc, 0x80] |
0x000021a2 add r8, pc | r8 = "/run/credentials/@system";
0x000021a4 blx 0x156c | r0 = get_color_mode ();
0x000021a8 cmp r0, 0 |
0x000021aa bne 0x2142 |
| } while (r0 != 0);
| label_11:
0x000021ac ldr r5, [pc, 0x74] |
0x000021ae add r5, pc | r5 = 0x43d6;
0x000021b0 blx 0x156c | r0 = get_color_mode ();
0x000021b4 cmp r0, 0 |
| if (r0 != 0) {
0x000021b6 bne 0x214e | goto label_0;
| }
| label_12:
0x000021b8 ldr r4, [pc, 0x6c] |
0x000021ba add r4, pc | r4 = 0x43e6;
0x000021bc blx 0x156c | r0 = get_color_mode ();
0x000021c0 cmp r0, 0 |
| if (r0 != 0) {
0x000021c2 bne 0x215a | goto label_1;
| }
| label_13:
0x000021c4 ldr r3, [pc, 0x64] |
0x000021c6 add r3, pc | r3 = 0x43f6;
0x000021c8 b 0x215e | goto label_2;
| label_9:
0x000021ca ldr r1, [pc, 0x64] |
0x000021cc movw r2, 0x28a | r2 = 0x28a;
0x000021d0 ldr r3, [pc, 0x60] |
0x000021d2 movs r0, 3 | r0 = 3;
0x000021d4 add r1, pc | r1 = 0x440a;
0x000021d6 add r3, pc | r3 = 0x440e;
0x000021d8 adds r1, 7 | r1 += 7;
0x000021da blx 0x18d0 | r0 = fcn_000018d0 ();
0x000021de mov r4, r0 | r4 = r0;
0x000021e0 b 0x2176 | goto label_3;
| label_15:
0x000021e2 ldr.w r8, [pc, 0x54] |
0x000021e6 add r8, pc | r8 = 0x4424;
0x000021e8 b 0x213a | goto label_4;
| label_14:
0x000021ea blx 0x16f8 | stack_chk_fail ();
0x000021ee nop |
0x000021f0 subs r5, 0x5e | r5 -= 0x5e;
0x000021f2 movs r0, r0 |
0x000021f4 lsls r4, r4, 5 | r4 <<= 5;
0x000021f6 movs r0, r0 |
0x000021f8 subs r2, r3, r0 | r2 = r3 - r0;
0x000021fa movs r0, r0 |
0x000021fc subs r4, r3, r0 | r4 = r3 - r0;
0x000021fe movs r0, r0 |
0x00002200 subs r5, 0x40 | r5 -= 0x40;
0x00002202 movs r0, r0 |
0x00002204 lsls r4, r1, 6 | r4 = r1 << 6;
0x00002206 movs r0, r0 |
0x00002208 adds r4, r1, r7 | r4 = r1 + r7;
0x0000220a movs r0, r0 |
0x0000220c adds r4, r1, r7 | r4 = r1 + r7;
0x0000220e movs r0, r0 |
0x00002210 adds r0, r1, r7 | r0 = r1 + r7;
0x00002212 movs r0, r0 |
0x00002214 adds r4, r6, r6 | r4 = r6 + r6;
0x00002216 movs r0, r0 |
0x00002218 subs r2, r0, r0 | r2 = r0 - r0;
0x0000221a movs r0, r0 |
0x0000221c subs r4, 0xe0 | r4 -= 0xe0;
0x0000221e movs r0, r0 |
0x00002220 adds r6, r5, r5 | r6 = r5 + r5;
0x00002222 movs r0, r0 |
0x00002224 movs r5, 0xb6 | r5 = 0xb6;
0x00002226 movs r0, r0 |
0x00002228 movs r5, 0xaa | r5 = 0xaa;
0x0000222a movs r0, r0 |
0x0000222c movs r5, 0x9e | r5 = 0x9e;
0x0000222e movs r0, r0 |
0x00002230 adds r4, r4, r5 | r4 += r5;
0x00002232 movs r0, r0 |
0x00002234 cmp r3, 0x66 |
0x00002236 movs r0, r0 |
0x00002238 movs r5, 0x7e | r5 = 0x7e;
0x0000223a movs r0, r0 |
0x0000223c push {r4, lr} |
0x0000223e sub sp, 8 |
0x00002240 blx 0x1710 | r0 = tpm2_support ();
0x00002244 mov r4, r0 | r4 = r0;
0x00002246 ldr r3, [pc, 0x8c] |
0x00002248 add r3, pc | r3 = 0x4522;
0x0000224a ldrb r3, [r3] | r3 = *(r3);
| if (r3 != 0) {
0x0000224c cbnz r3, 0x228a | goto label_16;
| }
0x0000224e cmp r0, 0xf |
| if (r0 == 0xf) {
0x00002250 beq 0x22a8 | goto label_17;
| }
| if (r0 == 0) {
0x00002252 cbz r0, 0x2294 | goto label_18;
| }
0x00002254 ldr r0, [pc, 0x80] |
0x00002256 add r0, pc | r0 = 0x4532;
0x00002258 blx 0x15cc | puts (r0);
0x0000225c lsls r2, r4, 0x1f | r2 = r4 << 0x1f;
| if (r2 < r4) {
0x0000225e bmi 0x22c8 | goto label_19;
| }
0x00002260 ldr r2, [pc, 0x78] |
0x00002262 add r2, pc | r2 = 0x4542;
| label_7:
0x00002264 lsls r3, r4, 0x1e | r3 = r4 << 0x1e;
| if (r3 >= r4) {
0x00002266 bpl 0x22bc | goto label_20;
| }
0x00002268 ldr r3, [pc, 0x74] |
0x0000226a add r3, pc | r3 = 0x454e;
| label_6:
0x0000226c lsls r0, r4, 0x1d | r0 = r4 << 0x1d;
| if (r0 >= r4) {
0x0000226e bpl 0x22ce | goto label_21;
| }
0x00002270 ldr r0, [pc, 0x70] |
0x00002272 add r0, pc | r0 = 0x455a;
| label_8:
0x00002274 lsls r1, r4, 0x1c | r1 = r4 << 0x1c;
| if (r1 >= r4) {
0x00002276 bpl 0x22c2 | goto label_22;
| }
0x00002278 ldr r1, [pc, 0x6c] |
0x0000227a add r1, pc | r1 = 0x4566;
| do {
| label_5:
0x0000227c str r1, [sp, 4] | var_4h = r1;
0x0000227e ldr r1, [pc, 0x6c] |
0x00002280 str r0, [sp] | *(sp) = r0;
0x00002282 movs r0, 1 | r0 = 1;
0x00002284 add r1, pc | r1 = 0x4576;
0x00002286 blx 0x18b4 | printf_chk ()
| label_16:
0x0000228a mvns r0, r4 | r0 = ~r4;
0x0000228c and r0, r0, 0xf | r0 &= 0xf;
0x00002290 add sp, 8 |
0x00002292 pop {r4, pc} |
| label_18:
0x00002294 ldr r0, [pc, 0x58] |
0x00002296 add r0, pc | r0 = 0x458a;
0x00002298 blx 0x15cc | puts (r0);
0x0000229c ldr r3, [pc, 0x54] |
0x0000229e add r3, pc | r3 = 0x4596;
0x000022a0 mov r2, r3 | r2 = r3;
0x000022a2 mov r0, r3 | r0 = r3;
0x000022a4 mov r1, r3 | r1 = r3;
0x000022a6 b 0x227c |
| } while (1);
| label_17:
0x000022a8 ldr r0, [pc, 0x4c] |
0x000022aa add r0, pc | r0 = 0x45a6;
0x000022ac blx 0x15cc | puts (r0);
0x000022b0 ldr r3, [pc, 0x48] |
0x000022b2 add r3, pc | r3 = 0x45b2;
0x000022b4 mov r2, r3 | r2 = r3;
0x000022b6 mov r0, r3 | r0 = r3;
0x000022b8 mov r1, r3 | r1 = r3;
0x000022ba b 0x227c | goto label_5;
| label_20:
0x000022bc ldr r3, [pc, 0x40] |
0x000022be add r3, pc | r3 = 0x45c2;
0x000022c0 b 0x226c | goto label_6;
| label_22:
0x000022c2 ldr r1, [pc, 0x40] |
0x000022c4 add r1, pc | r1 = 0x45ce;
0x000022c6 b 0x227c | goto label_5;
| label_19:
0x000022c8 ldr r2, [pc, 0x3c] |
0x000022ca add r2, pc | r2 = 0x45d6;
0x000022cc b 0x2264 | goto label_7;
| label_21:
0x000022ce ldr r0, [pc, 0x3c] |
0x000022d0 add r0, pc | r0 = 0x45e2;
0x000022d2 b 0x2274 | goto label_8;
| }
[*] Function printf used 3 times systemd-creds