[*] Binary protection state of osdp_testapp

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


[*] Function printf tear down of osdp_testapp

    ; assembly                                           | /* r2dec pseudo code output */
                                                         | /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/bin/osdp_testapp @ 0x5adc */
                                                         | #include <stdint.h>
                                                         |  
    ; (fcn) fcn.00005adc ()                              | void fcn_00005adc (int16_t arg1, int16_t arg2, int16_t arg3) {
                                                         |     r0 = arg1;
                                                         |     r1 = arg2;
                                                         |     r2 = arg3;
    0x00005adc push.w {r4, r5, r6, r7, r8, lr}           |     
    0x00005ae0 add.w r7, r2, r2, lsl 1                   |     r7 = r2 + (r2 << 1);
    0x00005ae4 ldr.w r8, [pc, 0x98]                      |     r8 = *(0x00005b80);
    0x00005ae8 mov r5, r0                                |     r5 = r0;
    0x00005aea mov r0, r7                                |     r0 = r7;
    0x00005aec mov r4, r1                                |     r4 = r1;
    0x00005aee blx 0x20f0                                |     fcn_000020f0 ();
    0x00005af2 ldr r2, [pc, 0x90]                        |     r2 = *(0x5b86);
    0x00005af4 add r8, pc                                |     r8 += pc;
    0x00005af6 mov r3, r8                                |     r3 = r8;
    0x00005af8 mov r1, r7                                |     r1 = r7;
    0x00005afa mov r6, r0                                |     r6 = r0;
    0x00005afc ldr.w r3, [r8, r2]                        |     r3 = *((r8 + r2));
    0x00005b00 ldr r2, [r3]                              |     r2 = *(r3);
    0x00005b02 blx 0x1d10                                |     r0 = printf_chk ()
                                                         |     if (r0 == 0) {
    0x00005b06 cbz r0, 0x5b76                            |         goto label_2;
                                                         |     }
    0x00005b08 mov r0, r6                                |     r0 = r6;
    0x00005b0a blx 0x1edc                                |     r0 = fcn_00001edc ();
    0x00005b0e subs r3, r0, 1                            |     r3 = r0 - 1;
    0x00005b10 cmp r3, 0                                 |     
                                                         |     if (r3 <= 0) {
    0x00005b12 ble 0x5b76                                |         goto label_2;
                                                         |     }
    0x00005b14 movs r7, 0                                |     r7 = 0;
    0x00005b16 subs r3, r6, 2                            |     r3 = r6 - 2;
    0x00005b18 add r0, r3                                |     r0 += r3;
    0x00005b1a subs r1, r6, 1                            |     r1 = r6 - 1;
    0x00005b1c str r7, [r4]                              |     *(r4) = r7;
    0x00005b1e b 0x5b30                                  |     goto label_1;
                                                         | label_0:
    0x00005b20 subs r2, 1                                |     r2--;
    0x00005b22 movs r7, 0                                |     r7 = 0;
    0x00005b24 ldrb.w ip, [r5, r2]                       |     ip = *((r5 + r2));
    0x00005b28 add r3, ip                                |     r3 += ip;
    0x00005b2a strb r3, [r5, r2]                         |     *((r5 + r2)) = r3;
                                                         |     do {
    0x00005b2c cmp r0, r1                                |         
                                                         |         if (r0 == r1) {
    0x00005b2e beq 0x5b76                                |             goto label_2;
                                                         |         }
                                                         | label_1:
    0x00005b30 ldrb r2, [r1, 1]!                         |         r2 = *((r1 += 1));
    0x00005b34 sub.w r3, r2, 0x30                        |         r3 = r2 - 0x30;
    0x00005b38 sub.w ip, r2, 0x41                        |         
    0x00005b3c uxtb r3, r3                               |         r3 = (int8_t) r3;
    0x00005b3e cmp r3, 9                                 |         
                                                         |         if (r3 < 9) {
    0x00005b40 bls 0x5b60                                |             goto label_3;
                                                         |         }
    0x00005b42 cmp.w ip, 5                               |         
    0x00005b46 sub.w r3, r2, 0x37                        |         r3 = r2 - 0x37;
    0x00005b4a sub.w lr, r2, 0x61                        |         lr = r2 - 0x61;
    0x00005b4e it ls                                     |         
                                                         |         if (ip <= 5) {
    0x00005b50 uxtbls r3, r3                             |             __asm ("uxtbls r3, r3");
                                                         |         }
    0x00005b52 sub.w r2, r2, 0x57                        |         r2 -= 0x57;
                                                         |         if (ip < 5) {
    0x00005b56 bls 0x5b60                                |             goto label_3;
                                                         |         }
    0x00005b58 cmp.w lr, 5                               |         
    0x00005b5c uxtb r3, r2                               |         r3 = (int8_t) r2;
    0x00005b5e bhi 0x5b2c                                |         
                                                         |     } while (lr > 5);
                                                         | label_3:
    0x00005b60 ldr r2, [r4]                              |     r2 = *(r4);
    0x00005b62 cmp r7, 0                                 |     
                                                         |     if (r7 != 0) {
    0x00005b64 bne 0x5b20                                |         goto label_0;
                                                         |     }
    0x00005b66 lsls r3, r3, 4                            |     r3 <<= 4;
    0x00005b68 movs r7, 1                                |     r7 = 1;
    0x00005b6a cmp r0, r1                                |     
    0x00005b6c strb r3, [r5, r2]                         |     *((r5 + r2)) = r3;
    0x00005b6e ldr r3, [r4]                              |     r3 = *(r4);
    0x00005b70 add r3, r7                                |     r3 += r7;
    0x00005b72 str r3, [r4]                              |     *(r4) = r3;
                                                         |     if (r0 != r1) {
    0x00005b74 bne 0x5b30                                |         goto label_1;
                                                         |     }
                                                         | label_2:
    0x00005b76 mov r0, r6                                |     r0 = r6;
    0x00005b78 pop.w {r4, r5, r6, r7, r8, lr}            |     
    0x00005b7c b.w 0x1bf0                                |     return void (*0x1bf0)() ();
                                                         | }

[*] Function printf used 2 times osdp_testapp