[*] Binary protection state of integritysetup
Full RELRO Canary found NX disabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function printf tear down of integritysetup
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/sbin/integritysetup @ 0x338c */
| #include <stdint.h>
|
; (fcn) sym.crypt_parse_hash_integrity_mode () | void crypt_parse_hash_integrity_mode () {
0x0000338c lui gp, 2 |
0x00003390 addiu gp, gp, 0x40d4 |
0x00003394 addu gp, gp, t9 | gp += t9;
0x00003398 addiu sp, sp, -0x88 |
0x0000339c sw s1, 0x74(sp) | *(var_74h) = s1;
0x000033a0 lw s1, -0x7d60(gp) | s1 = *((gp - 8024));
0x000033a4 sw gp, 0x20(sp) | *(var_20h) = gp;
0x000033a8 sw ra, 0x84(sp) | *(var_84h) = ra;
0x000033ac lw v0, (s1) | v0 = *(s1);
0x000033b0 sw s4, 0x80(sp) | *(var_80h) = s4;
0x000033b4 sw s3, 0x7c(sp) | *(var_7ch) = s3;
0x000033b8 sw s2, 0x78(sp) | *(var_78h) = s2;
0x000033bc sw s0, 0x70(sp) | *(var_70h) = s0;
0x000033c0 sw v0, 0x6c(sp) | *(var_6ch) = v0;
| if (a0 == 0) {
0x000033c4 beql a0, zero, 0x3460 | goto label_0;
| }
0x000033c8 addiu v0, zero, -0x16 | v0 = -0x16;
0x000033cc move s2, a1 | s2 = a1;
| if (a1 == 0) {
0x000033d0 beqz a1, 0x34c4 | goto label_3;
| }
0x000033d4 lw t9, -0x7e04(gp) | t9 = sym.imp.strchr;
0x000033d8 addiu a1, zero, 0x28 | a1 = 0x28;
0x000033dc move s0, a0 | s0 = a0;
0x000033e0 jalr t9 | t9 ();
0x000033e4 lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 != 0) {
0x000033e8 bnez v0, 0x34c4 | goto label_3;
| }
0x000033ec lw t9, -0x7e04(gp) | t9 = sym.imp.strchr;
0x000033f0 addiu a1, zero, 0x29 | a1 = 0x29;
0x000033f4 move a0, s0 | a0 = s0;
0x000033f8 jalr t9 | t9 ();
0x000033fc lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 != 0) {
0x00003400 bnez v0, 0x34c4 | goto label_3;
| }
0x00003404 lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x00003408 lw t9, -0x7d48(gp) | t9 = sym.imp.sscanf;
0x0000340c addiu s4, sp, 0x4c | s4 = sp + 0x4c;
0x00003410 addiu s3, sp, 0x2c | s3 = sp + 0x2c;
0x00003414 move a3, s4 | a3 = s4;
0x00003418 move a2, s3 | a2 = s3;
0x0000341c addiu a1, a1, -0x381c | a1 += -0x381c;
0x00003420 move a0, s0 | a0 = s0;
0x00003424 jalr t9 | t9 ();
0x00003428 addiu v1, zero, 2 | v1 = 2;
0x0000342c lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 == v1) {
0x00003430 beq v0, v1, 0x348c | goto label_4;
| }
0x00003434 addiu v1, zero, 1 | v1 = 1;
0x00003438 lw a2, -0x7fdc(gp) | a2 = *((gp - 8183));
| if (v0 != v1) {
0x0000343c bne v0, v1, 0x34c4 | goto label_3;
| }
0x00003440 lw t9, -0x7ea0(gp) | t9 = sym.imp.snprintf
0x00003444 move a3, s3 | a3 = s3;
0x00003448 addiu a2, a2, -0x34a8 | a2 += -0x34a8;
0x0000344c addiu a1, zero, 0x20 | a1 = 0x20;
0x00003450 move a0, s2 | a0 = s2;
0x00003454 jalr t9 | t9 ();
0x00003458 lw gp, 0x20(sp) | gp = *(var_20h);
| do {
0x0000345c move v0, zero | v0 = 0;
| label_0:
0x00003460 lw a0, 0x6c(sp) | a0 = *(var_6ch);
0x00003464 lw v1, (s1) | v1 = *(s1);
0x00003468 lw ra, 0x84(sp) | ra = *(var_84h);
| if (a0 != v1) {
0x0000346c bne a0, v1, 0x34cc | goto label_5;
| }
0x00003470 lw s4, 0x80(sp) | s4 = *(var_80h);
0x00003474 lw s3, 0x7c(sp) | s3 = *(var_7ch);
0x00003478 lw s2, 0x78(sp) | s2 = *(var_78h);
0x0000347c lw s1, 0x74(sp) | s1 = *(var_74h);
0x00003480 lw s0, 0x70(sp) | s0 = *(var_70h);
0x00003484 addiu sp, sp, 0x88 |
0x00003488 jr ra | return v0;
| label_4:
0x0000348c lw v0, -0x7fdc(gp) | v0 = *((gp - 8183));
0x00003490 lw t9, -0x7db4(gp) | t9 = sym.imp.__snprintf_chk
0x00003494 addiu v0, v0, -0x37e0 | v0 += -0x37e0;
0x00003498 sw s4, 0x18(sp) | *(var_18h) = s4;
0x0000349c sw s3, 0x14(sp) | *(var_14h) = s3;
0x000034a0 sw v0, 0x10(sp) | *(var_10h_2) = v0;
0x000034a4 addiu a3, zero, -1 | a3 = -1;
0x000034a8 addiu a2, zero, 1 | a2 = 1;
0x000034ac addiu a1, zero, 0x20 | a1 = 0x20;
0x000034b0 move a0, s2 | a0 = s2;
0x000034b4 jalr t9 | t9 ();
0x000034b8 addiu v1, zero, 0x20 | v1 = 0x20;
0x000034bc lw gp, 0x20(sp) | gp = *(var_20h);
0x000034c0 bne v0, v1, 0x345c |
| } while (v0 != v1);
| label_3:
0x000034c4 addiu v0, zero, -0x16 | v0 = -0x16;
0x000034c8 b 0x3460 | goto label_0;
| label_5:
0x000034cc lw t9, -0x7e2c(gp) | t9 = sym.imp.__stack_chk_fail;
0x000034d0 jalr t9 | t9 ();
0x000034d4 nop |
0x000034d8 lui gp, 2 |
0x000034dc addiu gp, gp, 0x3f88 |
0x000034e0 addu gp, gp, t9 | gp += t9;
0x000034e4 addiu sp, sp, -0x30 |
0x000034e8 sw gp, 0x10(sp) | *(var_10h) = gp;
0x000034ec sw ra, 0x2c(sp) | *(var_2ch) = ra;
0x000034f0 sw s3, 0x28(sp) | *(var_28h) = s3;
0x000034f4 sw s2, 0x24(sp) | *(var_24h) = s2;
0x000034f8 sw s1, 0x20(sp) | *(var_20h_2) = s1;
0x000034fc sw s0, 0x1c(sp) | *(var_1ch) = s0;
| if (a0 == 0) {
0x00003500 beql a0, zero, 0x3570 | goto label_2;
| }
0x00003504 addiu s3, zero, -0x16 | s3 = -0x16;
0x00003508 move s1, a1 | s1 = a1;
| if (a1 == 0) {
0x0000350c beqz a1, 0x36b8 | goto label_6;
| }
0x00003510 lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x00003514 lw t9, -0x7dc8(gp) | t9 = sym.imp.strcmp;
0x00003518 addiu a1, a1, -0x37d8 | a1 += -0x37d8;
0x0000351c move s0, a0 | s0 = a0;
0x00003520 move s2, a2 | s2 = a2;
0x00003524 jalr t9 | t9 ();
0x00003528 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x0000352c beqz v0, 0x354c | goto label_7;
| }
0x00003530 lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x00003534 lw t9, -0x7dc8(gp) | t9 = sym.imp.strcmp;
0x00003538 addiu a1, a1, -0x37d0 | a1 += -0x37d0;
0x0000353c move a0, s0 | a0 = s0;
0x00003540 jalr t9 | t9 ();
0x00003544 lw gp, 0x10(sp) | gp = *(var_10h);
0x00003548 bnez v0, 0x3590 |
| while (v0 == 0) {
| label_7:
0x0000354c lw t9, -0x7ddc(gp) | t9 = sym.imp.strncpy;
0x00003550 addiu a2, zero, 0x20 | a2 = 0x20;
0x00003554 move a1, s0 | a1 = s0;
0x00003558 move a0, s1 | a0 = s1;
0x0000355c jalr t9 | t9 ();
0x00003560 move s3, zero | s3 = 0;
0x00003564 move v0, zero | v0 = 0;
| label_1:
0x00003568 sw v0, (s2) | *(s2) = v0;
| if (s2 != 0) {
0x0000356c bnel s2, zero, 0x3570 |
| }
| label_2:
0x00003570 lw ra, 0x2c(sp) | ra = *(var_2ch);
0x00003574 move v0, s3 | v0 = s3;
0x00003578 lw s2, 0x24(sp) | s2 = *(var_24h);
0x0000357c lw s3, 0x28(sp) | s3 = *(var_28h);
0x00003580 lw s1, 0x20(sp) | s1 = *(var_20h_2);
0x00003584 lw s0, 0x1c(sp) | s0 = *(var_1ch);
0x00003588 addiu sp, sp, 0x30 |
0x0000358c jr ra | return v0;
0x00003590 lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x00003594 lw t9, -0x7dc8(gp) | t9 = sym.imp.strcmp;
0x00003598 addiu a1, a1, -0x37c4 | a1 += -0x37c4;
0x0000359c move a0, s0 | a0 = s0;
0x000035a0 jalr t9 | t9 ();
0x000035a4 lw gp, 0x10(sp) | gp = *(var_10h);
0x000035a8 beqz v0, 0x354c |
| }
0x000035ac lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x000035b0 lw t9, -0x7dc8(gp) | t9 = sym.imp.strcmp;
0x000035b4 addiu a1, a1, -0x37bc | a1 += -sym.crypt_safe_alloc;
0x000035b8 move a0, s0 | a0 = s0;
0x000035bc jalr t9 | t9 ();
0x000035c0 move s3, v0 | s3 = v0;
0x000035c4 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 != 0) {
0x000035c8 beqz v0, 0x3638 |
0x000035cc lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x000035d0 lw t9, -0x7dc8(gp) | t9 = sym.imp.strcmp;
0x000035d4 addiu a1, a1, -0x37a4 | a1 += -0x37a4;
0x000035d8 move a0, s0 | a0 = s0;
0x000035dc jalr t9 | t9 ();
0x000035e0 move s3, v0 | s3 = v0;
0x000035e4 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x000035e8 beqz v0, 0x3678 | goto label_8;
| }
0x000035ec lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x000035f0 lw t9, -0x7dc8(gp) | t9 = sym.imp.strcmp;
0x000035f4 addiu a1, a1, -0x3788 | a1 += -0x3788;
0x000035f8 move a0, s0 | a0 = s0;
0x000035fc jalr t9 | t9 ();
0x00003600 move s3, v0 | s3 = v0;
0x00003604 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x00003608 beqz v0, 0x3658 | goto label_9;
| }
0x0000360c lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x00003610 lw t9, -0x7dc8(gp) | t9 = sym.imp.strcmp;
0x00003614 addiu a1, a1, -0x376c | a1 += -0x376c;
0x00003618 move a0, s0 | a0 = s0;
0x0000361c jalr t9 | t9 ();
0x00003620 move s3, v0 | s3 = v0;
0x00003624 lw gp, 0x10(sp) | gp = *(var_10h);
| if (v0 == 0) {
0x00003628 beqz v0, 0x3698 | goto label_10;
| }
0x0000362c addiu s3, zero, -0x16 | s3 = -0x16;
0x00003630 move v0, zero | v0 = 0;
0x00003634 b 0x3568 | goto label_1;
| }
0x00003638 lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x0000363c lw t9, -0x7ddc(gp) | t9 = sym.imp.strncpy;
0x00003640 addiu a2, zero, 0x20 | a2 = 0x20;
0x00003644 addiu a1, a1, -0x37b0 | a1 += -0x37b0;
0x00003648 move a0, s1 | a0 = s1;
0x0000364c jalr t9 | t9 ();
0x00003650 addiu v0, zero, 0x14 | v0 = 0x14;
0x00003654 b 0x3568 | goto label_1;
| label_9:
0x00003658 lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x0000365c lw t9, -0x7ddc(gp) | t9 = sym.imp.strncpy;
0x00003660 addiu a2, zero, 0x20 | a2 = 0x20;
0x00003664 addiu a1, a1, -0x377c | a1 += -0x377c;
0x00003668 move a0, s1 | a0 = s1;
0x0000366c jalr t9 | t9 ();
0x00003670 addiu v0, zero, 0x40 | v0 = 0x40;
0x00003674 b 0x3568 | goto label_1;
| label_8:
0x00003678 lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x0000367c lw t9, -0x7ddc(gp) | t9 = sym.imp.strncpy;
0x00003680 addiu a2, zero, 0x20 | a2 = 0x20;
0x00003684 addiu a1, a1, -0x3798 | a1 += -0x3798;
0x00003688 move a0, s1 | a0 = s1;
0x0000368c jalr t9 | t9 ();
0x00003690 addiu v0, zero, 0x20 | v0 = 0x20;
0x00003694 b 0x3568 | goto label_1;
| label_10:
0x00003698 lw a1, -0x7fdc(gp) | a1 = *((gp - 8183));
0x0000369c lw t9, -0x7ddc(gp) | t9 = sym.imp.strncpy;
0x000036a0 addiu a2, zero, 0x20 | a2 = 0x20;
0x000036a4 addiu a1, a1, -0x3760 | a1 += -0x3760;
0x000036a8 move a0, s1 | a0 = s1;
0x000036ac jalr t9 | t9 ();
0x000036b0 addiu v0, zero, 0x10 | v0 = 0x10;
0x000036b4 b 0x3568 | goto label_1;
| label_6:
0x000036b8 addiu s3, zero, -0x16 | s3 = -0x16;
0x000036bc b 0x3570 | goto label_2;
| }
[*] Function printf used 3 times integritysetup