[*] Binary protection state of ubirename

  
  	Partial RELRO  No Canary found   NX disabled  No PIE       No RPATH     No RUNPATH   No Symbols


[*] Function fprintf tear down of ubirename

    ; 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/usr/sbin/ubirename @ 0x10c84 */
                                             | #include <stdint.h>
                                             |  
    ; (fcn) fcn.00010c84 ()                  | void fcn_00010c84 (int32_t arg1, int32_t arg2) {
                                             |     int32_t var_0h;
                                             |     int32_t var_4h;
                                             |     int32_t var_8h;
                                             |     char * buf;
                                             |     char * s;
                                             |     int32_t var_4ch;
                                             |     r0 = arg1;
                                             |     r1 = arg2;
    0x00010c84 push {r4, r5, r6, r7, lr}     |     
    0x00010c88 mov r6, r1                    |     r6 = r1;
    0x00010c8c sub sp, sp, 0x4c              |     
    0x00010c90 mov r1, 0                     |     r1 = 0;
    0x00010c94 mov r5, r0                    |     r5 = r0;
    0x00010c98 bl 0x107e0                    |     r0 = open64 ();
    0x00010c9c cmn r0, 1                     |     
    0x00010ca0 mov r4, r0                    |     r4 = r0;
                                             |     if (r0 == 1) {
    0x00010ca4 beq 0x10e00                   |         goto label_2;
                                             |     }
    0x00010ca8 mov r2, 0x32                  |     r2 = 0x32;
    0x00010cac add r1, sp, 0x14              |     r1 += buf;
    0x00010cb0 bl 0x1078c                    |     r0 = read (r0, r1, r2);
    0x00010cb4 cmn r0, 1                     |     
                                             |     if (r0 != 1) {
    0x00010cb8 bne 0x10d10                   |         goto label_3;
                                             |     }
    0x00010cbc bl 0x10810                    |     errno_location ();
    0x00010cc0 ldr r7, [pc, 0x144]           |     r7 = *(0x10e08);
    0x00010cc4 mov r3, r5                    |     r3 = r5;
    0x00010cc8 ldr r2, [pc, 0x140]           |     r2 = stderr;
    0x00010ccc ldr r1, [pc, 0x140]           |     r1 = "libubi";
    0x00010cd0 ldr r6, [r0]                  |     r6 = *(r0);
    0x00010cd4 ldr r0, [r7]                  |     r0 = *(0x10e08);
    0x00010cd8 bl 0x10774                    |     fprintf (r0, "libubi", r2, r3, r4, r5, r6)
    0x00010cdc mov r0, r6                    |     r0 = r6;
    0x00010ce0 ldr r5, [r7]                  |     r5 = *(0x10e08);
    0x00010ce4 bl 0x10714                    |     strerror (r0);
    0x00010ce8 str r6, [sp]                  |     *(sp) = r6;
    0x00010cec ldr r3, [pc, 0x124]           |     r3 = "_s:_error_:_cannot_read___s_";
    0x00010cf0 mov r2, 8                     |     r2 = 8;
    0x00010cf4 ldr r1, [pc, 0x120]           |     r1 = *(0x10e18);
    0x00010cf8 str r0, [sp, 4]               |     var_4h = r0;
    0x00010cfc mov r0, r5                    |     r0 = r5;
    0x00010d00 bl 0x10774                    |     fprintf (r0, r1, r2, "_s:_error_:_cannot_read___s_", r4, r5, r6)
                                             |     do {
    0x00010d04 mov r0, r4                    |         r0 = r4;
    0x00010d08 bl 0x10840                    |         close (r0);
    0x00010d0c b 0x10dfc                     |         goto label_4;
                                             | label_3:
    0x00010d10 cmp r0, 0x32                  |         
                                             |         if (r0 != 0x32) {
    0x00010d14 bne 0x10d40                   |             goto label_5;
                                             |         }
    0x00010d18 ldr r2, [pc, 0xf0]            |         r2 = stderr;
    0x00010d1c ldr r1, [pc, 0xfc]            |         r1 = "%*serror %d (%s)\n";
    0x00010d20 mov r3, r5                    |         r3 = r5;
                                             | label_0:
    0x00010d24 ldr r0, [pc, 0xe0]            |         
    0x00010d28 ldr r0, [r0]                  |         r0 = *(0x10e08);
    0x00010d2c bl 0x10774                    |         r0 = fprintf (r0, "%*serror %d (%s)\n", r2, r3)
                                             | label_1:
    0x00010d30 bl 0x10810                    |         errno_location ();
    0x00010d34 mov r3, 0x16                  |         r3 = 0x16;
    0x00010d38 str r3, [r0]                  |         *(r0) = r3;
    0x00010d3c b 0x10d04                     |         
                                             |     } while (1);
                                             | label_5:
    0x00010d40 add r3, sp, 0x48              |     r3 += s;
    0x00010d44 add r0, r3, r0                |     r0 = r3 + r0;
    0x00010d48 mov r3, 0                     |     r3 = 0;
    0x00010d4c strb r3, [r0, -0x34]          |     buf = r3;
    0x00010d50 mov r2, r6                    |     r2 = r6;
    0x00010d54 ldr r1, [pc, 0xc8]            |     r1 = "_s:_error_:_contents_of___s__is_too_long";
    0x00010d58 add r0, sp, 0x14              |     r0 += buf;
    0x00010d5c bl 0x107bc                    |     r0 = sscanf (r0, "_s:_error_:_contents_of___s__is_too_long", r2);
    0x00010d60 cmp r0, 1                     |     
                                             |     if (r0 == 1) {
    0x00010d64 movne r3, r5                  |         r3 = r5;
                                             |     }
                                             |     if (r0 == 1) {
    0x00010d68 ldrne r2, [pc, 0xa0]          |         r2 = "libubi";
                                             |     }
                                             |     if (r0 != 1) {
    0x00010d6c ldrne r1, [pc, 0xb4]          |         r1 = "_s:_error_:_cannot_read_integer_from___s_";
                                             |         goto label_6;
                                             |     }
                                             |     if (r0 != 1) {
                                             | label_6:
    0x00010d70 bne 0x10d24                   |         goto label_0;
                                             |     }
    0x00010d74 ldrd r2, r3, [r6]             |     __asm ("ldrd r2, r3, [r6]");
    0x00010d78 cmp r2, 0                     |     
    0x00010d7c sbcs r1, r3, 0                |     __asm ("sbcs r1, r3, 0");
                                             |     if (r2 < 0) {
    0x00010d80 bge 0x10da4                   |         
    0x00010d84 strd r2, r3, [sp]             |         __asm ("strd r2, r3, [sp]");
    0x00010d88 ldr r3, [pc, 0x7c]            |         r3 = *(0x10e08);
    0x00010d8c str r5, [sp, 8]               |         var_8h = r5;
    0x00010d90 ldr r2, [pc, 0x78]            |         r2 = stderr;
    0x00010d94 ldr r1, [pc, 0x90]            |         r1 = "_s:_error_:_cannot_read_integer_from___s_";
    0x00010d98 ldr r0, [r3]                  |         r0 = *(0x10e08);
    0x00010d9c bl 0x10774                    |         fprintf (r0, "_s:_error_:_cannot_read_integer_from___s_", r2, r3, r4, r5)
    0x00010da0 b 0x10d30                     |         goto label_1;
                                             |     }
    0x00010da4 mov r0, r4                    |     r0 = r4;
    0x00010da8 bl 0x10840                    |     r0 = close (r0);
    0x00010dac subs r4, r0, 0                |     r4 = r0 - 0;
                                             |     if (r4 != r0) {
    0x00010db0 beq 0x10e00                   |         
    0x00010db4 bl 0x10810                    |         errno_location ();
    0x00010db8 ldr r6, [pc, 0x4c]            |         r6 = *(0x10e08);
    0x00010dbc mov r3, r5                    |         r3 = r5;
    0x00010dc0 ldr r2, [pc, 0x48]            |         r2 = stderr;
    0x00010dc4 ldr r1, [pc, 0x64]            |         r1 = "_s:_error_:_negative_value__lld_in___s_";
    0x00010dc8 ldr r4, [r0]                  |         r4 = *(r0);
    0x00010dcc ldr r0, [r6]                  |         r0 = *(0x10e08);
    0x00010dd0 bl 0x10774                    |         fprintf (r0, "_s:_error_:_negative_value__lld_in___s_", r2, r3, r4, r5, r6)
    0x00010dd4 mov r0, r4                    |         r0 = r4;
    0x00010dd8 ldr r5, [r6]                  |         r5 = *(0x10e08);
    0x00010ddc bl 0x10714                    |         strerror (r0);
    0x00010de0 str r4, [sp]                  |         *(sp) = r4;
    0x00010de4 ldr r3, [pc, 0x2c]            |         r3 = "_s:_error_:_cannot_read___s_";
    0x00010de8 mov r2, 8                     |         r2 = 8;
    0x00010dec ldr r1, [pc, 0x28]            |         r1 = *(0x10e18);
    0x00010df0 str r0, [sp, 4]               |         var_4h = r0;
    0x00010df4 mov r0, r5                    |         r0 = r5;
    0x00010df8 bl 0x10774                    |         fprintf (r0, r1, r2, "_s:_error_:_cannot_read___s_", r4)
                                             | label_4:
    0x00010dfc mvn r4, 0                     |         r4 = ~0;
                                             |     }
                                             | label_2:
    0x00010e00 mov r0, r4                    |     r0 = r4;
    0x00010e04 add sp, sp, 0x4c              |     
    0x00010e08 pop {r4, r5, r6, r7, pc}      |     
                                             | }
    ; 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/usr/sbin/ubirename @ 0x10e34 */
                                             | #include <stdint.h>
                                             |  
    ; (fcn) fcn.00010e34 ()                  | void fcn_00010e34 (int32_t arg1, int32_t arg2) {
                                             |     int32_t var_0h;
                                             |     int32_t var_0h_2;
                                             |     int32_t var_8h;
                                             |     int32_t var_10h;
                                             |     int32_t var_10h_2;
                                             |     int32_t var_1ch;
                                             |     r0 = arg1;
                                             |     r1 = arg2;
    0x00010e34 push {r4, r5, lr}             |     
    0x00010e38 sub sp, sp, 0x1c              |     
    0x00010e3c mov r4, r1                    |     r4 = r1;
    0x00010e40 add r1, sp, 0x10              |     r1 += var_10h;
    0x00010e44 mov r5, r0                    |     r5 = r0;
    0x00010e48 bl 0x10c84                    |     r0 = fcn_00010c84 (r0, r1);
    0x00010e4c cmp r0, 0                     |     
                                             |     if (r0 == 0) {
    0x00010e50 bne 0x10e90                   |         
    0x00010e54 ldrd r2, r3, [sp, 0x10]       |         __asm ("ldrd r2, r3, [var_10h]");
    0x00010e58 cmp r2, 0x80000000            |         
    0x00010e5c sbcs r1, r3, 0                |         __asm ("sbcs r1, r3, 0");
                                             |         if (r2 >= 0x80000000) {
    0x00010e60 strlt r2, [r4]                |             *(r4) = r2;
                                             |         }
                                             |         if (r2 < 0x80000000) {
    0x00010e64 blt 0x10e94                   |             goto label_0;
                                             |         }
    0x00010e68 strd r2, r3, [sp]             |         __asm ("strd r2, r3, [sp]");
    0x00010e6c ldr r3, [pc, 0x28]            |         r3 = *(0x10e98);
    0x00010e70 str r5, [sp, 8]               |         var_8h = r5;
    0x00010e74 ldr r2, [pc, 0x24]            |         r2 = stderr;
    0x00010e78 ldr r0, [r3]                  |         r0 = *(0x10e98);
    0x00010e7c ldr r1, [pc, 0x20]            |         r1 = "libubi";
    0x00010e80 bl 0x10774                    |         r0 = fprintf (r0, "libubi", r2, r3, r4, r5)
    0x00010e84 bl 0x10810                    |         errno_location ();
    0x00010e88 mov r3, 0x16                  |         r3 = 0x16;
    0x00010e8c str r3, [r0]                  |         *(r0) = r3;
                                             |     }
    0x00010e90 mvn r0, 0                     |     r0 = ~0;
                                             | label_0:
    0x00010e94 add sp, sp, 0x1c              |     
    0x00010e98 pop {r4, r5, pc}              |     
                                             | }
    ; 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/usr/sbin/ubirename @ 0x10f40 */
                                                                 | #include <stdint.h>
                                                                 |  
    ; (fcn) fcn.00010f40 ()                                      | void fcn_00010f40 (int32_t arg1, int32_t arg2) {
                                                                 |     int32_t var_0h;
                                                                 |     int32_t var_4h;
                                                                 |     void * buf;
                                                                 |     int32_t var_10h;
                                                                 |     r0 = arg1;
                                                                 |     r1 = arg2;
    0x00010f40 push {r0, r1, r2, r3, r4, r5, r6, r7, r8, lr}     |     
    0x00010f44 mov r8, r1                                        |     r8 = r1;
    0x00010f48 mov r1, 0                                         |     r1 = 0;
    0x00010f4c mov r5, r0                                        |     r5 = r0;
    0x00010f50 mov r7, r2                                        |     r7 = r2;
    0x00010f54 bl 0x107e0                                        |     r0 = open64 ();
    0x00010f58 cmn r0, 1                                         |     
    0x00010f5c mov r4, r0                                        |     r4 = r0;
                                                                 |     if (r0 == 1) {
    0x00010f60 beq 0x110a8                                       |         goto label_2;
                                                                 |     }
    0x00010f64 mov r2, r7                                        |     r2 = r7;
    0x00010f68 mov r1, r8                                        |     r1 = r8;
    0x00010f6c bl 0x1078c                                        |     r0 = read (r0, r1, r2);
    0x00010f70 cmn r0, 1                                         |     
    0x00010f74 mov r6, r0                                        |     r6 = r0;
                                                                 |     if (r0 != 1) {
    0x00010f78 bne 0x10fd0                                       |         goto label_3;
                                                                 |     }
                                                                 | label_0:
    0x00010f7c bl 0x10810                                        |     errno_location ();
    0x00010f80 ldr r7, [pc, 0x12c]                               |     r7 = *(0x110b0);
    0x00010f84 mov r3, r5                                        |     r3 = r5;
    0x00010f88 ldr r2, [pc, 0x128]                               |     r2 = stderr;
    0x00010f8c ldr r1, [pc, 0x128]                               |     r1 = "libubi";
    0x00010f90 ldr r6, [r0]                                      |     r6 = *(r0);
    0x00010f94 ldr r0, [r7]                                      |     r0 = *(0x110b0);
    0x00010f98 bl 0x10774                                        |     fprintf (r0, "libubi", r2, r3, r4, r5, r6)
    0x00010f9c mov r0, r6                                        |     r0 = r6;
    0x00010fa0 ldr r5, [r7]                                      |     r5 = *(0x110b0);
    0x00010fa4 bl 0x10714                                        |     strerror (r0);
    0x00010fa8 str r6, [sp]                                      |     *(sp) = r6;
    0x00010fac ldr r3, [pc, 0x10c]                               |     r3 = "_s:_error_:_cannot_read___s_";
    0x00010fb0 mov r2, 8                                         |     r2 = 8;
    0x00010fb4 ldr r1, [pc, 0x108]                               |     r1 = *(0x110c0);
    0x00010fb8 str r0, [sp, 4]                                   |     var_4h = r0;
    0x00010fbc mov r0, r5                                        |     r0 = r5;
    0x00010fc0 bl 0x10774                                        |     fprintf (r0, r1, r2, "_s:_error_:_cannot_read___s_", r4, r5, r6)
                                                                 |     do {
    0x00010fc4 mov r0, r4                                        |         r0 = r4;
    0x00010fc8 bl 0x10840                                        |         close (r0);
    0x00010fcc b 0x110a4                                         |         goto label_4;
                                                                 | label_3:
    0x00010fd0 cmp r7, r0                                        |         
                                                                 |         if (r7 != r0) {
    0x00010fd4 bne 0x11000                                       |             goto label_5;
                                                                 |         }
    0x00010fd8 ldr r0, [pc, 0xd4]                                |         
    0x00010fdc mov r3, r5                                        |         r3 = r5;
    0x00010fe0 ldr r2, [pc, 0xd0]                                |         r2 = stderr;
    0x00010fe4 ldr r1, [pc, 0xdc]                                |         r1 = "%*serror %d (%s)\n";
    0x00010fe8 ldr r0, [r0]                                      |         r0 = *(0x110b0);
    0x00010fec bl 0x10774                                        |         r0 = fprintf (r0, "%*serror %d (%s)\n", r2, r3)
                                                                 | label_1:
    0x00010ff0 bl 0x10810                                        |         errno_location ();
    0x00010ff4 mov r3, 0x16                                      |         r3 = 0x16;
    0x00010ff8 str r3, [r0]                                      |         *(r0) = r3;
    0x00010ffc b 0x10fc4                                         |         
                                                                 |     } while (1);
                                                                 | label_5:
    0x00011000 mov r3, 0                                         |     r3 = 0;
    0x00011004 strb r3, [r8, r0]                                 |     *((r8 + r0)) = r3;
    0x00011008 mov r2, 1                                         |     r2 = 1;
    0x0001100c add r1, sp, 0xc                                   |     r1 += buf;
    0x00011010 mov r0, r4                                        |     r0 = r4;
    0x00011014 bl 0x1078c                                        |     r0 = read (r0, r1, r2);
    0x00011018 cmp r0, 1                                         |     
                                                                 |     if (r0 == 1) {
    0x0001101c beq 0x10f7c                                       |         goto label_0;
                                                                 |     }
    0x00011020 cmp r0, 0                                         |     
                                                                 |     if (r0 != 0) {
    0x00011024 beq 0x11048                                       |         
    0x00011028 ldr r0, [pc, 0x84]                                |         
    0x0001102c str r7, [sp]                                      |         *(sp) = r7;
    0x00011030 mov r3, r5                                        |         r3 = r5;
    0x00011034 ldr r2, [pc, 0x7c]                                |         r2 = stderr;
    0x00011038 ldr r1, [pc, 0x8c]                                |         r1 = "_s:_error_:_contents_of___s__is_too_long";
    0x0001103c ldr r0, [r0]                                      |         r0 = *(0x110b0);
    0x00011040 bl 0x10774                                        |         fprintf (r0, "_s:_error_:_contents_of___s__is_too_long", r2, r3)
    0x00011044 b 0x10ff0                                         |         goto label_1;
                                                                 |     }
    0x00011048 mov r0, r4                                        |     r0 = r4;
    0x0001104c bl 0x10840                                        |     r0 = close (r0);
    0x00011050 cmp r0, 0                                         |     
                                                                 |     if (r0 != 0) {
    0x00011054 moveq r4, r6                                      |         r4 = r6;
                                                                 |     }
                                                                 |     if (r0 != 0) {
    0x00011058 beq 0x110a8                                       |         
    0x0001105c bl 0x10810                                        |         errno_location ();
    0x00011060 ldr r6, [pc, 0x4c]                                |         r6 = *(0x110b0);
    0x00011064 mov r3, r5                                        |         r3 = r5;
    0x00011068 ldr r2, [pc, 0x48]                                |         r2 = stderr;
    0x0001106c ldr r1, [pc, 0x5c]                                |         r1 = "%s: error!: file \"%s\" contains too much data (> %d bytes)\n";
    0x00011070 ldr r4, [r0]                                      |         r4 = *(r0);
    0x00011074 ldr r0, [r6]                                      |         r0 = *(0x110b0);
    0x00011078 bl 0x10774                                        |         fprintf (r0, "%s: error!: file \"%s\" contains too much data (> %d bytes)\n", r2, r3, r4, r5, r6)
    0x0001107c mov r0, r4                                        |         r0 = r4;
    0x00011080 ldr r5, [r6]                                      |         r5 = *(0x110b0);
    0x00011084 bl 0x10714                                        |         strerror (r0);
    0x00011088 str r4, [sp]                                      |         *(sp) = r4;
    0x0001108c ldr r3, [pc, 0x2c]                                |         r3 = "_s:_error_:_cannot_read___s_";
    0x00011090 mov r2, 8                                         |         r2 = 8;
    0x00011094 ldr r1, [pc, 0x28]                                |         r1 = *(0x110c0);
    0x00011098 str r0, [sp, 4]                                   |         var_4h = r0;
    0x0001109c mov r0, r5                                        |         r0 = r5;
    0x000110a0 bl 0x10774                                        |         fprintf (r0, r1, r2, "_s:_error_:_cannot_read___s_", r4)
                                                                 | label_4:
    0x000110a4 mvn r4, 0                                         |         r4 = ~0;
                                                                 |     }
                                                                 | label_2:
    0x000110a8 mov r0, r4                                        |     r0 = r4;
    0x000110ac add sp, sp, 0x10                                  |     
    0x000110b0 pop {r4, r5, r6, r7, r8, pc}                      |     
                                                                 | }
    ; 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/usr/sbin/ubirename @ 0x110d4 */
                                                                 | #include <stdint.h>
                                                                 |  
    ; (fcn) fcn.000110d4 ()                                      | void fcn_000110d4 (int32_t arg1, int32_t arg2) {
                                                                 |     int32_t var_0h;
                                                                 |     int32_t var_4h;
                                                                 |     int32_t var_8h;
                                                                 |     r0 = arg1;
                                                                 |     r1 = arg2;
    0x000110d4 push {r0, r1, r4, r5, r6, r7, r8, sb, sl, lr}     |     
    0x000110d8 mov r7, r1                                        |     r7 = r1;
    0x000110dc mov sl, r0                                        |     sl = r0;
    0x000110e0 bl 0x1081c                                        |     r0 = strlen (r0);
    0x000110e4 mov r4, r0                                        |     r4 = r0;
    0x000110e8 mov sb, r0                                        |     sb = r0;
    0x000110ec mov r0, r7                                        |     r0 = r7;
    0x000110f0 bl 0x1081c                                        |     r0 = strlen (r0);
    0x000110f4 add r6, r4, r0                                    |     r6 = r4 + r0;
    0x000110f8 add r6, r6, 2                                     |     r6 += 2;
    0x000110fc mov r8, r0                                        |     r8 = r0;
    0x00011100 mov r0, r6                                        |     r0 = r6;
    0x00011104 bl 0x10744                                        |     r0 = malloc (r0);
    0x00011108 subs r5, r0, 0                                    |     r5 = r0 - 0;
                                                                 |     if (r5 != r0) {
    0x0001110c bne 0x11164                                       |         goto label_0;
                                                                 |     }
    0x00011110 bl 0x10810                                        |     errno_location ();
    0x00011114 ldr r7, [pc, 0x80]                                |     r7 = *(0x11198);
    0x00011118 mov r3, r6                                        |     r3 = r6;
    0x0001111c ldr r2, [pc, 0x7c]                                |     r2 = stderr;
    0x00011120 ldr r1, [pc, 0x7c]                                |     r1 = "libubi";
    0x00011124 ldr r4, [r0]                                      |     r4 = *(r0);
    0x00011128 ldr r0, [r7]                                      |     r0 = *(0x11198);
    0x0001112c bl 0x10774                                        |     fprintf (r0, "libubi", r2, r3, r4)
    0x00011130 mov r0, r4                                        |     r0 = r4;
    0x00011134 ldr r6, [r7]                                      |     r6 = *(0x11198);
    0x00011138 bl 0x10714                                        |     strerror (r0);
    0x0001113c str r4, [sp]                                      |     *(sp) = r4;
    0x00011140 ldr r3, [pc, 0x60]                                |     r3 = "_s:_error_:_cannot_allocate__d_bytes";
    0x00011144 mov r2, 8                                         |     r2 = 8;
    0x00011148 ldr r1, [pc, 0x5c]                                |     r1 = *(0x111a8);
    0x0001114c str r0, [sp, 4]                                   |     var_4h = r0;
    0x00011150 mov r0, r6                                        |     r0 = r6;
    0x00011154 bl 0x10774                                        |     fprintf (r0, r1, r2, "_s:_error_:_cannot_allocate__d_bytes", r4)
                                                                 |     do {
    0x00011158 mov r0, r5                                        |         r0 = r5;
    0x0001115c add sp, sp, 8                                     |         
    0x00011160 pop {r4, r5, r6, r7, r8, sb, sl, pc}              |         
                                                                 | label_0:
    0x00011164 mov r2, r4                                        |         r2 = r4;
    0x00011168 mov r1, sl                                        |         r1 = sl;
    0x0001116c bl 0x10738                                        |         memcpy (r0, r1, r2);
    0x00011170 add r3, r5, r4                                    |         r3 = r5 + r4;
    0x00011174 ldrb r3, [r3, -1]                                 |         r3 = *((r3 - 1));
    0x00011178 add r2, r8, 1                                     |         r2 = r8 + 1;
    0x0001117c cmp r3, 0x2f                                      |         
                                                                 |         if (r3 == 0x2f) {
    0x00011180 addne r4, r4, 1                                   |             r4++;
                                                                 |         }
                                                                 |         if (r3 == 0x2f) {
    0x00011184 movne r3, 0x2f                                    |             r3 = 0x2f;
                                                                 |         }
                                                                 |         if (r3 == 0x2f) {
    0x00011188 strbne r3, [r5, sb]                               |             *((r5 + sb)) = r3;
                                                                 |         }
    0x0001118c mov r1, r7                                        |         r1 = r7;
    0x00011190 add r0, r5, r4                                    |         r0 = r5 + r4;
    0x00011194 bl 0x10738                                        |         memcpy (r0, r1, r2);
    0x00011198 b 0x11158                                         |         
                                                                 |     } while (1);
                                                                 | }
    ; 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/usr/sbin/ubirename @ 0x111b0 */
                                             | #include <stdint.h>
                                             |  
    ; (fcn) fcn.000111b0 ()                  | void fcn_000111b0 (int32_t arg1) {
                                             |     int32_t var_0h;
                                             |     int32_t var_4h;
                                             |     int32_t var_8h;
                                             |     int32_t var_18h;
                                             |     int32_t var_28h;
                                             |     int32_t var_28h_2;
                                             |     int32_t var_74h;
                                             |     r0 = arg1;
    0x000111b0 push {r4, r5, r6, r7, lr}     |     
    0x000111b4 sub sp, sp, 0x74              |     
    0x000111b8 add r1, sp, 8                 |     r1 += var_8h;
    0x000111bc mov r5, r0                    |     r5 = r0;
    0x000111c0 bl 0x10720                    |     r0 = stat64 ();
    0x000111c4 cmp r0, 0                     |     
                                             |     if (r0 >= 0) {
    0x000111c8 bge 0x11220                   |         goto label_2;
                                             |     }
    0x000111cc bl 0x10810                    |     errno_location ();
    0x000111d0 ldr r6, [pc, 0xc8]            |     r6 = *(0x1129c);
    0x000111d4 ldr r2, [pc, 0xc8]            |     r2 = stderr;
    0x000111d8 ldr r1, [pc, 0xc8]            |     r1 = "libubi";
    0x000111dc mov r3, r5                    |     r3 = r5;
    0x000111e0 ldr r4, [r0]                  |     r4 = *(r0);
                                             |     do {
                                             | label_1:
    0x000111e4 ldr r0, [r6]                  |         r0 = *(r6);
    0x000111e8 bl 0x10774                    |         fprintf (r0, "libubi", r2, r3, r4, r5, r6)
    0x000111ec mov r0, r4                    |         r0 = r4;
    0x000111f0 ldr r5, [r6]                  |         r5 = *(r6);
    0x000111f4 bl 0x10714                    |         strerror (r0);
    0x000111f8 str r4, [sp]                  |         *(sp) = r4;
    0x000111fc ldr r3, [pc, 0xa8]            |         r3 = "_s:_error_:_cannot_stat___s_";
    0x00011200 mov r2, 8                     |         r2 = 8;
    0x00011204 ldr r1, [pc, 0xa4]            |         r1 = *(0x112ac);
    0x00011208 str r0, [sp, 4]               |         var_4h = r0;
    0x0001120c mov r0, r5                    |         r0 = r5;
    0x00011210 bl 0x10774                    |         fprintf (r0, r1, r2, "_s:_error_:_cannot_stat___s_", r4)
    0x00011214 mvn r0, 0                     |         r0 = ~0;
                                             | label_0:
    0x00011218 add sp, sp, 0x74              |         
    0x0001121c pop {r4, r5, r6, r7, pc}      |         
                                             | label_2:
    0x00011220 ldr r3, [sp, 0x18]            |         r3 = var_18h;
    0x00011224 and r3, r3, 0xf000            |         r3 &= 0xf000;
    0x00011228 cmp r3, 0x2000                |         
                                             |         if (r3 == 0x2000) {
    0x0001122c beq 0x11250                   |             goto label_3;
                                             |         }
    0x00011230 bl 0x10810                    |         errno_location ();
    0x00011234 mov r4, 0x16                  |         r4 = 0x16;
    0x00011238 ldr r6, [pc, 0x60]            |         r6 = *(0x1129c);
    0x0001123c mov r3, r5                    |         r3 = r5;
    0x00011240 ldr r2, [pc, 0x5c]            |         r2 = stderr;
    0x00011244 ldr r1, [pc, 0x68]            |         r1 = "%*serror %d (%s)\n";
    0x00011248 str r4, [r0]                  |         *(r0) = r4;
    0x0001124c b 0x111e4                     |         
                                             |     } while (1);
                                             | label_3:
    0x00011250 ldrd r6, r7, [sp, 0x28]       |     __asm ("ldrd r6, r7, [var_28h]");
    0x00011254 mov r1, r7                    |     r1 = r7;
    0x00011258 mov r0, r6                    |     r0 = r6;
    0x0001125c bl 0x1072c                    |     gnu_dev_major ();
    0x00011260 mov r1, r7                    |     r1 = r7;
    0x00011264 mov r4, r0                    |     r4 = r0;
    0x00011268 mov r0, r6                    |     r0 = r6;
    0x0001126c bl 0x10750                    |     gnu_dev_minor ();
    0x00011270 cmp r4, 0x5a                  |     
                                             |     if (r4 != 0x5a) {
    0x00011274 addeq r0, r0, r0, lsr 31      |         r0 += (r0 >> 31);
                                             |     }
    0x00011278 asreq r0, r0, 1               |     __asm ("asreq r0, r0, 1");
                                             |     if (r4 == 0x5a) {
    0x0001127c beq 0x11218                   |         goto label_0;
                                             |     }
    0x00011280 bl 0x10810                    |     errno_location ();
    0x00011284 mov r4, 0x16                  |     r4 = 0x16;
    0x00011288 ldr r6, [pc, 0x10]            |     r6 = *(0x1129c);
    0x0001128c mov r3, r5                    |     r3 = r5;
    0x00011290 ldr r2, [pc, 0xc]             |     r2 = stderr;
    0x00011294 ldr r1, [pc, 0x1c]            |     r1 = "_s:_error_:___s__is_not_a_character_device";
    0x00011298 str r4, [r0]                  |     *(r0) = r4;
    0x0001129c b 0x111e4                     |     goto label_1;
                                             | }
    ; 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/usr/sbin/ubirename @ 0x112bc */
                                         | #include <stdint.h>
                                         |  
    ; (fcn) fcn.000112bc ()              | void fcn_000112bc (int32_t arg1, int32_t arg2) {
                                         |     int32_t var_0h;
                                         |     int32_t var_4h;
                                         |     char * s;
                                         |     int32_t var_40h;
                                         |     r0 = arg1;
                                         |     r1 = arg2;
    0x000112bc push {r4, r5, r6, lr}     |     
    0x000112c0 sub sp, sp, 0x40          |     
    0x000112c4 mov r4, r1                |     r4 = r1;
    0x000112c8 mov r5, r2                |     r5 = r2;
    0x000112cc add r1, sp, 0xc           |     r1 += s;
    0x000112d0 mov r2, 0x32              |     r2 = 0x32;
    0x000112d4 mov r6, r0                |     r6 = r0;
    0x000112d8 bl 0x10f40                |     r0 = fcn_00010f40 (r0, r1);
    0x000112dc cmp r0, 0                 |     
                                         |     if (r0 < 0) {
    0x000112e0 blt 0x11328               |         goto label_1;
                                         |     }
    0x000112e4 mov r3, r5                |     r3 = r5;
    0x000112e8 mov r2, r4                |     r2 = r4;
    0x000112ec ldr r1, [pc, 0x8c]        |     r1 = *(0x1137c);
    0x000112f0 add r0, sp, 0xc           |     r0 += s;
    0x000112f4 bl 0x107bc                |     r0 = sscanf (r0, r1, r2);
    0x000112f8 cmp r0, 2                 |     
                                         |     if (r0 == 2) {
    0x000112fc beq 0x11330               |         goto label_2;
                                         |     }
    0x00011300 bl 0x10810                |     errno_location ();
    0x00011304 mov r3, 0x16              |     r3 = 0x16;
    0x00011308 ldr r2, [pc, 0x74]        |     r2 = "%d:%d\n";
    0x0001130c ldr r1, [pc, 0x74]        |     r1 = "libubi";
    0x00011310 str r3, [r0]              |     *(r0) = r3;
    0x00011314 ldr r0, [pc, 0x70]        |     
    0x00011318 mov r3, r6                |     r3 = r6;
    0x0001131c ldr r0, [r0]              |     r0 = "_s:_error_:___s__does_not_have_major:minor_format";
    0x00011320 bl 0x10774                |     fprintf ("_s:_error_:___s__does_not_have_major:minor_format", "libubi", "%d:%d\n", r3)
                                         | label_0:
    0x00011324 mvn r0, 0                 |     r0 = ~0;
                                         |     do {
                                         | label_1:
    0x00011328 add sp, sp, 0x40          |         
    0x0001132c pop {r4, r5, r6, pc}      |         
                                         | label_2:
    0x00011330 ldr r3, [r4]              |         r3 = *(r4);
    0x00011334 cmp r3, 0                 |         
                                         |         if (r3 < 0) {
    0x00011338 blt 0x1134c               |             goto label_3;
                                         |         }
    0x0001133c ldr r3, [r5]              |         r3 = *(r5);
    0x00011340 cmp r3, 0                 |         
                                         |         if (r3 < 0) {
    0x00011344 movge r0, 0               |             r0 = 0;
                                         |         }
    0x00011348 bge 0x11328               |         
                                         |     } while (r3 >= 0);
                                         | label_3:
    0x0001134c bl 0x10810                |     errno_location ();
    0x00011350 mov r3, 0x16              |     r3 = 0x16;
    0x00011354 ldr r2, [pc, 0x28]        |     r2 = "%d:%d\n";
    0x00011358 ldr r1, [pc, 0x30]        |     r1 = stderr;
    0x0001135c str r3, [r0]              |     *(r0) = r3;
    0x00011360 ldr r0, [pc, 0x24]        |     
    0x00011364 ldr r3, [r5]              |     r3 = *(r5);
    0x00011368 str r6, [sp, 4]           |     var_4h = r6;
    0x0001136c str r3, [sp]              |     *(sp) = r3;
    0x00011370 ldr r3, [r4]              |     r3 = *(r4);
    0x00011374 ldr r0, [r0]              |     r0 = "_s:_error_:___s__does_not_have_major:minor_format";
    0x00011378 bl 0x10774                |     fprintf ("_s:_error_:___s__does_not_have_major:minor_format", r1, "%d:%d\n", r3, r4, r5, r6)
    0x0001137c b 0x11324                 |     goto label_0;
                                         | }
    ; 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/usr/sbin/ubirename @ 0x113e8 */
                                                 | #include <stdint.h>
                                                 |  
    ; (fcn) fcn.000113e8 ()                      | void fcn_000113e8 (int32_t arg1) {
                                                 |     int32_t var_0h;
                                                 |     int32_t var_4h;
                                                 |     r0 = arg1;
    0x000113e8 push {r0, r1, r4, r5, r6, lr}     |     
    0x000113ec ldr r5, [pc, 0x50]                |     
    0x000113f0 mov r6, r0                        |     r6 = r0;
    0x000113f4 bl 0x10810                        |     errno_location ();
    0x000113f8 mov r3, r6                        |     r3 = r6;
    0x000113fc ldr r2, [pc, 0x44]                |     r2 = stderr;
    0x00011400 ldr r1, [pc, 0x44]                |     r1 = "libubi";
    0x00011404 ldr r4, [r0]                      |     r4 = *(r0);
    0x00011408 ldr r0, [r5]                      |     r0 = *(0x11440);
    0x0001140c bl 0x10774                        |     fprintf (r0, "libubi", r2, r3, r4)
    0x00011410 mov r0, r4                        |     r0 = r4;
    0x00011414 ldr r5, [r5]                      |     r5 = *(0x11440);
    0x00011418 bl 0x10714                        |     strerror (r0);
    0x0001141c str r4, [sp]                      |     *(sp) = r4;
    0x00011420 ldr r3, [pc, 0x28]                |     r3 = "_s:_error_:_cannot_open___s_";
    0x00011424 mov r2, 8                         |     r2 = 8;
    0x00011428 ldr r1, [pc, 0x24]                |     r1 = *(0x11450);
    0x0001142c str r0, [sp, 4]                   |     var_4h = r0;
    0x00011430 mov r0, r5                        |     r0 = r5;
    0x00011434 bl 0x10774                        |     fprintf (r0, r1, r2, "_s:_error_:_cannot_open___s_", r4)
    0x00011438 mvn r0, 0                         |     r0 = ~0;
    0x0001143c add sp, sp, 8                     |     
    0x00011440 pop {r4, r5, r6, pc}              |     
                                                 | }
    ; 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/usr/sbin/ubirename @ 0x1157c */
                                                         | #include <stdint.h>
                                                         |  
    ; (fcn) fcn.0001157c ()                              | void fcn_0001157c () {
                                                         |     int32_t var_0h;
                                                         |     int32_t var_4h;
                                                         |     int32_t var_ch;
                                                         |     int32_t var_10h;
    0x0001157c push {r0, r1, r2, r3, r4, r5, r6, lr}     |     
    0x00011580 mov r1, 0x68                              |     r1 = 0x68;
    0x00011584 mov r0, 1                                 |     r0 = 1;
    0x00011588 bl 0x10768                                |     r0 = calloc (r0, r1);
    0x0001158c subs r4, r0, 0                            |     r4 = r0 - 0;
                                                         |     if (r4 == r0) {
    0x00011590 beq 0x11600                               |         goto label_1;
                                                         |     }
    0x00011594 ldr r1, [pc, 0x2fc]                       |     r1 = *(0x11894);
    0x00011598 ldr r0, [pc, 0x2fc]                       |     r0 = "class_misc_ubi_ctrl_";
    0x0001159c bl 0x110d4                                |     r0 = fcn_000110d4 ("class_misc_ubi_ctrl_", r1);
    0x000115a0 cmp r0, 0                                 |     
    0x000115a4 str r0, [r4, 4]                           |     *((r4 + 4)) = r0;
                                                         |     if (r0 == 0) {
    0x000115a8 beq 0x115f4                               |         goto label_0;
                                                         |     }
    0x000115ac ldr r1, [pc, 0x2ec]                       |     r1 = "/sys";
    0x000115b0 bl 0x110d4                                |     r0 = fcn_000110d4 (r0, "/sys");
    0x000115b4 cmp r0, 0                                 |     
    0x000115b8 str r0, [r4, 8]                           |     *((r4 + 8)) = r0;
                                                         |     if (r0 == 0) {
    0x000115bc beq 0x115f4                               |         goto label_0;
                                                         |     }
    0x000115c0 ldr r1, [pc, 0x2dc]                       |     r1 = "dev";
    0x000115c4 ldr r0, [pc, 0x2d0]                       |     r0 = "class_misc_ubi_ctrl_";
    0x000115c8 bl 0x110d4                                |     r0 = fcn_000110d4 ("class_misc_ubi_ctrl_", "dev");
    0x000115cc cmp r0, 0                                 |     
    0x000115d0 str r0, [r4, 0xc]                         |     *((r4 + 0xc)) = r0;
                                                         |     if (r0 == 0) {
    0x000115d4 beq 0x115f4                               |         goto label_0;
                                                         |     }
    0x000115d8 mov r1, 0                                 |     r1 = 0;
    0x000115dc bl 0x107e0                                |     r0 = open64 ();
    0x000115e0 cmn r0, 1                                 |     
                                                         |     if (r0 != 1) {
    0x000115e4 bne 0x1160c                               |         goto label_2;
                                                         |     }
    0x000115e8 bl 0x10810                                |     errno_location ();
    0x000115ec mov r3, 0                                 |     r3 = 0;
    0x000115f0 str r3, [r0]                              |     *(r0) = r3;
                                                         |     do {
                                                         | label_0:
    0x000115f4 mov r0, r4                                |         r0 = r4;
    0x000115f8 bl 0x114a8                                |         fcn_000114a8 (r0);
    0x000115fc mov r4, 0                                 |         r4 = 0;
                                                         | label_1:
    0x00011600 mov r0, r4                                |         r0 = r4;
    0x00011604 add sp, sp, 0x10                          |         
    0x00011608 pop {r4, r5, r6, pc}                      |         
                                                         | label_2:
    0x0001160c bl 0x10840                                |         r0 = close (r0);
    0x00011610 cmp r0, 0                                 |         
                                                         |         if (r0 == 0) {
    0x00011614 beq 0x11664                               |             goto label_3;
                                                         |         }
    0x00011618 bl 0x10810                                |         errno_location ();
    0x0001161c ldr r6, [pc, 0x284]                       |         
    0x00011620 ldr r3, [r4, 0xc]                         |         r3 = *((r4 + 0xc));
    0x00011624 ldr r2, [pc, 0x280]                       |         r2 = stderr;
    0x00011628 ldr r1, [pc, 0x280]                       |         r1 = "libubi";
    0x0001162c ldr r5, [r0]                              |         r5 = *(r0);
    0x00011630 ldr r0, [r6]                              |         r0 = "class_ubi";
    0x00011634 bl 0x10774                                |         fprintf ("class_ubi", "libubi", r2, r3, r4, r5, "class_ubi")
    0x00011638 mov r0, r5                                |         r0 = r5;
    0x0001163c ldr r6, [r6]                              |         r6 = "class_ubi";
    0x00011640 bl 0x10714                                |         strerror (r0);
    0x00011644 str r5, [sp]                              |         *(sp) = r5;
    0x00011648 ldr r3, [pc, 0x264]                       |         r3 = "%s: error!: close failed on \"%s\"\n";
    0x0001164c mov r2, 8                                 |         r2 = 8;
    0x00011650 ldr r1, [pc, 0x260]                       |         r1 = *(0x118b4);
    0x00011654 str r0, [sp, 4]                           |         var_4h = r0;
    0x00011658 mov r0, r6                                |         r0 = r6;
    0x0001165c bl 0x10774                                |         fprintf (r0, r1, r2, "%s: error!: close failed on \"%s\"\n", r4, r5)
    0x00011660 b 0x115f4                                 |         
                                                         |     } while (1);
                                                         | label_3:
    0x00011664 ldr r1, [pc, 0x250]                       |     r1 = "%*serror %d (%s)\n";
    0x00011668 ldr r0, [r4, 0xc]                         |     r0 = *((r4 + 0xc));
    0x0001166c bl 0x110d4                                |     r0 = fcn_000110d4 (r0, "%*serror %d (%s)\n");
    0x00011670 cmp r0, 0                                 |     
    0x00011674 str r0, [r4, 0x10]                        |     *((r4 + 0x10)) = r0;
                                                         |     if (r0 == 0) {
    0x00011678 beq 0x115f4                               |         goto label_0;
                                                         |     }
    0x0001167c ldr r1, [pc, 0x23c]                       |     r1 = "ubi_d";
    0x00011680 ldr r0, [r4, 0xc]                         |     r0 = *((r4 + 0xc));
    0x00011684 bl 0x110d4                                |     r0 = fcn_000110d4 (r0, "ubi_d");
    0x00011688 cmp r0, 0                                 |     
    0x0001168c str r0, [r4, 0x14]                        |     *((r4 + 0x14)) = r0;
                                                         |     if (r0 == 0) {
    0x00011690 beq 0x115f4                               |         goto label_0;
                                                         |     }
    0x00011694 ldr r1, [pc, 0x204]                       |     r1 = "/sys";
    0x00011698 ldr r0, [r4, 0x10]                        |     r0 = *((r4 + 0x10));
    0x0001169c bl 0x110d4                                |     r0 = fcn_000110d4 (r0, "/sys");
    0x000116a0 cmp r0, 0                                 |     
    0x000116a4 str r0, [r4, 0x18]                        |     *((r4 + 0x18)) = r0;
                                                         |     if (r0 == 0) {
    0x000116a8 beq 0x115f4                               |         goto label_0;
                                                         |     }
    0x000116ac ldr r1, [pc, 0x210]                       |     r1 = "version";
    0x000116b0 ldr r0, [r4, 0x10]                        |     r0 = *((r4 + 0x10));
    0x000116b4 bl 0x110d4                                |     r0 = fcn_000110d4 (r0, "version");
    0x000116b8 cmp r0, 0                                 |     
    0x000116bc str r0, [r4, 0x1c]                        |     *((r4 + 0x1c)) = r0;
                                                         |     if (r0 == 0) {
    0x000116c0 beq 0x115f4                               |         goto label_0;
                                                         |     }
    0x000116c4 ldr r1, [pc, 0x1fc]                       |     r1 = "avail_eraseblocks";
    0x000116c8 ldr r0, [r4, 0x10]                        |     r0 = *((r4 + 0x10));
    0x000116cc bl 0x110d4                                |     r0 = fcn_000110d4 (r0, "avail_eraseblocks");
    0x000116d0 cmp r0, 0                                 |     
    0x000116d4 str r0, [r4, 0x20]                        |     *((r4 + 0x20)) = r0;
                                                         |     if (r0 == 0) {
    0x000116d8 beq 0x115f4                               |         goto label_0;
                                                         |     }
    0x000116dc ldr r1, [pc, 0x1e8]                       |     r1 = "total_eraseblocks";
    0x000116e0 ldr r0, [r4, 0x10]                        |     r0 = *((r4 + 0x10));
    0x000116e4 bl 0x110d4                                |     r0 = fcn_000110d4 (r0, "total_eraseblocks");
    0x000116e8 cmp r0, 0                                 |     
    0x000116ec str r0, [r4, 0x24]                        |     *((r4 + 0x24)) = r0;
                                                         |     if (r0 == 0) {
    0x000116f0 beq 0x115f4                               |         goto label_0;
                                                         |     }
    0x000116f4 ldr r1, [pc, 0x1d4]                       |     r1 = "bad_peb_count";
    0x000116f8 ldr r0, [r4, 0x10]                        |     r0 = *((r4 + 0x10));
    0x000116fc bl 0x110d4                                |     r0 = fcn_000110d4 (r0, "bad_peb_count");
    0x00011700 cmp r0, 0                                 |     
    0x00011704 str r0, [r4, 0x28]                        |     *((r4 + 0x28)) = r0;
                                                         |     if (r0 == 0) {
    0x00011708 beq 0x115f4                               |         goto label_0;
                                                         |     }
    0x0001170c ldr r1, [pc, 0x1c0]                       |     r1 = "eraseblock_size";
    0x00011710 ldr r0, [r4, 0x10]                        |     r0 = *((r4 + 0x10));
    0x00011714 bl 0x110d4                                |     r0 = fcn_000110d4 (r0, "eraseblock_size");
    0x00011718 cmp r0, 0                                 |     
    0x0001171c str r0, [r4, 0x2c]                        |     *((r4 + 0x2c)) = r0;
                                                         |     if (r0 == 0) {
    0x00011720 beq 0x115f4                               |         goto label_0;
                                                         |     }
    0x00011724 ldr r1, [pc, 0x1ac]                       |     r1 = "max_ec";
    0x00011728 ldr r0, [r4, 0x10]                        |     r0 = *((r4 + 0x10));
    0x0001172c bl 0x110d4                                |     r0 = fcn_000110d4 (r0, "max_ec");
    0x00011730 cmp r0, 0                                 |     
    0x00011734 str r0, [r4, 0x30]                        |     *((r4 + 0x30)) = r0;
                                                         |     if (r0 == 0) {
    0x00011738 beq 0x115f4                               |         goto label_0;
                                                         |     }
    0x0001173c ldr r1, [pc, 0x198]                       |     r1 = "reserved_for_bad";
    0x00011740 ldr r0, [r4, 0x10]                        |     r0 = *((r4 + 0x10));
    0x00011744 bl 0x110d4                                |     r0 = fcn_000110d4 (r0, "reserved_for_bad");
    0x00011748 cmp r0, 0                                 |     
    0x0001174c str r0, [r4, 0x34]                        |     *((r4 + 0x34)) = r0;
                                                         |     if (r0 == 0) {
    0x00011750 beq 0x115f4                               |         goto label_0;
                                                         |     }
    0x00011754 ldr r1, [pc, 0x184]                       |     r1 = "max_vol_count";
    0x00011758 ldr r0, [r4, 0x10]                        |     r0 = *((r4 + 0x10));
    0x0001175c bl 0x110d4                                |     r0 = fcn_000110d4 (r0, "max_vol_count");
    0x00011760 cmp r0, 0                                 |     
    0x00011764 str r0, [r4, 0x38]                        |     *((r4 + 0x38)) = r0;
                                                         |     if (r0 == 0) {
    0x00011768 beq 0x115f4                               |         goto label_0;
                                                         |     }
    0x0001176c ldr r1, [pc, 0x170]                       |     r1 = "min_io_size";
    0x00011770 ldr r0, [r4, 0x10]                        |     r0 = *((r4 + 0x10));
    0x00011774 bl 0x110d4                                |     r0 = fcn_000110d4 (r0, "min_io_size");
    0x00011778 cmp r0, 0                                 |     
    0x0001177c str r0, [r4, 0x3c]                        |     *((r4 + 0x3c)) = r0;
                                                         |     if (r0 == 0) {
    0x00011780 beq 0x115f4                               |         goto label_0;
                                                         |     }
    0x00011784 ldr r1, [pc, 0x15c]                       |     r1 = "mtd_num";
    0x00011788 ldr r0, [r4, 0xc]                         |     r0 = *((r4 + 0xc));
    0x0001178c bl 0x110d4                                |     r0 = fcn_000110d4 (r0, "mtd_num");
    0x00011790 cmp r0, 0                                 |     
    0x00011794 str r0, [r4, 0x40]                        |     *((r4 + 0x40)) = r0;
                                                         |     if (r0 == 0) {
    0x00011798 beq 0x115f4                               |         goto label_0;
                                                         |     }
    0x0001179c ldr r1, [pc, 0x148]                       |     r1 = "ubi_d__d";
    0x000117a0 bl 0x110d4                                |     r0 = fcn_000110d4 (r0, "ubi_d__d");
    0x000117a4 cmp r0, 0                                 |     
    0x000117a8 str r0, [r4, 0x44]                        |     *((r4 + 0x44)) = r0;
                                                         |     if (r0 == 0) {
    0x000117ac beq 0x115f4                               |         goto label_0;
                                                         |     }
    0x000117b0 ldr r1, [pc, 0xe8]                        |     r1 = "/sys";
    0x000117b4 ldr r0, [r4, 0x40]                        |     r0 = *((r4 + 0x40));
    0x000117b8 bl 0x110d4                                |     r0 = fcn_000110d4 (r0, "/sys");
    0x000117bc cmp r0, 0                                 |     
    0x000117c0 str r0, [r4, 0x48]                        |     *((r4 + 0x48)) = r0;
                                                         |     if (r0 == 0) {
    0x000117c4 beq 0x115f4                               |         goto label_0;
                                                         |     }
    0x000117c8 ldr r1, [pc, 0x120]                       |     r1 = "type";
    0x000117cc ldr r0, [r4, 0x40]                        |     r0 = *((r4 + 0x40));
    0x000117d0 bl 0x110d4                                |     r0 = fcn_000110d4 (r0, "type");
    0x000117d4 cmp r0, 0                                 |     
    0x000117d8 str r0, [r4, 0x4c]                        |     *((r4 + 0x4c)) = r0;
                                                         |     if (r0 == 0) {
    0x000117dc beq 0x115f4                               |         goto label_0;
                                                         |     }
    0x000117e0 ldr r1, [pc, 0x10c]                       |     r1 = "alignment";
    0x000117e4 ldr r0, [r4, 0x40]                        |     r0 = *((r4 + 0x40));
    0x000117e8 bl 0x110d4                                |     r0 = fcn_000110d4 (r0, "alignment");
    0x000117ec cmp r0, 0                                 |     
    0x000117f0 str r0, [r4, 0x50]                        |     *((r4 + 0x50)) = r0;
                                                         |     if (r0 == 0) {
    0x000117f4 beq 0x115f4                               |         goto label_0;
                                                         |     }
    0x000117f8 ldr r1, [pc, 0xf8]                        |     r1 = "data_bytes";
    0x000117fc ldr r0, [r4, 0x40]                        |     r0 = *((r4 + 0x40));
    0x00011800 bl 0x110d4                                |     r0 = fcn_000110d4 (r0, "data_bytes");
    0x00011804 cmp r0, 0                                 |     
    0x00011808 str r0, [r4, 0x54]                        |     *((r4 + 0x54)) = r0;
                                                         |     if (r0 == 0) {
    0x0001180c beq 0x115f4                               |         goto label_0;
                                                         |     }
    0x00011810 ldr r1, [pc, 0xe4]                        |     r1 = "reserved_ebs";
    0x00011814 ldr r0, [r4, 0x40]                        |     r0 = *((r4 + 0x40));
    0x00011818 bl 0x110d4                                |     r0 = fcn_000110d4 (r0, "reserved_ebs");
    0x0001181c cmp r0, 0                                 |     
    0x00011820 str r0, [r4, 0x58]                        |     *((r4 + 0x58)) = r0;
                                                         |     if (r0 == 0) {
    0x00011824 beq 0x115f4                               |         goto label_0;
                                                         |     }
    0x00011828 ldr r1, [pc, 0xd0]                        |     r1 = "usable_eb_size";
    0x0001182c ldr r0, [r4, 0x40]                        |     r0 = *((r4 + 0x40));
    0x00011830 bl 0x110d4                                |     r0 = fcn_000110d4 (r0, "usable_eb_size");
    0x00011834 cmp r0, 0                                 |     
    0x00011838 str r0, [r4, 0x5c]                        |     *((r4 + 0x5c)) = r0;
                                                         |     if (r0 == 0) {
    0x0001183c beq 0x115f4                               |         goto label_0;
                                                         |     }
    0x00011840 ldr r1, [pc, 0xbc]                        |     r1 = "corrupted";
    0x00011844 ldr r0, [r4, 0x40]                        |     r0 = *((r4 + 0x40));
    0x00011848 bl 0x110d4                                |     r0 = fcn_000110d4 (r0, "corrupted");
    0x0001184c cmp r0, 0                                 |     
    0x00011850 str r0, [r4, 0x60]                        |     *((r4 + 0x60)) = r0;
                                                         |     if (r0 == 0) {
    0x00011854 beq 0x115f4                               |         goto label_0;
                                                         |     }
    0x00011858 add r1, sp, 0xc                           |     r1 += var_ch;
    0x0001185c ldr r0, [r4, 0x14]                        |     r0 = *((r4 + 0x14));
    0x00011860 bl 0x10e34                                |     r0 = fcn_00010e34 (r0, r1);
    0x00011864 cmp r0, 0                                 |     
                                                         |     if (r0 != 0) {
    0x00011868 bne 0x115f4                               |         goto label_0;
                                                         |     }
    0x0001186c ldr r3, [sp, 0xc]                         |     r3 = var_ch;
    0x00011870 cmp r3, 1                                 |     
                                                         |     if (r3 == 1) {
    0x00011874 beq 0x11600                               |         goto label_1;
                                                         |     }
    0x00011878 ldr r0, [pc, 0x28]                        |     
    0x0001187c str r3, [sp]                              |     *(sp) = r3;
    0x00011880 ldr r2, [pc, 0x24]                        |     r2 = stderr;
    0x00011884 mov r3, 1                                 |     r3 = 1;
    0x00011888 ldr r1, [pc, 0x78]                        |     r1 = "name";
    0x0001188c ldr r0, [r0]                              |     r0 = "class_ubi";
    0x00011890 bl 0x10774                                |     fprintf ("class_ubi", "name", r2, r3)
    0x00011894 b 0x115f4                                 |     goto label_0;
                                                         | }
    ; 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/usr/sbin/ubirename @ 0x11a38 */
                                                             | #include <stdint.h>
                                                             |  
    ; (fcn) fcn.00011a38 ()                                  | void fcn_00011a38 (int32_t arg1, void * s) {
                                                             |     int32_t var_0h;
                                                             |     int32_t var_4h;
                                                             |     int32_t var_ch;
                                                             |     int32_t var_10h;
                                                             |     int32_t var_110h;
                                                             |     r0 = arg1;
                                                             |     r1 = s;
    0x00011a38 push {r4, r5, r6, r7, r8, sb, sl, lr}         |     
    0x00011a3c mov r4, r1                                    |     r4 = r1;
    0x00011a40 sub sp, sp, 0x110                             |     
    0x00011a44 mov r5, r0                                    |     r5 = r0;
    0x00011a48 mov r2, 0x18                                  |     r2 = 0x18;
    0x00011a4c mov r1, 0                                     |     r1 = 0;
    0x00011a50 mov r0, r4                                    |     r0 = r4;
    0x00011a54 bl 0x107d4                                    |     memset (r0, r1, r2);
    0x00011a58 add r2, r4, 0x14                              |     r2 = r4 + 0x14;
    0x00011a5c add r1, r4, 0x10                              |     r1 = r4 + 0x10;
    0x00011a60 ldr r0, [r5, 8]                               |     r0 = *((r5 + 8));
    0x00011a64 bl 0x112bc                                    |     r0 = fcn_000112bc (r0, r1);
    0x00011a68 cmp r0, 0                                     |     
                                                             |     if (r0 == 0) {
    0x00011a6c mvnne r3, 0                                   |         r3 = ~0;
                                                             |     }
                                                             |     if (r0 == 0) {
    0x00011a70 strne r3, [r4, 0x14]                          |         *((r4 + 0x14)) = r3;
                                                             |     }
                                                             |     if (r0 == 0) {
    0x00011a74 strne r3, [r4, 0x10]                          |         *((r4 + 0x10)) = r3;
                                                             |     }
    0x00011a78 ldr r0, [r5, 0xc]                             |     r0 = *((r5 + 0xc));
    0x00011a7c bl 0x107ec                                    |     r0 = opendir ();
    0x00011a80 subs r8, r0, 0                                |     r8 = r0 - 0;
                                                             |     if (r8 == r0) {
    0x00011a84 beq 0x11be4                                   |         goto label_2;
                                                             |     }
    0x00011a88 mvn r3, 0x80000000                            |     r3 = ~0x80000000;
    0x00011a8c str r3, [r4, 4]                               |     *((r4 + 4)) = r3;
    0x00011a90 bl 0x10810                                    |     errno_location ();
    0x00011a94 ldr sl, [pc, 0x17c]                           |     sl = "ubi%d%s";
    0x00011a98 mov sb, 0                                     |     sb = 0;
    0x00011a9c mov r7, r0                                    |     r7 = r0;
                                                             |     do {
                                                             | label_0:
    0x00011aa0 str sb, [r7]                                  |         *(r7) = sb;
    0x00011aa4 mov r0, r8                                    |         r0 = r8;
    0x00011aa8 bl 0x107b0                                    |         r0 = readdir64 ();
    0x00011aac cmp r0, 0                                     |         
                                                             |         if (r0 == 0) {
    0x00011ab0 beq 0x11b40                                   |             goto label_3;
                                                             |         }
    0x00011ab4 add r6, r0, 0x13                              |         r6 = r0 + 0x13;
    0x00011ab8 mov r0, r6                                    |         r0 = r6;
    0x00011abc bl 0x1081c                                    |         r0 = strlen (r0);
    0x00011ac0 cmp r0, 0xfe                                  |         
                                                             |         if (r0 >= 0xfe) {
    0x00011ac4 bls 0x11af8                                   |             
    0x00011ac8 ldr r0, [pc, 0x14c]                           |             
    0x00011acc str r6, [sp]                                  |             *(sp) = r6;
    0x00011ad0 ldr r2, [pc, 0x148]                           |             r2 = stderr;
    0x00011ad4 ldr r3, [r5, 0xc]                             |             r3 = *((r5 + 0xc));
    0x00011ad8 ldr r1, [pc, 0x144]                           |             r1 = "libubi";
    0x00011adc ldr r0, [r0]                                  |             r0 = "ubi%d%s";
    0x00011ae0 bl 0x10774                                    |             fprintf ("ubi%d%s", "libubi", r2, r3, r4, r5, r6)
    0x00011ae4 mov r3, 0x16                                  |             r3 = 0x16;
    0x00011ae8 str r3, [r7]                                  |             *(r7) = r3;
                                                             | label_1:
    0x00011aec mov r0, r8                                    |             r0 = r8;
    0x00011af0 bl 0x10828                                    |             closedir ();
    0x00011af4 b 0x11be4                                     |             goto label_2;
                                                             |         }
    0x00011af8 add r3, sp, 0x10                              |         r3 += var_10h;
    0x00011afc add r2, sp, 0xc                               |         r2 += var_ch;
    0x00011b00 mov r1, sl                                    |         r1 = sl;
    0x00011b04 mov r0, r6                                    |         r0 = r6;
    0x00011b08 bl 0x107bc                                    |         r0 = sscanf (r0, r1, r2);
    0x00011b0c cmp r0, 1                                     |         
    0x00011b10 bne 0x11aa0                                   |         
                                                             |     } while (r0 != 1);
    0x00011b14 ldr r3, [r4]                                  |     r3 = *(r4);
    0x00011b18 ldr r2, [r4, 8]                               |     r2 = *((r4 + 8));
    0x00011b1c add r3, r3, 1                                 |     r3++;
    0x00011b20 str r3, [r4]                                  |     *(r4) = r3;
    0x00011b24 ldr r3, [sp, 0xc]                             |     r3 = var_ch;
    0x00011b28 cmp r2, r3                                    |     
    0x00011b2c ldr r2, [r4, 4]                               |     r2 = *((r4 + 4));
                                                             |     if (r2 >= r3) {
    0x00011b30 strlt r3, [r4, 8]                             |         *((r4 + 8)) = r3;
                                                             |     }
    0x00011b34 cmp r3, r2                                    |     
                                                             |     if (r3 >= r2) {
    0x00011b38 strlt r3, [r4, 4]                             |         *((r4 + 4)) = r3;
                                                             |     }
    0x00011b3c b 0x11aa0                                     |     goto label_0;
                                                             | label_3:
    0x00011b40 ldr r6, [r7]                                  |     r6 = *(r7);
    0x00011b44 cmp r6, 0                                     |     
                                                             |     if (r6 != 0) {
    0x00011b48 beq 0x11b90                                   |         
    0x00011b4c ldr r4, [pc, 0xc8]                            |         
    0x00011b50 ldr r3, [r5, 0xc]                             |         r3 = *((r5 + 0xc));
    0x00011b54 ldr r2, [pc, 0xc4]                            |         r2 = stderr;
    0x00011b58 ldr r1, [pc, 0xc8]                            |         r1 = "_s:_error_:_invalid_entry_in__s:___s_";
    0x00011b5c ldr r0, [r4]                                  |         r0 = "ubi%d%s";
    0x00011b60 bl 0x10774                                    |         fprintf ("ubi%d%s", "_s:_error_:_invalid_entry_in__s:___s_", r2, r3, "ubi%d%s")
    0x00011b64 mov r0, r6                                    |         r0 = r6;
    0x00011b68 ldr r4, [r4]                                  |         r4 = "ubi%d%s";
    0x00011b6c bl 0x10714                                    |         strerror (r0);
    0x00011b70 str r6, [sp]                                  |         *(sp) = r6;
    0x00011b74 ldr r3, [pc, 0xb0]                            |         r3 = "%s: error!: readdir failed on \"%s\"\n";
    0x00011b78 mov r2, 8                                     |         r2 = 8;
    0x00011b7c ldr r1, [pc, 0xac]                            |         r1 = *(0x11c2c);
    0x00011b80 str r0, [sp, 4]                               |         var_4h = r0;
    0x00011b84 mov r0, r4                                    |         r0 = r4;
    0x00011b88 bl 0x10774                                    |         fprintf (r0, r1, r2, "%s: error!: readdir failed on \"%s\"\n", r4, r5, r6)
    0x00011b8c b 0x11aec                                     |         goto label_1;
                                                             |     }
    0x00011b90 mov r0, r8                                    |     r0 = r8;
    0x00011b94 bl 0x10828                                    |     r0 = closedir ();
    0x00011b98 cmp r0, 0                                     |     
                                                             |     if (r0 != 0) {
    0x00011b9c beq 0x11bec                                   |         
    0x00011ba0 ldr r6, [pc, 0x74]                            |         r6 = "ubi%d%s";
    0x00011ba4 ldr r4, [r7]                                  |         r4 = *(r7);
    0x00011ba8 ldr r3, [r5, 0xc]                             |         r3 = *((r5 + 0xc));
    0x00011bac ldr r2, [pc, 0x6c]                            |         r2 = stderr;
    0x00011bb0 ldr r1, [pc, 0x7c]                            |         r1 = "%*serror %d (%s)\n";
    0x00011bb4 ldr r0, [r6]                                  |         r0 = "ubi%d%s";
    0x00011bb8 bl 0x10774                                    |         fprintf ("ubi%d%s", "%*serror %d (%s)\n", r2, r3, r4, r5, "ubi%d%s")
    0x00011bbc mov r0, r4                                    |         r0 = r4;
    0x00011bc0 ldr r5, [r6]                                  |         r5 = "ubi%d%s";
    0x00011bc4 bl 0x10714                                    |         strerror (r0);
    0x00011bc8 str r4, [sp]                                  |         *(sp) = r4;
    0x00011bcc ldr r3, [pc, 0x58]                            |         r3 = "%s: error!: readdir failed on \"%s\"\n";
    0x00011bd0 mov r2, 8                                     |         r2 = 8;
    0x00011bd4 ldr r1, [pc, 0x54]                            |         r1 = *(0x11c2c);
    0x00011bd8 str r0, [sp, 4]                               |         var_4h = r0;
    0x00011bdc mov r0, r5                                    |         r0 = r5;
    0x00011be0 bl 0x10774                                    |         fprintf (r0, r1, r2, "%s: error!: readdir failed on \"%s\"\n", r4)
                                                             | label_2:
    0x00011be4 mvn r0, 0                                     |         r0 = ~0;
    0x00011be8 b 0x11c10                                     |         
                                                             |     } else {
    0x00011bec ldr r3, [r4, 4]                               |         r3 = *((r4 + 4));
    0x00011bf0 add r1, r4, 0xc                               |         r1 = r4 + 0xc;
    0x00011bf4 cmn r3, 0x80000001                            |         
                                                             |         if (r3 != 0x80000001) {
    0x00011bf8 streq r0, [r4, 4]                             |             *((r4 + 4)) = r0;
                                                             |         }
    0x00011bfc ldr r0, [r5, 0x14]                            |         r0 = *((r5 + 0x14));
    0x00011c00 bl 0x10e34                                    |         r0 = fcn_00010e34 (r0, r1);
    0x00011c04 adds r0, r0, 0                                |         r0 += 0;
                                                             |         if (r0 == r0) {
    0x00011c08 movne r0, 1                                   |             r0 = 1;
                                                             |         }
    0x00011c0c rsb r0, r0, 0                                 |         r0 -= ;
                                                             |     }
    0x00011c10 add sp, sp, 0x110                             |     
    0x00011c14 pop {r4, r5, r6, r7, r8, sb, sl, pc}          |     
                                                             | }
    ; 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/usr/sbin/ubirename @ 0x11d68 */
                                                             | #include <stdint.h>
                                                             |  
                                                             | #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
                                                             |  
    ; (fcn) fcn.00011d68 ()                                  | void fcn_00011d68 (int32_t arg2, char * s) {
                                                             |     int32_t var_b4h;
                                                             |     int32_t var_ach;
                                                             |     int32_t var_a8h;
                                                             |     int32_t var_a4h;
                                                             |     int32_t var_a0h;
                                                             |     int32_t var_9ch;
                                                             |     int32_t var_8ch;
                                                             |     int32_t var_7ch;
                                                             |     int32_t var_6ch;
                                                             |     int32_t var_0h;
                                                             |     int32_t var_4h;
                                                             |     int32_t var_sp_b4h;
                                                             |     int32_t var_sp_6ch;
                                                             |     int32_t var_20h_2;
                                                             |     int32_t var_20h;
                                                             |     r1 = arg2;
                                                             |     r0 = s;
    0x00011d68 push {r4, r5, r6, r7, r8, sb, sl, fp, lr}     |     
    0x00011d6c add fp, sp, 0x20                              |     
    0x00011d70 sub sp, sp, 0x9c                              |     
    0x00011d74 mov r6, r0                                    |     r6 = r0;
    0x00011d78 ldr r0, [r0, 0x40]                            |     r0 = *((r0 + 0x40));
    0x00011d7c mov r5, r1                                    |     r5 = r1;
    0x00011d80 bl 0x1081c                                    |     strlen (r0);
    0x00011d84 sub r1, fp, 0x8c                              |     r1 -= var_8ch;
    0x00011d88 add r0, r0, 0x6b                              |     r0 += 0x6b;
    0x00011d8c bic r0, r0, 7                                 |     r0 = BIT_MASK (r0, 7);
    0x00011d90 sub sp, sp, r0                                |     
    0x00011d94 mov r0, r5                                    |     r0 = r5;
    0x00011d98 bl 0x10720                                    |     r0 = stat64 ();
    0x00011d9c cmp r0, 0                                     |     
                                                             |     if (r0 == 0) {
    0x00011da0 beq 0x11df8                                   |         goto label_5;
                                                             |     }
    0x00011da4 bl 0x10810                                    |     errno_location ();
    0x00011da8 ldr r6, [pc, 0x1e8]                           |     r6 = *(0x11f94);
    0x00011dac mov r3, r5                                    |     r3 = r5;
    0x00011db0 ldr r2, [pc, 0x1e4]                           |     r2 = stderr;
    0x00011db4 ldr r1, [pc, 0x1e4]                           |     r1 = "libubi";
    0x00011db8 ldr r4, [r0]                                  |     r4 = *(r0);
    0x00011dbc ldr r0, [r6]                                  |     r0 = *(0x11f94);
    0x00011dc0 bl 0x10774                                    |     fprintf (r0, "libubi", r2, r3, r4, r5, r6)
    0x00011dc4 mov r0, r4                                    |     r0 = r4;
    0x00011dc8 ldr r5, [r6]                                  |     r5 = *(0x11f94);
    0x00011dcc bl 0x10714                                    |     strerror (r0);
    0x00011dd0 str r4, [sp]                                  |     *(sp) = r4;
    0x00011dd4 ldr r3, [pc, 0x1c8]                           |     r3 = "_s:_error_:_cannot_get_information_about___s_";
    0x00011dd8 mov r2, 8                                     |     r2 = 8;
    0x00011ddc ldr r1, [pc, 0x1c4]                           |     r1 = *(0x11fa4);
    0x00011de0 str r0, [sp, 4]                               |     var_4h = r0;
    0x00011de4 mov r0, r5                                    |     r0 = r5;
    0x00011de8 bl 0x10774                                    |     fprintf (r0, r1, r2, "_s:_error_:_cannot_get_information_about___s_", r4)
                                                             |     do {
                                                             | label_0:
    0x00011dec mvn r0, 0                                     |         r0 = ~0;
                                                             | label_4:
    0x00011df0 sub sp, fp, 0x20                              |         
    0x00011df4 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc}      |         
                                                             | label_5:
    0x00011df8 ldr r3, [fp, -0x7c]                           |         r3 = var_7ch;
    0x00011dfc and r3, r3, 0xf000                            |         r3 &= 0xf000;
    0x00011e00 cmp r3, 0x2000                                |         
                                                             |         if (r3 == 0x2000) {
    0x00011e04 beq 0x11e30                                   |             goto label_6;
                                                             |         }
    0x00011e08 ldr r0, [pc, 0x188]                           |         
    0x00011e0c mov r3, r5                                    |         r3 = r5;
    0x00011e10 ldr r2, [pc, 0x184]                           |         r2 = stderr;
    0x00011e14 ldr r1, [pc, 0x190]                           |         r1 = "%*serror %d (%s)\n";
    0x00011e18 ldr r0, [r0]                                  |         r0 = *(0x11f94);
    0x00011e1c bl 0x10774                                    |         r0 = fprintf (r0, "%*serror %d (%s)\n", r2, r3)
    0x00011e20 bl 0x10810                                    |         errno_location ();
    0x00011e24 mov r3, 0x16                                  |         r3 = 0x16;
                                                             | label_1:
    0x00011e28 str r3, [r0]                                  |         *(r0) = r3;
    0x00011e2c b 0x11dec                                     |         
                                                             |     } while (1);
                                                             | label_6:
    0x00011e30 ldrd r2, r3, [fp, -0x6c]                      |     __asm ("ldrd r2, r3, [var_6ch]");
    0x00011e34 mov r1, r3                                    |     r1 = r3;
    0x00011e38 mov r0, r2                                    |     r0 = r2;
    0x00011e3c strd r2, r3, [fp, -0xb4]                      |     __asm ("strd r2, r3, [var_b4h]");
    0x00011e40 bl 0x1072c                                    |     gnu_dev_major ();
    0x00011e44 ldrd r2, r3, [fp, -0xb4]                      |     __asm ("ldrd r2, r3, [var_b4h]");
    0x00011e48 mov r1, r3                                    |     r1 = r3;
    0x00011e4c mov sb, r0                                    |     sb = r0;
    0x00011e50 mov r0, r2                                    |     r0 = r2;
    0x00011e54 bl 0x10750                                    |     gnu_dev_minor ();
    0x00011e58 sub r1, fp, 0xa4                              |     r1 -= var_a4h;
    0x00011e5c mov r7, r0                                    |     r7 = r0;
    0x00011e60 mov r0, r6                                    |     r0 = r6;
    0x00011e64 bl 0x11a38                                    |     r0 = fcn_00011a38 (r0, r1);
    0x00011e68 cmp r0, 0                                     |     
                                                             |     if (r0 != 0) {
    0x00011e6c addeq r8, sp, 8                               |         r8 += var_b4h;
                                                             |     }
                                                             |     if (r0 != 0) {
    0x00011e70 ldreq r4, [fp, -0xa0]                         |         r4 = var_a0h;
                                                             |     }
                                                             |     if (r0 == 0) {
    0x00011e74 addeq sl, r6, 0x18                            |         sl = r6 + 0x18;
                                                             |         goto label_7;
                                                             |     }
                                                             |     if (r0 != 0) {
                                                             | label_7:
    0x00011e78 bne 0x11dec                                   |         goto label_0;
                                                             |     }
                                                             |     do {
    0x00011e7c ldr r3, [fp, -0x9c]                           |         r3 = var_9ch;
    0x00011e80 cmp r4, r3                                    |         
                                                             |         if (r4 > r3) {
    0x00011e84 bgt 0x11efc                                   |             goto label_8;
                                                             |         }
    0x00011e88 sub r3, fp, 0xa8                              |         r3 -= var_a8h;
    0x00011e8c sub r2, fp, 0xac                              |         r2 -= var_ach;
    0x00011e90 mov r1, r4                                    |         r1 = r4;
    0x00011e94 mov r0, sl                                    |         r0 = sl;
    0x00011e98 bl 0x11394                                    |         r0 = fcn_00011394 (r0, r1);
    0x00011e9c cmp r0, 0                                     |         
                                                             |         if (r0 == 0) {
    0x00011ea0 beq 0x11ef0                                   |             goto label_9;
                                                             |         }
    0x00011ea4 bl 0x10810                                    |         r0 = errno_location ();
    0x00011ea8 ldr r3, [r0]                                  |         r3 = *(r0);
    0x00011eac cmp r3, 2                                     |         
                                                             |         if (r3 != 2) {
    0x00011eb0 bne 0x11ebc                                   |             goto label_10;
                                                             |         }
                                                             | label_2:
    0x00011eb4 add r4, r4, 1                                 |         r4++;
    0x00011eb8 b 0x11e7c                                     |         
                                                             |     } while (1);
                                                             | label_10:
    0x00011ebc cmp r3, 0                                     |     
                                                             |     if (r3 != 0) {
    0x00011ec0 bne 0x11dec                                   |         goto label_0;
                                                             |     }
                                                             | label_3:
    0x00011ec4 ldr r0, [pc, 0xcc]                            |     
    0x00011ec8 mov r3, r5                                    |     r3 = r5;
    0x00011ecc str r7, [sp, 4]                               |     var_4h = r7;
    0x00011ed0 str sb, [sp]                                  |     *(sp) = sb;
    0x00011ed4 ldr r2, [pc, 0xc0]                            |     r2 = stderr;
    0x00011ed8 ldr r1, [pc, 0xd0]                            |     r1 = "_s:_error_:___s__is_not_a_character_device";
    0x00011edc ldr r0, [r0]                                  |     r0 = *(0x11f94);
    0x00011ee0 bl 0x10774                                    |     r0 = fprintf (r0, "_s:_error_:___s__is_not_a_character_device", r2, r3)
    0x00011ee4 bl 0x10810                                    |     errno_location ();
    0x00011ee8 mov r3, 0x13                                  |     r3 = 0x13;
    0x00011eec b 0x11e28                                     |     goto label_1;
                                                             | label_9:
    0x00011ef0 ldr r3, [fp, -0xac]                           |     r3 = var_ach;
    0x00011ef4 cmp r3, sb                                    |     
                                                             |     if (r3 != sb) {
    0x00011ef8 bne 0x11eb4                                   |         goto label_2;
                                                             |     }
                                                             | label_8:
    0x00011efc ldr r3, [fp, -0x9c]                           |     r3 = var_9ch;
    0x00011f00 cmp r4, r3                                    |     
                                                             |     if (r4 > r3) {
    0x00011f04 bgt 0x11ec4                                   |         goto label_3;
                                                             |     }
    0x00011f08 cmp r7, 0                                     |     
                                                             |     if (r7 == 0) {
    0x00011f0c moveq r0, 1                                   |         r0 = 1;
                                                             |         goto label_11;
                                                             |     }
                                                             |     if (r7 == 0) {
                                                             | label_11:
    0x00011f10 beq 0x11df0                                   |         goto label_4;
                                                             |     }
    0x00011f14 sub r3, r7, 1                                 |     r3 = r7 - 1;
    0x00011f18 mov r2, r4                                    |     r2 = r4;
    0x00011f1c ldr r1, [r6, 0x40]                            |     r1 = *((r6 + 0x40));
    0x00011f20 mov r0, r8                                    |     r0 = r8;
    0x00011f24 bl 0x10804                                    |     sprintf (r0, r1, r2);
    0x00011f28 mov r1, 0                                     |     r1 = 0;
    0x00011f2c mov r0, r8                                    |     r0 = r8;
    0x00011f30 bl 0x107e0                                    |     r0 = open64 ();
    0x00011f34 cmn r0, 1                                     |     
                                                             |     if (r0 == 1) {
    0x00011f38 beq 0x11ec4                                   |         goto label_3;
                                                             |     }
    0x00011f3c bl 0x10840                                    |     r0 = close (r0);
    0x00011f40 cmp r0, 0                                     |     
                                                             |     if (r0 != 0) {
    0x00011f44 beq 0x11f90                                   |         
    0x00011f48 bl 0x10810                                    |         errno_location ();
    0x00011f4c ldr r5, [pc, 0x44]                            |         
    0x00011f50 mov r3, r8                                    |         r3 = r8;
    0x00011f54 ldr r2, [pc, 0x40]                            |         r2 = stderr;
    0x00011f58 ldr r1, [pc, 0x54]                            |         r1 = "%s: error!: \"%s\" has major:minor %d:%d, but this does not correspond to any existing UBI device or volume\n";
    0x00011f5c ldr r4, [r0]                                  |         r4 = *(r0);
    0x00011f60 ldr r0, [r5]                                  |         r0 = *(0x11f94);
    0x00011f64 bl 0x10774                                    |         fprintf (r0, "%s: error!: \"%s\" has major:minor %d:%d, but this does not correspond to any existing UBI device or volume\n", r2, r3, r4, r5)
    0x00011f68 mov r0, r4                                    |         r0 = r4;
    0x00011f6c ldr r5, [r5]                                  |         r5 = *(0x11f94);
    0x00011f70 bl 0x10714                                    |         strerror (r0);
    0x00011f74 str r4, [sp]                                  |         *(sp) = r4;
    0x00011f78 ldr r3, [pc, 0x24]                            |         r3 = "_s:_error_:_cannot_get_information_about___s_";
    0x00011f7c mov r2, 8                                     |         r2 = 8;
    0x00011f80 ldr r1, [pc, 0x20]                            |         r1 = *(0x11fa4);
    0x00011f84 str r0, [sp, 4]                               |         var_4h = r0;
    0x00011f88 mov r0, r5                                    |         r0 = r5;
    0x00011f8c bl 0x10774                                    |         fprintf (r0, r1, r2, "_s:_error_:_cannot_get_information_about___s_", r4)
                                                             |     }
    0x00011f90 mov r0, 2                                     |     r0 = 2;
    0x00011f94 b 0x11df0                                     |     goto label_4;
                                                             | }
    ; 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/usr/sbin/ubirename @ 0x123c4 */
                                                             | #include <stdint.h>
                                                             |  
                                                             | #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
                                                             |  
    ; (fcn) fcn.000123c4 ()                                  | void fcn_000123c4 (int32_t arg1, int32_t arg2) {
                                                             |     int32_t var_128h;
                                                             |     int32_t var_124h;
                                                             |     int32_t var_0h;
                                                             |     int32_t var_4h;
                                                             |     char * s;
                                                             |     int32_t var_20h_2;
                                                             |     int32_t var_20h;
                                                             |     r0 = arg1;
                                                             |     r1 = arg2;
    0x000123c4 push {r4, r5, r6, r7, r8, sb, sl, fp, lr}     |     
    0x000123c8 add sl, r2, 4                                 |     sl = r2 + 4;
    0x000123cc add fp, sp, 0x20                              |     
    0x000123d0 sub sp, sp, 0x114                             |     
    0x000123d4 mov r6, r1                                    |     r6 = r1;
    0x000123d8 mov r5, r0                                    |     r5 = r0;
    0x000123dc mov r4, r2                                    |     r4 = r2;
    0x000123e0 mov r1, 0                                     |     r1 = 0;
    0x000123e4 mov r2, 0x54                                  |     r2 = 0x54;
    0x000123e8 mov r0, sl                                    |     r0 = sl;
    0x000123ec bl 0x107d4                                    |     memset (r0, r1, r2);
    0x000123f0 str r6, [r4]                                  |     *(r4) = r6;
    0x000123f4 mov r1, r6                                    |     r1 = r6;
    0x000123f8 mov r0, r5                                    |     r0 = r5;
    0x000123fc bl 0x12370                                    |     r0 = fcn_00012370 (r0, r1);
    0x00012400 cmp r0, 0                                     |     
    0x00012404 bne 0x12410                                   |     
                                                             |     while (r8 == r0) {
                                                             | label_0:
    0x00012408 mvn r0, 0                                     |         r0 = ~0;
    0x0001240c b 0x126d4                                     |         goto label_3;
    0x00012410 ldr r0, [r5, 0xc]                             |         r0 = *((r5 + 0xc));
    0x00012414 bl 0x107ec                                    |         r0 = opendir ();
    0x00012418 subs r8, r0, 0                                |         r8 = r0 - 0;
    0x0001241c beq 0x12408                                   |         
                                                             |     }
    0x00012420 mvn r3, 0x80000000                            |     r3 = ~0x80000000;
    0x00012424 str r3, [r4, 0xc]                             |     *((r4 + 0xc)) = r3;
    0x00012428 bl 0x10810                                    |     r0 = errno_location ();
    0x0001242c mov sb, r0                                    |     sb = r0;
                                                             |     do {
                                                             | label_1:
    0x00012430 mov r3, 0                                     |         r3 = 0;
    0x00012434 str r3, [sb]                                  |         *(sb) = r3;
    0x00012438 mov r0, r8                                    |         r0 = r8;
    0x0001243c bl 0x107b0                                    |         r0 = readdir64 ();
    0x00012440 cmp r0, 0                                     |         
                                                             |         if (r0 == 0) {
    0x00012444 beq 0x124e0                                   |             goto label_4;
                                                             |         }
    0x00012448 add r7, r0, 0x13                              |         r7 = r0 + 0x13;
    0x0001244c mov r0, r7                                    |         r0 = r7;
    0x00012450 bl 0x1081c                                    |         r0 = strlen (r0);
    0x00012454 cmp r0, 0xfe                                  |         
                                                             |         if (r0 >= 0xfe) {
    0x00012458 bls 0x12484                                   |             
    0x0001245c ldr r0, [pc, 0x278]                           |             
    0x00012460 str r7, [sp]                                  |             *(sp) = r7;
    0x00012464 ldr r2, [pc, 0x274]                           |             r2 = stderr;
    0x00012468 ldr r3, [r5, 0xc]                             |             r3 = *((r5 + 0xc));
    0x0001246c ldr r1, [pc, 0x270]                           |             r1 = "libubi";
    0x00012470 ldr r0, [r0]                                  |             r0 = *(0x126d8);
    0x00012474 bl 0x10774                                    |             fprintf (r0, "libubi", r2, r3)
                                                             | label_2:
    0x00012478 mov r0, r8                                    |             r0 = r8;
    0x0001247c bl 0x10828                                    |             closedir ();
    0x00012480 b 0x12408                                     |             goto label_0;
                                                             |         }
    0x00012484 sub r3, fp, 0x124                             |         r3 -= var_124h;
    0x00012488 str r3, [sp]                                  |         *(sp) = r3;
    0x0001248c sub r2, fp, 0x128                             |         r2 -= var_128h;
    0x00012490 sub r3, fp, 0x12c                             |         r3 -= s;
    0x00012494 ldr r1, [pc, 0x24c]                           |         r1 = "_s:_error_:_invalid_entry_in__s:___s_";
    0x00012498 mov r0, r7                                    |         r0 = r7;
    0x0001249c bl 0x107bc                                    |         r0 = sscanf (r0, "_s:_error_:_invalid_entry_in__s:___s_", r2);
    0x000124a0 cmp r0, 2                                     |         
    0x000124a4 bne 0x12430                                   |         
                                                             |     } while (r0 != 2);
    0x000124a8 ldr r3, [fp, -0x128]                          |     r3 = var_128h;
    0x000124ac cmp r3, r6                                    |     
                                                             |     if (r3 != r6) {
    0x000124b0 bne 0x12430                                   |         goto label_1;
                                                             |     }
    0x000124b4 ldr r3, [r4, 8]                               |     r3 = *((r4 + 8));
    0x000124b8 ldr r2, [r4, 0x10]                            |     r2 = *((r4 + 0x10));
    0x000124bc add r3, r3, 1                                 |     r3++;
    0x000124c0 str r3, [r4, 8]                               |     *((r4 + 8)) = r3;
    0x000124c4 ldr r3, [fp, -0x12c]                          |     r3 = s;
    0x000124c8 cmp r2, r3                                    |     
    0x000124cc ldr r2, [r4, 0xc]                             |     r2 = *((r4 + 0xc));
                                                             |     if (r2 >= r3) {
    0x000124d0 strlt r3, [r4, 0x10]                          |         *((r4 + 0x10)) = r3;
                                                             |     }
    0x000124d4 cmp r3, r2                                    |     
                                                             |     if (r3 >= r2) {
    0x000124d8 strlt r3, [r4, 0xc]                           |         *((r4 + 0xc)) = r3;
                                                             |     }
    0x000124dc b 0x12430                                     |     goto label_1;
                                                             | label_4:
    0x000124e0 ldr r7, [sb]                                  |     r7 = *(sb);
    0x000124e4 cmp r7, 0                                     |     
                                                             |     if (r7 != 0) {
    0x000124e8 beq 0x12530                                   |         
    0x000124ec ldr r4, [pc, 0x1e8]                           |         
    0x000124f0 ldr r3, [r5, 0xc]                             |         r3 = *((r5 + 0xc));
    0x000124f4 ldr r2, [pc, 0x1e4]                           |         r2 = stderr;
    0x000124f8 ldr r1, [pc, 0x1ec]                           |         r1 = "ubi_d__d_s";
    0x000124fc ldr r0, [r4]                                  |         r0 = *(0x126d8);
    0x00012500 bl 0x10774                                    |         fprintf (r0, "ubi_d__d_s", r2, r3, r4)
    0x00012504 mov r0, r7                                    |         r0 = r7;
    0x00012508 ldr r4, [r4]                                  |         r4 = *(0x126d8);
    0x0001250c bl 0x10714                                    |         strerror (r0);
    0x00012510 str r7, [sp]                                  |         *(sp) = r7;
    0x00012514 ldr r3, [pc, 0x1d4]                           |         r3 = "%s: error!: readdir failed on \"%s\"\n";
    0x00012518 mov r2, 8                                     |         r2 = 8;
    0x0001251c ldr r1, [pc, 0x1d0]                           |         r1 = *(0x126f0);
    0x00012520 str r0, [sp, 4]                               |         var_4h = r0;
    0x00012524 mov r0, r4                                    |         r0 = r4;
    0x00012528 bl 0x10774                                    |         fprintf (r0, r1, r2, "%s: error!: readdir failed on \"%s\"\n")
    0x0001252c b 0x12478                                     |         goto label_2;
                                                             |     }
    0x00012530 mov r0, r8                                    |     r0 = r8;
    0x00012534 bl 0x10828                                    |     r0 = closedir ();
    0x00012538 cmp r0, 0                                     |     
                                                             |     if (r0 != 0) {
    0x0001253c beq 0x12588                                   |         
    0x00012540 ldr r6, [pc, 0x194]                           |         r6 = *(0x126d8);
    0x00012544 ldr r4, [sb]                                  |         r4 = *(sb);
    0x00012548 ldr r3, [r5, 0xc]                             |         r3 = *((r5 + 0xc));
    0x0001254c ldr r2, [pc, 0x18c]                           |         r2 = stderr;
    0x00012550 ldr r1, [pc, 0x1a0]                           |         r1 = "%*serror %d (%s)\n";
    0x00012554 ldr r0, [r6]                                  |         r0 = *(0x126d8);
    0x00012558 bl 0x10774                                    |         fprintf (r0, "%*serror %d (%s)\n", r2, r3, r4, r5, r6)
    0x0001255c mov r0, r4                                    |         r0 = r4;
    0x00012560 ldr r5, [r6]                                  |         r5 = *(0x126d8);
    0x00012564 bl 0x10714                                    |         strerror (r0);
    0x00012568 str r4, [sp]                                  |         *(sp) = r4;
    0x0001256c ldr r3, [pc, 0x17c]                           |         r3 = "%s: error!: readdir failed on \"%s\"\n";
    0x00012570 mov r2, 8                                     |         r2 = 8;
    0x00012574 ldr r1, [pc, 0x178]                           |         r1 = *(0x126f0);
    0x00012578 str r0, [sp, 4]                               |         var_4h = r0;
    0x0001257c mov r0, r5                                    |         r0 = r5;
    0x00012580 bl 0x10774                                    |         fprintf (r0, r1, r2, "%s: error!: readdir failed on \"%s\"\n", r4)
    0x00012584 b 0x12408                                     |         goto label_0;
                                                             |     }
    0x00012588 ldr r3, [r4, 0xc]                             |     r3 = *((r4 + 0xc));
    0x0001258c add r2, r4, 0x14                              |     r2 = r4 + 0x14;
    0x00012590 cmn r3, 0x80000001                            |     
                                                             |     if (r3 != 0x80000001) {
    0x00012594 streq r0, [r4, 0xc]                           |         *((r4 + 0xc)) = r0;
                                                             |     }
    0x00012598 add r3, r4, 0x18                              |     r3 = r4 + 0x18;
    0x0001259c mov r1, r6                                    |     r1 = r6;
    0x000125a0 add r0, r5, 0x18                              |     r0 = r5 + 0x18;
    0x000125a4 bl 0x11394                                    |     r0 = fcn_00011394 (r0, r1);
    0x000125a8 cmp r0, 0                                     |     
                                                             |     if (r0 != 0) {
    0x000125ac bne 0x12408                                   |         goto label_0;
                                                             |     }
    0x000125b0 mov r2, sl                                    |     r2 = sl;
    0x000125b4 mov r1, r6                                    |     r1 = r6;
    0x000125b8 ldr r0, [r5, 0x3c]                            |     r0 = *((r5 + 0x3c));
    0x000125bc bl 0x10ea8                                    |     r0 = fcn_00010ea8 (r0, r1);
    0x000125c0 cmp r0, 0                                     |     
                                                             |     if (r0 != 0) {
    0x000125c4 bne 0x12408                                   |         goto label_0;
                                                             |     }
    0x000125c8 add r2, r4, 0x20                              |     r2 = r4 + 0x20;
    0x000125cc mov r1, r6                                    |     r1 = r6;
    0x000125d0 ldr r0, [r5, 0x1c]                            |     r0 = *((r5 + 0x1c));
    0x000125d4 bl 0x10ea8                                    |     r0 = fcn_00010ea8 (r0, r1);
    0x000125d8 cmp r0, 0                                     |     
                                                             |     if (r0 != 0) {
    0x000125dc bne 0x12408                                   |         goto label_0;
                                                             |     }
    0x000125e0 add r2, r4, 0x1c                              |     r2 = r4 + 0x1c;
    0x000125e4 mov r1, r6                                    |     r1 = r6;
    0x000125e8 ldr r0, [r5, 0x20]                            |     r0 = *((r5 + 0x20));
    0x000125ec bl 0x10ea8                                    |     r0 = fcn_00010ea8 (r0, r1);
    0x000125f0 cmp r0, 0                                     |     
                                                             |     if (r0 != 0) {
    0x000125f4 bne 0x12408                                   |         goto label_0;
                                                             |     }
    0x000125f8 add r2, r4, 0x38                              |     r2 = r4 + 0x38;
    0x000125fc mov r1, r6                                    |     r1 = r6;
    0x00012600 ldr r0, [r5, 0x24]                            |     r0 = *((r5 + 0x24));
    0x00012604 bl 0x10ea8                                    |     r0 = fcn_00010ea8 (r0, r1);
    0x00012608 cmp r0, 0                                     |     
                                                             |     if (r0 != 0) {
    0x0001260c bne 0x12408                                   |         goto label_0;
                                                             |     }
    0x00012610 add r2, r4, 0x3c                              |     r2 = r4 + 0x3c;
    0x00012614 mov r1, r6                                    |     r1 = r6;
    0x00012618 ldr r0, [r5, 0x28]                            |     r0 = *((r5 + 0x28));
    0x0001261c bl 0x10ea8                                    |     r0 = fcn_00010ea8 (r0, r1);
    0x00012620 cmp r0, 0                                     |     
                                                             |     if (r0 != 0) {
    0x00012624 bne 0x12408                                   |         goto label_0;
                                                             |     }
    0x00012628 add r2, r4, 0x48                              |     r2 = r4 + 0x48;
    0x0001262c mov r1, r6                                    |     r1 = r6;
    0x00012630 ldr r0, [r5, 0x30]                            |     r0 = *((r5 + 0x30));
    0x00012634 bl 0x10ea8                                    |     r0 = fcn_00010ea8 (r0, r1);
    0x00012638 cmp r0, 0                                     |     
                                                             |     if (r0 != 0) {
    0x0001263c bne 0x12408                                   |         goto label_0;
                                                             |     }
    0x00012640 ldr r8, [r5, 0x2c]                            |     r8 = *((r5 + 0x2c));
    0x00012644 mov sb, sp                                    |     sb = sp;
    0x00012648 mov r0, r8                                    |     r0 = r8;
    0x0001264c bl 0x1081c                                    |     strlen (r0);
    0x00012650 mov r2, r6                                    |     r2 = r6;
    0x00012654 mov r1, r8                                    |     r1 = r8;
    0x00012658 add r0, r0, 0x39                              |     r0 += 0x39;
    0x0001265c bic r0, r0, 7                                 |     r0 = BIT_MASK (r0, 7);
    0x00012660 sub sp, sp, r0                                |     
    0x00012664 add r7, sp, 8                                 |     r7 += s;
    0x00012668 mov r0, r7                                    |     r0 = r7;
    0x0001266c bl 0x10804                                    |     sprintf (r0, r1, r2);
    0x00012670 add r1, r4, 0x40                              |     r1 = r4 + 0x40;
    0x00012674 mov r0, r7                                    |     r0 = r7;
    0x00012678 bl 0x10c84                                    |     fcn_00010c84 (r0, r1);
    0x0001267c mov sp, sb                                    |     
    0x00012680 cmp r0, 0                                     |     
                                                             |     if (r0 != 0) {
    0x00012684 bne 0x12408                                   |         goto label_0;
                                                             |     }
    0x00012688 add r2, r4, 0x4c                              |     r2 = r4 + 0x4c;
    0x0001268c mov r1, r6                                    |     r1 = r6;
    0x00012690 ldr r0, [r5, 0x34]                            |     r0 = *((r5 + 0x34));
    0x00012694 bl 0x10ea8                                    |     r0 = fcn_00010ea8 (r0, r1);
    0x00012698 cmp r0, 0                                     |     
                                                             |     if (r0 != 0) {
    0x0001269c bne 0x12408                                   |         goto label_0;
                                                             |     }
    0x000126a0 add r2, r4, 0x50                              |     r2 = r4 + 0x50;
    0x000126a4 mov r1, r6                                    |     r1 = r6;
    0x000126a8 ldr r0, [r5, 0x38]                            |     r0 = *((r5 + 0x38));
    0x000126ac bl 0x10ea8                                    |     r0 = fcn_00010ea8 (r0, r1);
    0x000126b0 cmp r0, 0                                     |     
                                                             |     if (r0 != 0) {
    0x000126b4 bne 0x12408                                   |         goto label_0;
                                                             |     }
    0x000126b8 ldr r3, [r4, 0x3c]                            |     r3 = *((r4 + 0x3c));
    0x000126bc ldr r2, [r4, 0x20]                            |     r2 = *((r4 + 0x20));
    0x000126c0 smull r6, r7, r2, r3                          |     r6:r7 = r2 * r3;
    0x000126c4 ldr r2, [r4, 0x1c]                            |     r2 = *((r4 + 0x1c));
    0x000126c8 strd r6, r7, [r4, 0x30]                       |     __asm ("strd r6, r7, [r4, 0x30]");
    0x000126cc smull r6, r7, r2, r3                          |     r6:r7 = r2 * r3;
    0x000126d0 strd r6, r7, [r4, 0x28]                       |     __asm ("strd r6, r7, [r4, 0x28]");
                                                             | label_3:
    0x000126d4 sub sp, fp, 0x20                              |     
    0x000126d8 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc}      |     
                                                             | }
    ; 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/usr/sbin/ubirename @ 0x126fc */
                                                         | #include <stdint.h>
                                                         |  
    ; (fcn) fcn.000126fc ()                              | void fcn_000126fc (int32_t arg1, int32_t arg2) {
                                                         |     int32_t var_0h;
                                                         |     int32_t var_4h;
                                                         |     int32_t var_8h;
                                                         |     int32_t var_ch;
                                                         |     int32_t var_10h;
                                                         |     int32_t var_14h;
                                                         |     int32_t var_18h;
                                                         |     int32_t var_28h;
                                                         |     int32_t var_38h;
                                                         |     int32_t var_48h;
                                                         |     int32_t var_48h_2;
                                                         |     int32_t var_90h;
                                                         |     r0 = arg1;
                                                         |     r1 = arg2;
    0x000126fc push {r4, r5, r6, r7, r8, sb, sl, lr}     |     
    0x00012700 sub sp, sp, 0x90                          |     
    0x00012704 mov r6, r0                                |     r6 = r0;
    0x00012708 mov r4, r1                                |     r4 = r1;
    0x0001270c mov r7, r2                                |     r7 = r2;
    0x00012710 bl 0x11d68                                |     r0 = fcn_00011d68 (r0, r1);
    0x00012714 cmp r0, 1                                 |     
                                                         |     if (r0 == 1) {
    0x00012718 beq 0x12738                               |         goto label_2;
                                                         |     }
    0x0001271c cmp r0, 2                                 |     
                                                         |     if (r0 != 2) {
    0x00012720 bne 0x12730                               |         goto label_0;
                                                         |     }
    0x00012724 bl 0x10810                                |     errno_location ();
    0x00012728 mov r3, 0x13                              |     r3 = 0x13;
    0x0001272c str r3, [r0]                              |     *(r0) = r3;
                                                         |     do {
                                                         | label_0:
    0x00012730 mvn r0, 0                                 |         r0 = ~0;
    0x00012734 b 0x128c4                                 |         goto label_3;
                                                         | label_2:
    0x00012738 add r1, sp, 0x28                          |         r1 += var_28h;
    0x0001273c mov r0, r4                                |         r0 = r4;
    0x00012740 bl 0x10720                                |         r0 = stat64 ();
    0x00012744 cmp r0, 0                                 |         
                                                         |         if (r0 == 0) {
    0x00012748 beq 0x12798                               |             goto label_4;
                                                         |         }
    0x0001274c bl 0x10810                                |         errno_location ();
    0x00012750 ldr r6, [pc, 0x174]                       |         r6 = *(0x128c8);
    0x00012754 mov r3, r4                                |         r3 = r4;
    0x00012758 ldr r2, [pc, 0x170]                       |         r2 = stderr;
    0x0001275c ldr r1, [pc, 0x170]                       |         r1 = "libubi";
    0x00012760 ldr r5, [r0]                              |         r5 = *(r0);
    0x00012764 ldr r0, [r6]                              |         r0 = *(0x128c8);
    0x00012768 bl 0x10774                                |         fprintf (r0, "libubi", r2, r3, r4, r5, r6)
    0x0001276c mov r0, r5                                |         r0 = r5;
    0x00012770 ldr r4, [r6]                              |         r4 = *(0x128c8);
    0x00012774 bl 0x10714                                |         strerror (r0);
    0x00012778 str r5, [sp]                              |         *(sp) = r5;
    0x0001277c ldr r3, [pc, 0x154]                       |         r3 = "_s:_error_:_cannot_get_information_about___s_";
    0x00012780 mov r2, 8                                 |         r2 = 8;
    0x00012784 ldr r1, [pc, 0x150]                       |         r1 = *(0x128d8);
    0x00012788 str r0, [sp, 4]                           |         var_4h = r0;
    0x0001278c mov r0, r4                                |         r0 = r4;
    0x00012790 bl 0x10774                                |         fprintf (r0, r1, r2, "_s:_error_:_cannot_get_information_about___s_", r4, r5)
    0x00012794 b 0x12730                                 |         
                                                         |     } while (1);
                                                         | label_4:
    0x00012798 ldr r3, [sp, 0x38]                        |     r3 = var_38h;
    0x0001279c and r3, r3, 0xf000                        |     r3 &= 0xf000;
    0x000127a0 cmp r3, 0x2000                            |     
                                                         |     if (r3 == 0x2000) {
    0x000127a4 beq 0x127d0                               |         goto label_5;
                                                         |     }
    0x000127a8 bl 0x10810                                |     errno_location ();
    0x000127ac ldr r2, [pc, 0x11c]                       |     r2 = stderr;
    0x000127b0 ldr r1, [pc, 0x128]                       |     r1 = "%*serror %d (%s)\n";
    0x000127b4 mov r3, 0x16                              |     r3 = 0x16;
    0x000127b8 str r3, [r0]                              |     *(r0) = r3;
    0x000127bc mov r3, r4                                |     r3 = r4;
                                                         |     do {
    0x000127c0 ldr r0, [pc, 0x104]                       |         
    0x000127c4 ldr r0, [r0]                              |         r0 = *(0x128c8);
    0x000127c8 bl 0x10774                                |         fprintf (r0, "%*serror %d (%s)\n", r2, r3)
    0x000127cc b 0x12730                                 |         goto label_0;
                                                         | label_5:
    0x000127d0 ldrd r8, sb, [sp, 0x48]                   |         __asm ("ldrd r8, sb, [var_48h]");
    0x000127d4 mov r1, sb                                |         r1 = sb;
    0x000127d8 mov r0, r8                                |         r0 = r8;
    0x000127dc bl 0x1072c                                |         gnu_dev_major ();
    0x000127e0 mov r1, sb                                |         r1 = sb;
    0x000127e4 mov sl, r0                                |         sl = r0;
    0x000127e8 mov r0, r8                                |         r0 = r8;
    0x000127ec bl 0x10750                                |         r0 = gnu_dev_minor ();
    0x000127f0 cmp r0, 0                                 |         
                                                         |         if (r0 == 0) {
    0x000127f4 beq 0x12814                               |             goto label_6;
                                                         |         }
    0x000127f8 bl 0x10810                                |         errno_location ();
    0x000127fc mov r3, 0x16                              |         r3 = 0x16;
    0x00012800 ldr r2, [pc, 0xc8]                        |         r2 = stderr;
    0x00012804 ldr r1, [pc, 0xd8]                        |         r1 = "_s:_error_:___s__is_not_a_character_device";
    0x00012808 str r3, [r0]                              |         *(r0) = r3;
    0x0001280c mov r3, r4                                |         r3 = r4;
    0x00012810 b 0x127c0                                 |         
                                                         |     } while (1);
                                                         | label_6:
    0x00012814 add r1, sp, 0x10                          |     r1 += var_10h;
    0x00012818 mov r0, r6                                |     r0 = r6;
    0x0001281c bl 0x11a38                                |     r0 = fcn_00011a38 (r0, r1);
    0x00012820 cmp r0, 0                                 |     
                                                         |     if (r0 != 0) {
    0x00012824 bne 0x12730                               |         goto label_0;
                                                         |     }
    0x00012828 bl 0x10810                                |     errno_location ();
    0x0001282c ldr r4, [sp, 0x14]                        |     r4 = var_14h;
    0x00012830 add r8, r6, 0x18                          |     r8 = r6 + 0x18;
    0x00012834 mov r5, r0                                |     r5 = r0;
                                                         | label_1:
    0x00012838 ldr r3, [sp, 0x18]                        |     r3 = var_18h;
    0x0001283c cmp r4, r3                                |     
                                                         |     if (r4 <= r3) {
    0x00012840 movgt r3, 0x13                            |         r3 = 0x13;
                                                         |     }
                                                         |     if (r4 > r3) {
    0x00012844 bgt 0x128a8                               |         goto label_7;
                                                         |     }
    0x00012848 add r3, sp, 0xc                           |     r3 += var_ch;
    0x0001284c add r2, sp, 8                             |     r2 += var_8h;
    0x00012850 mov r1, r4                                |     r1 = r4;
    0x00012854 mov r0, r8                                |     r0 = r8;
    0x00012858 bl 0x11394                                |     r0 = fcn_00011394 (r0, r1);
    0x0001285c cmp r0, 0                                 |     
                                                         |     if (r0 == 0) {
    0x00012860 beq 0x12878                               |         goto label_8;
                                                         |     }
    0x00012864 ldr r3, [r5]                              |     r3 = *(r5);
    0x00012868 cmp r3, 2                                 |     
                                                         |     if (r3 != 2) {
    0x0001286c bne 0x12730                               |         goto label_0;
                                                         |     }
                                                         |     do {
    0x00012870 add r4, r4, 1                             |         r4++;
    0x00012874 b 0x12838                                 |         goto label_1;
                                                         | label_8:
    0x00012878 ldr r3, [sp, 8]                           |         r3 = var_8h;
    0x0001287c cmp sl, r3                                |         
    0x00012880 bne 0x12870                               |         
                                                         |     } while (sl != r3);
    0x00012884 ldr r3, [sp, 0xc]                         |     r3 = var_ch;
    0x00012888 cmp r3, 0                                 |     
                                                         |     if (r3 != 0) {
    0x0001288c beq 0x128b0                               |         
    0x00012890 ldr r0, [pc, 0x34]                        |         
    0x00012894 ldr r2, [pc, 0x34]                        |         r2 = stderr;
    0x00012898 ldr r1, [pc, 0x48]                        |         r1 = "%s: error!: \"%s\" is not an UBI character device\n";
    0x0001289c ldr r0, [r0]                              |         r0 = *(0x128c8);
    0x000128a0 bl 0x10774                                |         fprintf (r0, "%s: error!: \"%s\" is not an UBI character device\n", r2)
    0x000128a4 mov r3, 0x16                              |         r3 = 0x16;
                                                         | label_7:
    0x000128a8 str r3, [r5]                              |         *(r5) = r3;
    0x000128ac b 0x12730                                 |         goto label_0;
                                                         |     }
    0x000128b0 str r3, [r5]                              |     *(r5) = r3;
    0x000128b4 mov r2, r7                                |     r2 = r7;
    0x000128b8 mov r1, r4                                |     r1 = r4;
    0x000128bc mov r0, r6                                |     r0 = r6;
    0x000128c0 bl 0x123c4                                |     fcn_000123c4 (r0, r1);
                                                         | label_3:
    0x000128c4 add sp, sp, 0x90                          |     
    0x000128c8 pop {r4, r5, r6, r7, r8, sb, sl, pc}      |     
                                                         | }
    ; 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/usr/sbin/ubirename @ 0x128ec */
                                                             | #include <stdint.h>
                                                             |  
                                                             | #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
                                                             |  
    ; (fcn) fcn.000128ec ()                                  | void fcn_000128ec (int32_t arg1, int32_t arg2) {
                                                             |     char * s1;
                                                             |     int32_t var_0h;
                                                             |     int32_t var_20h_2;
                                                             |     int32_t var_20h;
                                                             |     r0 = arg1;
                                                             |     r1 = arg2;
    0x000128ec push {r4, r5, r6, r7, r8, sb, sl, fp, lr}     |     
    0x000128f0 add sb, r3, 8                                 |     sb = r3 + 8;
    0x000128f4 add fp, sp, 0x20                              |     
    0x000128f8 sub sp, sp, 0x3c                              |     
    0x000128fc mov r5, r1                                    |     r5 = r1;
    0x00012900 mov r6, r2                                    |     r6 = r2;
    0x00012904 mov r1, 0                                     |     r1 = 0;
    0x00012908 mov r2, 0xb0                                  |     r2 = 0xb0;
    0x0001290c mov r7, r0                                    |     r7 = r0;
    0x00012910 mov r0, sb                                    |     r0 = sb;
    0x00012914 mov r4, r3                                    |     r4 = r3;
    0x00012918 bl 0x107d4                                    |     memset (r0, r1, r2);
    0x0001291c ldr sl, [r7, 0x48]                            |     sl = *((r7 + 0x48));
    0x00012920 stm r4, {r5, r6}                              |     *(r4) = r5;
                                                             |     *((r4 + 4)) = r6;
    0x00012924 mov r0, sl                                    |     r0 = sl;
    0x00012928 bl 0x1081c                                    |     strlen (r0);
    0x0001292c mov r8, sp                                    |     r8 = sp;
    0x00012930 mov r3, r6                                    |     r3 = r6;
    0x00012934 mov r2, r5                                    |     r2 = r5;
    0x00012938 mov r1, sl                                    |     r1 = sl;
    0x0001293c add r0, r0, 0x6b                              |     r0 += 0x6b;
    0x00012940 bic r0, r0, 7                                 |     r0 = BIT_MASK (r0, 7);
    0x00012944 sub sp, sp, r0                                |     
    0x00012948 mov r0, sp                                    |     r0 = sp;
    0x0001294c bl 0x10804                                    |     sprintf (r0, r1, r2);
    0x00012950 mov r0, sp                                    |     r0 = sp;
    0x00012954 add r2, r4, 0xc                               |     r2 = r4 + 0xc;
    0x00012958 mov r1, sb                                    |     r1 = sb;
    0x0001295c bl 0x112bc                                    |     fcn_000112bc (r0, r1);
    0x00012960 mov sp, r8                                    |     
    0x00012964 cmp r0, 0                                     |     
    0x00012968 beq 0x1297c                                   |     
                                                             |     while (r8 < r0) {
                                                             | label_0:
    0x0001296c mvn r8, 0                                     |         r8 = ~0;
                                                             | label_1:
    0x00012970 mov r0, r8                                    |         r0 = r8;
    0x00012974 sub sp, fp, 0x20                              |         
    0x00012978 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc}      |         
    0x0001297c ldr sb, [r7, 0x44]                            |         sb = *((r7 + 0x44));
    0x00012980 mov r0, sb                                    |         r0 = sb;
    0x00012984 bl 0x1081c                                    |         strlen (r0);
    0x00012988 mov r3, r6                                    |         r3 = r6;
    0x0001298c mov r2, r5                                    |         r2 = r5;
    0x00012990 mov r1, sb                                    |         r1 = sb;
    0x00012994 add r0, r0, 0x6b                              |         r0 += 0x6b;
    0x00012998 bic r0, r0, 7                                 |         r0 = BIT_MASK (r0, 7);
    0x0001299c sub sp, sp, r0                                |         
    0x000129a0 mov r0, sp                                    |         r0 = sp;
    0x000129a4 bl 0x10804                                    |         sprintf (r0, r1, r2);
    0x000129a8 mov r0, sp                                    |         r0 = sp;
    0x000129ac mov r2, 0x32                                  |         r2 = 0x32;
    0x000129b0 sub r1, fp, 0x58                              |         r1 -= s1;
    0x000129b4 bl 0x10f40                                    |         fcn_00010f40 (r0, r1);
    0x000129b8 mov sp, r8                                    |         
    0x000129bc subs r8, r0, 0                                |         r8 = r0 - 0;
    0x000129c0 blt 0x1296c                                   |         
                                                             |     }
    0x000129c4 mov r2, r8                                    |     r2 = r8;
    0x000129c8 ldr r1, [pc, 0x174]                           |     r1 = *(0x12b40);
    0x000129cc sub r0, fp, 0x58                              |     r0 -= s1;
    0x000129d0 bl 0x10798                                    |     r0 = strncmp (r0, r1, r2);
    0x000129d4 cmp r0, 0                                     |     
                                                             |     if (r0 != 0) {
    0x000129d8 moveq r3, 4                                   |         r3 = 4;
                                                             |     }
                                                             |     if (r0 != 0) {
    0x000129dc beq 0x129fc                                   |         
    0x000129e0 mov r2, r8                                    |         r2 = r8;
    0x000129e4 ldr r1, [pc, 0x15c]                           |         r1 = "static";
    0x000129e8 sub r0, fp, 0x58                              |         r0 -= s1;
    0x000129ec bl 0x10798                                    |         r0 = strncmp (r0, "static", r2);
    0x000129f0 cmp r0, 0                                     |         
                                                             |         if (r0 != 0) {
    0x000129f4 bne 0x12b1c                                   |             goto label_2;
                                                             |         }
    0x000129f8 mov r3, 3                                     |         r3 = 3;
                                                             |     }
    0x000129fc str r3, [r4, 0x10]                            |     *((r4 + 0x10)) = r3;
    0x00012a00 mov r2, r6                                    |     r2 = r6;
    0x00012a04 add r3, r4, 0x14                              |     r3 = r4 + 0x14;
    0x00012a08 mov r1, r5                                    |     r1 = r5;
    0x00012a0c ldr r0, [r7, 0x4c]                            |     r0 = *((r7 + 0x4c));
    0x00012a10 bl 0x10ef0                                    |     r0 = fcn_00010ef0 (r0, r1);
    0x00012a14 cmp r0, 0                                     |     
                                                             |     if (r0 != 0) {
    0x00012a18 bne 0x1296c                                   |         goto label_0;
                                                             |     }
    0x00012a1c ldr r8, [r7, 0x50]                            |     r8 = *((r7 + 0x50));
    0x00012a20 mov sb, sp                                    |     sb = sp;
    0x00012a24 mov r0, r8                                    |     r0 = r8;
    0x00012a28 bl 0x1081c                                    |     strlen (r0);
    0x00012a2c mov r3, r6                                    |     r3 = r6;
    0x00012a30 mov r2, r5                                    |     r2 = r5;
    0x00012a34 mov r1, r8                                    |     r1 = r8;
    0x00012a38 add r0, r0, 0x6b                              |     r0 += 0x6b;
    0x00012a3c bic r0, r0, 7                                 |     r0 = BIT_MASK (r0, 7);
    0x00012a40 sub sp, sp, r0                                |     
    0x00012a44 mov r0, sp                                    |     r0 = sp;
    0x00012a48 bl 0x10804                                    |     sprintf (r0, r1, r2);
    0x00012a4c mov r0, sp                                    |     r0 = sp;
    0x00012a50 add r1, r4, 0x18                              |     r1 = r4 + 0x18;
    0x00012a54 bl 0x10c84                                    |     fcn_00010c84 (r0, r1);
    0x00012a58 mov sp, sb                                    |     
    0x00012a5c cmp r0, 0                                     |     
                                                             |     if (r0 != 0) {
    0x00012a60 bne 0x1296c                                   |         goto label_0;
                                                             |     }
    0x00012a64 add r3, r4, 0x28                              |     r3 = r4 + 0x28;
    0x00012a68 mov r2, r6                                    |     r2 = r6;
    0x00012a6c mov r1, r5                                    |     r1 = r5;
    0x00012a70 ldr r0, [r7, 0x54]                            |     r0 = *((r7 + 0x54));
    0x00012a74 bl 0x10ef0                                    |     r0 = fcn_00010ef0 (r0, r1);
    0x00012a78 cmp r0, 0                                     |     
                                                             |     if (r0 != 0) {
    0x00012a7c bne 0x1296c                                   |         goto label_0;
                                                             |     }
    0x00012a80 add r3, r4, 0x2c                              |     r3 = r4 + 0x2c;
    0x00012a84 mov r2, r6                                    |     r2 = r6;
    0x00012a88 mov r1, r5                                    |     r1 = r5;
    0x00012a8c ldr r0, [r7, 0x58]                            |     r0 = *((r7 + 0x58));
    0x00012a90 bl 0x10ef0                                    |     r0 = fcn_00010ef0 (r0, r1);
    0x00012a94 cmp r0, 0                                     |     
                                                             |     if (r0 != 0) {
    0x00012a98 bne 0x1296c                                   |         goto label_0;
                                                             |     }
    0x00012a9c add r3, r4, 0x30                              |     r3 = r4 + 0x30;
    0x00012aa0 mov r2, r6                                    |     r2 = r6;
    0x00012aa4 mov r1, r5                                    |     r1 = r5;
    0x00012aa8 ldr r0, [r7, 0x5c]                            |     r0 = *((r7 + 0x5c));
    0x00012aac bl 0x10ef0                                    |     r0 = fcn_00010ef0 (r0, r1);
    0x00012ab0 subs r8, r0, 0                                |     r8 = r0 - 0;
                                                             |     if (r8 != r0) {
    0x00012ab4 bne 0x1296c                                   |         goto label_0;
                                                             |     }
    0x00012ab8 ldr r1, [r4, 0x28]                            |     r1 = *((r4 + 0x28));
    0x00012abc ldr r0, [r4, 0x2c]                            |     r0 = *((r4 + 0x2c));
    0x00012ac0 ldr r7, [r7, 0x60]                            |     r7 = *((r7 + 0x60));
    0x00012ac4 smull r2, r3, r0, r1                          |     r2:r3 = r0 * r1;
    0x00012ac8 mov r0, r7                                    |     r0 = r7;
    0x00012acc strd r2, r3, [r4, 0x20]                       |     __asm ("strd r2, r3, [r4, 0x20]");
    0x00012ad0 bl 0x1081c                                    |     strlen (r0);
    0x00012ad4 mov r3, r6                                    |     r3 = r6;
    0x00012ad8 mov r2, r5                                    |     r2 = r5;
    0x00012adc mov r1, r7                                    |     r1 = r7;
    0x00012ae0 add r0, r0, 0x6b                              |     r0 += 0x6b;
    0x00012ae4 bic r0, r0, 7                                 |     r0 = BIT_MASK (r0, 7);
    0x00012ae8 sub sp, sp, r0                                |     
    0x00012aec mov r0, sp                                    |     r0 = sp;
    0x00012af0 bl 0x10804                                    |     sprintf (r0, r1, r2);
    0x00012af4 mov r0, sp                                    |     r0 = sp;
    0x00012af8 mov r2, 0x81                                  |     r2 = 0x81;
    0x00012afc add r1, r4, 0x34                              |     r1 = r4 + 0x34;
    0x00012b00 bl 0x10f40                                    |     fcn_00010f40 (r0, r1);
    0x00012b04 mov sp, sb                                    |     
    0x00012b08 cmp r0, 0                                     |     
                                                             |     if (r0 < 0) {
    0x00012b0c blt 0x1296c                                   |         goto label_0;
                                                             |     }
    0x00012b10 add r4, r4, r0                                |     r4 += r0;
    0x00012b14 strb r8, [r4, 0x33]                           |     *((r4 + 0x33)) = r8;
    0x00012b18 b 0x12970                                     |     goto label_1;
                                                             | label_2:
    0x00012b1c ldr r0, [pc, 0x28]                            |     
    0x00012b20 sub r3, fp, 0x58                              |     r3 -= s1;
    0x00012b24 ldr r2, [pc, 0x24]                            |     r2 = stderr;
    0x00012b28 ldr r1, [pc, 0x24]                            |     r1 = "libubi";
    0x00012b2c ldr r0, [r0]                                  |     r0 = "dynamic";
    0x00012b30 bl 0x10774                                    |     r0 = fprintf ("dynamic", "libubi", r2, r3)
    0x00012b34 bl 0x10810                                    |     errno_location ();
    0x00012b38 mov r3, 0x16                                  |     r3 = 0x16;
    0x00012b3c str r3, [r0]                                  |     *(r0) = r3;
    0x00012b40 b 0x1296c                                     |     goto label_0;
                                                             | }
    ; 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/usr/sbin/ubirename @ 0x10858 */
                                                             | #include <stdint.h>
                                                             |  
    ; (fcn) main ()                                          | int32_t main (uint32_t argc, char ** argv) {
                                                             |     int32_t var_0h;
                                                             |     int32_t var_4h;
                                                             |     char * s1;
                                                             |     int32_t var_10h;
                                                             |     int32_t var_14h;
                                                             |     int32_t var_18h;
                                                             |     int32_t var_214h;
                                                             |     int32_t var_210h;
                                                             |     int32_t var_70h;
                                                             |     int32_t var_1c4h;
                                                             |     char * s2;
                                                             |     int32_t var_128h;
                                                             |     int32_t var_8h;
                                                             |     int16_t var_4h_2;
                                                             |     char * dest;
                                                             |     int32_t var_88h;
                                                             |     int32_t var_238h;
                                                             |     int32_t var_1200h;
                                                             |     int32_t var_3ch;
                                                             |     r0 = argc;
                                                             |     r1 = argv;
                                                             |     /* [10] -r-x section size 10000 named .text */
    0x00010858 push {r4, r5, r6, r7, r8, sb, sl, fp, lr}     |     
    0x0001085c cmp r0, 2                                     |     
    0x00010860 sub sp, sp, 0x1200                            |     
    0x00010864 sub sp, sp, 0x3c                              |     
                                                             |     if (r0 > 2) {
    0x00010868 ble 0x10878                                   |         
    0x0001086c ands sb, r0, 1                                |         sb = r0 & 1;
    0x00010870 mov r6, r0                                    |         r6 = r0;
                                                             |         if (sb == r0) {
    0x00010874 beq 0x108a0                                   |             goto label_5;
                                                             |         }
                                                             |     }
    0x00010878 ldr r4, [pc, 0x2ac]                           |     r4 = *(0x10b28);
    0x0001087c ldr r2, [pc, 0x2ac]                           |     r2 = stderr;
    0x00010880 ldr r1, [pc, 0x2ac]                           |     r1 = "ubirename";
    0x00010884 ldr r0, [r4]                                  |     r0 = *(0x10b28);
    0x00010888 bl 0x10774                                    |     fprintf (r0, "ubirename", r2, r3, r4)
    0x0001088c ldr r2, [pc, 0x2a4]                           |     r2 = "%s: error!: too few arguments\n";
    0x00010890 ldr r1, [pc, 0x2a4]                           |     r1 = "Usage:_ubirename__UBI_device_node_file_name____old_name___new_name_..._Example:_ubirename__dev_ubi0_A_B_C_D___rename_volume_A_to_B__and_C_to_DThis_utility_allows_re_naming_several_volumes_in_one_go_atomically.For_example__if_you_have_volumes_A_and_B";
    0x00010894 ldr r0, [r4]                                  |     r0 = *(0x10b28);
                                                             |     do {
    0x00010898 bl 0x10774                                    |         fprintf (r0, "Usage:_ubirename__UBI_device_node_file_name____old_name___new_name_..._Example:_ubirename__dev_ubi0_A_B_C_D___rename_volume_A_to_B__and_C_to_DThis_utility_allows_re_naming_several_volumes_in_one_go_atomically.For_example__if_you_have_volumes_A_and_B", "%s: error!: too few arguments\n")
    0x0001089c b 0x108c0                                     |         goto label_0;
                                                             | label_5:
    0x000108a0 cmp r0, 0x22                                  |         
                                                             |         if (r0 > 0x22) {
    0x000108a4 ble 0x108c8                                   |             
    0x000108a8 ldr r0, [pc, 0x27c]                           |             
    0x000108ac mov r3, 0x20                                  |             r3 = 0x20;
    0x000108b0 ldr r2, [pc, 0x278]                           |             r2 = stderr;
    0x000108b4 ldr r1, [pc, 0x284]                           |             r1 = "_s";
    0x000108b8 ldr r0, [r0]                                  |             r0 = *(0x10b28);
    0x000108bc bl 0x10774                                    |             fprintf (r0, "_s", r2, r3)
                                                             | label_0:
    0x000108c0 mvn fp, 0                                     |             
    0x000108c4 b 0x10b1c                                     |             goto label_6;
                                                             |         }
    0x000108c8 mov r4, r1                                    |         r4 = r1;
    0x000108cc ldr r5, [r1, 4]                               |         r5 = *((r1 + 4));
    0x000108d0 bl 0x1157c                                    |         r0 = fcn_0001157c ();
    0x000108d4 subs r7, r0, 0                                |         r7 = r0 - 0;
                                                             |         if (r7 != r0) {
    0x000108d8 bne 0x10930                                   |             goto label_7;
                                                             |         }
    0x000108dc bl 0x10810                                    |         errno_location ();
    0x000108e0 ldr r5, [pc, 0x244]                           |         r5 = *(0x10b28);
    0x000108e4 ldr r2, [pc, 0x244]                           |         r2 = stderr;
    0x000108e8 ldr r4, [r0]                                  |         r4 = *(r0);
    0x000108ec ldr r0, [r5]                                  |         r0 = *(0x10b28);
    0x000108f0 cmp r4, 0                                     |         
                                                             |         if (r4 != 0) {
    0x000108f4 ldreq r1, [pc, 0x248]                         |             r1 = "%s: error!: UBI is not present in the system\n";
                                                             |         }
    0x000108f8 beq 0x10898                                   |         
                                                             |     } while (r4 == 0);
    0x000108fc ldr r1, [pc, 0x244]                           |     r1 = "%s: error!: UBI is not present in the system\n";
    0x00010900 bl 0x10774                                    |     fprintf (r0, "%s: error!: UBI is not present in the system\n")
    0x00010904 mov r0, r4                                    |     r0 = r4;
    0x00010908 ldr r5, [r5]                                  |     r5 = *(r5);
    0x0001090c bl 0x10714                                    |     strerror (r0);
    0x00010910 str r4, [sp]                                  |     *(sp) = r4;
    0x00010914 ldr r3, [pc, 0x230]                           |     r3 = "%s: error!: cannot open libubi\n";
    0x00010918 mov r2, 0xb                                   |     r2 = 0xb;
    0x0001091c ldr r1, [pc, 0x22c]                           |     r1 = *(0x10b4c);
    0x00010920 str r0, [sp, 4]                               |     var_4h = r0;
    0x00010924 mov r0, r5                                    |     r0 = r5;
    0x00010928 bl 0x10774                                    |     fprintf (r0, r1, r2, "%s: error!: cannot open libubi\n", r4)
    0x0001092c b 0x108c0                                     |     goto label_0;
                                                             | label_7:
    0x00010930 mov r1, r5                                    |     r1 = r5;
    0x00010934 bl 0x11d68                                    |     r0 = fcn_00011d68 (r0, r1);
    0x00010938 cmp r0, 2                                     |     
                                                             |     if (r0 == 2) {
    0x0001093c bne 0x10958                                   |         
    0x00010940 ldr r2, [pc, 0x1e8]                           |         r2 = stderr;
    0x00010944 ldr r1, [pc, 0x208]                           |         r1 = "%*serror %d (%s)\n";
    0x00010948 mov r3, r5                                    |         r3 = r5;
                                                             | label_1:
    0x0001094c ldr r0, [pc, 0x1d8]                           |         
    0x00010950 ldr r0, [r0]                                  |         r0 = *(0x10b28);
    0x00010954 b 0x10988                                     |         
                                                             |     } else {
    0x00010958 cmp r0, 0                                     |         
                                                             |         if (r0 >= 0) {
    0x0001095c bge 0x10998                                   |             goto label_8;
                                                             |         }
    0x00010960 bl 0x10810                                    |         errno_location ();
    0x00010964 ldr r6, [pc, 0x1c0]                           |         r6 = *(0x10b28);
    0x00010968 mov r3, r5                                    |         r3 = r5;
    0x0001096c ldr r2, [pc, 0x1bc]                           |         r2 = stderr;
    0x00010970 ldr r4, [r0]                                  |         r4 = *(r0);
    0x00010974 ldr r0, [r6]                                  |         r0 = *(0x10b28);
    0x00010978 cmp r4, 0x13                                  |         
                                                             |         if (r4 == 0x13) {
    0x0001097c ldrne r1, [pc, 0x1d4]                         |             r1 = "%s: error!: error while probing \"%s\"\n";
                                                             |         }
                                                             |         if (r4 != 0x13) {
    0x00010980 bne 0x109cc                                   |             goto label_9;
                                                             |         }
    0x00010984 ldr r1, [pc, 0x1d0]                           |         r1 = "%s: error!: error while probing \"%s\"\n";
                                                             |     }
    0x00010988 bl 0x10774                                    |     fprintf (r0, "%s: error!: error while probing \"%s\"\n")
                                                             |     do {
    0x0001098c mov r0, r7                                    |         r0 = r7;
    0x00010990 bl 0x114a8                                    |         fcn_000114a8 (r0);
    0x00010994 b 0x108c0                                     |         goto label_0;
                                                             | label_8:
    0x00010998 add r2, sp, 0x18                              |         r2 += var_18h;
    0x0001099c mov r1, r5                                    |         r1 = r5;
    0x000109a0 mov r0, r7                                    |         r0 = r7;
    0x000109a4 bl 0x126fc                                    |         r0 = fcn_000126fc (r0, r1);
    0x000109a8 cmn r0, 1                                     |         
                                                             |         if (r0 != 1) {
    0x000109ac bne 0x109fc                                   |             goto label_10;
                                                             |         }
    0x000109b0 bl 0x10810                                    |         errno_location ();
    0x000109b4 ldr r6, [pc, 0x170]                           |         r6 = *(0x10b28);
    0x000109b8 ldr r2, [pc, 0x170]                           |         r2 = stderr;
    0x000109bc ldr r1, [pc, 0x19c]                           |         r1 = "%s: error!: \"%s\" is not an UBI device node\n";
    0x000109c0 mov r3, r5                                    |         r3 = r5;
    0x000109c4 ldr r4, [r0]                                  |         r4 = *(r0);
    0x000109c8 ldr r0, [r6]                                  |         r0 = *(0x10b28);
                                                             | label_9:
    0x000109cc bl 0x10774                                    |         fprintf (r0, "%s: error!: \"%s\" is not an UBI device node\n", r2, r3, r4, r5, r6)
    0x000109d0 ldr r5, [r6]                                  |         r5 = *(r6);
                                                             | label_3:
    0x000109d4 mov r0, r4                                    |         r0 = r4;
    0x000109d8 bl 0x10714                                    |         strerror (r0);
    0x000109dc str r4, [sp]                                  |         *(sp) = r4;
    0x000109e0 ldr r3, [pc, 0x164]                           |         r3 = "%s: error!: cannot open libubi\n";
    0x000109e4 mov r2, 0xb                                   |         r2 = 0xb;
    0x000109e8 ldr r1, [pc, 0x160]                           |         r1 = *(0x10b4c);
    0x000109ec str r0, [sp, 4]                               |         var_4h = r0;
    0x000109f0 mov r0, r5                                    |         r0 = r5;
    0x000109f4 bl 0x10774                                    |         fprintf (r0, r1, r2, "%s: error!: cannot open libubi\n", r4)
    0x000109f8 b 0x1098c                                     |         
                                                             |     } while (1);
                                                             | label_10:
    0x000109fc sub r6, r6, 3                                 |     r6 -= 3;
    0x00010a00 lsr r6, r6, 1                                 |     r6 >>= 1;
    0x00010a04 add r3, r6, 1                                 |     r3 = r6 + 1;
    0x00010a08 str r3, [sp, 0x10]                            |     var_10h = r3;
    0x00010a0c add r4, r4, 8                                 |     r4 += 8;
    0x00010a10 add r3, sp, 0x70                              |     r3 += var_70h;
    0x00010a14 add r8, sp, 0x140                             |     r8 += dest;
    0x00010a18 str r3, [sp, 0x14]                            |     var_14h = r3;
                                                             | label_2:
    0x00010a1c add r6, sp, 0x238                             |     r6 += var_238h;
    0x00010a20 ldr r3, [r4]                                  |     r3 = *(r4);
    0x00010a24 ldr sl, [r6, -0x214]                          |     sl = var_214h;
    0x00010a28 str r3, [sp, 0xc]                             |     s1 = r3;
                                                             | label_4:
    0x00010a2c ldr r3, [r6, -0x210]                          |     r3 = var_210h;
    0x00010a30 cmp sl, r3                                    |     
                                                             |     if (sl > r3) {
    0x00010a34 bgt 0x10a64                                   |         goto label_11;
                                                             |     }
    0x00010a38 ldr r3, [sp, 0x14]                            |     r3 = var_14h;
    0x00010a3c mov r2, sl                                    |     r2 = sl;
    0x00010a40 ldr r1, [r6, -0x220]                          |     r1 = var_18h;
    0x00010a44 mov r0, r7                                    |     r0 = r7;
    0x00010a48 bl 0x128ec                                    |     r0 = fcn_000128ec (r0, r1);
    0x00010a4c cmn r0, 1                                     |     
                                                             |     if (r0 != 1) {
    0x00010a50 bne 0x10a74                                   |         goto label_12;
                                                             |     }
    0x00010a54 bl 0x10810                                    |     r0 = errno_location ();
    0x00010a58 ldr r3, [r0]                                  |     r3 = *(r0);
    0x00010a5c cmp r3, 2                                     |     
                                                             |     if (r3 == 2) {
    0x00010a60 beq 0x10b0c                                   |         goto label_13;
                                                             |     }
                                                             |     do {
                                                             | label_11:
    0x00010a64 ldr r3, [r4]                                  |         r3 = *(r4);
    0x00010a68 ldr r2, [pc, 0xc0]                            |         r2 = stderr;
    0x00010a6c ldr r1, [pc, 0xf0]                            |         r1 = "%s: error!: cannot get information about UBI device \"%s\"\n";
    0x00010a70 b 0x1094c                                     |         goto label_1;
                                                             | label_12:
    0x00010a74 add r1, sp, 0xa4                              |         r1 += s2;
    0x00010a78 ldr r0, [sp, 0xc]                             |         r0 = s1;
    0x00010a7c bl 0x107f8                                    |         r0 = strcmp (r0, r1);
    0x00010a80 subs fp, r0, 0                                |         
                                                             |         if (fp != r0) {
    0x00010a84 bne 0x10b0c                                   |             goto label_13;
                                                             |         }
    0x00010a88 ldr r2, [r6, -0x1c4]                          |         r2 = var_1c4h;
    0x00010a8c cmn r2, 1                                     |         
    0x00010a90 beq 0x10a64                                   |         
                                                             |     } while (r2 == 1);
    0x00010a94 ldr sl, [r4, 4]                               |     sl = *((r4 + 4));
    0x00010a98 str r2, [r8, -8]                              |     var_8h = r2;
    0x00010a9c mov r0, sl                                    |     r0 = sl;
    0x00010aa0 bl 0x1081c                                    |     strlen (r0);
    0x00010aa4 mov r1, sl                                    |     r1 = sl;
    0x00010aa8 add sb, sb, 1                                 |     sb++;
    0x00010aac add r4, r4, 8                                 |     r4 += 8;
    0x00010ab0 strh r0, [r8, -4]                             |     var_4h_2 = r0;
    0x00010ab4 mov r0, r8                                    |     r0 = r8;
    0x00010ab8 bl 0x106fc                                    |     strcpy (r0, r1);
    0x00010abc ldr r3, [sp, 0x10]                            |     r3 = var_10h;
    0x00010ac0 add r8, r8, 0x88                              |     r8 += var_88h;
    0x00010ac4 cmp sb, r3                                    |     
                                                             |     if (sb != r3) {
    0x00010ac8 bne 0x10a1c                                   |         goto label_2;
                                                             |     }
    0x00010acc add r2, sp, 0x128                             |     r2 += var_128h;
    0x00010ad0 mov r1, r5                                    |     r1 = r5;
    0x00010ad4 mov r0, r7                                    |     r0 = r7;
    0x00010ad8 str sb, [r6, -0x110]                          |     var_128h = sb;
    0x00010adc bl 0x121b4                                    |     r0 = fcn_000121b4 (r0);
    0x00010ae0 cmn r0, 1                                     |     
                                                             |     if (r0 == 1) {
    0x00010ae4 bne 0x10b14                                   |         
    0x00010ae8 bl 0x10810                                    |         errno_location ();
    0x00010aec ldr r5, [pc, 0x38]                            |         
    0x00010af0 ldr r2, [pc, 0x38]                            |         r2 = stderr;
    0x00010af4 ldr r1, [pc, 0x6c]                            |         r1 = "%s: error!: \"%s\" volume not found\n";
    0x00010af8 ldr r4, [r0]                                  |         r4 = *(r0);
    0x00010afc ldr r0, [r5]                                  |         r0 = *(0x10b28);
    0x00010b00 bl 0x10774                                    |         fprintf (r0, "%s: error!: \"%s\" volume not found\n", r2, r3, r4, r5)
    0x00010b04 ldr r5, [r5]                                  |         r5 = *(0x10b28);
    0x00010b08 b 0x109d4                                     |         goto label_3;
                                                             | label_13:
    0x00010b0c add sl, sl, 1                                 |         sl++;
    0x00010b10 b 0x10a2c                                     |         goto label_4;
                                                             |     }
    0x00010b14 mov r0, r7                                    |     r0 = r7;
    0x00010b18 bl 0x114a8                                    |     fcn_000114a8 (r0);
                                                             | label_6:
    0x00010b1c mov r0, fp                                    |     r0 = fp;
    0x00010b20 add sp, sp, 0x1200                            |     
    0x00010b24 add sp, sp, 0x3c                              |     
    0x00010b28 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc}      |     
                                                             | }

[*] Function fprintf used 55 times ubirename