[*] Binary protection state of mount.util-linux
Full RELRO Canary found NX enabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function printf tear down of mount.util-linux
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/mount.util-linux @ 0x3a9c */
| #include <stdint.h>
|
; (fcn) fcn.00003a9c () | void fcn_00003a9c (int16_t arg_1060h, int16_t arg4) {
| int16_t var_0h;
| r3 = arg4;
| do {
| label_0:
0x00002f88 mov r0, r4 | r0 = r4;
0x00002f8a blx 0x21ac | fcn_000021ac ();
0x00002f8e ldr.w r3, [pc, 0x4c8] |
0x00002f92 add r3, pc | r3 = 0x63f0;
0x00002f94 ldr r0, [r3] | r0 = *(0x63f0);
0x00002f96 bl 0x45fc | fcn_000045fc (r0);
0x00002f9a ldr.w r2, [pc, 0x4c0] |
0x00002f9e add.w r1, sp, 0x1060 | r1 += arg_1060h;
0x00002fa2 ldr.w r3, [pc, 0x400] | r3 = *(0x33a6);
0x00002fa6 adds r1, 4 | r1 += 4;
0x00002fa8 add r2, pc | r2 = 0x640a;
0x00002faa ldr r3, [r2, r3] | r3 = *(0x640a);
0x00002fac ldr r2, [r3] | r2 = *(0x640a);
0x00002fae ldr r3, [r1] | r3 = *(r1);
0x00002fb0 eors r2, r3 | r2 ^= r3;
0x00002fb2 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00002fb6 bne.w 0x38b6 | goto label_4;
| }
0x00002fba mov r0, fp | r0 = fp;
0x00002fbc add.w sp, sp, 0x1060 |
0x00002fc0 add sp, 0xc |
0x00002fc2 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_2:
0x000035a6 mov r0, r6 | r0 = r6;
0x000035a8 blx 0x2288 | fcn_00002288 ();
0x000035ac b 0x2f88 |
| } while (1);
| label_3:
0x000035e0 add r2, pc | r2 += pc;
0x000035e2 ldr r3, [r3] | r3 = *(r3);
0x000035e4 blx 0x24e8 | fcn_000024e8 ();
0x000035e8 mov r1, r4 | r1 = r4;
0x000035ea movs r0, 0xa | r0 = 0xa;
0x000035ec blx 0x2524 | fcn_00002524 ();
0x000035f0 ldr r0, [pc, 0x3a8] |
0x000035f2 mov r3, r4 | r3 = r4;
0x000035f4 movs r2, 0x14 | r2 = 0x14;
0x000035f6 movs r1, 1 | r1 = 1;
0x000035f8 add r0, pc | r0 = 0x6f98;
0x000035fa blx 0x2478 | warn (r0);
0x000035fe ldr r0, [pc, 0x3a0] |
0x00003600 mov r3, r4 | r3 = r4;
0x00003602 movs r2, 0xa | r2 = 0xa;
0x00003604 movs r1, 1 | r1 = 1;
0x00003606 add r0, pc | r0 = 0x6fac;
0x00003608 blx 0x2478 | warn (r0);
0x0000360c ldr r0, [pc, 0x394] |
0x0000360e mov r3, r4 | r3 = r4;
0x00003610 mov.w r2, 0x128 | r2 = 0x128;
0x00003614 movs r1, 1 | r1 = 1;
0x00003616 add r0, pc | r0 = 0x6fbe;
0x00003618 blx 0x2478 | warn (r0);
0x0000361c ldr r0, [pc, 0x388] |
0x0000361e mov r3, r4 | r3 = r4;
0x00003620 movs r2, 0x3d | r2 = 0x3d;
0x00003622 movs r1, 1 | r1 = 1;
0x00003624 add r0, pc | r0 = 0x6fd0;
0x00003626 blx 0x2478 | warn (r0);
0x0000362a ldr r0, [pc, 0x380] |
0x0000362c mov r3, r4 | r3 = r4;
0x0000362e movs r2, 0x35 | r2 = 0x35;
0x00003630 movs r1, 1 | r1 = 1;
0x00003632 add r0, pc | r0 = 0x6fe4;
0x00003634 blx 0x2478 | warn (r0);
0x00003638 ldr r0, [pc, 0x374] |
0x0000363a mov r3, r4 | r3 = r4;
0x0000363c movs r2, 0x3e | r2 = 0x3e;
0x0000363e movs r1, 1 | r1 = 1;
0x00003640 add r0, pc | r0 = 0x6ff4;
0x00003642 blx 0x2478 | warn (r0);
0x00003646 ldr r0, [pc, 0x36c] |
0x00003648 mov r3, r4 | r3 = r4;
0x0000364a movs r2, 0x32 | r2 = 0x32;
0x0000364c movs r1, 1 | r1 = 1;
0x0000364e add r0, pc | r0 = 0x7008;
0x00003650 blx 0x2478 | warn (r0);
0x00003654 ldr r0, [pc, 0x360] |
0x00003656 mov r3, r4 | r3 = r4;
0x00003658 movw r2, 0x105 | r2 = 0x105;
0x0000365c movs r1, 1 | r1 = 1;
0x0000365e add r0, pc | r0 = 0x701a;
0x00003660 blx 0x2478 | warn (r0);
0x00003664 ldr r0, [pc, 0x354] |
0x00003666 mov r3, r4 | r3 = r4;
0x00003668 mov.w r2, 0x106 | r2 = 0x106;
0x0000366c movs r1, 1 | r1 = 1;
0x0000366e add r0, pc | r0 = 0x702e;
0x00003670 blx 0x2478 | warn (r0);
0x00003674 ldr r0, [pc, 0x348] |
0x00003676 mov r3, r4 | r3 = r4;
0x00003678 movs r2, 0x82 | r2 = 0x82;
0x0000367a movs r1, 1 | r1 = 1;
0x0000367c add r0, pc |
0x0000367e blx 0x2478 | warn (r0);
0x00003680 mrc p8, 7, r4, c12, c0, 6 | __asm ("mrc p8, 7, r4, c12, c0, 6");
0x00003684 mov r3, r4 | r3 = r4;
0x00003686 movs r2, 0x5d | r2 = 0x5d;
0x00003688 movs r1, 1 | r1 = 1;
0x0000368a add r0, pc | r0 = 0xa6ce;
0x0000368c blx 0x2478 | warn (r0);
0x00003690 ldr r0, [pc, 0x334] |
0x00003692 mov r3, r4 | r3 = r4;
0x00003694 movs r2, 0x30 | r2 = 0x30;
0x00003696 movs r1, 1 | r1 = 1;
0x00003698 add r0, pc | r0 = 0x7064;
0x0000369a blx 0x2478 | warn (r0);
0x0000369e ldr r0, [pc, 0x32c] |
0x000036a0 mov r3, r4 | r3 = r4;
0x000036a2 movs r2, 0x43 | r2 = 0x43;
0x000036a4 movs r1, 1 | r1 = 1;
0x000036a6 add r0, pc | r0 = 0x7078;
0x000036a8 blx 0x2478 | warn (r0);
0x000036ac ldr r0, [pc, 0x320] |
0x000036ae mov r3, r4 | r3 = r4;
0x000036b0 movs r2, 0x3c | r2 = 0x3c;
0x000036b2 movs r1, 1 | r1 = 1;
0x000036b4 add r0, pc | r0 = 0x7088;
0x000036b6 blx 0x2478 | warn (r0);
0x000036ba mov r1, r4 | r1 = r4;
0x000036bc movs r0, 0xa | r0 = 0xa;
0x000036be blx 0x2524 | fcn_00002524 ();
0x000036c2 ldr r0, [pc, 0x310] |
0x000036c4 ldr r2, [pc, 0x310] |
0x000036c6 ldr r1, [pc, 0x314] |
0x000036c8 ldr r3, [pc, 0x314] |
0x000036ca add r0, pc | r0 = 0x70a4;
0x000036cc add r2, pc | r2 = 0x70a8;
0x000036ce strd r0, r5, [sp] | __asm ("strd r0, r5, [sp]");
0x000036d2 add r1, pc | r1 = 0x70b4;
0x000036d4 movs r0, 1 | r0 = 1;
0x000036d6 add r3, pc | r3 = 0x70ba;
0x000036d8 blx 0x2148 | printf_chk ()
0x000036dc ldr r0, [pc, 0x304] |
0x000036de mov r3, r4 | r3 = r4;
0x000036e0 movw r2, 0x19f | r2 = 0x19f;
0x000036e4 movs r1, 1 | r1 = 1;
0x000036e6 add r0, pc |
0x000036e8 blx 0x2478 | warn (r0);
0x000036ea mcr p8, 6, r4, c6, c14, 5 | __asm ("mcr p8, 6, r4, c6, c14, 5");
0x000036ee mov r3, r4 | r3 = r4;
0x000036f0 movs r2, 0xb1 | r2 = 0xb1;
0x000036f2 movs r1, 1 | r1 = 1;
0x000036f4 add r0, pc | r0 = 0xa7c6;
0x000036f6 blx 0x2478 | warn (r0);
0x000036fa ldr r0, [pc, 0x2f0] |
0x000036fc mov r3, r4 | r3 = r4;
0x000036fe movs r2, 0xdd | r2 = 0xdd;
0x00003700 movs r1, 1 | r1 = 1;
0x00003702 add r0, pc | r0 = 0x70f4;
0x00003704 blx 0x2478 | warn (r0);
0x00003708 ldr r0, [pc, 0x2e4] |
0x0000370a mov r3, r4 | r3 = r4;
0x0000370c movs r2, 0xcc | r2 = 0xcc;
0x0000370e movs r1, 1 | r1 = 1;
0x00003710 add r0, pc | r0 = 0x7104;
0x00003712 blx 0x2478 | warn (r0);
0x00003716 ldr r0, [pc, 0x2dc] |
0x00003718 mov r3, r4 | r3 = r4;
0x0000371a mov.w r2, 0x114 | r2 = 0x114;
0x0000371e movs r1, 1 | r1 = 1;
0x00003720 add r0, pc | r0 = 0x711a;
0x00003722 blx 0x2478 | warn (r0);
0x00003726 ldr r2, [pc, 0x2d0] |
0x00003728 movs r0, 1 | r0 = 1;
0x0000372a ldr r1, [pc, 0x2d0] |
0x0000372c add r2, pc | r2 = 0x712a;
0x0000372e add r1, pc | r1 = 0x7130;
0x00003730 blx 0x2148 | printf_chk ()
0x00003734 movs r0, 0 | r0 = 0;
0x00003736 blx 0x26ec | fcn_000026ec ();
0x0000373a mov r0, r4 | r0 = r4;
0x0000373c blx 0x21ac | fcn_000021ac ();
0x00003740 movs r3, 0 | r3 = 0;
0x00003742 sub.w r0, sl, 0x18 | r0 = sl - 0x18;
0x00003744 movs r0, r3 | r0 = r3;
0x00003746 strd r3, r3, [sl, -0x18] | __asm ("strd r3, r3, [sl, -0x18]");
0x0000374a blx 0x2100 | mnt_get_library_version ();
0x0000374e sub.w r0, sl, 0x14 | r0 = sl - 0x14;
0x00003752 blx 0x2620 | fcn_00002620 ();
0x00003756 ldr r1, [sl, -0x18] | r1 = *((sl - 0x18));
0x0000375a movs r0, 1 | r0 = 1;
0x0000375c ldr r2, [pc, 0x234] |
0x0000375e ldr r3, [pc, 0x2a0] |
0x00003760 ldr.w r2, [sb, r2] | r2 = *((sb + r2));
0x00003764 str r1, [sp] | *(sp) = r1;
0x00003766 add r3, pc | r3 = 0x716c;
0x00003768 ldr r1, [pc, 0x298] |
0x0000376a ldr r2, [r2] | r2 = *(0x3994);
0x0000376c add r1, pc | r1 = 0x7174;
0x0000376e blx 0x2148 | printf_chk ()
0x00003772 ldr r4, [sl, -0x14] | r4 = *((sl - 0x14));
0x00003776 ldr r3, [pc, 0x214] | r3 = *(0x398e);
| if (r4 == 0) {
0x00003778 cbz r4, 0x37d2 | goto label_5;
| }
0x0000377a ldr r7, [pc, 0x28c] |
0x0000377c ldr r6, [pc, 0x28c] |
0x0000377e ldr.w r5, [sb, r3] | r5 = *((sb + r3));
0x00003782 add r7, pc | r7 = 0x7190;
0x00003784 add r6, pc | r6 = 0x7194;
0x00003786 b 0x37a8 |
| while (r3 != 0) {
0x00003788 ldr r3, [sl, -0x14] | r3 = *((sl - 0x14));
0x0000378c movs r1, 1 | r1 = 1;
0x0000378e movs r2, 2 | r2 = 2;
0x00003790 cmp r3, r4 |
0x00003792 ldr r3, [r5] | r3 = *(r5);
0x00003794 ite eq |
| if (r3 != r4) {
0x00003796 moveq r0, r7 | r0 = r7;
| }
| if (r3 == r4) {
0x00003798 movne r0, r6 | r0 = r6;
| }
0x0000379a blx 0x2478 | warn (r0);
0x0000379e ldr r1, [r5] | r1 = *(r5);
0x000037a0 ldr r0, [r4], 4 | r0 = *(r4);
| r4 += 4;
0x000037a4 blx 0x2758 | fcn_00002758 ();
0x000037a8 ldr r3, [r4] | r3 = *(r4);
0x000037aa cmp r3, 0 |
0x000037ac bne 0x3788 |
| }
| label_1:
0x000037ae ldr r0, [pc, 0x260] |
0x000037b0 movs r2, 2 | r2 = 2;
0x000037b2 ldr r3, [r5] | r3 = *(r5);
0x000037b4 movs r1, 1 | r1 = 1;
0x000037b6 add r0, pc | r0 = 0x71cc;
0x000037b8 blx 0x2478 | warn (r0);
0x000037bc movs r0, 0 | r0 = 0;
0x000037be blx 0x26ec | fcn_000026ec ();
0x000037c2 ldr r0, [pc, 0x250] |
0x000037c4 mov.w fp, 2 |
0x000037c8 add r0, pc | r0 = 0x71e2;
0x000037ca blx 0x2484 | mnt_fs_set_source ();
0x000037ce b.w 0x2f88 | goto label_0;
| if (r3 != 0) {
0x000037d0 cbnz r3, 0x384a | void (*0x384a)() ();
| }
| label_5:
0x000037d2 ldr.w r5, [sb, r3] | r5 = *((sb + r3));
0x000037d6 b 0x37ae | goto label_1;
| label_4:
0x000038b6 blx 0x24dc | fcn_000024dc ();
0x000038ba ldr r1, [pc, 0x19c] |
0x000038bc movs r0, 2 | r0 = 2;
0x000038be add r1, pc | r1 = 0x731c;
0x000038c0 blx 0x20b8 | err ();
0x000038c4 cmp r5, 0 |
0x000038c6 ite ne |
| if (r5 == 0) {
0x000038c8 movne fp, 0x40 |
| }
| if (r5 == 0) {
0x000038cc mov.w fp, 0x20 |
| }
0x000038d0 b 0x35a6 | goto label_2;
0x00003a9c adds r0, 0x14 | r0 += 0x14;
0x00003a9e b 0x35e0 | goto label_3;
| }
[*] Function printf used 4 times mount.util-linux