[*] Binary protection state of bootblocktool

  
  	Full RELRO     No Canary found   NX enabled   PIE enabled  No RPATH     No RUNPATH   No Symbols


[*] Function fprintf tear down of bootblocktool

    ; assembly                                               | /* r2dec pseudo code output */
                                                             | /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/bootblocktool @ 0xcc0 */
                                                             | #include <stdint.h>
                                                             |  
    ; (fcn) fcn.00000cc0 ()                                  | void fcn_00000cc0 (int16_t arg_8h, int16_t arg_ch, int16_t arg_10h, int16_t arg_14h, int16_t arg_18h, int16_t arg_1ch) {
                                                             |     int16_t var_0h;
                                                             | label_16:
    0x00000804 adds r4, 0x18                                 |     r4 += 0x18;
    0x00000806 add r3, pc                                    |     r3 += pc;
    0x00000808 str r3, [sp, 0x14]                            |     *(arg_14h) = r3;
                                                             | label_2:
    0x0000080a ldr.w r4, [sl]                                |     r4 = *(sl);
    0x0000080e ldrb.w r0, [r4]                               |     r0 = *(r4);
    0x00000812 movs r0, r0                                   |     
    0x00000814 lsrs r5, r5, 0x1c                             |     r5 >>= 0x1c;
                                                             |     if (r5 != r5) {
    0x00000816 bne 0x8b6                                     |         goto label_17;
                                                             |     }
    0x00000818 ldrb r2, [r4, 1]                              |     r2 = *((r4 + 1));
    0x0000081a cmp r2, 0x68                                  |     
                                                             |     if (r2 == 0x68) {
    0x0000081c bne 0x826                                     |         
    0x0000081e ldrb r2, [r4, 2]                              |         r2 = *((r4 + 2));
    0x00000820 cmp r2, 0                                     |         
                                                             |         if (r2 == 0) {
    0x00000822 beq.w 0xb7e                                   |             goto label_18;
                                                             |         }
                                                             |     }
    0x00000826 cmp.w r8, 0x2d                                |     
                                                             |     if (r8 != 0x2d) {
    0x0000082a bne 0x8b6                                     |         goto label_17;
                                                             |     }
    0x0000082c ldrb r2, [r4, 1]                              |     r2 = *((r4 + 1));
    0x0000082e cmp r2, 0x78                                  |     
                                                             |     if (r2 != 0x78) {
    0x00000830 bne 0x8b6                                     |         goto label_17;
                                                             |     }
    0x00000832 ldrb r2, [r4, 2]                              |     r2 = *((r4 + 2));
    0x00000834 cmp r2, 0                                     |     
                                                             |     if (r2 != 0) {
    0x00000836 bne 0x8b6                                     |         goto label_17;
                                                             |     }
    0x00000838 mov r5, sl                                    |     r5 = sl;
    0x0000083a ldr.w sl, [sp, 0x18]                          |     sl = *(arg_18h);
    0x0000083e cmp r6, 0                                     |     
                                                             |     if (r6 == 0) {
    0x00000840 beq.w 0xbda                                   |         goto label_19;
                                                             |     }
    0x00000844 ldr r7, [pc, 0x3d8]                           |     
    0x00000846 mov.w r8, 1                                   |     r8 = 1;
    0x00000848 lsrs r1, r0, 0x20                             |     r1 = r0 >> 0x20;
    0x0000084a ldr r4, [pc, 0x3d8]                           |     
    0x0000084c add r7, pc                                    |     r7 = 0x1470;
    0x0000084e add r4, pc                                    |     r4 = 0x1478;
    0x00000850 b 0x85a                                       |     
                                                             |     while (r0 != 0) {
    0x00000852 blx 0x750                                     |         puts (r0);
    0x00000856 subs r6, 1                                    |         r6--;
                                                             |         if (r6 == 1) {
    0x00000858 beq 0x880                                     |             goto label_3;
                                                             |         }
                                                             | label_0:
    0x0000085a ldr r0, [r5, 4]!                              |         r0 = *((r5 += 4));
    0x0000085e blx 0x72c                                     |         r0 = bootblock_get ();
    0x00000862 cmp r0, 0                                     |         
    0x00000864 bne 0x852                                     |         
                                                             |     }
    0x00000866 ldr r0, [pc, 0x3c0]                           |     
    0x00000868 mov r2, r7                                    |     r2 = r7;
    0x0000086a ldr r3, [r5]                                  |     r3 = *(r5);
    0x0000086c movs r1, 1                                    |     r1 = 1;
    0x0000086e ldr.w r0, [sl, r0]                            |     r0 = *((sl + r0));
    0x00000872 ldr r0, [r0]                                  |     r0 = *(0xc2a);
    0x00000874 blx 0x738                                     |     fprintf_chk ()
    0x00000878 subs r6, 1                                    |     r6--;
    0x0000087a str.w r8, [r4]                                |     __asm ("str.w r8, [r4]");
                                                             |     if (r6 != 1) {
    0x0000087e bne 0x85a                                     |         goto label_0;
                                                             |     }
                                                             | label_3:
    0x00000880 ldr r3, [pc, 0x3a8]                           |     
    0x00000882 add r3, pc                                    |     r3 = 0x14b2;
    0x00000884 ldrb r0, [r3, 4]                              |     r0 = *((r3 + 4));
                                                             |     if (r0 != 0) {
    0x00000886 cbz r0, 0x88a                                 |         
    0x00000888 ldr r0, [r3]                                  |         r0 = *(r3);
                                                             |     }
    0x0000088a add sp, 0x24                                  |     
    0x0000088c pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc}    |     
                                                             | label_15:
    0x000008a0 movw r2, 0x247                                |     r2 = 0x247;
                                                             | label_14:
    0x000008a4 ldr.w r3, [sl, r3]                            |     r3 = *((sl + r3));
    0x000008a8 movs r1, 1                                    |     r1 = 1;
    0x000008aa ldr r3, [r3]                                  |     r3 = *(r3);
    0x000008ac blx 0x714                                     |     fwrite (r0, r1, r2, r3);
    0x000008b0 movs r0, 1                                    |     r0 = 1;
    0x000008b2 blx 0x774                                     |     exit (r0);
                                                             | label_17:
    0x000008b6 cmp.w r8, 0x2d                                |     
    0x000008ba add.w r5, sl, 4                               |     r5 = sl + 4;
                                                             |     if (r8 != 0x2d) {
    0x000008be bne 0x960                                     |         goto label_20;
                                                             |     }
    0x000008c0 ldrb r2, [r4, 1]                              |     r2 = *((r4 + 1));
    0x000008c2 cmp r2, 0x6c                                  |     
                                                             |     if (r2 != 0x6c) {
    0x000008c4 bne 0x960                                     |         goto label_20;
                                                             |     }
    0x000008c6 ldrb r2, [r4, 2]                              |     r2 = *((r4 + 2));
    0x000008c8 cmp r2, 0                                     |     
                                                             |     if (r2 != 0) {
    0x000008ca bne 0x960                                     |         goto label_20;
                                                             |     }
                                                             | label_5:
    0x000008cc ldrb r4, [r4, 2]                              |     r4 = *((r4 + 2));
    0x000008ce blx 0x708                                     |     r0 = bootblock_get_all ();
    0x000008d2 mov r7, r0                                    |     r7 = r0;
    0x000008d4 cmp r0, 0                                     |     
                                                             |     if (r0 == 0) {
    0x000008d6 beq.w 0xbf0                                   |         goto label_21;
                                                             |     }
    0x000008da ldr r2, [r0]                                  |     r2 = *(r0);
    0x000008dc mov.w r8, 0                                   |     r8 = 0;
                                                             |     if (r2 != 0) {
    0x000008e0 cbnz r2, 0x8fe                                |         goto label_1;
                                                             |     }
    0x000008e2 b 0x920                                       |     goto label_22;
                                                             |     do {
    0x000008e4 cmp r4, 0x61                                  |         
                                                             |         if (r4 == 0x61) {
    0x000008e6 bne 0x8f4                                     |             
    0x000008e8 ldr r1, [pc, 0x348]                           |             
    0x000008ea mov r3, r0                                    |             r3 = r0;
    0x000008ec movs r0, 1                                    |             r0 = 1;
    0x000008ee add r1, pc                                    |             r1 = 0x1526;
    0x000008f0 blx 0x6c0                                     |             printf_chk ();
                                                             |         }
                                                             | label_4:
    0x000008f4 ldr r2, [r7, 8]!                              |         r2 = *((r7 += 8));
    0x000008f8 add.w r8, r8, 1                               |         r8++;
                                                             |         if (r2 == 0) {
    0x000008fc cbz r2, 0x920                                 |             goto label_22;
                                                             |         }
                                                             | label_1:
    0x000008fe cmp r4, 0x65                                  |         
    0x00000900 ldr r0, [r7, 4]                               |         r0 = *((r7 + 4));
                                                             |         if (r4 == 0x65) {
    0x00000902 beq 0x954                                     |             goto label_23;
                                                             |         }
                                                             |         if (r4 > 0x65) {
    0x00000904 bhi 0x936                                     |             goto label_24;
                                                             |         }
    0x00000906 cmp r4, 0                                     |         
    0x00000908 bne 0x8e4                                     |         
                                                             |     } while (r4 != 0);
    0x0000090a mov r3, r0                                    |     r3 = r0;
    0x0000090c ldr r1, [sp, 0x10]                            |     r1 = *(arg_10h);
    0x0000090e movs r0, 1                                    |     r0 = 1;
    0x00000910 add.w r8, r8, 1                               |     r8++;
    0x00000914 blx 0x6c0                                     |     printf_chk ();
    0x00000916 mrc p8, 6, apsr_nzcv, c4, c7, 2               |     __asm ("mrc p8, 6, apsr_nzcv, c4, c7, 2");
    0x0000091a cmp r7, 8                                     |     
    0x0000091c cmp r2, 0                                     |     
                                                             |     if (r2 != 0) {
    0x0000091e bne 0x8fe                                     |         goto label_1;
                                                             |     }
                                                             | label_22:
    0x00000920 cmp r4, 0x77                                  |     
    0x00000922 it ne                                         |     
                                                             |     if (r4 != 0x77) {
    0x00000924 cmpne r4, 0x61                                |         __asm ("cmpne r4, 0x61");
                                                             |     }
                                                             |     if (r4 == 0x77) {
    0x00000926 beq 0x9b2                                     |         goto label_25;
                                                             |     }
                                                             | label_7:
    0x00000928 mov sl, r5                                    |     sl = r5;
    0x0000092a mov r7, r6                                    |     r7 = r6;
                                                             | label_8:
    0x0000092c subs r6, r7, 1                                |     r6 = r7 - 1;
    0x0000092e cmp r7, 0                                     |     
                                                             |     if (r7 != 0) {
    0x00000930 bne.w 0x80a                                   |         goto label_2;
                                                             |     }
    0x00000934 b 0x880                                       |     goto label_3;
                                                             | label_24:
    0x00000936 cmp r4, 0x77                                  |     
                                                             |     if (r4 != 0x77) {
    0x00000938 bne 0x8f4                                     |         goto label_4;
                                                             |     }
    0x0000093a cmp.w r8, 0                                   |     
                                                             |     if (r8 != 0) {
    0x0000093e bne 0x9ae                                     |         goto label_26;
                                                             |     }
    0x00000940 ldr r1, [pc, 0x2f4]                           |     
    0x00000942 add r1, pc                                    |     r1 = 0x157e;
                                                             | label_6:
    0x00000944 mov r3, r2                                    |     r3 = r2;
    0x00000946 str r0, [sp]                                  |     *(sp) = r0;
    0x00000948 mov r2, r1                                    |     r2 = r1;
    0x0000094a movs r0, 1                                    |     r0 = 1;
    0x0000094c ldr r1, [sp, 0xc]                             |     r1 = *(arg_ch);
    0x0000094e blx 0x6c0                                     |     printf_chk ();
    0x00000952 b 0x8f4                                       |     goto label_4;
                                                             | label_23:
    0x00000954 mov r3, r0                                    |     r3 = r0;
    0x00000956 ldr r1, [sp, 8]                               |     r1 = *(arg_8h);
    0x00000958 movs r0, 1                                    |     r0 = 1;
    0x0000095a blx 0x6c0                                     |     printf_chk ();
    0x0000095e b 0x8f4                                       |     goto label_4;
                                                             | label_20:
    0x00000960 ldr r1, [pc, 0x2d8]                           |     
    0x00000962 mov r0, r4                                    |     r0 = r4;
    0x00000964 add r1, pc                                    |     r1 = 0x15a4;
    0x00000966 blx 0x768                                     |     r0 = strcmp (r0, r1);
    0x0000096a cmp r0, 0                                     |     
                                                             |     if (r0 == 0) {
    0x0000096c beq 0x8cc                                     |         goto label_5;
                                                             |     }
    0x0000096e ldr r1, [pc, 0x2d0]                           |     
    0x00000970 mov r0, r4                                    |     r0 = r4;
    0x00000972 add r1, pc                                    |     r1 = 0x15b8;
    0x00000974 blx 0x768                                     |     r0 = strcmp (r0, r1);
    0x00000978 cmp r0, 0                                     |     
                                                             |     if (r0 == 0) {
    0x0000097a beq 0x8cc                                     |         goto label_5;
                                                             |     }
    0x0000097c ldr r1, [pc, 0x2c4]                           |     
    0x0000097e mov r0, r4                                    |     r0 = r4;
    0x00000980 add r1, pc                                    |     r1 = 0x15c8;
    0x00000982 blx 0x768                                     |     r0 = strcmp (r0, r1);
    0x00000986 cmp r0, 0                                     |     
                                                             |     if (r0 == 0) {
    0x00000988 beq 0x8cc                                     |         goto label_5;
                                                             |     }
    0x0000098a cmp.w r8, 0x2d                                |     
                                                             |     if (r8 != 0x2d) {
    0x0000098e beq 0x9ba                                     |         
                                                             | label_9:
    0x00000990 ldr r2, [pc, 0x2b4]                           |         
    0x00000992 ldr.w sl, [sp, 0x18]                          |         sl = *(arg_18h);
    0x00000996 ldr r0, [pc, 0x290]                           |         r0 = *(0xc2a);
    0x00000998 add r2, pc                                    |         r2 = 0x15e4;
                                                             | label_13:
    0x0000099a ldr.w r0, [sl, r0]                            |         r0 = *((sl + r0));
    0x0000099e mov r3, r4                                    |         r3 = r4;
    0x000009a0 movs r1, 1                                    |         r1 = 1;
    0x000009a2 ldr r0, [r0]                                  |         r0 = *(r0);
    0x000009a4 blx 0x738                                     |         fprintf_chk ()
    0x000009a8 movs r0, 1                                    |         r0 = 1;
    0x000009aa blx 0x774                                     |         exit (r0);
                                                             | label_26:
    0x000009ae ldr r1, [sp, 0x14]                            |         r1 = *(arg_14h);
    0x000009b0 b 0x944                                       |         goto label_6;
                                                             | label_25:
    0x000009b2 movs r0, 0xa                                  |         r0 = 0xa;
    0x000009b4 blx 0x6d8                                     |         putchar (r0);
    0x000009b8 b 0x928                                       |         goto label_7;
                                                             |     }
    0x000009ba ldrb r2, [r4, 1]                              |     r2 = *((r4 + 1));
    0x000009bc cmp r2, 0x61                                  |     
                                                             |     if (r2 != 0x61) {
    0x000009be bne 0xa28                                     |         goto label_27;
                                                             |     }
    0x000009c0 ldrb.w sb, [r4, 2]                            |     sb = *((r4 + 2));
    0x000009c4 cmp.w sb, 0                                   |     
                                                             |     if (sb != 0) {
    0x000009c8 bne 0xa28                                     |         goto label_27;
                                                             |     }
    0x000009ca cmp r6, 0                                     |     
                                                             |     if (r6 == 0) {
    0x000009cc beq.w 0xbd6                                   |         goto label_28;
                                                             |     }
    0x000009d0 asrs r0, r6, 1                                |     r0 = r6 >> 1;
    0x000009d2 adds r0, 1                                    |     r0++;
    0x000009d4 lsls r0, r0, 3                                |     r0 <<= 3;
    0x000009d6 blx 0x720                                     |     r0 = malloc (r0);
    0x000009da mov r4, r0                                    |     r4 = r0;
    0x000009dc cmp r0, 0                                     |     
                                                             |     if (r0 == 0) {
    0x000009de beq.w 0xbe2                                   |         goto label_29;
                                                             |     }
    0x000009e2 cmp r6, 1                                     |     
    0x000009e4 itt eq                                        |     
                                                             |     if (r6 != 1) {
    0x000009e6 moveq sl, r5                                  |         sl = r5;
                                                             |     }
                                                             |     if (r6 != 1) {
    0x000009e8 moveq r7, r6                                  |         r7 = r6;
                                                             |     }
                                                             |     if (r6 == 1) {
    0x000009ea beq 0xa14                                     |         goto label_30;
                                                             |     }
    0x000009ec mov r7, r6                                    |     r7 = r6;
    0x000009ee mov r2, r0                                    |     r2 = r0;
    0x000009f0 mov sl, r5                                    |     sl = r5;
                                                             |     do {
    0x000009f2 vld1.32 {d16}, [sl]!                          |         __asm ("vld1.32 {d16}, [sl]!");
    0x000009f6 ldr.w r0, [r5, sb, lsl 3]                     |         offset_0 = sb << 3;
                                                             |         r0 = *((r5 + offset_0));
    0x000009fa vmov.32 r3, d16[1]                            |         __asm ("vmov.32 r3, d16[1]");
    0x000009fe ldrb r3, [r3]                                 |         r3 = *(r3);
    0x00000a00 cmp r3, 0                                     |         
                                                             |         if (r3 == 0) {
    0x00000a02 beq.w 0xbaa                                   |             goto label_31;
                                                             |         }
    0x00000a06 subs r7, 2                                    |         r7 -= 2;
    0x00000a08 add.w sb, sb, 1                               |         sb++;
    0x00000a0c cmp r7, 1                                     |         
    0x00000a0e vst1.64 {d16}, [r2:0x40]!                     |         __asm ("vst1.64 {d16}, [r2:0x40]!");
    0x00000a12 bgt 0x9f2                                     |         
                                                             |     } while (r7 > 1);
                                                             | label_30:
    0x00000a14 movs r2, 0                                    |     r2 = 0;
    0x00000a16 mov r0, r4                                    |     r0 = r4;
    0x00000a18 str.w r2, [r4, sb, lsl 3]                     |     __asm ("str.w r2, [r4, sb, lsl 3]");
    0x00000a1c bl 0xd88                                      |     fcn_00000d88 ();
    0x00000a20 mov r0, r4                                    |     r0 = r4;
    0x00000a22 blx 0x6e4                                     |     free (r0);
    0x00000a26 b 0x92c                                       |     goto label_8;
                                                             | label_27:
    0x00000a28 cmp.w r8, 0x2d                                |     
                                                             |     if (r8 != 0x2d) {
    0x00000a2c bne 0x990                                     |         goto label_9;
                                                             |     }
    0x00000a2e ldrb r2, [r4, 1]                              |     r2 = *((r4 + 1));
    0x00000a30 cmp r2, 0x63                                  |     
                                                             |     if (r2 == 0x63) {
    0x00000a32 beq 0xb00                                     |         goto label_32;
                                                             |     }
                                                             | label_10:
    0x00000a34 cmp.w r8, 0x2d                                |     
                                                             |     if (r8 != 0x2d) {
    0x00000a38 bne 0x990                                     |         goto label_9;
                                                             |     }
    0x00000a3a ldrb r2, [r4, 1]                              |     r2 = *((r4 + 1));
    0x00000a3c cmp r2, 0x77                                  |     
                                                             |     if (r2 != 0x77) {
    0x00000a3e bne 0x990                                     |         goto label_9;
                                                             |     }
    0x00000a40 ldrb.w r8, [r4, 2]                            |     r8 = *((r4 + 2));
    0x00000a44 cmp.w r8, 0                                   |     
    0x00000a46 lsrs r0, r0, 0x1c                             |     r0 >>= 0x1c;
                                                             |     if (r0 != r0) {
    0x00000a48 bne 0x990                                     |         goto label_9;
                                                             |     }
    0x00000a4a cmp r6, 0                                     |     
                                                             |     if (r6 == 0) {
    0x00000a4c beq.w 0xbd6                                   |         goto label_28;
                                                             |     }
    0x00000a50 ldr.w r4, [sl, 4]                             |     r4 = *((sl + 4));
    0x00000a54 mov r0, r4                                    |     r0 = r4;
    0x00000a56 blx 0x6fc                                     |     strlen (r0);
    0x00000a58 cdp p8, 5, c2, c2, c0, 0                      |     __asm ("cdp p8, 5, c2, c2, c0, 0");
                                                             |     if (r6 == 0) {
    0x00000a5c beq.w 0xb8e                                   |         goto label_33;
                                                             |     }
    0x00000a60 subs r2, r4, 1                                |     r2 = r4 - 1;
    0x00000a62 movs r1, 1                                    |     r1 = 1;
    0x00000a64 adds r6, r2, r0                               |     r6 = r2 + r0;
    0x00000a66 movs r0, 2                                    |     r0 = 2;
                                                             |     do {
    0x00000a68 ldrb r3, [r2, 1]!                             |         r3 = *((r2 += 1));
    0x00000a6c cmp r3, 0x3a                                  |         
    0x00000a6e it eq                                         |         
                                                             |         if (r3 != 0x3a) {
    0x00000a70 moveq r1, r0                                  |             r1 = r0;
                                                             |         }
    0x00000a72 cmp r2, r6                                    |         
    0x00000a74 add.w r0, r1, 1                               |         r0 = r1 + 1;
    0x00000a78 bne 0xa68                                     |         
                                                             |     } while (r2 != r6);
                                                             | label_12:
    0x00000a7a lsls r0, r0, 3                                |     r0 <<= 3;
    0x00000a7c blx 0x720                                     |     r0 = malloc (r0);
    0x00000a80 mov r5, r0                                    |     r5 = r0;
    0x00000a82 cmp r0, 0                                     |     
                                                             |     if (r0 == 0) {
    0x00000a84 beq.w 0xbc8                                   |         goto label_34;
                                                             |     }
    0x00000a88 ldr r1, [pc, 0x1c0]                           |     
    0x00000a8a mov r0, r4                                    |     r0 = r4;
    0x00000a8c add r1, pc                                    |     r1 = 0x16dc;
    0x00000a8e blx 0x744                                     |     r0 = strtok (r0, r1);
    0x00000a92 mov r4, r0                                    |     r4 = r0;
                                                             |     if (r0 == 0) {
    0x00000a94 cbz r0, 0xae6                                 |         goto label_35;
                                                             |     }
    0x00000a96 ldr.w fp, [pc, 0x1b8]                         |     
    0x00000a9a adds r6, r5, 4                                |     r6 = r5 + 4;
    0x00000a9c ldr.w sb, [pc, 0x1b4]                         |     
    0x00000aa0 str r5, [sp, 0x1c]                            |     *(arg_1ch) = r5;
    0x00000aa2 add fp, pc                                    |     fp = 0x16f8;
    0x00000aa4 add sb, pc                                    |     sb = 0x16fc;
                                                             |     do {
    0x00000aa6 movs r1, 0x3d                                 |         r1 = 0x3d;
    0x00000aa8 mov r0, r4                                    |         r0 = r4;
    0x00000aaa blx 0x6cc                                     |         r0 = strchr (r0, r1);
    0x00000aae cmp r0, 0                                     |         
                                                             |         if (r0 == 0) {
    0x00000ab0 beq 0xb92                                     |             goto label_36;
                                                             |         }
    0x00000ab2 mov r2, r0                                    |         r2 = r0;
    0x00000ab4 movs r5, 0                                    |         r5 = 0;
    0x00000ab6 strb r5, [r2], 1                              |         *(r2) = r5;
                                                             |         r2++;
    0x00000aba ldrb r1, [r0, 1]                              |         r1 = *((r0 + 1));
    0x00000abc cmp r1, 0                                     |         
                                                             |         if (r1 == 0) {
    0x00000abe beq 0xb9e                                     |             goto label_37;
                                                             |         }
    0x00000ac0 str r4, [r6, -0x4]                            |         *((r6 - 0x4)) = r4;
    0x00000ac4 mov r1, fp                                    |         r1 = fp;
    0x00000ac6 str r2, [r6], 8                               |         *(r6) = r2;
                                                             |         r6 += 8;
    0x00000aca movs r0, 1                                    |         r0 = 1;
    0x00000acc mov r2, r4                                    |         r2 = r4;
    0x00000ace add.w r8, r8, 1                               |         r8++;
    0x00000ad2 blx 0x6c0                                     |         printf_chk ();
    0x00000ad6 mov r0, r5                                    |         r0 = r5;
    0x00000ad8 mov r1, sb                                    |         r1 = sb;
    0x00000ada blx 0x744                                     |         r0 = strtok (r0, r1);
    0x00000ade mov r4, r0                                    |         r4 = r0;
    0x00000ae0 cmp r0, 0                                     |         
    0x00000ae2 bne 0xaa6                                     |         
                                                             |     } while (r0 != 0);
    0x00000ae4 ldr r5, [sp, 0x1c]                            |     r5 = *(arg_1ch);
                                                             | label_35:
    0x00000ae6 movs r2, 0                                    |     r2 = 0;
    0x00000ae8 mov r0, r5                                    |     r0 = r5;
    0x00000aea str.w r2, [r5, r8, lsl 3]                     |     __asm ("str.w r2, [r5, r8, lsl 3]");
    0x00000aee subs r7, 2                                    |     r7 -= 2;
    0x00000af0 bl 0xd88                                      |     fcn_00000d88 ();
    0x00000af4 mov r0, r5                                    |     r0 = r5;
    0x00000af6 add.w sl, sl, 8                               |     sl += 8;
    0x00000afa blx 0x6e4                                     |     free (r0);
    0x00000afe b 0x92c                                       |     goto label_8;
                                                             | label_32:
    0x00000b00 ldrb r2, [r4, 2]                              |     r2 = *((r4 + 2));
    0x00000b02 cmp r2, 0                                     |     
                                                             |     if (r2 != 0) {
    0x00000b04 bne 0xa34                                     |         goto label_10;
                                                             |     }
    0x00000b06 cmp r6, 0                                     |     
                                                             |     if (r6 == 0) {
    0x00000b08 beq 0xbd6                                     |         goto label_28;
                                                             |     }
    0x00000b0a ldr r1, [pc, 0x14c]                           |     
    0x00000b0c ldr.w r0, [sl, 4]                             |     r0 = *((sl + 4));
    0x00000b10 add r1, pc                                    |     r1 = 0x176e;
    0x00000b12 blx 0x744                                     |     r0 = strtok (r0, r1);
    0x00000b16 mov r8, r0                                    |     r8 = r0;
                                                             |     if (r0 == 0) {
    0x00000b18 cbz r0, 0xb76                                 |         goto label_38;
                                                             |     }
    0x00000b1a ldr r6, [pc, 0x140]                           |     
    0x00000b1c ldr r5, [pc, 0x140]                           |     
    0x00000b1e ldr r4, [pc, 0x144]                           |     
    0x00000b20 ldr.w sb, [sp, 0x18]                          |     sb = *(arg_18h);
    0x00000b24 add r6, pc                                    |     r6 = 0x1786;
    0x00000b26 add r5, pc                                    |     r5 = 0x178a;
    0x00000b28 add r4, pc                                    |     r4 = 0x1792;
    0x00000b2a b 0xb52                                       |     
                                                             |     while (r0 != 0) {
    0x00000b2c ldr.w r3, [sl, 4]                             |         r3 = *((sl + 4));
    0x00000b30 cmp r3, r8                                    |         
                                                             |         if (r3 != r8) {
    0x00000b32 beq 0xb3a                                     |             
    0x00000b34 movs r0, 0x20                                 |             r0 = 0x20;
    0x00000b36 blx 0x6d8                                     |             putchar (r0);
                                                             |         }
    0x00000b3a mov r2, fp                                    |         r2 = fp;
    0x00000b3c mov r1, r4                                    |         r1 = r4;
    0x00000b3e movs r0, 1                                    |         r0 = 1;
    0x00000b40 blx 0x6c0                                     |         printf_chk ();
                                                             | label_11:
    0x00000b44 ldr r1, [pc, 0x120]                           |         
    0x00000b46 movs r0, 0                                    |         r0 = 0;
    0x00000b48 add r1, pc                                    |         r1 = 0x17b4;
    0x00000b4a blx 0x744                                     |         r0 = strtok (r0, r1);
    0x00000b4e mov r8, r0                                    |         r8 = r0;
                                                             |         if (r0 == 0) {
    0x00000b50 cbz r0, 0xb76                                 |             goto label_38;
                                                             |         }
    0x00000b52 mov r0, r8                                    |         r0 = r8;
    0x00000b54 blx 0x72c                                     |         r0 = bootblock_get ();
    0x00000b58 mov fp, r0                                    |         
    0x00000b5a cmp r0, 0                                     |         
    0x00000b5c bne 0xb2c                                     |         
                                                             |     }
    0x00000b5e ldr r2, [pc, 0xc8]                            |     r2 = *(0xc2a);
    0x00000b60 mov r3, r8                                    |     r3 = r8;
    0x00000b62 movs r1, 1                                    |     r1 = 1;
    0x00000b64 ldr.w r2, [sb, r2]                            |     r2 = *((sb + r2));
    0x00000b68 ldr r0, [r2]                                  |     r0 = *(0xc2a);
    0x00000b6a mov r2, r6                                    |     r2 = r6;
    0x00000b6c blx 0x738                                     |     fprintf_chk ()
    0x00000b70 movs r3, 1                                    |     r3 = 1;
    0x00000b72 str r3, [r5]                                  |     *(r5) = r3;
    0x00000b74 b 0xb44                                       |     goto label_11;
                                                             | label_38:
    0x00000b76 subs r7, 2                                    |     r7 -= 2;
    0x00000b78 add.w sl, sl, 8                               |     sl += 8;
    0x00000b7a lsrs r0, r1, 8                                |     r0 = r1 >> 8;
    0x00000b7c b 0x92c                                       |     goto label_8;
                                                             | label_18:
    0x00000b7e ldr r0, [pc, 0xec]                            |     
    0x00000b80 mov r7, r2                                    |     r7 = r2;
    0x00000b82 add r0, pc                                    |     r0 = 0x17f4;
    0x00000b84 blx 0x750                                     |     puts (r0);
    0x00000b88 mov r0, r7                                    |     r0 = r7;
    0x00000b8a blx 0x774                                     |     exit (r0);
                                                             | label_33:
    0x00000b8e movs r0, 2                                    |     r0 = 2;
    0x00000b90 b 0xa7a                                       |     goto label_12;
                                                             | label_36:
    0x00000b92 ldr r2, [pc, 0xdc]                            |     
    0x00000b94 ldr.w sl, [sp, 0x18]                          |     sl = *(arg_18h);
    0x00000b98 ldr r0, [pc, 0x8c]                            |     r0 = *(0xc28);
    0x00000b9a add r2, pc                                    |     r2 = 0x1810;
    0x00000b9c b 0x99a                                       |     goto label_13;
                                                             | label_37:
    0x00000b9e ldr r2, [pc, 0xd4]                            |     
    0x00000ba0 ldr.w sl, [sp, 0x18]                          |     sl = *(arg_18h);
    0x00000ba2 adr r0, 0x60                                  |     r0 = 0x60;
    0x00000ba4 ldr r0, [pc, 0x80]                            |     r0 = *(0xc28);
    0x00000ba6 add r2, pc                                    |     r2 = 0x1820;
    0x00000ba8 b 0x99a                                       |     goto label_13;
                                                             | label_31:
    0x00000baa ldr.w sl, [sp, 0x18]                          |     sl = *(arg_18h);
    0x00000bae mov r3, r0                                    |     r3 = r0;
    0x00000bb0 ldr r4, [pc, 0x74]                            |     r4 = *(0xc28);
    0x00000bb2 movs r1, 1                                    |     r1 = 1;
    0x00000bb4 ldr r2, [pc, 0xc0]                            |     
    0x00000bb6 ldr.w r0, [sl, r4]                            |     r0 = *((sl + r4));
    0x00000bba add r2, pc                                    |     r2 = 0x1836;
    0x00000bbc ldr r0, [r0]                                  |     r0 = *(r0);
    0x00000bbe blx 0x738                                     |     fprintf_chk ()
    0x00000bc2 movs r0, 1                                    |     r0 = 1;
    0x00000bc4 blx 0x774                                     |     exit (r0);
                                                             | label_34:
    0x00000bc8 ldr r0, [pc, 0xb0]                            |     
    0x00000bca movs r2, 0x16                                 |     r2 = 0x16;
    0x00000bcc ldr.w sl, [sp, 0x18]                          |     sl = *(arg_18h);
    0x00000bd0 ldr r3, [pc, 0x54]                            |     r3 = *(0xc28);
    0x00000bd2 add r0, pc                                    |     r0 = 0x1852;
    0x00000bd4 b 0x8a4                                       |     goto label_14;
                                                             | label_28:
    0x00000bd6 ldr.w sl, [sp, 0x18]                          |     sl = *(arg_18h);
                                                             | label_19:
    0x00000bda ldr r0, [pc, 0xa4]                            |     
    0x00000bdc ldr r3, [pc, 0x48]                            |     r3 = *(0xc28);
    0x00000bde add r0, pc                                    |     r0 = 0x1864;
    0x00000be0 b 0x8a0                                       |     goto label_15;
                                                             | label_29:
    0x00000be2 ldr r0, [pc, 0xa0]                            |     
    0x00000be4 movs r2, 0x16                                 |     r2 = 0x16;
    0x00000be6 ldr.w sl, [sp, 0x18]                          |     sl = *(arg_18h);
    0x00000bea ldr r3, [pc, 0x3c]                            |     r3 = *(0xc2a);
    0x00000bec add r0, pc                                    |     r0 = 0x1876;
    0x00000bee b 0x8a4                                       |     goto label_14;
                                                             | label_21:
    0x00000bf0 ldr r0, [pc, 0x94]                            |     
    0x00000bf2 movs r2, 0x2d                                 |     r2 = 0x2d;
    0x00000bf4 ldr.w sl, [sp, 0x18]                          |     sl = *(arg_18h);
    0x00000bf8 ldr r3, [pc, 0x2c]                            |     r3 = *(0xc28);
    0x00000bfa add r0, pc                                    |     r0 = 0x1886;
    0x00000bfc b 0x8a4                                       |     goto label_14;
    0x00000cc0 adds r0, 0x14                                 |     r0 += 0x14;
    0x00000cc2 b 0x804                                       |     goto label_16;
                                                             | }
    ; assembly                               | /* r2dec pseudo code output */
                                             | /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/bootblocktool @ 0xd88 */
                                             | #include <stdint.h>
                                             |  
    ; (fcn) fcn.00000d88 ()                  | void fcn_00000d88 () {
    0x00000d88 push {r4, lr}                 |     
    0x00000d8a blx 0x6f0                     |     r0 = bootblock_add ();
    0x00000d8e cmp r0, 0x11                  |     
    0x00000d90 ldr.w ip, [pc, 0x64]          |     ip = *(0x00000df8);
    0x00000d94 add ip, pc                    |     
                                             |     if (r0 != 0x11) {
    0x00000d96 beq 0xda0                     |         
    0x00000d98 cmp r0, 0x16                  |         
                                             |         if (r0 == 0x16) {
    0x00000d9a beq 0xdde                     |             goto label_0;
                                             |         }
                                             |         if (r0 != 0) {
    0x00000d9c cbnz r0, 0xdbe                |             goto label_1;
                                             |         }
    0x00000d9e pop {r4, pc}                  |         
                                             |     }
    0x00000da0 ldr r3, [pc, 0x58]            |     
    0x00000da2 movs r2, 0x21                 |     r2 = 0x21;
    0x00000da4 ldr r0, [pc, 0x58]            |     
    0x00000da6 movs r1, 1                    |     r1 = 1;
    0x00000da8 ldr.w r3, [ip, r3]            |     r3 = *((ip + r3));
    0x00000dac add r0, pc                    |     r0 = 0x1bb0;
    0x00000dae ldr r3, [r3]                  |     r3 = *(0xdfc);
    0x00000db0 blx 0x714                     |     fwrite (r0, r1, r2, r3);
    0x00000db4 ldr r3, [pc, 0x4c]            |     
    0x00000db6 movs r2, 1                    |     r2 = 1;
    0x00000db8 add r3, pc                    |     r3 = 0x1bc0;
    0x00000dba str r2, [r3]                  |     *(r3) = r2;
    0x00000dbc pop {r4, pc}                  |     
                                             | label_1:
    0x00000dbe ldr r3, [pc, 0x3c]            |     r3 = *(0xdfe);
    0x00000dc0 ldr.w r3, [ip, r3]            |     r3 = *((ip + r3));
    0x00000dc4 ldr r4, [r3]                  |     r4 = *(0xdfe);
    0x00000dc6 blx 0x69c                     |     strerror (r0);
    0x00000dca ldr r2, [pc, 0x3c]            |     
    0x00000dcc mov r3, r0                    |     r3 = r0;
    0x00000dce movs r1, 1                    |     r1 = 1;
    0x00000dd0 mov r0, r4                    |     r0 = r4;
    0x00000dd2 add r2, pc                    |     r2 = 0x1be0;
    0x00000dd4 blx 0x738                     |     fprintf_chk ()
    0x00000dd8 movs r0, 1                    |     r0 = 1;
    0x00000dda blx 0x774                     |     exit (r0);
                                             | label_0:
    0x00000dde ldr r3, [pc, 0x1c]            |     
    0x00000de0 movs r2, 0x17                 |     r2 = 0x17;
    0x00000de2 ldr r0, [pc, 0x28]            |     
    0x00000de4 movs r1, 1                    |     r1 = 1;
    0x00000de6 ldr.w r3, [ip, r3]            |     r3 = *((ip + r3));
    0x00000dea add r0, pc                    |     r0 = 0x1bfc;
    0x00000dec ldr r3, [r3]                  |     r3 = *(0xdfe);
    0x00000dee blx 0x714                     |     fwrite (r0, r1, r2, r3);
    0x00000df2 movs r0, 1                    |     r0 = 1;
    0x00000df4 blx 0x774                     |     exit (r0);
    0x00000df8 movs r1, 0xf4                 |     r1 = 0xf4;
    0x00000dfa movs r0, r0                   |     
    0x00000dfc lsls r0, r5, 1                |     r0 = r5 << 1;
    0x00000dfe movs r0, r0                   |     
    0x00000e00 lsls r4, r2, 4                |     r4 = r2 << 4;
    0x00000e02 movs r0, r0                   |     
    0x00000e04 movs r2, 0x50                 |     r2 = 0x50;
    0x00000e06 movs r0, r0                   |     
    0x00000e08 lsls r2, r2, 4                |     r2 <<= 4;
    0x00000e0a movs r0, r0                   |     
    0x00000e0c lsls r6, r7, 2                |     r6 = r7 << 2;
    0x00000e0e movs r0, r0                   |     
                                             |     /* [14] -r-x section size 8 named .fini */
    0x00000e10 ands r0, r1                   |     r0 &= r1;
    0x00000e12 invalid                       |     
                                             | }

[*] Function fprintf used 6 times bootblocktool