[*] Binary protection state of libuClibc-1.0.31.so

  
  	Full RELRO     No Canary found   NX disabled  DSO          No RPATH     No RUNPATH   No Symbols


[*] Function strcat tear down of libuClibc-1.0.31.so

    ; assembly                                               | /* r2dec pseudo code output */
                                                             | /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/lib/libuClibc-1.0.31.so @ 0x19818 */
                                                             | #include <stdint.h>
                                                             |  
                                                             | #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
                                                             |  
    ; (fcn) fcn.00019818 ()                                  | void fcn_00019818 (int32_t arg_4h, int32_t arg_8h, int32_t arg1, int32_t arg2) {
                                                             |     int32_t var_38h;
                                                             |     int32_t var_34h;
                                                             |     int32_t var_30h;
                                                             |     int32_t var_28h;
                                                             |     int32_t var_24h;
                                                             |     int32_t var_0h;
                                                             |     int32_t var_8h;
                                                             |     int32_t var_20h_2;
                                                             |     int32_t var_20h;
                                                             |     r0 = arg1;
                                                             |     r1 = arg2;
    0x00019818 push {r4, r5, r6, r7, r8, sb, sl, fp, lr}     |     
    0x0001981c add fp, sp, 0x20                              |     
    0x00019820 sub sp, sp, 0x24                              |     
    0x00019824 mov r8, r0                                    |     r8 = r0;
    0x00019828 mov r7, r3                                    |     r7 = r3;
    0x0001982c sub sb, fp, 0x24                              |     sb -= var_24h;
    0x00019830 mov r3, 0                                     |     r3 = 0;
    0x00019834 mov r0, r1                                    |     r0 = r1;
    0x00019838 mov r6, r2                                    |     r6 = r2;
    0x0001983c str r3, [sb, -4]!                             |     *((sb -= 4)) = r3;
    0x00019840 str r1, [fp, -0x30]                           |     var_30h = r1;
    0x00019844 bl 0x3e3c0                                    |     strlen ();
    0x00019848 ldr r3, [fp, -0x30]                           |     r3 = var_30h;
    0x0001984c ldr r5, [fp, 8]                               |     r5 = *(arg_8h);
    0x00019850 add r4, r3, 1                                 |     r4 = r3 + 1;
    0x00019854 mov sl, r4                                    |     sl = r4;
    0x00019858 mov r3, 0                                     |     r3 = 0;
    0x0001985c add r0, r0, 0x12                              |     r0 += 0x12;
    0x00019860 bic r2, r0, 7                                 |     r2 = BIT_MASK (r0, 7);
    0x00019864 str r2, [fp, -0x34]                           |     var_34h = r2;
                                                             |     do {
    0x00019868 ldrb r2, [r4]                                 |         r2 = *(r4);
    0x0001986c cmp r2, 0                                     |         
                                                             |         if (r2 == 0) {
    0x00019870 bne 0x19884                                   |             
                                                             | label_2:
    0x00019874 mvn r3, 0                                     |             r3 = ~0;
                                                             | label_0:
    0x00019878 mov r0, r3                                    |             r0 = r3;
    0x0001987c sub sp, fp, 0x20                              |             
    0x00019880 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc}      |             
                                                             |         }
    0x00019884 cmp r2, 0x5b                                  |         
                                                             |         if (r2 != 0x5b) {
    0x00019888 bne 0x1997c                                   |             goto label_11;
                                                             |         }
    0x0001988c ldr r2, [pc, 0x3f0]                           |         r2 = *(0x19c80);
    0x00019890 add r2, pc, r2                                |         r2 = pc + r2;
    0x00019894 ldr r1, [r2]                                  |         r1 = *(0x19c80);
    0x00019898 cmp r1, 0                                     |         
                                                             |         if (r1 == 0) {
    0x0001989c bne 0x198cc                                   |             
    0x000198a0 ldr r0, [pc, 0x3e0]                           |             r0 = *(0x19c84);
    0x000198a4 str r2, [fp, -0x3c]                           |             var_8h = r2;
    0x000198a8 add r0, pc, r0                                |             r0 = pc + r0;
    0x000198ac str r3, [fp, -0x38]                           |             var_38h = r3;
    0x000198b0 bl 0x4b980                                    |             getenv (r0);
    0x000198b4 ldr r2, [fp, -0x3c]                           |             r2 = var_8h;
    0x000198b8 ldr r3, [fp, -0x38]                           |             r3 = var_38h;
    0x000198bc cmp r0, 0                                     |             
                                                             |             if (r0 != 0) {
    0x000198c0 mvneq r1, 0                                   |                 r1 = ~0;
                                                             |             }
                                                             |             if (r0 == 0) {
    0x000198c4 movne r1, 1                                   |                 r1 = 1;
                                                             |             }
    0x000198c8 str r1, [r2]                                  |             *(r2) = r1;
                                                             |         }
    0x000198cc ldrb r2, [r4, 1]                              |         r2 = *((r4 + 1));
    0x000198d0 cmp r2, 0x21                                  |         
                                                             |         if (r2 != 0x21) {
    0x000198d4 beq 0x198fc                                   |             
    0x000198d8 ldr r1, [pc, 0x3ac]                           |             
    0x000198dc sub r2, r2, 0x5e                              |             r2 -= 0x5e;
    0x000198e0 add r1, pc, r1                                |             r1 = pc + r1;
    0x000198e4 ldr r1, [r1]                                  |             r1 = *(0x19c88);
    0x000198e8 clz r2, r2                                    |             r2 &= r2;
    0x000198ec lsr r2, r2, 5                                 |             r2 >>= 5;
    0x000198f0 ands r2, r2, r1, lsr 31                       |             r2 &= (r1 >> 31);
                                                             |             if (r2 != r2) {
    0x000198f4 addeq r4, r4, 1                               |                 r4++;
                                                             |             }
                                                             |             if (r2 == r2) {
    0x000198f8 beq 0x19900                                   |                 goto label_12;
                                                             |             }
                                                             |         }
    0x000198fc add r4, r4, 2                                 |         r4 += 2;
                                                             | label_12:
    0x00019900 ldrb r2, [r4]                                 |         r2 = *(r4);
    0x00019904 cmp r2, 0x5d                                  |         
                                                             |         if (r2 != 0x5d) {
    0x00019908 addeq r4, r4, 1                               |             r4++;
                                                             |         }
                                                             | label_1:
    0x0001990c mov r2, r4                                    |         r2 = r4;
    0x00019910 ldrb r1, [r2], 1                              |         r1 = *(r2);
                                                             |         r2++;
    0x00019914 cmp r1, 0x5d                                  |         
                                                             |         if (r1 != 0x5d) {
    0x00019918 bne 0x1996c                                   |             goto label_13;
                                                             |         }
                                                             | label_3:
    0x0001991c cmn r3, 1                                     |         
    0x00019920 add r4, r4, 1                                 |         r4++;
    0x00019924 bne 0x19868                                   |         
                                                             |     } while (r3 != 1);
    0x00019928 cmp r8, 0x2b                                  |     
                                                             |     if (r8 == 0x2b) {
    0x0001992c beq 0x19b38                                   |         goto label_14;
                                                             |     }
                                                             |     if (r8 > 0x2b) {
    0x00019930 bgt 0x19a70                                   |         goto label_15;
                                                             |     }
    0x00019934 cmp r8, 0x21                                  |     
                                                             |     if (r8 == 0x21) {
    0x00019938 beq 0x19acc                                   |         goto label_16;
                                                             |     }
    0x0001993c cmp r8, 0x2a                                  |     
                                                             |     if (r8 != 0x2a) {
    0x00019940 bne 0x19878                                   |         goto label_0;
                                                             |     }
    0x00019944 str r5, [sp]                                  |     *(sp) = r5;
    0x00019948 ldr r3, [fp, 4]                               |     r3 = *(arg_4h);
    0x0001994c mov r2, r7                                    |     r2 = r7;
    0x00019950 mov r1, r6                                    |     r1 = r6;
    0x00019954 mov r0, r4                                    |     r0 = r4;
    0x00019958 bl 0x19c94                                    |     r0 = fcn_00019c94 (r0, r1, r2);
    0x0001995c cmp r0, 0                                     |     
                                                             |     if (r0 != 0) {
    0x00019960 bne 0x19b38                                   |         goto label_14;
                                                             |     }
                                                             | label_4:
    0x00019964 mov r3, 0                                     |     r3 = 0;
    0x00019968 b 0x19878                                     |     goto label_0;
                                                             | label_13:
    0x0001996c cmp r1, 0                                     |     
    0x00019970 mov r4, r2                                    |     r4 = r2;
                                                             |     if (r1 != 0) {
    0x00019974 bne 0x1990c                                   |         goto label_1;
                                                             |     }
    0x00019978 b 0x19874                                     |     goto label_2;
                                                             | label_11:
    0x0001997c sub r1, r2, 0x21                              |     r1 = r2 - 0x21;
    0x00019980 and r1, r1, 0xff                              |     r1 &= 0xff;
    0x00019984 cmp r1, 0x1f                                  |     
                                                             |     if (r1 > 0x1f) {
    0x00019988 bhi 0x199ac                                   |         goto label_17;
                                                             |     }
    0x0001998c ldr r0, [pc, 0x2fc]                           |     r0 = *(0x19c8c);
    0x00019990 mvn r1, r0, lsr r1                            |     r1 = ~r0;
    0x00019994 tst r1, 1                                     |     
                                                             |     if ((r1 & 1) != 0) {
    0x00019998 bne 0x199ac                                   |         goto label_17;
                                                             |     }
    0x0001999c ldrb r1, [r4, 1]                              |     r1 = *((r4 + 1));
    0x000199a0 cmp r1, 0x28                                  |     
                                                             |     if (r1 == 0x28) {
    0x000199a4 addeq r3, r3, 1                               |         r3++;
                                                             |         goto label_18;
                                                             |     }
                                                             |     if (r1 == 0x28) {
                                                             | label_18:
    0x000199a8 beq 0x1991c                                   |         goto label_3;
                                                             |     }
                                                             | label_17:
    0x000199ac cmp r2, 0x29                                  |     
                                                             |     if (r2 != 0x29) {
    0x000199b0 bne 0x19a10                                   |         goto label_19;
                                                             |     }
    0x000199b4 cmp r3, 0                                     |     
                                                             |     if (r3 != 0) {
    0x000199b8 subne r3, r3, 1                               |         r3--;
                                                             |         goto label_20;
                                                             |     }
                                                             |     if (r3 != 0) {
                                                             | label_20:
    0x000199bc bne 0x1991c                                   |         goto label_3;
                                                             |     }
    0x000199c0 sub r3, r8, 0x3f                              |     r3 = r8 - 0x3f;
    0x000199c4 cmp r3, 1                                     |     
    0x000199c8 sub r2, r4, sl                                |     r2 = r4 - sl;
                                                             |     if (r3 > 1) {
    0x000199cc ldrls r3, [fp, -0x34]                         |         r3 = var_34h;
                                                             |     }
                                                             |     if (r3 <= 1) {
    0x000199d0 addhi r3, r2, 0x13                            |         r3 = r2 + 0x13;
                                                             |     }
    0x000199d4 bichi r3, r3, 7                               |     __asm ("bichi r3, r3, 7");
    0x000199d8 sub sp, sp, r3                                |     
    0x000199dc add r3, sp, 8                                 |     r3 += var_8h;
    0x000199e0 add r0, r3, 4                                 |     r0 = r3 + 4;
    0x000199e4 mov r1, sl                                    |     r1 = sl;
    0x000199e8 str r3, [fp, -0x38]                           |     var_38h = r3;
    0x000199ec bl 0x3e98c                                    |     mempcpy ();
    0x000199f0 ldr r3, [fp, -0x38]                           |     r3 = var_38h;
    0x000199f4 mov r2, 0                                     |     r2 = 0;
    0x000199f8 strb r2, [r0]                                 |     *(r0) = r2;
    0x000199fc str r2, [r3]                                  |     *(r3) = r2;
    0x00019a00 str r3, [sb]                                  |     *(sb) = r3;
    0x00019a04 mov sb, r3                                    |     sb = r3;
    0x00019a08 mvn r3, 0                                     |     r3 = ~0;
    0x00019a0c b 0x1991c                                     |     goto label_3;
                                                             | label_19:
    0x00019a10 cmp r2, 0x7c                                  |     
    0x00019a14 cmpeq r3, 0                                   |     __asm ("cmpeq r3, 0");
                                                             |     if (r2 != 0x7c) {
    0x00019a18 bne 0x1991c                                   |         goto label_3;
                                                             |     }
    0x00019a1c sub r3, r8, 0x3f                              |     r3 = r8 - 0x3f;
    0x00019a20 cmp r3, 1                                     |     
    0x00019a24 sub r2, r4, sl                                |     r2 = r4 - sl;
                                                             |     if (r3 > 1) {
    0x00019a28 ldrls r3, [fp, -0x34]                         |         r3 = var_34h;
                                                             |     }
                                                             |     if (r3 <= 1) {
    0x00019a2c addhi r3, r2, 0x13                            |         r3 = r2 + 0x13;
                                                             |     }
    0x00019a30 bichi r3, r3, 7                               |     __asm ("bichi r3, r3, 7");
    0x00019a34 sub sp, sp, r3                                |     
    0x00019a38 add r3, sp, 8                                 |     r3 += var_8h;
    0x00019a3c mov r1, sl                                    |     r1 = sl;
    0x00019a40 add r0, r3, 4                                 |     r0 = r3 + 4;
    0x00019a44 str r3, [fp, -0x38]                           |     var_38h = r3;
    0x00019a48 bl 0x3e98c                                    |     mempcpy ();
    0x00019a4c ldr r3, [fp, -0x38]                           |     r3 = var_38h;
    0x00019a50 mov r2, 0                                     |     r2 = 0;
    0x00019a54 add sl, r4, 1                                 |     sl = r4 + 1;
    0x00019a58 strb r2, [r0]                                 |     *(r0) = r2;
    0x00019a5c str r2, [r3]                                  |     *(r3) = r2;
    0x00019a60 str r3, [sb]                                  |     *(sb) = r3;
    0x00019a64 mov sb, r3                                    |     sb = r3;
    0x00019a68 mov r3, r2                                    |     r3 = r2;
    0x00019a6c b 0x1991c                                     |     goto label_3;
                                                             | label_15:
    0x00019a70 cmp r8, 0x3f                                  |     
                                                             |     if (r8 == 0x3f) {
    0x00019a74 beq 0x19c30                                   |         goto label_21;
                                                             |     }
    0x00019a78 cmp r8, 0x40                                  |     
                                                             |     if (r8 != 0x40) {
    0x00019a7c bne 0x19878                                   |         goto label_0;
                                                             |     }
                                                             | label_8:
    0x00019a80 bic r3, r5, 4                                 |     r3 = BIT_MASK (r5, 4);
    0x00019a84 tst r5, 1                                     |     
                                                             |     if ((r5 & 1) != 0) {
    0x00019a88 moveq r5, r3                                  |         r5 = r3;
                                                             |     }
                                                             | label_5:
    0x00019a8c ldr r8, [fp, -0x28]                           |     r8 = var_28h;
    0x00019a90 mov r1, r4                                    |     r1 = r4;
    0x00019a94 add r0, r8, 4                                 |     r0 = r8 + 4;
    0x00019a98 bl 0x3ea84                                    |     strcat ()
    0x00019a9c str r5, [sp]                                  |     *(sp) = r5;
    0x00019aa0 ldr r3, [fp, 4]                               |     r3 = *(arg_4h);
    0x00019aa4 mov r2, r7                                    |     r2 = r7;
    0x00019aa8 mov r1, r6                                    |     r1 = r6;
    0x00019aac bl 0x19c94                                    |     r0 = fcn_00019c94 (r0, r1, r2);
    0x00019ab0 cmp r0, 0                                     |     
                                                             |     if (r0 == 0) {
    0x00019ab4 beq 0x19964                                   |         goto label_4;
                                                             |     }
    0x00019ab8 ldr r3, [r8]                                  |     r3 = *(r8);
    0x00019abc cmp r3, 0                                     |     
    0x00019ac0 str r3, [fp, -0x28]                           |     var_28h = r3;
                                                             |     if (r3 != 0) {
    0x00019ac4 bne 0x19a8c                                   |         goto label_5;
                                                             |     }
    0x00019ac8 b 0x19b78                                     |     goto label_22;
                                                             | label_16:
    0x00019acc tst r5, 1                                     |     
    0x00019ad0 bic sl, r5, 4                                 |     sl = BIT_MASK (r5, 4);
    0x00019ad4 mov sb, r6                                    |     sb = r6;
                                                             |     if ((r5 & 1) == 0) {
    0x00019ad8 movne sl, r5                                  |         sl = r5;
                                                             |     }
    0x00019adc and r5, r5, 5                                 |     r5 &= 5;
                                                             | label_9:
    0x00019ae0 cmp sb, r7                                    |     
                                                             |     if (sb > r7) {
    0x00019ae4 bhi 0x19b78                                   |         goto label_22;
                                                             |     }
    0x00019ae8 ldr r8, [fp, -0x28]                           |     r8 = var_28h;
                                                             | label_10:
    0x00019aec cmp r8, 0                                     |     
                                                             |     if (r8 != 0) {
    0x00019af0 bne 0x19c54                                   |         goto label_23;
                                                             |     }
    0x00019af4 cmp sb, r6                                    |     
                                                             |     if (sb != r6) {
    0x00019af8 ldreq r3, [fp, 4]                             |         r3 = *(arg_4h);
                                                             |     }
                                                             |     if (sb != r6) {
    0x00019afc beq 0x19b18                                   |         
    0x00019b00 ldrb r3, [sb, -1]                             |         r3 = *((sb - 1));
    0x00019b04 cmp r3, 0x2f                                  |         
                                                             |         if (r3 != 0x2f) {
    0x00019b08 subeq r3, r5, 5                               |             r3 = r5 - 5;
                                                             |         }
    0x00019b0c clzeq r3, r3                                  |         __asm ("clzeq r3, r3");
                                                             |         if (r3 == 0x2f) {
    0x00019b10 movne r3, r8                                  |             r3 = r8;
                                                             |         }
                                                             |         if (r3 == 0x2f) {
    0x00019b14 lsreq r3, r3, 5                               |             r3 >>= 5;
                                                             |             goto label_24;
                                                             |         }
                                                             |     }
                                                             | label_24:
    0x00019b18 str sl, [sp]                                  |     *(sp) = sl;
    0x00019b1c mov r2, r7                                    |     r2 = r7;
    0x00019b20 mov r1, sb                                    |     r1 = sb;
    0x00019b24 mov r0, r4                                    |     r0 = r4;
    0x00019b28 bl 0x19c94                                    |     r0 = fcn_00019c94 (r0, r1, r2);
    0x00019b2c cmp r0, 0                                     |     
                                                             |     if (r0 != 0) {
    0x00019b30 bne 0x19c74                                   |         goto label_25;
                                                             |     }
    0x00019b34 b 0x19964                                     |     goto label_4;
                                                             | label_14:
    0x00019b38 ldr r3, [fp, -0x30]                           |     r3 = var_30h;
    0x00019b3c tst r5, 1                                     |     
    0x00019b40 bic sb, r5, 4                                 |     sb = BIT_MASK (r5, 4);
    0x00019b44 sub r3, r3, 1                                 |     r3--;
                                                             |     if ((r5 & 1) == 0) {
    0x00019b48 movne sb, r5                                  |         sb = r5;
                                                             |     }
    0x00019b4c str r3, [fp, -0x34]                           |     var_34h = r3;
                                                             |     do {
    0x00019b50 and r3, r5, 5                                 |         r3 = r5 & 5;
    0x00019b54 mov r8, r6                                    |         r8 = r6;
    0x00019b58 str r3, [fp, -0x30]                           |         var_30h = r3;
                                                             | label_6:
    0x00019b5c cmp r8, r7                                    |         
    0x00019b60 ldr r0, [fp, -0x28]                           |         r0 = var_28h;
                                                             |         if (r8 < r7) {
    0x00019b64 bls 0x19b80                                   |             goto label_26;
                                                             |         }
    0x00019b68 ldr r3, [r0]                                  |         r3 = *(r0);
    0x00019b6c cmp r3, 0                                     |         
    0x00019b70 str r3, [fp, -0x28]                           |         var_28h = r3;
    0x00019b74 bne 0x19b50                                   |         
                                                             |     } while (r3 != 0);
                                                             | label_22:
    0x00019b78 mov r3, 1                                     |     r3 = 1;
    0x00019b7c b 0x19878                                     |     goto label_0;
                                                             | label_26:
    0x00019b80 str sb, [sp]                                  |     *(sp) = sb;
    0x00019b84 ldr r3, [fp, 4]                               |     r3 = *(arg_4h);
    0x00019b88 mov r2, r8                                    |     r2 = r8;
    0x00019b8c mov r1, r6                                    |     r1 = r6;
    0x00019b90 add r0, r0, 4                                 |     r0 += 4;
    0x00019b94 bl 0x19c94                                    |     r0 = fcn_00019c94 (r0, r1, r2);
    0x00019b98 subs sl, r0, 0                                |     sl = r0 - 0;
                                                             |     if (sl != r0) {
    0x00019b9c beq 0x19ba8                                   |         
                                                             | label_7:
    0x00019ba0 add r8, r8, 1                                 |         r8++;
    0x00019ba4 b 0x19b5c                                     |         goto label_6;
                                                             |     }
    0x00019ba8 cmp r8, r6                                    |     
                                                             |     if (r8 != r6) {
    0x00019bac ldreq r3, [fp, 4]                             |         r3 = *(arg_4h);
                                                             |     }
                                                             |     if (r8 != r6) {
    0x00019bb0 beq 0x19bd0                                   |         
    0x00019bb4 ldrb r3, [r8, -1]                             |         r3 = *((r8 - 1));
    0x00019bb8 cmp r3, 0x2f                                  |         
                                                             |         if (r3 != 0x2f) {
    0x00019bbc ldreq r3, [fp, -0x30]                         |             r3 = var_30h;
                                                             |         }
                                                             |         if (r3 == 0x2f) {
    0x00019bc0 movne r3, sl                                  |             r3 = sl;
                                                             |         }
                                                             |         if (r3 != 0x2f) {
    0x00019bc4 subeq r3, r3, 5                               |             r3 -= 5;
                                                             |         }
    0x00019bc8 clzeq r3, r3                                  |         __asm ("clzeq r3, r3");
                                                             |         if (r3 == 0x2f) {
    0x00019bcc lsreq r3, r3, 5                               |             r3 >>= 5;
                                                             |             goto label_27;
                                                             |         }
                                                             |     }
                                                             | label_27:
    0x00019bd0 str sb, [sp]                                  |     *(sp) = sb;
    0x00019bd4 mov r2, r7                                    |     r2 = r7;
    0x00019bd8 mov r1, r8                                    |     r1 = r8;
    0x00019bdc mov r0, r4                                    |     r0 = r4;
    0x00019be0 bl 0x19c94                                    |     r0 = fcn_00019c94 (r0, r1, r2);
    0x00019be4 cmp r0, 0                                     |     
                                                             |     if (r0 == 0) {
    0x00019be8 beq 0x19964                                   |         goto label_4;
                                                             |     }
    0x00019bec cmp r8, r6                                    |     
                                                             |     if (r8 == r6) {
    0x00019bf0 beq 0x19ba0                                   |         goto label_7;
                                                             |     }
    0x00019bf4 ldrb r3, [r8, -1]                             |     r3 = *((r8 - 1));
    0x00019bf8 mov r2, r7                                    |     r2 = r7;
    0x00019bfc cmp r3, 0x2f                                  |     
                                                             |     if (r3 != 0x2f) {
    0x00019c00 ldreq r3, [fp, -0x30]                         |         r3 = var_30h;
                                                             |     }
    0x00019c04 str sb, [sp]                                  |     *(sp) = sb;
                                                             |     if (r3 != 0x2f) {
    0x00019c08 subeq sl, r3, 5                               |         sl = r3 - 5;
                                                             |     }
    0x00019c0c clzeq sl, sl                                  |     __asm ("clzeq sl, sl");
                                                             |     if (r3 != 0x2f) {
    0x00019c10 lsreq sl, sl, 5                               |         sl >>= 5;
                                                             |     }
    0x00019c14 mov r3, sl                                    |     r3 = sl;
    0x00019c18 mov r1, r8                                    |     r1 = r8;
    0x00019c1c ldr r0, [fp, -0x34]                           |     r0 = var_34h;
    0x00019c20 bl 0x19c94                                    |     r0 = fcn_00019c94 (r0, r1, r2);
    0x00019c24 cmp r0, 0                                     |     
                                                             |     if (r0 != 0) {
    0x00019c28 bne 0x19ba0                                   |         goto label_7;
                                                             |     }
    0x00019c2c b 0x19964                                     |     goto label_4;
                                                             | label_21:
    0x00019c30 str r5, [sp]                                  |     *(sp) = r5;
    0x00019c34 ldr r3, [fp, 4]                               |     r3 = *(arg_4h);
    0x00019c38 mov r2, r7                                    |     r2 = r7;
    0x00019c3c mov r1, r6                                    |     r1 = r6;
    0x00019c40 mov r0, r4                                    |     r0 = r4;
    0x00019c44 bl 0x19c94                                    |     r0 = fcn_00019c94 (r0, r1, r2);
    0x00019c48 cmp r0, 0                                     |     
                                                             |     if (r0 != 0) {
    0x00019c4c bne 0x19a80                                   |         goto label_8;
                                                             |     }
    0x00019c50 b 0x19964                                     |     goto label_4;
                                                             | label_23:
    0x00019c54 str sl, [sp]                                  |     *(sp) = sl;
    0x00019c58 ldr r3, [fp, 4]                               |     r3 = *(arg_4h);
    0x00019c5c mov r2, sb                                    |     r2 = sb;
    0x00019c60 mov r1, r6                                    |     r1 = r6;
    0x00019c64 add r0, r8, 4                                 |     r0 = r8 + 4;
    0x00019c68 bl 0x19c94                                    |     r0 = fcn_00019c94 (r0, r1, r2);
    0x00019c6c cmp r0, 0                                     |     
                                                             |     if (r0 == 0) {
    0x00019c70 bne 0x19c7c                                   |         
                                                             | label_25:
    0x00019c74 add sb, sb, 1                                 |         sb++;
    0x00019c78 b 0x19ae0                                     |         goto label_9;
                                                             |     }
    0x00019c7c ldr r8, [r8]                                  |     r8 = *(r8);
    0x00019c80 b 0x19aec                                     |     goto label_10;
                                                             | }
    ; assembly                                               | /* r2dec pseudo code output */
                                                             | /* /logs/firmware/unblob_extracted/firmware_extract/56048-12514271.gzip_extract/gzip.uncompressed_extract/5243916-15068666.gzip_extract/gzip.uncompressed_extract/lib/libuClibc-1.0.31.so @ 0x4cd34 */
                                                             | #include <stdint.h>
                                                             |  
    ; (fcn) sym.ptsname_r ()                                 | void ptsname_r (int32_t arg1) {
                                                             |     int32_t var_0h;
                                                             |     int32_t var_4h;
                                                             |     int32_t var_8h;
                                                             |     char * s2;
                                                             |     int32_t var_18h;
                                                             |     r0 = arg1;
    0x0004cd34 ldr r3, [pc, 0xc4]                            |     r3 = *(0x4cdfc);
    0x0004cd38 push {r4, r5, r6, r7, r8, sb, sl, lr}         |     
    0x0004cd3c ldr r3, [pc, r3]                              |     r3 = *(0x0004cd44);
    0x0004cd40 mov r4, r0                                    |     r4 = r0;
    0x0004cd44 sub sp, sp, 0x18                              |     
    0x0004cd48 bl 0x11934                                    |     fcn_00011934 ();
    0x0004cd4c mov r7, r1                                    |     r7 = r1;
    0x0004cd50 ldr r8, [r0, r3]                              |     r8 = *((r0 + r3));
    0x0004cd54 mov sb, r2                                    |     sb = r2;
    0x0004cd58 mov r6, r0                                    |     r6 = r0;
    0x0004cd5c add r2, sp, 8                                 |     r2 += var_8h;
    0x0004cd60 mov r0, r4                                    |     r0 = r4;
    0x0004cd64 ldr r1, [pc, 0x98]                            |     r1 = swscanf;
    0x0004cd68 bl 0x165d8                                    |     r0 = ioctl ();
    0x0004cd6c subs r4, r0, 0                                |     r4 = r0 - 0;
                                                             |     if (r4 != r0) {
    0x0004cd70 bne 0x4cdf0                                   |         goto label_0;
                                                             |     }
    0x0004cd74 ldr r2, [sp, 8]                               |     r2 = var_8h;
    0x0004cd78 mvn r3, 9                                     |     r3 = ~9;
    0x0004cd7c add r5, sp, 0x17                              |     r5 += s2;
    0x0004cd80 str r3, [sp]                                  |     *(sp) = r3;
    0x0004cd84 mov r0, r5                                    |     r0 = r5;
    0x0004cd88 str r4, [sp, 4]                               |     var_4h = r4;
    0x0004cd8c asr r3, r2, 0x1f                              |     r3 = r2 >> 0x1f;
    0x0004cd90 bl 0x369d8                                    |     r0 = fcn_000369d8 (r0, r1, r2);
    0x0004cd94 sub r5, r5, r0                                |     r5 -= r0;
    0x0004cd98 add r5, r5, 0xa                               |     r5 += 0xa;
    0x0004cd9c cmp r5, sb                                    |     
    0x0004cda0 mov sl, r0                                    |     sl = r0;
                                                             |     if (r5 < sb) {
    0x0004cda4 bls 0x4cdbc                                   |         goto label_1;
                                                             |     }
    0x0004cda8 ldr r3, [pc, 0x58]                            |     r3 = *(0x4ce04);
    0x0004cdac mov r4, 0x22                                  |     r4 = 0x22;
    0x0004cdb0 ldr r3, [pc, r3]                              |     r3 = *(0x0004cdb8);
                                                             |     do {
    0x0004cdb4 str r4, [r6, r3]                              |         *((r6 + r3)) = r4;
    0x0004cdb8 b 0x4cde4                                     |         goto label_2;
                                                             | label_1:
    0x0004cdbc ldr r1, [pc, 0x48]                            |         r1 = *(0x4ce08);
    0x0004cdc0 mov r0, r7                                    |         r0 = r7;
    0x0004cdc4 add r1, pc, r1                                |         r1 = pc + r1;
    0x0004cdc8 bl 0x3e970                                    |         strcpy (r0, r1);
    0x0004cdcc mov r1, sl                                    |         r1 = sl;
    0x0004cdd0 mov r0, r7                                    |         r0 = r7;
    0x0004cdd4 bl 0x3ea84                                    |         strcat ()
    0x0004cdd8 ldr r3, [pc, 0x30]                            |         r3 = *(0x4ce0c);
    0x0004cddc ldr r3, [pc, r3]                              |         r3 = *(0x0004cde4);
    0x0004cde0 str r8, [r6, r3]                              |         *((r6 + r3)) = r8;
                                                             | label_2:
    0x0004cde4 mov r0, r4                                    |         r0 = r4;
    0x0004cde8 add sp, sp, 0x18                              |         
    0x0004cdec pop {r4, r5, r6, r7, r8, sb, sl, pc}          |         
                                                             | label_0:
    0x0004cdf0 ldr r3, [pc, 0x1c]                            |         r3 = *(0x4ce10);
    0x0004cdf4 mov r4, 0x19                                  |         r4 = 0x19;
    0x0004cdf8 ldr r3, [pc, r3]                              |         r3 = sym.swscanf;
    0x0004cdfc b 0x4cdb4                                     |         
                                                             |     } while (1);
                                                             | }

[*] Function strcat used 3 times libuClibc-1.0.31.so