[*] Binary protection state of ldd
Partial RELRO No Canary found NX disabled No PIE No RPATH No RUNPATH No Symbols
[*] Function strcpy tear down of ldd
; 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/bin/ldd @ 0x10da0 */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) fcn.00010da0 () | void fcn_00010da0 (int32_t arg_0h, int32_t arg_ch, char * arg1) {
| int32_t var_ch;
| char * s;
| int32_t var_14h;
| int32_t var_1ch;
| void * buf;
| int32_t var_30h;
| int32_t var_4ch;
| int32_t var_78h;
| int32_t var_88h;
| int32_t var_d0h;
| int32_t var_12ch;
| r0 = arg1;
0x00010da0 push {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00010da4 mov r2, 0 | r2 = 0;
0x00010da8 sub sp, sp, 0x12c |
0x00010dac str r2, [sp, 0x14] | var_14h = r2;
0x00010db0 str r2, [sp, 0xc] | var_ch = r2;
0x00010db4 ldr r2, [pc, 0x74c] | r2 = *(0x11504);
0x00010db8 cmp r0, r2 |
| if (r0 != r2) {
0x00010dbc bne 0x10dcc | goto label_18;
| }
| label_1:
0x00010dc0 mov r0, 0 | r0 = 0;
| do {
| label_7:
0x00010dc4 add sp, sp, 0x12c |
0x00010dc8 pop {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_18:
0x00010dcc cmp r0, 0 |
0x00010dd0 str r0, [sp, 0x10] | s = r0;
| if (arg_0h != ) {
0x00010dd4 bne 0x10df0 | goto label_19;
| }
0x00010dd8 ldr r3, [pc, 0x72c] | r3 = "not_found";
0x00010ddc ldr r1, [pc, 0x72c] | r1 = stderr;
0x00010de0 ldr r0, [r3] | r0 = "not_found";
0x00010de4 bl 0x107b8 | fprintf ("not_found", r1, r2, "not_found");
| label_0:
0x00010de8 mvn r0, 0 | r0 = ~0;
0x00010dec b 0x10dc4 |
| } while (1);
| label_19:
0x00010df0 ldr r1, [pc, 0x71c] | r1 = "No filename specified.\n";
0x00010df4 bl 0x10800 | r0 = fopen (r0, "No filename specified.\n");
0x00010df8 subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 == r0) {
0x00010dfc bne 0x10e0c |
0x00010e00 ldr r0, [sp, 0x10] | r0 = s;
0x00010e04 bl 0x10764 | perror (r0);
0x00010e08 b 0x10de8 | goto label_0;
| }
0x00010e0c bl 0x10854 | fileno (r0);
0x00010e10 add r1, sp, 0x20 | r1 += buf;
0x00010e14 bl 0x107ac | r0 = fstat (r0, r1);
0x00010e18 cmp r0, 0 |
| if (r0 < 0) {
0x00010e1c bge 0x10e34 |
0x00010e20 ldr r0, [sp, 0x10] | r0 = s;
0x00010e24 bl 0x10764 | perror (r0);
0x00010e28 mov r0, r4 | r0 = r4;
0x00010e2c bl 0x1080c | fclose (r0);
0x00010e30 b 0x10de8 | goto label_0;
| }
0x00010e34 ldr r5, [sp, 0x4c] | r5 = var_4ch;
0x00010e38 cmp r5, 0x33 |
| if (r5 >= 0x33) {
0x00010e3c bls 0x10eb4 |
0x00010e40 ldr r3, [sp, 0x30] | r3 = var_30h;
0x00010e44 and r3, r3, 0xf000 | r3 &= 0xf000;
0x00010e48 cmp r3, 0x8000 |
| if (r3 != 0x8000) {
0x00010e4c bne 0x10eb4 | goto label_20;
| }
0x00010e50 mov r0, r4 | r0 = r4;
0x00010e54 bl 0x10854 | fileno (r0);
0x00010e58 mov r3, 0 | r3 = 0;
0x00010e5c mov r2, 3 | r2 = 3;
0x00010e60 mov r1, r5 | r1 = r5;
0x00010e64 stm sp, {r0, r3} | *(sp) = r0;
| *((sp + 4)) = r3;
0x00010e68 mov r3, 2 | r3 = 2;
0x00010e6c mov r0, 0 | r0 = 0;
0x00010e70 bl 0x10788 | r0 = mmap (r0, r1, r2, r3, r4, r5);
0x00010e74 cmn r0, 1 |
0x00010e78 str r0, [sp, 0xc] | var_ch = r0;
| if (r0 != 1) {
0x00010e7c bne 0x10eb4 | goto label_20;
| }
0x00010e80 mov r0, r4 | r0 = r4;
0x00010e84 bl 0x1080c | fclose (r0);
0x00010e88 ldr r3, [pc, 0x67c] | r3 = "not_found";
0x00010e8c ldr r4, [r3] | r4 = "not_found";
0x00010e90 bl 0x1083c | r0 = errno_location ();
0x00010e94 ldr r0, [r0] | r0 = *(r0);
0x00010e98 bl 0x10740 | strerror (r0);
0x00010e9c ldr r2, [sp, 0x10] | r2 = s;
0x00010ea0 ldr r1, [pc, 0x670] | r1 = *(0x11514);
0x00010ea4 mov r3, r0 | r3 = r0;
0x00010ea8 mov r0, r4 | r0 = r4;
0x00010eac bl 0x107b8 | fprintf (r0, r1, r2, r3);
0x00010eb0 b 0x10de8 | goto label_0;
| }
| label_20:
0x00010eb4 mov r0, r4 | r0 = r4;
0x00010eb8 bl 0x1080c | fclose (r0);
0x00010ebc ldr r3, [sp, 0xc] | r3 = var_ch;
0x00010ec0 cmp r3, 0 |
| if (r3 != 0) {
0x00010ec4 beq 0x10f94 |
0x00010ec8 ldr r2, [r3] | r2 = *(r3);
0x00010ecc ldr r3, [pc, 0x648] | r3 = "mmap(%s) failed: %s\n";
0x00010ed0 cmp r2, r3 |
| if (r2 == r3) {
0x00010ed4 bne 0x10f94 |
0x00010ed8 ldr r3, [sp, 0xc] | r3 = var_ch;
0x00010edc ldr r2, [pc, 0x63c] | r2 = *(0x1151c);
0x00010ee0 ldr r3, [r3, 4] | r3 = *((r3 + 4));
0x00010ee4 bic r3, r3, 0xff000000 | r3 = BIT_MASK (r3, 0xff000000);
0x00010ee8 bic r3, r3, 0xff00 | r3 = BIT_MASK (r3, 0xff00);
0x00010eec cmp r3, r2 |
| if (r3 != r2) {
0x00010ef0 bne 0x10f94 | goto label_21;
| }
0x00010ef4 ldr r3, [sp, 0xc] | r3 = var_ch;
0x00010ef8 ldrb r3, [r3, 5] | r3 = *((r3 + 5));
0x00010efc cmp r3, 1 |
0x00010f00 ldr r3, [pc, 0x61c] | r3 = *(0x11520);
| if (r3 == 1) {
0x00010f04 movne r2, 1 | r2 = 1;
| }
| if (r3 != 1) {
0x00010f08 moveq r2, 0 | r2 = 0;
| }
0x00010f0c str r2, [r3] | *(r3) = r2;
0x00010f10 ldr r3, [sp, 0xc] | r3 = var_ch;
0x00010f14 ldrh r2, [r3, 0x10] | r2 = *((r3 + 0x10));
| if (r3 != 1) {
0x00010f18 beq 0x10f74 |
0x00010f1c lsr r3, r2, 8 | r3 = r2 >> 8;
0x00010f20 orr r3, r3, r2, lsl 8 | r3 |= (r2 << 8);
0x00010f24 ldr r2, [sp, 0xc] | r2 = var_ch;
0x00010f28 ldr r0, [r2, 0x1c] | r0 = *((r2 + 0x1c));
0x00010f2c strh r3, [r2, 0x10] | *((r2 + 0x10)) = r3;
0x00010f30 bl 0x10b9c | fcn_00010b9c (r0);
0x00010f34 ldr r3, [sp, 0xc] | r3 = var_ch;
0x00010f38 str r0, [r3, 0x1c] | *((r3 + 0x1c)) = r0;
0x00010f3c ldr r0, [r3, 0x20] | r0 = *((r3 + 0x20));
0x00010f40 bl 0x10b9c | fcn_00010b9c (r0);
0x00010f44 ldr r3, [sp, 0xc] | r3 = var_ch;
0x00010f48 ldrh r2, [r3, 0x2c] | r2 = *((r3 + 0x2c));
0x00010f4c str r0, [r3, 0x20] | *((r3 + 0x20)) = r0;
0x00010f50 lsr r3, r2, 8 | r3 = r2 >> 8;
0x00010f54 orr r3, r3, r2, lsl 8 | r3 |= (r2 << 8);
0x00010f58 ldr r2, [sp, 0xc] | r2 = var_ch;
0x00010f5c strh r3, [r2, 0x2c] | *((r2 + 0x2c)) = r3;
0x00010f60 ldrh r2, [r2, 0x30] | r2 = *((r2 + 0x30));
0x00010f64 lsr r3, r2, 8 | r3 = r2 >> 8;
0x00010f68 orr r3, r3, r2, lsl 8 | r3 |= (r2 << 8);
0x00010f6c ldr r2, [sp, 0xc] | r2 = var_ch;
0x00010f70 strh r3, [r2, 0x30] | *((r2 + 0x30)) = r3;
| }
0x00010f74 ldr r3, [sp, 0xc] | r3 = var_ch;
0x00010f78 ldrh r3, [r3, 0x10] | r3 = *((r3 + 0x10));
0x00010f7c sub r3, r3, 2 | r3 -= 2;
0x00010f80 cmp r3, 1 |
| if (r3 < 1) {
0x00010f84 bls 0x10fac | goto label_22;
| }
0x00010f88 ldr r2, [sp, 0x10] | r2 = s;
0x00010f8c ldr r1, [pc, 0x594] | r1 = *(0x11524);
0x00010f90 b 0x10f9c |
| }
| } else {
| label_21:
0x00010f94 ldr r2, [sp, 0x10] | r2 = s;
0x00010f98 ldr r1, [pc, 0x58c] | r1 = "_s:_not_a_dynamic_executable";
| }
0x00010f9c ldr r3, [pc, 0x568] | r3 = "not_found";
0x00010fa0 ldr r0, [r3] | r0 = "not_found";
0x00010fa4 bl 0x107b8 | fprintf ("not_found", "_s:_not_a_dynamic_executable", r2, "not_found");
0x00010fa8 b 0x10de8 | goto label_0;
| label_22:
0x00010fac ldr r2, [sp, 0x30] | r2 = var_30h;
0x00010fb0 ldr r1, [pc, 0x578] | r1 = "_s:_not_an_ELF_file.";
0x00010fb4 tst r2, 0x800 |
0x00010fb8 mov r3, 0 | r3 = 0;
| if ((r2 & 0x800) == 0) {
0x00010fbc movne r3, 1 | r3 = 1;
| }
0x00010fc0 bics r2, r1, r2 | __asm ("bics r2, r1, r2");
| if ((r2 & 0x800) == 0) {
0x00010fc4 beq 0x1103c | goto label_23;
| }
0x00010fc8 cmp r3, 0 |
0x00010fcc str r3, [sp, 0x14] | var_14h = r3;
| if (r3 != 0) {
0x00010fd0 beq 0x10fe8 |
| label_3:
0x00010fd4 ldr r3, [pc, 0x530] | r3 = "not_found";
0x00010fd8 ldr r2, [sp, 0x10] | r2 = s;
0x00010fdc ldr r1, [pc, 0x550] | r1 = *(0x11530);
0x00010fe0 ldr r0, [r3] | r0 = "not_found";
0x00010fe4 bl 0x107b8 | fprintf ("not_found", r1, r2, "not_found");
| }
0x00010fe8 ldr r3, [pc, 0x534] | r3 = *(0x11520);
0x00010fec mov r2, 0 | r2 = 0;
0x00010ff0 str r2, [r3, 4] | *((r3 + 4)) = r2;
0x00010ff4 ldr r3, [sp, 0xc] | r3 = var_ch;
0x00010ff8 ldr r4, [r3, 0x1c] | r4 = "PATH_usr_bin:_bin:_usr_sbin:_sbin";
0x00010ffc ldrh r5, [r3, 0x2c] | r5 = *((r3 + 0x2c));
0x00011000 add r4, r3, r4 | r4 = r3 + r4;
| label_4:
0x00011004 subs r5, r5, 1 | r5--;
| if (r5 >= r5) {
0x00011008 bhs 0x11048 | goto label_24;
| }
| label_5:
0x0001100c ldr r3, [sp, 0xc] | r3 = var_ch;
0x00011010 ldr r4, [r3, 0x20] | r4 = *((r3 + 0x20));
0x00011014 ldrh r5, [r3, 0x30] | r5 = *((r3 + 0x30));
0x00011018 add r4, r3, r4 | r4 = r3 + r4;
| label_2:
0x0001101c subs r5, r5, 1 | r5--;
| if (r5 <= r5) {
0x00011020 blo 0x10dc0 | goto label_1;
| }
0x00011024 ldr r0, [r4, 4] | r0 = *((r4 + 4));
0x00011028 bl 0x10b9c | r0 = fcn_00010b9c (r0);
0x0001102c cmp r0, 6 |
| if (r0 == 6) {
0x00011030 beq 0x114e8 | goto label_25;
| }
0x00011034 add r4, r4, 0x28 | r4 += 0x28;
0x00011038 b 0x1101c | goto label_2;
| label_23:
0x0001103c mov r3, 1 | r3 = 1;
0x00011040 str r3, [sp, 0x14] | var_14h = r3;
0x00011044 b 0x10fd4 | goto label_3;
| label_24:
0x00011048 ldr r0, [r4] | r0 = *(r4);
0x0001104c bl 0x10b9c | r0 = fcn_00010b9c (r0);
0x00011050 cmp r0, 3 |
| if (r0 == 3) {
0x00011054 beq 0x11458 | goto label_26;
| }
0x00011058 add r4, r4, 0x20 | r4 += 0x20;
0x0001105c b 0x11004 | goto label_4;
| label_14:
0x00011060 cmp r2, 0x2f |
| if (r2 != 0x2f) {
0x00011064 moveq r6, r3 | r6 = r3;
| }
0x00011068 b 0x114b8 | goto label_27;
| label_15:
0x0001106c cmp r6, 0 |
| if (r6 == 0) {
0x00011070 beq 0x1100c | goto label_5;
| }
0x00011074 ldr r7, [r4] | r7 = *(r4);
0x00011078 cmp r7, 0 |
| if (r7 == 0) {
0x0001107c beq 0x1100c | goto label_5;
| }
0x00011080 mov r1, r6 | r1 = r6;
0x00011084 mov r0, r7 | r0 = r7;
0x00011088 bl 0x10818 | r0 = strcmp (r0, r1);
0x0001108c cmp r0, 0 |
| if (r0 != 0) {
0x00011090 bne 0x1118c | goto label_28;
| }
0x00011094 mov r0, r7 | r0 = r7;
0x00011098 bl 0x10884 | free (r0);
0x0001109c ldr r0, [r4, 8] | r0 = *((r4 + 8));
0x000110a0 ldr r3, [pc, 0x460] | r3 = *(0x11504);
0x000110a4 cmp r0, r3 |
| if (r0 != r3) {
0x000110a8 bne 0x11184 | goto label_29;
| }
| label_6:
0x000110ac mov r3, 0 | r3 = 0;
0x000110b0 str r3, [r4] | *(r4) = r3;
0x000110b4 str r3, [r4, 8] | *((r4 + 8)) = r3;
| label_16:
0x000110b8 mov r0, r5 | r0 = r5;
0x000110bc bl 0x1086c | r0 = strlen (r0);
0x000110c0 add r0, r0, 1 | r0++;
0x000110c4 bl 0x1077c | malloc (r0);
0x000110c8 mov r1, r5 | r1 = r5;
0x000110cc str r0, [r4] | *(r4) = r0;
0x000110d0 bl 0x1071c | strcpy (r0, r1)
0x000110d4 ldr r0, [r4] | r0 = *(r4);
0x000110d8 bl 0x107f4 | strdup (r0);
0x000110dc mov r2, 0 | r2 = 0;
0x000110e0 str r2, [r4, 0xc] | *((r4 + 0xc)) = r2;
0x000110e4 ldr r2, [pc, 0x438] | r2 = *(0x11520);
0x000110e8 mov r3, 1 | r3 = 1;
0x000110ec str r3, [r4, 4] | *((r4 + 4)) = r3;
0x000110f0 str r3, [r2, 4] | *((r2 + 4)) = r3;
0x000110f4 ldr r3, [sp, 0xc] | r3 = var_ch;
0x000110f8 ldrh r3, [r3, 0x10] | r3 = *((r3 + 0x10));
0x000110fc sub r3, r3, 2 | r3 -= 2;
0x00011100 cmp r3, 1 |
0x00011104 str r0, [r4, 8] | *((r4 + 8)) = r0;
| if (r3 > 1) {
0x00011108 bhi 0x1100c | goto label_5;
| }
0x0001110c ldr r3, [sp, 0xc] | r3 = var_ch;
0x00011110 ldrh r2, [r3, 4] | r2 = *((r3 + 4));
0x00011114 ldr r3, [pc, 0x41c] | r3 = "_s:_is_setuid";
0x00011118 cmp r2, r3 |
| if (r2 != r3) {
0x0001111c bne 0x1100c | goto label_5;
| }
0x00011120 ldr r3, [sp, 0xc] | r3 = var_ch;
0x00011124 ldrb r3, [r3, 6] | r3 = *((r3 + 6));
0x00011128 cmp r3, 1 |
| if (r3 != 1) {
0x0001112c bne 0x1100c | goto label_5;
| }
0x00011130 ldr r3, [sp, 0xc] | r3 = var_ch;
0x00011134 ldrh r3, [r3, 0x12] | r3 = *((r3 + 0x12));
0x00011138 cmp r3, 0x28 |
| if (r3 != 0x28) {
0x0001113c bne 0x1100c | goto label_5;
| }
0x00011140 add r1, sp, 0x78 | r1 += var_78h;
0x00011144 bl 0x10830 | r0 = stat ();
0x00011148 cmp r0, 0 |
| if (r0 != 0) {
0x0001114c bne 0x1100c | goto label_5;
| }
0x00011150 ldr r3, [sp, 0x88] | r3 = var_88h;
0x00011154 and r3, r3, 0xf000 | r3 &= 0xf000;
0x00011158 cmp r3, 0x8000 |
| if (r3 != 0x8000) {
0x0001115c bne 0x1100c | goto label_5;
| }
0x00011160 bl 0x10824 | r0 = vfork ();
0x00011164 subs r2, r0, 0 | r2 = r0 - 0;
| if (r2 == r0) {
0x00011168 bne 0x11194 |
0x0001116c ldr r1, [sp, 0x10] | r1 = s;
0x00011170 ldr r3, [pc, 0x3c4] | r3 = *(0x11538);
0x00011174 mov r0, r1 | r0 = r1;
0x00011178 bl 0x10770 | execle ();
0x0001117c ldr r0, [pc, 0x3bc] | r0 = "PATH_usr_bin:_bin:_usr_sbin:_sbin";
0x00011180 bl 0x10860 | r0 = exit ("PATH_usr_bin:_bin:_usr_sbin:_sbin");
| label_29:
0x00011184 bl 0x10884 | free (r0);
0x00011188 b 0x110ac | goto label_6;
| label_28:
0x0001118c ldr r4, [r4, 0xc] | r4 = *((r4 + 0xc));
0x00011190 b 0x114cc | goto label_30;
| }
0x00011194 mov r2, 0 | r2 = 0;
0x00011198 add r1, sp, 0x1c | r1 += var_1ch;
0x0001119c bl 0x10728 | waitpid ();
0x000111a0 ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x000111a4 tst r3, 0x7f |
| if ((r3 & 0x7f) != 0) {
0x000111a8 bne 0x1100c | goto label_5;
| }
0x000111ac asr r3, r3, 8 | r3 >>= 8;
0x000111b0 tst r3, 0xff |
| if ((r3 & 0xff) == 0) {
0x000111b4 moveq r0, 1 | r0 = 1;
| goto label_31;
| }
| if ((r3 & 0xff) != 0) {
| label_31:
0x000111b8 bne 0x1100c | goto label_5;
| }
0x000111bc b 0x10dc4 | goto label_7;
| do {
0x000111c0 cmp r0, 1 |
| if (r0 == 1) {
0x000111c4 bne 0x11200 |
0x000111c8 ldr r1, [sp, 0xc] | r1 = var_ch;
0x000111cc mov r0, r8 | r0 = r8;
0x000111d0 bl 0x10d10 | r0 = fcn_00010d10 (r0, r1);
0x000111d4 mov r5, r0 | r5 = r0;
0x000111d8 ldr r0, [r7, -4] | r0 = *((r7 - 4));
0x000111dc bl 0x10b9c | fcn_00010b9c (r0);
0x000111e0 ldr fp, [r6, 0x10] | fp = *((r6 + 0x10));
0x000111e4 adds r5, r5, r0 | r5 += r0;
| if (r5 == r5) {
0x000111e8 beq 0x11200 | goto label_8;
| }
0x000111ec mov r0, r5 | r0 = r5;
0x000111f0 bl 0x1086c | r0 = strlen (r0);
0x000111f4 cmp r0, 0 |
| if (r0 == 0) {
0x000111f8 movne r3, r5 | r3 = r5;
| }
| if (r0 != 0) {
0x000111fc bne 0x11220 | goto label_32;
| }
| }
| label_8:
0x00011200 add r7, r7, 8 | r7 += 8;
| label_17:
0x00011204 ldr r0, [r7, -8] | r0 = *((r7 - 8));
0x00011208 bl 0x10b9c | r0 = fcn_00010b9c (r0);
0x0001120c cmp r0, 0 |
0x00011210 bne 0x111c0 |
| } while (r0 != 0);
0x00011214 b 0x10dc0 | goto label_1;
| do {
0x00011218 cmp r2, 0x2f |
| if (r2 != 0x2f) {
0x0001121c moveq r5, r3 | r5 = r3;
| }
| label_32:
0x00011220 ldrb r2, [r3], 1 | r2 = *(r3);
| r3++;
0x00011224 cmp r2, 0 |
0x00011228 bne 0x11218 |
| } while (r2 != 0);
0x0001122c ldr r3, [r6, 4] | r3 = *((r6 + 4));
0x00011230 cmp r3, 0 |
| if (r3 == 0) {
0x00011234 beq 0x11270 | goto label_9;
| }
0x00011238 ldr r4, [r6, 8] | r4 = *((r6 + 8));
0x0001123c mov r1, 0x2f | r1 = 0x2f;
0x00011240 mov r0, r4 | r0 = r4;
0x00011244 bl 0x107a0 | r0 = strrchr (r0, r1);
0x00011248 cmp r0, 0 |
| if (r0 == 0) {
0x0001124c beq 0x11270 | goto label_9;
| }
0x00011250 ldr r0, [r6, 0xc] | r0 = *((r6 + 0xc));
0x00011254 bl 0x1086c | r0 = strlen (r0);
0x00011258 add r1, r0, 1 | r1 = r0 + 1;
0x0001125c add r1, r4, r1 | r1 = r4 + r1;
0x00011260 mov r0, r5 | r0 = r5;
0x00011264 bl 0x10818 | r0 = strcmp (r0, r1);
0x00011268 cmp r0, 0 |
| if (r0 == 0) {
0x0001126c beq 0x11200 | goto label_8;
| }
| label_9:
0x00011270 cmp fp, 0 |
| if (fp != 0) {
0x00011274 bne 0x112f4 | goto label_33;
| }
0x00011278 mov r0, 0x10 | r0 = 0x10;
0x0001127c bl 0x1077c | r0 = malloc (r0);
0x00011280 subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 == r0) {
0x00011284 beq 0x11200 | goto label_8;
| }
0x00011288 mov r0, r5 | r0 = r5;
0x0001128c bl 0x1086c | r0 = strlen (r0);
0x00011290 add r0, r0, 1 | r0++;
0x00011294 bl 0x1077c | malloc (r0);
0x00011298 mov r1, r5 | r1 = r5;
0x0001129c str r0, [r4] | *(r4) = r0;
0x000112a0 bl 0x1071c | strcpy (r0, r1)
0x000112a4 str fp, [r4, 4] | *((r4 + 4)) = fp;
0x000112a8 str fp, [r4, 8] | *((r4 + 8)) = fp;
0x000112ac str fp, [r4, 0xc] | *((r4 + 0xc)) = fp;
0x000112b0 add r1, sp, 0xd0 | r1 += var_d0h;
0x000112b4 ldr r0, [r4] | r0 = *(r4);
0x000112b8 bl 0x10830 | r0 = stat ();
0x000112bc cmp r0, 0 |
| if (r0 != 0) {
0x000112c0 bne 0x11334 | goto label_34;
| }
0x000112c4 ldr r0, [r4] | r0 = *(r4);
0x000112c8 bl 0x107f4 | strdup (r0);
0x000112cc str r0, [r4, 8] | *((r4 + 8)) = r0;
| label_11:
0x000112d0 ldr r3, [r6, 0x10] | r3 = *((r6 + 0x10));
0x000112d4 cmp r3, 0 |
| if (r3 == 0) {
0x000112d8 streq r4, [r6, 0x10] | *((r6 + 0x10)) = r4;
| goto label_35;
| }
| if (r3 == 0) {
| label_35:
0x000112dc beq 0x11200 | goto label_8;
| }
| label_13:
0x000112e0 ldr r2, [r3, 0xc] | r2 = *((r3 + 0xc));
0x000112e4 cmp r2, 0 |
| if (r2 != 0) {
0x000112e8 bne 0x11450 | goto label_36;
| }
0x000112ec str r4, [r3, 0xc] | *((r3 + 0xc)) = r4;
0x000112f0 b 0x11200 | goto label_8;
| label_33:
0x000112f4 ldr r0, [fp] | r0 = *(fp);
0x000112f8 cmp r0, 0 |
| if (r0 == 0) {
0x000112fc movne r3, r0 | r3 = r0;
| }
| if (r0 != 0) {
0x00011300 bne 0x11314 | goto label_37;
| }
| label_10:
0x00011304 ldr fp, [fp, 0xc] | fp = *(arg_ch);
0x00011308 b 0x11270 | goto label_9;
| do {
0x0001130c cmp r2, 0x2f |
| if (r2 != 0x2f) {
0x00011310 moveq r0, r3 | r0 = r3;
| }
| label_37:
0x00011314 ldrb r2, [r3], 1 | r2 = *(r3);
| r3++;
0x00011318 cmp r2, 0 |
0x0001131c bne 0x1130c |
| } while (r2 != 0);
0x00011320 mov r1, r5 | r1 = r5;
0x00011324 bl 0x10818 | r0 = strcmp (r0, r1);
0x00011328 cmp r0, 0 |
| if (r0 != 0) {
0x0001132c bne 0x11304 | goto label_10;
| }
0x00011330 b 0x11200 | goto label_8;
| label_34:
0x00011334 mov r0, 0x400 | r0 = 0x400;
0x00011338 bl 0x1077c | r0 = malloc (r0);
0x0001133c subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 != r0) {
0x00011340 bne 0x11428 | goto label_38;
| }
0x00011344 ldr r3, [pc, 0x1c0] | r3 = "not_found";
0x00011348 ldr r2, [pc, 0x1f4] | r2 = *(0x11540);
0x0001134c ldr r1, [pc, 0x1f4] | r1 = "locate_library_file";
0x00011350 ldr r0, [r3] | r0 = "not_found";
0x00011354 bl 0x107b8 | fprintf ("not_found", "locate_library_file", r2, "not_found");
0x00011358 mov r0, 1 | r0 = 1;
0x0001135c bl 0x10848 | exit (r0);
| do {
0x00011360 add sb, sb, 8 | sb += 8;
| label_12:
0x00011364 ldr r0, [sb] | r0 = *(sb);
0x00011368 bl 0x10b9c | r0 = fcn_00010b9c (r0);
0x0001136c cmp r0, 0 |
| if (r0 == 0) {
0x00011370 beq 0x1139c | goto label_39;
| }
0x00011374 cmp r0, 0xf |
0x00011378 bne 0x11360 |
| } while (r0 != 0xf);
0x0001137c ldr r1, [sp, 0xc] | r1 = var_ch;
0x00011380 mov r0, r8 | r0 = r8;
0x00011384 bl 0x10d10 | r0 = fcn_00010d10 (r0, r1);
0x00011388 mov fp, r0 |
0x0001138c ldr r0, [sb, 4] | r0 = *((sb + 4));
0x00011390 bl 0x10b9c | r0 = fcn_00010b9c (r0);
0x00011394 adds r2, fp, r0 | r2 = fp + r0;
0x00011398 bne 0x11430 |
| while (r3 == 0) {
| label_39:
0x0001139c ldr r3, [sp, 0x14] | r3 = var_14h;
0x000113a0 cmp r3, 1 |
| if (r3 != 1) {
0x000113a4 beq 0x113d4 |
0x000113a8 ldr r0, [pc, 0x19c] | r0 = "_s:_Out_of_memory_";
0x000113ac bl 0x10758 | getenv ("_s:_Out_of_memory_");
0x000113b0 ldr r3, [r4] | r3 = *(r4);
0x000113b4 subs r2, r0, 0 | r2 = r0 - 0;
| if (r2 == r0) {
0x000113b8 beq 0x113d4 | goto label_40;
| }
0x000113bc mov r0, r3 | r0 = r3;
0x000113c0 mov r1, r5 | r1 = r5;
0x000113c4 bl 0x10bbc | fcn_00010bbc (r0, r1);
0x000113c8 ldrb r3, [r5] | r3 = *(r5);
0x000113cc cmp r3, 0 |
| if (r3 != 0) {
0x000113d0 bne 0x11448 | goto label_41;
| }
| }
| label_40:
0x000113d4 ldr r2, [r6, 0xc] | r2 = *((r6 + 0xc));
0x000113d8 cmp r2, 0 |
| if (r2 != 0) {
0x000113dc beq 0x113f8 |
0x000113e0 mov r1, r5 | r1 = r5;
0x000113e4 ldr r0, [r4] | r0 = *(r4);
0x000113e8 bl 0x10bbc | fcn_00010bbc (r0, r1);
0x000113ec ldrb r3, [r5] | r3 = *(r5);
0x000113f0 cmp r3, 0 |
| if (r3 != 0) {
0x000113f4 bne 0x11448 | goto label_41;
| }
| }
0x000113f8 mov r2, sl | r2 = sl;
0x000113fc mov r1, r5 | r1 = r5;
0x00011400 ldr r0, [r4] | r0 = *(r4);
0x00011404 bl 0x10bbc | fcn_00010bbc (r0, r1);
0x00011408 ldrb r3, [r5] | r3 = *(r5);
0x0001140c cmp r3, 0 |
| if (r3 != 0) {
0x00011410 bne 0x11448 | goto label_41;
| }
0x00011414 mov r0, r5 | r0 = r5;
0x00011418 bl 0x10884 | free (r0);
0x0001141c ldr r3, [pc, 0xe4] | r3 = *(0x11504);
0x00011420 str r3, [r4, 8] | *((r4 + 8)) = r3;
0x00011424 b 0x112d0 | goto label_11;
| label_38:
0x00011428 mov sb, r8 | sb = r8;
0x0001142c b 0x11364 | goto label_12;
0x00011430 mov r1, r5 | r1 = r5;
0x00011434 ldr r0, [r4] | r0 = *(r4);
0x00011438 bl 0x10bbc | fcn_00010bbc (r0, r1);
0x0001143c ldrb r3, [r5] | r3 = *(r5);
0x00011440 cmp r3, 0 |
0x00011444 beq 0x1139c |
| }
| label_41:
0x00011448 str r5, [r4, 8] | *((r4 + 8)) = r5;
0x0001144c b 0x112d0 | goto label_11;
| label_36:
0x00011450 mov r3, r2 | r3 = r2;
0x00011454 b 0x112e0 | goto label_13;
| label_26:
0x00011458 ldr r0, [r4, 4] | r0 = *((r4 + 4));
0x0001145c bl 0x10b9c | fcn_00010b9c (r0);
0x00011460 ldr r3, [sp, 0xc] | r3 = var_ch;
0x00011464 ldr r4, [pc, 0xb8] | r4 = *(0x11520);
0x00011468 add r5, r3, r0 | r5 = r3 + r0;
0x0001146c mov r0, r5 | r0 = r5;
0x00011470 bl 0x107f4 | strdup (r0);
0x00011474 str r0, [r4, 8] | *((r4 + 8)) = r0;
0x00011478 mov r0, r5 | r0 = r5;
0x0001147c bl 0x107f4 | strdup (r0);
0x00011480 mov r1, 0x2f | r1 = 0x2f;
0x00011484 mov r6, r0 | r6 = r0;
0x00011488 str r0, [r4, 0xc] | *((r4 + 0xc)) = r0;
0x0001148c bl 0x107a0 | r0 = strrchr (r0, r1);
0x00011490 cmp r0, 0 |
| if (r0 == 0) {
0x00011494 movne r3, 0 | r3 = 0;
| }
| if (r0 == 0) {
0x00011498 strbne r3, [r0] | *(r0) = r3;
| }
| if (r0 == 0) {
0x0001149c bne 0x114b0 |
0x000114a0 mov r0, r6 | r0 = r6;
0x000114a4 bl 0x10884 | free (r0);
0x000114a8 ldr r3, [r4, 8] | r3 = *((r4 + 8));
0x000114ac str r3, [r4, 0xc] | *((r4 + 0xc)) = r3;
| }
0x000114b0 mov r3, r5 | r3 = r5;
0x000114b4 mov r6, r5 | r6 = r5;
| label_27:
0x000114b8 ldrb r2, [r3], 1 | r2 = *(r3);
| r3++;
0x000114bc cmp r2, 0 |
| if (r2 != 0) {
0x000114c0 bne 0x11060 | goto label_14;
| }
0x000114c4 ldr r3, [pc, 0x58] | r3 = *(0x11520);
0x000114c8 ldr r4, [r3, 0x10] | r4 = *(0x11530);
| label_30:
0x000114cc cmp r4, 0 |
| if (r4 != 0) {
0x000114d0 bne 0x1106c | goto label_15;
| }
0x000114d4 mov r0, 0x10 | r0 = 0x10;
0x000114d8 bl 0x1077c | r0 = malloc (r0);
0x000114dc subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 != r0) {
0x000114e0 bne 0x110b8 | goto label_16;
| }
0x000114e4 b 0x1100c | goto label_5;
| label_25:
0x000114e8 ldr r0, [r4, 0x10] | r0 = *((r4 + 0x10));
0x000114ec bl 0x10b9c | fcn_00010b9c (r0);
0x000114f0 ldr r3, [sp, 0xc] | r3 = var_ch;
0x000114f4 ldr r6, [pc, 0x28] | r6 = *(0x11520);
0x000114f8 ldr sl, [pc, 0x50] | sl = "/lib:/usr/lib:/usr/X11R6/lib";
0x000114fc add r8, r3, r0 | r8 = r3 + r0;
0x00011500 add r7, r8, 8 | r7 = r8 + 8;
0x00011504 b 0x11204 | goto label_17;
| }
[*] Function strcpy used 3 times ldd