[*] Binary protection state of libc.so.6
Full RELRO Canary found NX enabled DSO No RPATH No RUNPATH No Symbols
[*] Function strcpy tear down of libc.so.6
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libc.so.6 @ 0x28e64 */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) fcn.00028e64 () | void fcn_00028e64 (int16_t arg_0h, int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| int16_t var_0h;
| int16_t var_8h;
| int32_t var_0h_3;
| int32_t var_8h_2;
| char * src;
| int32_t var_10h;
| size_t n;
| int32_t var_18h;
| int32_t var_1ch;
| int32_t var_20h;
| int32_t var_20h_2;
| int32_t var_28h;
| int32_t var_2ch;
| char * s2;
| int32_t var_34h;
| int32_t var_38h;
| int16_t var_3ch;
| int32_t var_40h;
| int32_t var_44h;
| int32_t var_48h;
| int32_t var_50h;
| int32_t var_5ch;
| int16_t var_0h_2;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x00028e64 push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00028e68 sub sp, 0x6c |
0x00028e6a ldr.w fp, [pc, 0x308] | fp = *(0x00029174);
0x00028e6e movs r4, 0 | r4 = 0;
0x00028e70 add r7, sp, 8 | r7 += var_8h;
0x00028e72 mov sl, r1 | sl = r1;
0x00028e74 str r4, [r7, 0x38] | var_38h = r4;
0x00028e76 add fp, pc |
0x00028e78 strd r2, r3, [r7, 0x20] | __asm ("strd r2, r3, [var_20h]");
| if (r1 != 0) {
0x00028e7c cbz r1, 0x28ea8 |
0x00028e7e ldr.w r2, [r7, 0x8c] | r2 = *((r7 + 0x8c));
0x00028e82 mov sb, r0 | sb = r0;
0x00028e84 mov r0, r3 | r0 = r3;
0x00028e86 sub.w r3, r2, 6 | r3 = r2 - 6;
0x00028e8a clz r3, r3 | r3 &= r3;
0x00028e8e lsrs r3, r3, 5 | r3 >>= 5;
0x00028e90 cmp r2, 0xc |
0x00028e92 it hi |
| if (r2 <= 0xc) {
0x00028e94 orrhi r3, r3, 1 | r3 |= 1;
| }
| if (r3 == 0) {
0x00028e98 cbz r3, 0x28eb4 | goto label_13;
| }
0x00028e9a ldr.w r2, [r7, 0x88] | r2 = *((r7 + 0x88));
0x00028e9e cmp r2, 1 |
0x00028ea0 it ne |
| if (r2 != 1) {
0x00028ea2 cmpne r0, r4 | __asm ("cmpne r0, r4");
| }
| if (r2 != 1) {
0x00028ea4 bne.w 0x2911e | goto label_14;
| }
| }
| label_2:
0x00028ea8 mov r3, sl | r3 = sl;
| label_0:
0x00028eaa mov r0, r3 | r0 = r3;
0x00028eac adds r7, 0x64 | r7 += 0x64;
0x00028eae mov sp, r7 |
0x00028eb0 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_13:
0x00028eb4 ldr r3, [pc, 0x2b0] |
0x00028eb6 mrc p15, 0, r2, c13, c0, 3 | __asm ("mrc p15, 0, r2, c13, c0, 3");
0x00028eba ldr r0, [pc, 0x2bc] |
0x00028ebc add r3, pc |
0x00028ebe ldr r3, [r3] | r3 = *(0x52028);
0x00028ec0 str r2, [r7, 0x18] | var_18h = r2;
0x00028ec2 ldr r3, [r2, r3] | r3 = *((r2 + r3));
0x00028ec4 add r0, pc | r0 = 0x52042;
0x00028ec6 str r3, [r7, 0x1c] | var_1ch = r3;
0x00028ec8 bl 0x5e7c4 | pthread_rwlock_rdlock ();
0x00028ecc ldr r0, [pc, 0x2ac] |
0x00028ece add r0, pc | r0 = 0x5204e;
0x00028ed0 adds r0, 0x1c | r0 += 0x1c;
0x00028ed2 bl 0x5e7c4 | pthread_rwlock_rdlock ();
0x00028ed6 cmp.w sb, 0 |
| if (sb == 0) {
0x00028eda beq.w 0x291f4 | goto label_15;
| }
| label_8:
0x00028ede ldr r5, [pc, 0x2a0] |
0x00028ee0 ldr.w r3, [r7, 0x8c] | r3 = *((r7 + 0x8c));
0x00028ee4 ldr.w r0, [r7, 0x8c] | r0 = *((r7 + 0x8c));
0x00028ee8 add r5, pc | r5 = 0x5206e;
0x00028eea str.w sl, [r7, 0x5c] | __asm ("str.w sl, [var_5ch]");
0x00028eee add.w r4, r5, 0x3c | r4 = r5 + 0x3c;
0x00028ef2 str r3, [r7, 0x44] | var_44h = r3;
0x00028ef4 movs r3, 0 | r3 = 0;
0x00028ef6 str.w sb, [r7, 0x40] | __asm ("str.w sb, [var_40h]");
0x00028efa str r3, [r7, 0x50] | var_50h = r3;
0x00028efc bl 0x27e0c | fcn_00027e0c (r0);
0x00028f00 str r0, [r7, 0xc] | src = r0;
0x00028f02 str r0, [r7, 0x48] | var_48h = r0;
0x00028f04 mov r0, r4 | r0 = r4;
0x00028f06 bl 0x5e7c4 | pthread_rwlock_rdlock ();
0x00028f0a ldr r2, [pc, 0x278] |
0x00028f0c mov r1, r5 | r1 = r5;
0x00028f0e add.w r0, r7, 0x40 | r0 += var_40h;
0x00028f12 add r2, pc | r2 = 0x5209c;
0x00028f14 bl 0xa9f78 | r0 = tfind ();
0x00028f18 mov r5, r0 | r5 = r0;
0x00028f1a str r0, [r7, 0x10] | var_10h = r0;
0x00028f1c mov r0, r4 | r0 = r4;
0x00028f1e bl 0x5f0ac | pthread_rwlock_unlock ();
| if (r5 != 0) {
0x00028f22 cbz r5, 0x28f36 |
0x00028f24 ldr r3, [pc, 0x260] |
0x00028f26 ldr r4, [r5] | r4 = *(r5);
0x00028f28 ldr.w r3, [fp, r3] | r3 = *((fp + r3));
0x00028f2c ldr r2, [r4, 0xc] | r2 = *((r4 + 0xc));
0x00028f2e ldr r3, [r3] | r3 = *(0x29188);
0x00028f30 cmp r2, r3 |
| if (r2 == r3) {
0x00028f32 beq.w 0x29210 | goto label_16;
| }
| }
0x00028f36 ldr r3, [pc, 0x254] | r3 = *(0x2918e);
0x00028f38 ldr.w r3, [fp, r3] | r3 = *((fp + r3));
0x00028f3c ldr r4, [r3] | r4 = *(0x2918e);
| if (r4 != 0) {
0x00028f3e cbnz r4, 0x28f4e | goto label_17;
| }
0x00028f40 b 0x2932c | goto label_18;
| do {
| if (r4 < 0) {
0x00028f42 blt.w 0x291fe | goto label_19;
| }
0x00028f46 ldr r4, [r4] | r4 = *(r4);
0x00028f48 cmp r4, 0 |
| if (r4 == 0) {
0x00028f4a beq.w 0x29208 | goto label_20;
| }
| label_17:
0x00028f4e add.w r1, r4, 0xc | r1 = r4 + 0xc;
0x00028f52 mov r0, sb | r0 = sb;
0x00028f54 bl 0x69790 | r0 = strcmp (r0, r1);
0x00028f58 subs r1, r0, 0 | r1 = r0 - 0;
0x00028f5a bne 0x28f42 |
| } while (r1 != r0);
0x00028f5c ldr r6, [r4, 4] | r6 = *((r4 + 4));
0x00028f5e ldrb r3, [r6] | r3 = *(r6);
0x00028f60 str r6, [r7, 0x34] | var_34h = r6;
0x00028f62 cmp r3, 0x2f |
| if (r3 != 0x2f) {
0x00028f64 bne.w 0x2912a | goto label_21;
| }
| label_4:
0x00028f68 ldr r3, [pc, 0x224] |
0x00028f6a ldr.w r2, [r7, 0x8c] | r2 = *((r7 + 0x8c));
0x00028f6e add r3, pc | r3 = 0x52102;
0x00028f70 ldrb r6, [r3, r2] | r6 = *((r3 + r2));
0x00028f72 mov r0, r2 | r0 = r2;
0x00028f74 ldr r3, [pc, 0x21c] |
0x00028f76 add r3, pc | r3 = 0x5210e;
0x00028f78 add r6, r3 | r6 += r3;
0x00028f7a bl 0x27e0c | r0 = fcn_00027e0c (r0);
0x00028f7e ldrb r3, [r0] | r3 = *(r0);
0x00028f80 mov r8, r0 | r8 = r0;
0x00028f82 cmp r3, 0x43 |
| if (r3 == 0x43) {
0x00028f84 beq.w 0x29156 | goto label_22;
| }
| label_5:
0x00028f88 ldr r0, [pc, 0x20c] |
0x00028f8a add r0, pc | r0 = 0x52126;
0x00028f8c bl 0x2e8f0 | r0 = getenv (r0);
0x00028f90 mov r5, r0 | r5 = r0;
| if (r0 != 0) {
0x00028f92 cbz r0, 0x28f98 |
0x00028f94 ldrb r3, [r0] | r3 = *(r0);
| if (r3 != 0) {
0x00028f96 cbnz r3, 0x28f9a | goto label_6;
| }
| }
0x00028f98 mov r5, r8 | r5 = r8;
| label_6:
0x00028f9a mov r0, sb | r0 = sb;
0x00028f9c bl 0x6ae40 | r0 = strlen ();
0x00028fa0 mov r8, r0 | r8 = r0;
0x00028fa2 mov r0, r6 | r0 = r6;
0x00028fa4 bl 0x6ae40 | strlen ();
0x00028fa8 mov r3, r8 | r3 = r8;
0x00028faa ldr r2, [pc, 0x1f0] |
0x00028fac adds r3, r0, r3 | r3 = r0 + r3;
0x00028fae mov r1, r6 | r1 = r6;
0x00028fb0 adds r3, 0xc | r3 += 0xc;
0x00028fb2 str.w r8, [r7, 0x14] | __asm ("str.w r8, [n]");
0x00028fb6 bic r3, r3, 7 | r3 = BIT_MASK (r3, 7);
0x00028fba add r2, pc | r2 = 0x5215c;
0x00028fbc sub.w sp, sp, r3 |
0x00028fc0 str r2, [r7, 0x30] | s2 = r2;
0x00028fc2 add r0, sp, 8 | r0 += var_8h;
0x00028fc4 add.w r2, r7, 0x3c | r2 += var_3ch;
0x00028fc8 str r2, [r7, 0x28] | var_28h = r2;
0x00028fca str r0, [r7, 0x2c] | var_2ch = r0;
0x00028fcc bl 0x6a590 | stpcpy ();
0x00028fd0 ldr r6, [r7, 0x14] | r6 = n;
0x00028fd2 movs r3, 0x2f | r3 = 0x2f;
0x00028fd4 mov r1, sb | r1 = sb;
0x00028fd6 strb r3, [r0], 1 | *(r0) = r3;
| r0++;
0x00028fda mov r2, r6 | r2 = r6;
0x00028fdc blx 0x6d540 | memcpy (r0, r1, r2);
0x00028fe0 ldr r2, [pc, 0x1bc] |
0x00028fe2 mov r3, r0 | r3 = r0;
0x00028fe4 add r2, pc | r2 = 0x52188;
0x00028fe6 ldr r0, [r2] | r0 = *(0x52188);
0x00028fe8 str r0, [r3, r6] | *((r3 + r6)) = r0;
0x00028fea mov r0, r5 | r0 = r5;
0x00028fec bl 0x6ae40 | r0 = strlen ();
0x00028ff0 add.w r3, r0, 8 | r3 = r0 + 8;
0x00028ff4 bic r3, r3, 7 | r3 = BIT_MASK (r3, 7);
0x00028ff8 sub.w sp, sp, r3 |
0x00028ffc add r6, sp, 8 | r6 += var_8h;
| do {
| label_1:
0x00028ffe ldrb r3, [r5] | r3 = *(r5);
0x00029000 cmp r3, 0x3a |
| if (r3 == 0x3a) {
0x00029002 beq.w 0x29162 | goto label_23;
| }
0x00029006 cmp r3, 0 |
| if (r3 != 0) {
0x00029008 bne.w 0x291b8 | goto label_24;
| }
0x0002900c movs r3, 0x43 | r3 = 0x43;
0x0002900e strh r3, [r6] | *(r6) = r3;
| label_7:
0x00029010 ldrb r3, [r6] | r3 = *(r6);
0x00029012 cmp r3, 0x43 |
| if (r3 == 0x43) {
0x00029014 bne 0x2901c |
0x00029016 ldrb r3, [r6, 1] | r3 = *((r6 + 1));
0x00029018 cmp r3, 0 |
| if (r3 == 0) {
0x0002901a beq 0x290ea | goto label_3;
| }
| }
0x0002901c ldr r1, [r7, 0x30] | r1 = s2;
0x0002901e mov r0, r6 | r0 = r6;
0x00029020 bl 0x69790 | r0 = strcmp (r0, r1);
0x00029024 cmp r0, 0 |
| if (r0 == 0) {
0x00029026 beq 0x290ea | goto label_3;
| }
0x00029028 ldr r2, [r7, 0x2c] | r2 = var_2ch;
0x0002902a mov r3, r4 | r3 = r4;
0x0002902c ldr r0, [r7, 0x34] | r0 = var_34h;
0x0002902e mov r1, r6 | r1 = r6;
0x00029030 bl 0x293e0 | r0 = fcn_000293e0 (r0, r1, r2, r3, r4);
0x00029034 mov r8, r0 | r8 = r0;
0x00029036 cmp r0, 0 |
0x00029038 beq 0x28ffe |
| } while (r0 == 0);
0x0002903a ldr r3, [r7, 0x28] | r3 = var_28h;
0x0002903c mov r2, sl | r2 = sl;
0x0002903e mov r1, r4 | r1 = r4;
0x00029040 str r3, [sp] | *(sp) = r3;
0x00029042 movs r3, 1 | r3 = 1;
0x00029044 bl 0x287f4 | r0 = fcn_000287f4 (r0, r1, r2, r3);
0x00029048 mov r3, r0 | r3 = r0;
0x0002904a cmp r0, 0 |
| if (r0 != 0) {
0x0002904c beq 0x290a6 |
0x0002904e adds r2, r0, 1 | r2 = r0 + 1;
| if (r2 == r0) {
0x00029050 beq 0x290ea | goto label_3;
| }
| label_11:
0x00029052 ldr r0, [r7, 0x38] | r0 = var_38h;
0x00029054 str r3, [r7, 0x34] | var_34h = r3;
0x00029056 blx 0x1ded4 | fcn_0001ded4 ();
0x0002905a ldr r2, [r7, 0x10] | r2 = var_10h;
0x0002905c ldr r3, [r7, 0x34] | r3 = var_34h;
0x0002905e cmp r2, 0 |
| if (r2 == 0) {
0x00029060 beq.w 0x29274 | goto label_25;
| }
0x00029064 ldr r1, [pc, 0x120] |
0x00029066 ldr r2, [r7, 0x10] | r2 = var_10h;
0x00029068 ldr.w r1, [fp, r1] | r1 = *((fp + r1));
0x0002906c ldr r2, [r2] | r2 = *(r2);
0x0002906e ldr r1, [r1] | r1 = *(0x29188);
0x00029070 strd r8, r3, [r2, 0x10] | __asm ("strd r8, r3, [r2, 0x10]");
0x00029074 str r1, [r2, 0xc] | *((r2 + 0xc)) = r1;
0x00029076 ldr r1, [r7, 0x3c] | r1 = var_3ch;
0x00029078 str r1, [r2, 0x18] | *((r2 + 0x18)) = r1;
| label_10:
0x0002907a ldr r2, [pc, 0xf0] |
0x0002907c ldrd r1, r0, [r7, 0x18] | __asm ("ldrd r1, r0, [var_18h]");
0x00029080 add r2, pc |
0x00029082 ldr r2, [r2] | r2 = *(0x521f2);
0x00029084 str r0, [r1, r2] | *((r1 + r2)) = r0;
0x00029086 ldr r2, [r7, 0x24] | r2 = var_20h_2;
0x00029088 cmp r2, 0 |
| if (r2 != 0) {
0x0002908a bne.w 0x29334 | goto label_26;
| }
| label_12:
0x0002908e ldr r0, [pc, 0x114] |
0x00029090 str r3, [r7, 0x34] | var_34h = r3;
0x00029092 add r0, pc | r0 = 0x5223c;
0x00029094 adds r0, 0x1c | r0 += 0x1c;
0x00029096 bl 0x5f0ac | pthread_rwlock_unlock ();
0x0002909a ldr r0, [pc, 0x10c] |
0x0002909c add r0, pc | r0 = 0x5224a;
0x0002909e bl 0x5f0ac | pthread_rwlock_unlock ();
0x000290a2 ldr r3, [r7, 0x34] | r3 = var_34h;
0x000290a4 b 0x28eaa | goto label_0;
| }
0x000290a6 ldr.w r0, [r8, 0x10] | r0 = *((r8 + 0x10));
0x000290aa cmp r0, 0 |
| if (r0 == 0) {
0x000290ac beq 0x28ffe | goto label_1;
| }
0x000290ae mov r2, r3 | r2 = r3;
0x000290b0 add.w r3, r8, 0x10 | r3 = r8 + 0x10;
0x000290b4 strd r6, r5, [r7] | __asm ("strd r6, r5, [r7]");
0x000290b8 mov r5, r3 | r5 = r3;
0x000290ba str.w r8, [r7, 8] | __asm ("str.w r8, [var_8h_2]");
0x000290be mov r6, r2 | r6 = r2;
0x000290c0 ldr.w r8, [r7, 0x28] | r8 = var_28h;
0x000290c4 b 0x290d8 |
| while (r3 != r0) {
0x000290c6 cmp r0, 0 |
| if (r0 != 0) {
0x000290c8 bne.w 0x29316 | goto label_27;
| }
0x000290cc ldr r0, [r5, 4]! | r0 = *((r5 += 4));
0x000290d0 adds r6, 1 | r6++;
0x000290d2 cmp r0, 0 |
| if (r0 == 0) {
0x000290d4 beq.w 0x29326 | goto label_28;
| }
0x000290d8 movs r3, 1 | r3 = 1;
0x000290da mov r2, sl | r2 = sl;
0x000290dc mov r1, r4 | r1 = r4;
0x000290de str.w r8, [sp] | __asm ("str.w r8, [sp]");
0x000290e2 bl 0x287f4 | r0 = fcn_000287f4 (r0, r1, r2, r3);
0x000290e6 adds r3, r0, 1 | r3 = r0 + 1;
0x000290e8 bne 0x290c6 |
| }
| label_3:
0x000290ea ldr r0, [r7, 0x38] | r0 = var_38h;
0x000290ec blx 0x1ded4 | fcn_0001ded4 ();
0x000290f0 ldr r0, [pc, 0xb8] |
0x000290f2 add r0, pc | r0 = 0x522a2;
0x000290f4 adds r0, 0x1c | r0 += 0x1c;
0x000290f6 bl 0x5f0ac | pthread_rwlock_unlock ();
0x000290fa ldr r0, [pc, 0xb4] |
0x000290fc add r0, pc | r0 = 0x522b2;
0x000290fe bl 0x5f0ac | pthread_rwlock_unlock ();
0x00029102 ldr r3, [pc, 0x6c] |
0x00029104 ldrd r2, r1, [r7, 0x18] | __asm ("ldrd r2, r1, [var_18h]");
0x00029108 add r3, pc |
0x0002910a ldr r3, [r3] | r3 = *(0x5227e);
0x0002910c str r1, [r2, r3] | *((r2 + r3)) = r1;
0x0002910e ldr r3, [r7, 0x24] | r3 = var_20h_2;
0x00029110 ldr.w r2, [r7, 0x88] | r2 = *((r7 + 0x88));
0x00029114 cmp r2, 1 |
0x00029116 it ne |
| if (r2 == 1) {
0x00029118 cmpne r3, 0 | __asm ("cmpne r3, 0");
| goto label_29;
| }
| if (r2 == 1) {
| label_29:
0x0002911a beq.w 0x28ea8 | goto label_2;
| }
| label_14:
0x0002911e ldr r3, [r7, 0x20] | r3 = var_20h;
0x00029120 adds r7, 0x64 | r7 += 0x64;
0x00029122 mov r0, r3 | r0 = r3;
0x00029124 mov sp, r7 |
0x00029126 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_21:
0x0002912a bl 0x9efc8 | r0 = getcwd ();
0x0002912e mov r5, r0 | r5 = r0;
0x00029130 cmp r0, 0 |
| if (r0 == 0) {
0x00029132 beq 0x290ea | goto label_3;
| }
0x00029134 ldr r1, [pc, 0x7c] |
0x00029136 mov r3, r6 | r3 = r6;
0x00029138 mov r2, r0 | r2 = r0;
0x0002913a add.w r0, r7, 0x38 | r0 += var_38h;
0x0002913e add r1, pc | r1 = 0x522f6;
0x00029140 bl 0x38ce0 | r0 = asprintf ();
0x00029144 mov r6, r0 | r6 = r0;
0x00029146 mov r0, r5 | r0 = r5;
0x00029148 blx 0x1ded4 | fcn_0001ded4 ();
0x0002914c cmp r6, 0 |
| if (r6 < 0) {
0x0002914e blt 0x290ea | goto label_3;
| }
0x00029150 ldr r3, [r7, 0x38] | r3 = var_38h;
0x00029152 str r3, [r7, 0x34] | var_34h = r3;
0x00029154 b 0x28f68 | goto label_4;
| label_22:
0x00029156 ldrb r3, [r0, 1] | r3 = *((r0 + 1));
0x00029158 cmp r3, 0 |
| if (r3 != 0) {
0x0002915a bne.w 0x28f88 | goto label_5;
| }
0x0002915e mov r5, r8 | r5 = r8;
0x00029160 b 0x28f9a | goto label_6;
| label_23:
0x00029162 adds r5, 1 | r5++;
0x00029164 b 0x28ffe | goto label_1;
| label_24:
0x000291b8 adds r2, r5, 1 | r2 = r5 + 1;
0x000291ba mov r1, r6 | r1 = r6;
| do {
0x000291bc strb r3, [r1], 1 | *(r1) = r3;
| r1++;
0x000291c0 mov r5, r2 | r5 = r2;
0x000291c2 ldrb r3, [r2] | r3 = *(r2);
0x000291c4 adds r2, 1 | r2++;
0x000291c6 cmp r3, 0 |
0x000291c8 it ne |
| if (r3 != 0) {
0x000291ca cmpne r3, 0x3a | __asm ("cmpne r3, 0x3a");
| }
0x000291cc ite ne |
| if (r3 == 0) {
0x000291ce movne r0, 1 | r0 = 1;
| }
| if (r3 != 0) {
0x000291d0 moveq r0, 0 | r0 = 0;
| }
0x000291d2 bne 0x291bc |
| } while (r3 != 0);
0x000291d4 ldr r3, [pc, 0x1a4] |
0x000291d6 strb r0, [r1] | *(r1) = r0;
0x000291d8 ldr.w r3, [fp, r3] | r3 = *((fp + r3));
0x000291dc ldr r3, [r3] | r3 = *(0x2937c);
0x000291de cmp r3, 0 |
| if (r3 == 0) {
0x000291e0 beq.w 0x29010 | goto label_7;
| }
0x000291e4 movs r1, 0x2f | r1 = 0x2f;
0x000291e6 mov r0, r6 | r0 = r6;
0x000291e8 bl 0x69630 | r0 = strchr ();
0x000291ec cmp r0, 0 |
| if (r0 != 0) {
0x000291ee bne.w 0x28ffe | goto label_1;
| }
0x000291f2 b 0x29010 | goto label_7;
| label_15:
0x000291f4 ldr r3, [pc, 0x188] |
0x000291f6 add r3, pc | r3 = 0x5257a;
0x000291f8 ldr.w sb, [r3] | sb = *(0x5257a);
0x000291fc b 0x28ede | goto label_8;
| label_19:
0x000291fe ldr r3, [pc, 0x184] |
0x00029200 movs r4, 0 | r4 = 0;
0x00029202 add r3, pc | r3 = 0x5258c;
0x00029204 str r3, [r7, 0x34] | var_34h = r3;
0x00029206 b 0x28f68 | goto label_4;
| label_20:
0x00029208 ldr r3, [pc, 0x17c] |
0x0002920a add r3, pc | r3 = 0x52596;
0x0002920c str r3, [r7, 0x34] | var_34h = r3;
0x0002920e b 0x28f68 | goto label_4;
| label_16:
0x00029210 ldr r2, [r7, 0x24] | r2 = var_20h_2;
0x00029212 ldr r3, [r4, 0x14] | r3 = *((r4 + 0x14));
0x00029214 cbnz r2, 0x2923a |
| while (r0 >= r2) {
| label_9:
0x00029216 ldr r0, [pc, 0x174] |
0x00029218 str r3, [r7, 0x34] | var_34h = r3;
0x0002921a add r0, pc | r0 = 0x525ac;
0x0002921c adds r0, 0x1c | r0 += 0x1c;
0x0002921e bl 0x5f0ac | pthread_rwlock_unlock ();
0x00029222 ldr r0, [pc, 0x16c] |
0x00029224 add r0, pc | r0 = 0x525ba;
0x00029226 bl 0x5f0ac | pthread_rwlock_unlock ();
0x0002922a ldr r2, [pc, 0x14c] |
0x0002922c ldrd r3, r1, [r7, 0x18] | __asm ("ldrd r3, r1, [var_18h]");
0x00029230 add r2, pc |
0x00029232 ldr r2, [r2] | r2 = *(0x525ae);
0x00029234 str r1, [r3, r2] | *((r3 + r2)) = r1;
0x00029236 ldr r3, [r7, 0x34] | r3 = var_34h;
0x00029238 b 0x28eaa | goto label_0;
0x0002923a ldr r2, [r4, 0x10] | r2 = *((r4 + 0x10));
0x0002923c ldr.w r1, [r7, 0x88] | r1 = *((r7 + 0x88));
0x00029240 str r3, [r7, 0x34] | var_34h = r3;
0x00029242 ldr r6, [r2, 8] | r6 = *((r2 + 8));
0x00029244 ldr r0, [r6, 0x60] | r0 = *((r6 + 0x60));
0x00029246 bl 0x286b4 | fcn_000286b4 (r0, r1);
0x0002924a ldr r2, [r6, 0x64] | r2 = *((r6 + 0x64));
0x0002924c mov r5, r0 | r5 = r0;
0x0002924e ldr r3, [r7, 0x34] | r3 = var_34h;
0x00029250 cmp r0, r2 |
0x00029252 bhs 0x29216 |
| }
0x00029254 ldr r4, [r4, 0x18] | r4 = *((r4 + 0x18));
0x00029256 mov r0, r3 | r0 = r3;
0x00029258 mov r6, r3 | r6 = r3;
0x0002925a add r4, r3 | r4 += r3;
| do {
0x0002925c subs r5, 1 | r5--;
0x0002925e mov.w r1, 0 | r1 = 0;
| if (r5 <= 1) {
0x00029262 blo.w 0x2936e | goto label_30;
| }
0x00029266 bl 0x68ed0 | rawmemchr ();
0x0002926a adds r0, 1 | r0++;
0x0002926c cmp r0, r4 |
0x0002926e blo 0x2925c |
| } while (r0 <= r4);
0x00029270 mov r3, r6 | r3 = r6;
0x00029272 b 0x29216 | goto label_9;
| label_25:
0x00029274 mov r0, sl | r0 = sl;
0x00029276 bl 0x6ae40 | r0 = strlen ();
0x0002927a adds r5, r0, 1 | r5 = r0 + 1;
0x0002927c ldr r0, [r7, 0xc] | r0 = src;
0x0002927e bl 0x6ae40 | strlen ();
0x00029282 ldr r6, [r7, 0x14] | r6 = n;
0x00029284 add.w r2, r6, 0x1e | r2 = r6 + 0x1e;
0x00029288 add r0, r2 | r0 += r2;
0x0002928a add r0, r5 | r0 += r5;
0x0002928c blx 0x1df60 | fcn_0001df60 ();
0x00029290 ldr r3, [r7, 0x34] | r3 = var_34h;
0x00029292 mov r4, r0 | r4 = r0;
0x00029294 cmp r0, 0 |
| if (r0 == 0) {
0x00029296 beq.w 0x2907a | goto label_10;
| }
0x0002929a mov r2, r5 | r2 = r5;
0x0002929c mov r1, sl | r1 = sl;
0x0002929e adds r0, 0x1c | r0 += 0x1c;
0x000292a0 adds r6, 1 | r6++;
0x000292a2 blx 0x6d540 | r0 = memcpy (r0, r1, r2);
0x000292a6 add r5, r0 | r5 += r0;
0x000292a8 mov r2, r6 | r2 = r6;
0x000292aa mov r1, sb | r1 = sb;
0x000292ac adds r6, r5, r6 | r6 = r5 + r6;
0x000292ae mov r0, r5 | r0 = r5;
0x000292b0 blx 0x6d540 | memcpy (r0, r1, r2);
0x000292b4 ldr r1, [r7, 0xc] | r1 = src;
0x000292b6 mov r0, r6 | r0 = r6;
0x000292b8 bl 0x6a5a0 | strcpy (r0, r1)
0x000292bc ldr.w r3, [r7, 0x8c] | r3 = *((r7 + 0x8c));
0x000292c0 ldr r2, [pc, 0xd0] |
0x000292c2 str r5, [r4] | *(r4) = r5;
0x000292c4 strd r3, r6, [r4, 4] | __asm ("strd r3, r6, [r4, 4]");
0x000292c8 ldr.w r2, [fp, r2] | r2 = *((fp + r2));
0x000292cc ldr r5, [pc, 0xc8] |
0x000292ce ldr r3, [r7, 0x34] | r3 = var_34h;
0x000292d0 ldr r2, [r2] | r2 = *(0x29394);
0x000292d2 add r5, pc | r5 = 0x5266e;
0x000292d4 str.w r8, [r4, 0x10] | __asm ("str.w r8, [r4, 0x10]");
0x000292d8 add.w r6, r5, 0x3c | r6 = r5 + 0x3c;
0x000292dc str r3, [r4, 0x14] | *((r4 + 0x14)) = r3;
0x000292de str r2, [r4, 0xc] | *((r4 + 0xc)) = r2;
0x000292e0 mov r0, r6 | r0 = r6;
0x000292e2 ldr r2, [r7, 0x3c] | r2 = var_3ch;
0x000292e4 str r2, [r4, 0x18] | *((r4 + 0x18)) = r2;
0x000292e6 bl 0x5f248 | pthread_rwlock_wrlock ();
0x000292ea ldr r2, [pc, 0xb0] |
0x000292ec mov r1, r5 | r1 = r5;
0x000292ee mov r0, r4 | r0 = r4;
0x000292f0 add r2, pc | r2 = 0x52692;
0x000292f2 bl 0xa9e70 | r0 = tsearch ();
0x000292f6 mov r5, r0 | r5 = r0;
0x000292f8 mov r0, r6 | r0 = r6;
0x000292fa bl 0x5f0ac | pthread_rwlock_unlock ();
0x000292fe ldr r3, [r7, 0x34] | r3 = var_34h;
| if (r5 == 0) {
0x00029300 cbz r5, 0x2930a | goto label_31;
| }
0x00029302 ldr r2, [r5] | r2 = *(r5);
0x00029304 cmp r2, r4 |
| if (r2 == r4) {
0x00029306 beq.w 0x2907a | goto label_10;
| }
| label_31:
0x0002930a mov r0, r4 | r0 = r4;
0x0002930c str r3, [r7, 0x34] | var_34h = r3;
0x0002930e blx 0x1ded4 | fcn_0001ded4 ();
0x00029312 ldr r3, [r7, 0x34] | r3 = var_34h;
0x00029314 b 0x2907a | goto label_10;
| label_27:
0x00029316 ldr.w r8, [r7, 8] | r8 = var_8h_2;
0x0002931a mov r2, r6 | r2 = r6;
0x0002931c adds r2, 4 | r2 += 4;
0x0002931e mov r3, r0 | r3 = r0;
0x00029320 ldr.w r8, [r8, r2, lsl 2] | offset_0 = r2 << 2;
| r8 = *((r8 + offset_0));
0x00029324 b 0x29052 | goto label_11;
| label_28:
0x00029326 ldrd r6, r5, [r7] | __asm ("ldrd r6, r5, [r7]");
0x0002932a b 0x28ffe | goto label_1;
| label_18:
0x0002932c ldr r3, [pc, 0x70] |
0x0002932e add r3, pc | r3 = 0x526d2;
0x00029330 str r3, [r7, 0x34] | var_34h = r3;
0x00029332 b 0x28f68 | goto label_4;
| label_26:
0x00029334 ldr.w r4, [r8, 8] | r4 = *((r8 + 8));
0x00029338 ldr.w r1, [r7, 0x88] | r1 = *((r7 + 0x88));
0x0002933c str r3, [r7, 0x34] | var_34h = r3;
0x0002933e ldr r0, [r4, 0x60] | r0 = *((r4 + 0x60));
0x00029340 bl 0x286b4 | fcn_000286b4 (r0, r1);
0x00029344 ldr r2, [r4, 0x64] | r2 = *((r4 + 0x64));
0x00029346 mov r4, r0 | r4 = r0;
0x00029348 ldr r3, [r7, 0x34] | r3 = var_34h;
0x0002934a cmp r0, r2 |
| if (r0 >= r2) {
0x0002934c bhs.w 0x2908e | goto label_12;
| }
0x00029350 ldr r5, [r7, 0x3c] | r5 = var_3ch;
0x00029352 mov r0, r3 | r0 = r3;
0x00029354 mov r6, r3 | r6 = r3;
0x00029356 add r5, r3 | r5 += r3;
| do {
0x00029358 subs r4, 1 | r4--;
0x0002935a mov.w r1, 0 | r1 = 0;
| if (r4 <= 1) {
0x0002935e blo 0x29372 | goto label_32;
| }
0x00029360 bl 0x68ed0 | rawmemchr ();
0x00029364 adds r0, 1 | r0++;
0x00029366 cmp r0, r5 |
0x00029368 blo 0x29358 |
| } while (r0 <= r5);
0x0002936a mov r3, r6 | r3 = r6;
0x0002936c b 0x2908e | goto label_12;
| label_30:
0x0002936e mov r3, r0 | r3 = r0;
0x00029370 b 0x29216 | goto label_9;
| label_32:
0x00029372 mov r3, r0 | r3 = r0;
0x00029374 b 0x2908e | goto label_12;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libc.so.6 @ 0xc7dd0 */
| #include <stdint.h>
|
; (fcn) fcn.000c7dd0 () | void fcn_000c7dd0 (int16_t arg_30h, int16_t arg_34h, int16_t arg_38h, int16_t arg_3ch, int16_t arg_40h, int16_t arg_44h, int16_t arg2, int16_t arg3, int16_t arg4) {
| int16_t var_0h;
| int16_t var_4h;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x000c7dd0 push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x000c7dd4 mov r7, r2 | r7 = r2;
0x000c7dd6 ldrb r2, [r1] | r2 = *(r1);
0x000c7dd8 mov r4, r3 | r4 = r3;
0x000c7dda sub sp, 0xc |
0x000c7ddc mov r5, r1 | r5 = r1;
0x000c7dde ldr.w r8, [sp, 0x30] | r8 = *(arg_30h);
0x000c7de2 sub.w r3, r2, 0x30 | r3 = r2 - 0x30;
0x000c7de4 lsls r0, r6, 0xc | r0 = r6 << 0xc;
0x000c7de6 cmp r3, 9 |
| if (r3 >= 9) {
0x000c7de8 bls 0xc7e0a |
0x000c7dea ldr r3, [pc, 0x26c] |
0x000c7dec mrc p15, 0, r1, c13, c0, 3 | __asm ("mrc p15, 0, r1, c13, c0, 3");
0x000c7df0 add r3, pc |
0x000c7df2 ldr r3, [r3] | r3 = *(0x18fe4e);
0x000c7df4 ldr r3, [r1, r3] | r3 = *((r1 + r3));
0x000c7df6 ldrh.w r3, [r3, r2, lsl 1] | offset_0 = r2 << 1;
| r3 = *((r3 + offset_0));
0x000c7dfa ubfx r3, r3, 0xc, 1 | r3 = (r3 >> 0xc) & ((1 << 1) - 1);
0x000c7dfe cmp r2, 0x3a |
0x000c7e00 it eq |
| if (r2 != 0x3a) {
0x000c7e02 orreq r3, r3, 1 | r3 |= 1;
| }
0x000c7e06 cmp r3, 0 |
| if (r3 == 0) {
0x000c7e08 beq 0xc7eb2 | goto label_2;
| }
| }
0x000c7e0a ldr r3, [sp, 0x40] | r3 = *(arg_40h);
0x000c7e0c mov r0, r5 | r0 = r5;
0x000c7e0e cmp r3, 0xa |
0x000c7e10 ittet ne |
| if (r3 == 0xa) {
0x000c7e12 movne r3, 2 | r3 = 2;
| }
| if (r3 == 0xa) {
0x000c7e14 movne r6, 4 | r6 = 4;
| }
| if (r3 != 0xa) {
0x000c7e16 moveq r6, 0x10 | r6 = 0x10;
| }
| if (r3 == 0xa) {
0x000c7e18 strne r3, [sp, 0x40] | *(arg_40h) = r3;
| }
0x000c7e1a bl 0x6ae40 | r0 = strlen ();
0x000c7e1e add.w sl, r0, 0x1d | sl = r0 + 0x1d;
0x000c7e22 cmp.w r8, 0 |
| if (r8 == 0) {
0x000c7e26 beq.w 0xc7f64 | goto label_11;
| }
0x000c7e2a ldr.w r2, [r8] | r2 = *(r8);
0x000c7e2e ldr r3, [r4] | r3 = *(r4);
0x000c7e30 cmp r2, sl |
| if (r2 <= sl) {
0x000c7e32 blo.w 0xc7f6e | goto label_12;
| }
| label_5:
0x000c7e36 mov r2, sl | r2 = sl;
0x000c7e38 mov r0, r3 | r0 = r3;
0x000c7e3a movs r1, 0 | r1 = 0;
0x000c7e3c blx 0x68e50 | memset (r0, r1, r2);
0x000c7e40 ldr.w sb, [r4] | sb = *(r4);
0x000c7e44 ldrb r4, [r5] | r4 = *(r5);
0x000c7e46 add.w r3, sb, 0x10 | r3 = sb + 0x10;
0x000c7e4a add.w sl, sb, 0x18 | sl = sb + 0x18;
0x000c7e4e str r3, [sp] | *(sp) = r3;
0x000c7e50 sub.w r3, r4, 0x30 | r3 = r4 - 0x30;
0x000c7e54 cmp r3, 9 |
0x000c7e56 add.w fp, sb, 0x1c |
| if (r3 > 9) {
0x000c7e5a bhi 0xc7eba | goto label_13;
| }
0x000c7e5c mov r1, r5 | r1 = r5;
0x000c7e5e mov r3, r4 | r3 = r4;
| do {
0x000c7e60 sub.w r2, r3, 0x30 | r2 = r3 - 0x30;
0x000c7e64 cmp r3, 0x2e |
0x000c7e66 it ne |
| if (r3 != 0x2e) {
0x000c7e68 cmpne r2, 9 | __asm ("cmpne r2, 9");
| }
| if (r3 > 0x2e) {
0x000c7e6a bhi 0xc7eba | goto label_13;
| }
0x000c7e6c ldrb r3, [r1, 1]! | r3 = *((r1 += 1));
0x000c7e70 cmp r3, 0 |
0x000c7e72 bne 0xc7e60 |
| } while (r3 != 0);
0x000c7e74 ldrb r3, [r1, -0x1] | r3 = *((r1 - 0x1));
0x000c7e78 cmp r3, 0x2e |
| if (r3 == 0x2e) {
0x000c7e7a beq.w 0xc7f8c | goto label_14;
| }
0x000c7e7e ldr r3, [sp, 0x40] | r3 = *(arg_40h);
0x000c7e80 cmp r3, 2 |
| if (r3 == 2) {
0x000c7e82 beq.w 0xc7fc8 | goto label_15;
| }
0x000c7e86 mov r2, sb | r2 = sb;
0x000c7e88 mov r1, r5 | r1 = r5;
0x000c7e8a movs r0, 0xa | r0 = 0xa;
0x000c7e8c bl 0xc1ac0 | r0 = inet_pton ();
0x000c7e90 cmp r0, 0 |
| if (r0 > 0) {
0x000c7e92 bgt.w 0xc7fd6 | goto label_16;
| }
| label_1:
0x000c7e96 ldr r2, [sp, 0x44] | r2 = *(arg_44h);
0x000c7e98 movs r3, 1 | r3 = 1;
0x000c7e9a str r3, [r2] | *(r2) = r3;
0x000c7e9c cmp.w r8, 0 |
| if (r8 == 0) {
0x000c7ea0 beq.w 0xc800a | goto label_17;
| }
| label_10:
0x000c7ea4 ldr r2, [sp, 0x38] | r2 = *(arg_38h);
0x000c7ea6 movs r3, 0 | r3 = 0;
0x000c7ea8 str r3, [r2] | *(r2) = r3;
| label_4:
0x000c7eaa movs r0, 1 | r0 = 1;
0x000c7eac b 0xc7eb4 |
| while (r2 >= r1) {
| label_0:
0x000c7eae cmp r4, 0x3a |
| if (r4 == 0x3a) {
0x000c7eb0 beq 0xc7f84 | goto label_18;
| }
| label_2:
0x000c7eb2 movs r0, 0 | r0 = 0;
0x000c7eb4 add sp, 0xc |
0x000c7eb6 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
0x000c7eb8 ldrh r0, [r6, 0x3e] | r0 = *((r6 + 0x3e));
| label_13:
0x000c7eba ldr r3, [pc, 0x1a0] |
0x000c7ebc mrc p15, 0, r1, c13, c0, 3 | __asm ("mrc p15, 0, r1, c13, c0, 3");
0x000c7ec0 sxth r6, r4 | __asm ("sxth r6, r4");
0x000c7ec2 add r3, pc |
0x000c7ec4 ldr r3, [r3] | r3 = *(0x18ff24);
0x000c7ec6 ldr r3, [r1, r3] | r3 = *((r1 + r3));
0x000c7ec8 ldrh.w r1, [r3, r6, lsl 1] | offset_1 = r6 << 1;
| r1 = *((r3 + offset_1));
0x000c7ecc lsls r2, r1, 0x13 | r2 = r1 << 0x13;
0x000c7ece bpl 0xc7eae |
| }
| label_7:
0x000c7ed0 movs r1, 0x3a | r1 = 0x3a;
0x000c7ed2 mov r0, r5 | r0 = r5;
0x000c7ed4 str r3, [sp, 4] | var_4h = r3;
0x000c7ed6 bl 0x69630 | strchr ();
0x000c7eda ldr r3, [sp, 4] | r3 = var_4h;
0x000c7edc cmp r0, 0 |
| if (r0 == 0) {
0x000c7ede beq 0xc7eae | goto label_0;
| }
0x000c7ee0 ldr r2, [sp, 0x40] | r2 = *(arg_40h);
0x000c7ee2 cmp r2, 0xa |
| if (r2 != 0xa) {
0x000c7ee4 bne 0xc7e96 | goto label_1;
| }
0x000c7ee6 cmp r4, 0 |
| if (r4 == 0) {
0x000c7ee8 beq.w 0xc8012 | goto label_19;
| }
| label_6:
0x000c7eec mov r0, r5 | r0 = r5;
0x000c7eee b 0xc7ef2 | goto label_20;
| label_3:
0x000c7ef0 sxth r6, r4 | __asm ("sxth r6, r4");
| label_20:
0x000c7ef2 ldrh.w r2, [r3, r6, lsl 1] | offset_2 = r6 << 1;
| r2 = *((r3 + offset_2));
0x000c7ef6 cmp r4, 0x3a |
0x000c7ef8 it ne |
| if (r4 != 0x3a) {
0x000c7efa cmpne r4, 0x2e | __asm ("cmpne r4, 0x2e");
| }
0x000c7efc ite ne |
| if (r4 == 0x3a) {
0x000c7efe movne r4, 1 | r4 = 1;
| }
| if (r4 != 0x3a) {
0x000c7f00 moveq r4, 0 | r4 = 0;
| }
0x000c7f02 eor r2, r2, 0x1000 | r2 ^= 0x1000;
0x000c7f06 ands.w r4, r4, r2, lsr 12 | r4 &= (r2 >> 12);
| if (r4 != r4) {
0x000c7f0a bne 0xc7eb2 | goto label_2;
| }
0x000c7f0c ldrb r4, [r0, 1]! | r4 = *((r0 += 1));
0x000c7f10 cmp r4, 0 |
| if (r4 != 0) {
0x000c7f12 bne 0xc7ef0 | goto label_3;
| }
| label_9:
0x000c7f14 ldrb r3, [r0, -0x1] | r3 = *((r0 - 0x1));
0x000c7f18 cmp r3, 0x2e |
| if (r3 == 0x2e) {
0x000c7f1a beq 0xc7eb2 | goto label_2;
| }
0x000c7f1c mov r2, sb | r2 = sb;
0x000c7f1e mov r1, r5 | r1 = r5;
0x000c7f20 movs r0, 0xa | r0 = 0xa;
0x000c7f22 bl 0xc1ac0 | r0 = inet_pton ();
0x000c7f26 cmp r0, 0 |
| if (r0 <= 0) {
0x000c7f28 ble 0xc7e96 | goto label_1;
| }
0x000c7f2a mov r1, r5 | r1 = r5;
0x000c7f2c mov r0, fp | r0 = fp;
0x000c7f2e bl 0x6a5a0 | strcpy (r0, r1)
0x000c7f32 ldr r2, [sp] | r2 = *(sp);
0x000c7f34 movs r3, 0 | r3 = 0;
0x000c7f36 str r0, [r7] | *(r7) = r0;
0x000c7f38 add.w r1, r7, 8 | r1 = r7 + 8;
0x000c7f3c str.w r3, [sb, 0x18] | __asm ("str.w r3, [sb, 0x18]");
0x000c7f40 str.w sl, [r7, 4] | __asm ("str.w sl, [r7, 4]");
0x000c7f44 strd sb, r3, [sb, 0x10] | __asm ("strd sb, r3, [sb, 0x10]");
0x000c7f48 str r2, [r7, 0x10] | *((r7 + 0x10)) = r2;
0x000c7f4a ldr r2, [sp, 0x44] | r2 = *(arg_44h);
0x000c7f4c vldr d16, [pc, 0x100] | __asm ("vldr d16, aav.0x000000ff");
0x000c7f50 vst1.32 {d16}, [r1] | __asm ("vst1.32 {d16}, [r1]");
0x000c7f54 str r3, [r2] | *(r2) = r3;
0x000c7f56 cmp.w r8, 0 |
| if (r8 != 0) {
0x000c7f5a bne 0xc8004 | goto label_21;
| }
| label_8:
0x000c7f5c ldr r2, [sp, 0x3c] | r2 = *(arg_3ch);
0x000c7f5e movs r3, 1 | r3 = 1;
0x000c7f60 str r3, [r2] | *(r2) = r3;
0x000c7f62 b 0xc7eaa | goto label_4;
| label_11:
0x000c7f64 ldr r3, [sp, 0x34] | r3 = *(arg_34h);
0x000c7f66 cmp sl, r3 |
| if (sl > r3) {
0x000c7f68 bhi 0xc7fa4 | goto label_22;
| }
0x000c7f6a ldr r3, [r4] | r3 = *(r4);
0x000c7f6c b 0xc7e36 | goto label_5;
| label_12:
0x000c7f6e mov r0, r3 | r0 = r3;
0x000c7f70 mov r1, sl | r1 = sl;
0x000c7f72 str.w sl, [r8] | __asm ("str.w sl, [r8]");
0x000c7f76 blx 0x1deac | r0 = fcn_0001deac ();
0x000c7f7a mov r3, r0 | r3 = r0;
0x000c7f7c cmp r0, 0 |
| if (r0 == 0) {
0x000c7f7e beq 0xc8016 | goto label_23;
| }
0x000c7f80 str r0, [r4] | *(r4) = r0;
0x000c7f82 b 0xc7e36 | goto label_5;
| label_18:
0x000c7f84 ldr r2, [sp, 0x40] | r2 = *(arg_40h);
0x000c7f86 cmp r2, 0xa |
| if (r2 == 0xa) {
0x000c7f88 beq 0xc7eec | goto label_6;
| }
0x000c7f8a b 0xc7e96 | goto label_1;
| label_14:
0x000c7f8c ldr r3, [pc, 0xd0] |
0x000c7f8e mrc p15, 0, r1, c13, c0, 3 | __asm ("mrc p15, 0, r1, c13, c0, 3");
0x000c7f92 sxth r6, r4 | __asm ("sxth r6, r4");
0x000c7f94 add r3, pc |
0x000c7f96 ldr r3, [r3] | r3 = *(0x18fff8);
0x000c7f98 ldr r3, [r1, r3] | r3 = *((r1 + r3));
0x000c7f9a ldrh.w r1, [r3, r6, lsl 1] | offset_3 = r6 << 1;
| r1 = *((r3 + offset_3));
0x000c7f9e lsls r1, r1, 0x13 | r1 <<= 0x13;
| if (r1 < r1) {
0x000c7fa0 bmi 0xc7ed0 | goto label_7;
| }
0x000c7fa2 b 0xc7eb2 | goto label_2;
| label_22:
0x000c7fa4 ldr r2, [sp, 0x3c] | r2 = *(arg_3ch);
0x000c7fa6 mvn r3, 1 | r3 = ~1;
0x000c7faa str r3, [r2] | *(r2) = r3;
0x000c7fac ldr r3, [sp, 0x44] | r3 = *(arg_44h);
| if (r3 != 0) {
0x000c7fae cbz r3, 0xc7fb8 |
0x000c7fb0 ldr r2, [sp, 0x44] | r2 = *(arg_44h);
0x000c7fb2 mov.w r3, -1 | r3 = -1;
0x000c7fb6 str r3, [r2] | *(r2) = r3;
| }
0x000c7fb8 ldr r3, [pc, 0xa8] |
0x000c7fba mrc p15, 0, r2, c13, c0, 3 | __asm ("mrc p15, 0, r2, c13, c0, 3");
0x000c7fbe movs r1, 0x22 | r1 = 0x22;
0x000c7fc0 add r3, pc |
0x000c7fc2 ldr r3, [r3] | r3 = *(0x190028);
0x000c7fc4 str r1, [r2, r3] | *((r2 + r3)) = r1;
0x000c7fc6 b 0xc7eaa | goto label_4;
| label_15:
0x000c7fc8 mov r1, sb | r1 = sb;
0x000c7fca mov r0, r5 | r0 = r5;
0x000c7fcc bl 0xc1620 | r0 = inet_aton_exact ();
0x000c7fd0 cmp r0, 0 |
| if (r0 == 0) {
0x000c7fd2 beq.w 0xc7e96 | goto label_1;
| }
| label_16:
0x000c7fd6 mov r1, r5 | r1 = r5;
0x000c7fd8 mov r0, fp | r0 = fp;
0x000c7fda bl 0x6a5a0 | strcpy (r0, r1)
0x000c7fde ldr r2, [sp] | r2 = *(sp);
0x000c7fe0 movs r3, 0 | r3 = 0;
0x000c7fe2 str r0, [r7] | *(r7) = r0;
0x000c7fe4 str.w r3, [sb, 0x18] | __asm ("str.w r3, [sb, 0x18]");
0x000c7fe8 str.w sl, [r7, 4] | __asm ("str.w sl, [r7, 4]");
0x000c7fec strd sb, r3, [sb, 0x10] | __asm ("strd sb, r3, [sb, 0x10]");
0x000c7ff0 str r2, [r7, 0x10] | *((r7 + 0x10)) = r2;
0x000c7ff2 ldr r2, [sp, 0x40] | r2 = *(arg_40h);
0x000c7ff4 strd r2, r6, [r7, 8] | __asm ("strd r2, r6, [r7, 8]");
0x000c7ff8 ldr r2, [sp, 0x44] | r2 = *(arg_44h);
| if (r2 != 0) {
0x000c7ffa cbz r2, 0xc7ffe |
0x000c7ffc str r3, [r2] | *(r2) = r3;
| }
0x000c7ffe cmp.w r8, 0 |
| if (r8 == 0) {
0x000c8002 beq 0xc7f5c | goto label_8;
| }
| label_21:
0x000c8004 ldr r3, [sp, 0x38] | r3 = *(arg_38h);
0x000c8006 str r7, [r3] | *(r3) = r7;
0x000c8008 b 0xc7eaa | goto label_4;
| label_17:
0x000c800a ldr r2, [sp, 0x3c] | r2 = *(arg_3ch);
0x000c800c movs r3, 0 | r3 = 0;
0x000c800e str r3, [r2] | *(r2) = r3;
0x000c8010 b 0xc7eaa | goto label_4;
| label_19:
0x000c8012 mov r0, r5 | r0 = r5;
0x000c8014 b 0xc7f14 | goto label_9;
| label_23:
0x000c8016 ldr r2, [pc, 0x50] |
0x000c8018 mrc p15, 0, r5, c13, c0, 3 | __asm ("mrc p15, 0, r5, c13, c0, 3");
0x000c801c str r0, [sp] | *(sp) = r0;
0x000c801e ldr r0, [r4] | r0 = *(r4);
0x000c8020 add r2, pc |
0x000c8022 ldr r2, [r2] | r2 = *(0x19008e);
0x000c8024 ldr r6, [r5, r2] | r6 = *((r5 + r2));
0x000c8026 blx 0x1ded4 | fcn_0001ded4 ();
0x000c802a ldr r3, [sp] | r3 = *(sp);
0x000c802c ldr r2, [pc, 0x3c] |
0x000c802e str r3, [r4] | *(r4) = r3;
0x000c8030 str.w r3, [r8] | __asm ("str.w r3, [r8]");
0x000c8034 add r2, pc |
0x000c8036 ldr r2, [r2] | r2 = *(0x1900a4);
0x000c8038 ldr r3, [sp, 0x44] | r3 = *(arg_44h);
0x000c803a str r6, [r5, r2] | *((r5 + r2)) = r6;
0x000c803c cmp r3, 0 |
| if (r3 == 0) {
0x000c803e beq.w 0xc7ea4 | goto label_10;
| }
0x000c8042 ldr r2, [sp, 0x44] | r2 = *(arg_44h);
0x000c8044 mov.w r3, -1 | r3 = -1;
0x000c8048 str r3, [r2] | *(r2) = r3;
0x000c804a b 0xc7ea4 | goto label_10;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libc.so.6 @ 0xba120 */
| #include <stdint.h>
|
; (fcn) sym.ether_ntohost () | void ether_ntohost (int16_t arg_24h, int16_t arg_30h, char * arg1, int16_t arg2) {
| int16_t var_0h;
| int16_t var_8h;
| int16_t var_ch;
| char * dest;
| int16_t var_14h;
| int16_t var_1ch;
| int16_t var_20h;
| r0 = arg1;
| r1 = arg2;
0x000ba120 push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x000ba124 subw sp, sp, 0x434 | __asm ("subw sp, sp, aav.0x000000ff");
0x000ba128 ldr r5, [pc, 0x84] |
0x000ba12a add r4, sp, 0x20 | r4 += var_20h;
0x000ba12c add r6, sp, 0x1c | r6 += var_1ch;
0x000ba12e mov r3, r4 | r3 = r4;
0x000ba130 str r0, [sp, 0x10] | dest = r0;
0x000ba132 movs r2, 0 | r2 = 0;
0x000ba134 add r5, pc | r5 = 0x1742e8;
0x000ba136 str r1, [sp, 8] | var_8h = r1;
0x000ba138 mov r0, r6 | r0 = r6;
0x000ba13a mov r1, r5 | r1 = r5;
0x000ba13c bl 0xc83bc | r0 = fcn_000c83bc (r0, r1, r2, r3);
| if (r0 != 0) {
0x000ba140 cbnz r0, 0xba1a2 | goto label_0;
| }
0x000ba142 ldr.w sl, [pc, 0x70] | sl = *(0x000ba1b4);
0x000ba146 add.w sb, sp, 0x24 | sb += arg_24h;
0x000ba14a mrc p15, 0, r8, c13, c0, 3 | __asm ("mrc p15, 0, r8, c13, c0, 3");
0x000ba14e add r2, sp, 0x30 | r2 += arg_30h;
0x000ba150 str r2, [sp, 0xc] | var_ch = r2;
0x000ba152 str r0, [sp, 0x14] | var_14h = r0;
| do {
0x000ba154 mov r2, sl | r2 = sl;
0x000ba156 mov.w r3, 0x400 | r3 = 0x400;
0x000ba15a add r2, pc | r2 += pc;
0x000ba15c ldr r2, [r2] | r2 = *(r2);
0x000ba15e mov r1, sb | r1 = sb;
0x000ba160 add r2, r8 | r2 += r8;
0x000ba162 ldr r0, [sp, 8] | r0 = var_8h;
0x000ba164 str r2, [sp] | *(sp) = r2;
0x000ba166 ldr r2, [sp, 0xc] | r2 = var_ch;
0x000ba168 ldr r7, [r4] | r7 = *(r4);
0x000ba16a blx r7 | uint32_t (*r7)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x000ba16c movs r2, 0 | r2 = 0;
0x000ba16e mov fp, r0 |
0x000ba170 strd r0, r2, [sp] | __asm ("strd r0, r2, [sp]");
0x000ba174 mov r3, r4 | r3 = r4;
0x000ba176 mov r1, r5 | r1 = r5;
0x000ba178 mov r0, r6 | r0 = r6;
0x000ba17a bl 0xc7928 | r0 = nss_next2 ();
0x000ba17e cmp r0, 0 |
0x000ba180 beq 0xba154 |
| } while (r0 == 0);
0x000ba182 ldr r3, [sp, 0x14] | r3 = var_14h;
0x000ba184 cmp.w fp, 1 |
0x000ba188 str r3, [sp, 8] | var_8h = r3;
| if (fp == 1) {
0x000ba18a bne 0xba1a2 |
0x000ba18c ldr.w r1, [sb] | r1 = *(sb);
0x000ba190 ldr r0, [sp, 0x10] | r0 = dest;
0x000ba192 bl 0x6a5a0 | strcpy (r0, r1)
0x000ba196 ldr r3, [sp, 8] | r3 = var_8h;
0x000ba198 mov r0, r3 | r0 = r3;
0x000ba19a addw sp, sp, 0x434 | __asm ("addw sp, var_0h");
0x000ba19e pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| }
| label_0:
0x000ba1a2 mov.w r3, -1 | r3 = -1;
0x000ba1a6 mov r0, r3 | r0 = r3;
0x000ba1a8 addw sp, sp, 0x434 | __asm ("addw sp, var_0h");
0x000ba1ac pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libc.so.6 @ 0x9f52c */
| #include <stdint.h>
|
; (fcn) sym.getwd () | void getwd (int16_t arg1, int16_t arg3) {
| char * src;
| int16_t var_1000h;
| r0 = arg1;
| r2 = arg3;
| if (r0 == 0) {
0x0009f52c cbz r0, 0x9f556 | goto label_0;
| }
0x0009f52e push {r4, r5, lr} |
0x0009f530 sub.w sp, sp, 0x1000 |
0x0009f534 sub sp, 4 |
0x0009f536 mov r4, r0 | r4 = r0;
0x0009f538 mov r5, sp | r5 = sp;
0x0009f53a mov.w r1, 0x1000 | r1 = 0x1000;
0x0009f53e mov r0, r5 | r0 = r5;
0x0009f540 bl 0x9efc8 | r0 = getcwd ();
| if (r0 == 0) {
0x0009f544 cbz r0, 0x9f568 | goto label_1;
| }
0x0009f546 mov r1, r5 | r1 = r5;
0x0009f548 mov r0, r4 | r0 = r4;
0x0009f54a bl 0x6a5a0 | strcpy (r0, r1)
| do {
0x0009f54e add.w sp, sp, 0x1000 |
0x0009f552 add sp, 4 |
0x0009f554 pop {r4, r5, pc} |
| label_0:
0x0009f556 ldr r3, [pc, 0x2c] |
0x0009f558 mrc p15, 0, r2, c13, c0, 3 | __asm ("mrc p15, 0, r2, c13, c0, 3");
0x0009f55c movs r1, 0x16 | r1 = 0x16;
0x0009f55e movs r0, 0 | r0 = 0;
0x0009f560 add r3, pc |
0x0009f562 ldr r3, [r3] | r3 = *(0x13eaea);
0x0009f564 str r1, [r2, r3] | *((r2 + r3)) = r1;
0x0009f566 bx lr | return;
| label_1:
0x0009f568 ldr r3, [pc, 0x1c] |
0x0009f56a mrc p15, 0, r0, c13, c0, 3 | __asm ("mrc p15, 0, r0, c13, c0, 3");
0x0009f56e mov.w r2, 0x400 | r2 = 0x400;
0x0009f570 str r0, [r0, 0x28] | *((r0 + 0x28)) = r0;
0x0009f572 mov r1, r4 | r1 = r4;
0x0009f574 add r3, pc |
0x0009f576 ldr r3, [r3] | r3 = *(0x13eb00);
0x0009f578 ldr r0, [r0, r3] | r0 = *((r0 + r3));
0x0009f57a bl 0x67bc4 | strerror_r ();
0x0009f57e movs r0, 0 | r0 = 0;
0x0009f580 b 0x9f54e |
| } while (1);
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libc.so.6 @ 0xc1674 */
| #include <stdint.h>
|
; (fcn) sym.inet_ntop () | void inet_ntop (uint32_t arg1, int16_t arg2, char * arg3, int16_t arg4) {
| int16_t var_0h;
| int16_t var_4h;
| char * dest;
| int16_t var_ch;
| int16_t var_10h;
| int16_t var_1ch;
| void * s;
| int16_t var_34h;
| char * src;
| int16_t var_70h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x000c1674 cmp r0, 2 |
0x000c1676 push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x000c167a sub sp, 0x74 |
0x000c167c mov r6, r1 | r6 = r1;
0x000c167e mov sb, r3 | sb = r3;
0x000c1680 str r2, [sp, 8] | dest = r2;
| if (r0 != 2) {
0x000c1682 beq 0xc169e |
0x000c1684 cmp r0, 0xa |
| if (r0 == 0xa) {
0x000c1686 beq 0xc16ca | goto label_8;
| }
0x000c1688 ldr r3, [pc, 0x21c] |
0x000c168a movs r0, 0 | r0 = 0;
0x000c168c mrc p15, 0, r2, c13, c0, 3 | __asm ("mrc p15, 0, r2, c13, c0, 3");
0x000c1690 movs r1, 0x61 | r1 = 0x61;
0x000c1692 add r3, pc |
0x000c1694 ldr r3, [r3] | r3 = *(0x182f3e);
0x000c1696 str r1, [r2, r3] | *((r2 + r3)) = r1;
| label_7:
0x000c1698 add sp, 0x74 |
0x000c169a pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| }
0x000c169e ldrb r2, [r1, 3] | r2 = *((r1 + 3));
0x000c16a0 add r4, sp, 0x40 | r4 += src;
0x000c16a2 ldrb r3, [r1, 2] | r3 = *((r1 + 2));
0x000c16a4 mov r0, r4 | r0 = r4;
0x000c16a6 strd r3, r2, [sp] | __asm ("strd r3, r2, [sp]");
0x000c16aa ldrb r3, [r1, 1] | r3 = *((r1 + 1));
0x000c16ac ldrb r2, [r1] | r2 = *(r1);
0x000c16ae ldr r1, [pc, 0x208] |
0x000c16b0 add r1, pc | r1 = 0x182f6e;
0x000c16b2 bl 0x3cad0 | r0 = IO_sprintf ();
0x000c16b6 cmp sb, r0 |
| if (sb < r0) {
0x000c16b8 bls.w 0xc1874 | goto label_9;
| }
0x000c16bc ldr r0, [sp, 8] | r0 = dest;
0x000c16be mov r1, r4 | r1 = r4;
0x000c16c0 bl 0x6a5a0 | strcpy (r0, r1)
0x000c16c4 add sp, 0x74 |
0x000c16c6 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_8:
0x000c16ca add.w fp, sp, 0x20 |
0x000c16ce movs r2, 0x20 | r2 = 0x20;
0x000c16d0 movs r1, 0 | r1 = 0;
0x000c16d2 mov r0, fp | r0 = fp;
0x000c16d4 blx 0x68e50 | memset (r0, r1, r2);
0x000c16d8 adds r4, r6, 1 | r4 = r6 + 1;
0x000c16da movs r3, 0 | r3 = 0;
| do {
0x000c16dc ldrb r0, [r6, r3] | r0 = *((r6 + r3));
0x000c16de asrs r2, r3, 1 | r2 = r3 >> 1;
0x000c16e0 ldrb r1, [r4, r3] | r1 = *((r4 + r3));
0x000c16e2 add r5, sp, 0x70 | r5 += var_70h;
0x000c16e4 adds r3, 2 | r3 += 2;
0x000c16e6 add.w r2, r5, r2, lsl 2 | r2 = r5 + (r2 << 2);
0x000c16ea cmp r3, 0x10 |
0x000c16ec orr.w r1, r1, r0, lsl 8 | r1 |= (r0 << 8);
0x000c16f0 str r1, [r2, -0x50] | s = r1;
0x000c16f4 bne 0xc16dc |
| } while (r3 != 0x10);
0x000c16f6 movs r7, 0 | r7 = 0;
0x000c16f8 mov.w sl, -1 | sl = -1;
0x000c16fc add r1, sp, 0x1c | r1 += var_1ch;
0x000c16fe mov r5, r7 | r5 = r7;
0x000c1700 mov r0, sl | r0 = sl;
0x000c1702 mov r2, r7 | r2 = r7;
0x000c1704 b 0xc1718 |
| while (r3 == 0) {
0x000c1706 adds r3, r0, 1 | r3 = r0 + 1;
0x000c1708 add.w r5, r5, 1 | r5++;
| if (r3 == r0) {
0x000c170c bne 0xc1712 |
0x000c170e mov r0, r2 | r0 = r2;
0x000c1710 movs r5, 1 | r5 = 1;
| }
| label_0:
0x000c1712 adds r2, 1 | r2++;
0x000c1714 cmp r2, 8 |
| if (r2 == 8) {
0x000c1716 beq 0xc1748 | goto label_10;
| }
| label_1:
0x000c1718 ldr r3, [r1, 4]! | r3 = s;
0x000c171c cmp r3, 0 |
0x000c171e beq 0xc1706 |
| }
0x000c1720 adds r4, r0, 1 | r4 = r0 + 1;
| if (r4 == r0) {
0x000c1722 beq 0xc1712 | goto label_0;
| }
0x000c1724 sub.w r3, sl, -1 | r3 = sl - -1;
0x000c1728 clz r3, r3 | r3 &= r3;
0x000c172c lsrs r3, r3, 5 | r3 >>= 5;
0x000c172e cmp r7, r5 |
0x000c1730 it lt |
| if (r7 >= r5) {
0x000c1732 orrlt r3, r3, 1 | r3 |= 1;
| }
0x000c1736 cmp r3, 0 |
| if (r3 == 0) {
0x000c1738 beq 0xc17be | goto label_11;
| }
0x000c173a adds r2, 1 | r2++;
0x000c173c mov sl, r0 | sl = r0;
0x000c173e cmp r2, 8 |
0x000c1740 mov r7, r5 | r7 = r5;
0x000c1742 mov.w r0, -1 | r0 = -1;
| if (r2 != 8) {
0x000c1746 bne 0xc1718 | goto label_1;
| }
| label_10:
0x000c1748 adds r3, r0, 1 | r3 = r0 + 1;
| if (r3 == r0) {
0x000c174a beq 0xc17c4 | goto label_12;
| }
0x000c174c sub.w r2, sl, -1 | r2 = sl - -1;
0x000c1750 clz r2, r2 | r2 &= r2;
0x000c1754 lsrs r2, r2, 5 | r2 >>= 5;
0x000c1756 cmp r5, r7 |
0x000c1758 it gt |
| if (r5 <= r7) {
0x000c175a orrgt r2, r2, 1 | r2 |= 1;
| }
0x000c175e cmp r2, 0 |
0x000c1760 itt ne |
| if (r2 == 0) {
0x000c1762 movne r7, r5 | r7 = r5;
| }
| if (r2 == 0) {
0x000c1764 movne sl, r0 | sl = r0;
| }
| label_3:
0x000c1766 cmp r7, 1 |
| if (r7 <= 1) {
0x000c1768 ble 0xc17ca | goto label_13;
| }
0x000c176a add r3, sp, 0x40 | r3 += src;
0x000c176c movs r5, 0 | r5 = 0;
0x000c176e mov r4, r3 | r4 = r3;
0x000c1770 str r3, [sp, 0xc] | var_ch = r3;
0x000c1772 cmp.w sl, 0 |
| if (sl != 0) {
0x000c1776 bne 0xc1796 | goto label_4;
| }
0x000c1778 mov r4, r3 | r4 = r3;
| label_5:
0x000c177a cmp.w sl, 7 |
0x000c177e mov.w r2, 0x3a | r2 = 0x3a;
0x000c1782 add.w r5, sl, 1 | r5 = sl + 1;
0x000c1786 strb r2, [r4], 1 | *(r4) = r2;
| r4++;
| if (sl == 7) {
0x000c178a beq 0xc184c | goto label_14;
| }
| do {
| label_6:
0x000c178c cmp r5, sl |
| if (r5 >= sl) {
0x000c178e bge 0xc17d8 | goto label_15;
| }
0x000c1790 movs r2, 0x3a | r2 = 0x3a;
0x000c1792 strb r2, [r4], 1 | *(r4) = r2;
| r4++;
| label_4:
0x000c1796 ldr.w r8, [pc, 0x124] | r8 = *(0x000c18bc);
0x000c179a add r8, pc | r8 += pc;
| label_2:
0x000c179c ldr.w r2, [fp, r5, lsl 2] | offset_0 = r5 << 2;
| r2 = *((fp + offset_0));
0x000c17a0 mov r0, r4 | r0 = r4;
0x000c17a2 mov r1, r8 | r1 = r8;
0x000c17a4 adds r5, 1 | r5++;
0x000c17a6 bl 0x3cad0 | IO_sprintf ();
0x000c17aa cmp r5, 8 |
0x000c17ac add r4, r0 | r4 += r0;
| if (r5 == 8) {
0x000c17ae beq 0xc1846 | goto label_16;
| }
0x000c17b0 cmp.w sl, -1 |
0x000c17b4 bne 0xc178c |
| } while (sl != -1);
0x000c17b6 movs r3, 0x3a | r3 = 0x3a;
0x000c17b8 strb r3, [r4], 1 | *(r4) = r3;
| r4++;
0x000c17bc b 0xc179c | goto label_2;
| label_11:
0x000c17be mov.w r0, -1 | r0 = -1;
0x000c17c2 b 0xc1712 | goto label_0;
| label_12:
0x000c17c4 cmp.w sl, -1 |
| if (sl != -1) {
0x000c17c8 bne 0xc1766 | goto label_3;
| }
| label_13:
0x000c17ca add r3, sp, 0x40 | r3 += src;
0x000c17cc mov.w sl, -1 | sl = -1;
0x000c17d0 movs r5, 0 | r5 = 0;
0x000c17d2 mov r4, r3 | r4 = r3;
0x000c17d4 str r3, [sp, 0xc] | var_ch = r3;
0x000c17d6 b 0xc1796 | goto label_4;
| label_15:
0x000c17d8 add.w r3, sl, r7 | r3 = sl + r7;
0x000c17dc cmp r3, r5 |
| if (r3 > r5) {
0x000c17de bgt 0xc183c | goto label_17;
| }
0x000c17e0 cmp r5, 6 |
0x000c17e2 it eq |
| if (r5 == 6) {
0x000c17e4 cmpeq sl, 0 | __asm ("cmpeq sl, 0");
| }
0x000c17e8 mov.w r2, 0x3a | r2 = 0x3a;
0x000c17ec strb r2, [r4], 1 | *(r4) = r2;
| r4++;
| if (r5 != 6) {
0x000c17f0 bne 0xc1796 | goto label_4;
| }
0x000c17f2 cmp r7, 6 |
| if (r7 == 6) {
0x000c17f4 beq 0xc180c | goto label_18;
| }
0x000c17f6 cmp r7, 5 |
0x000c17f8 mov.w r5, 6 | r5 = 6;
0x000c17fc mov.w sl, 0 | sl = 0;
| if (r7 != 5) {
0x000c1800 bne 0xc1796 | goto label_4;
| }
0x000c1802 ldr r1, [sp, 0x34] | r1 = var_34h;
0x000c1804 movw r2, 0xffff | r2 = 0xffff;
0x000c1808 cmp r1, r2 |
| if (r1 != r2) {
0x000c180a bne 0xc1796 | goto label_4;
| }
| label_18:
0x000c180c ldrb r3, [r6, 0xf] | r3 = *((r6 + 0xf));
0x000c180e add r5, sp, 0x10 | r5 += var_10h;
0x000c1810 ldr r1, [pc, 0xac] |
0x000c1812 mov r0, r5 | r0 = r5;
0x000c1814 str r3, [sp, 4] | var_4h = r3;
0x000c1816 ldrb r3, [r6, 0xe] | r3 = *((r6 + 0xe));
0x000c1818 add r1, pc | r1 = 0x1830dc;
0x000c181a str r3, [sp] | *(sp) = r3;
0x000c181c ldrb r3, [r6, 0xd] | r3 = *((r6 + 0xd));
0x000c181e ldrb r2, [r6, 0xc] | r2 = *((r6 + 0xc));
0x000c1820 bl 0x3cad0 | IO_sprintf ();
0x000c1824 ldr r3, [sp, 0xc] | r3 = var_ch;
0x000c1826 subs r3, r4, r3 | r3 = r4 - r3;
0x000c1828 rsb.w r3, r3, 0x2e | r3 = 0x2e - r3;
0x000c182c cmp r3, r0 |
| if (r3 < r0) {
0x000c182e bls 0xc1898 | goto label_19;
| }
0x000c1830 mov r0, r4 | r0 = r4;
0x000c1832 mov r1, r5 | r1 = r5;
0x000c1834 bl 0x6a590 | r0 = stpcpy ();
0x000c1838 mov r4, r0 | r4 = r0;
0x000c183a b 0xc184e | goto label_20;
| label_17:
0x000c183c cmp r5, sl |
| if (r5 == sl) {
0x000c183e beq 0xc177a | goto label_5;
| }
0x000c1840 adds r5, 1 | r5++;
0x000c1842 cmp r5, 8 |
| if (r5 != 8) {
0x000c1844 bne 0xc178c | goto label_6;
| }
| label_16:
0x000c1846 cmp.w sl, -1 |
| if (sl != -1) {
0x000c184a beq 0xc1858 |
| label_14:
0x000c184c add r7, sl | r7 += sl;
| label_20:
0x000c184e cmp r7, 8 |
0x000c1850 itt eq |
| if (r7 != 8) {
0x000c1852 moveq r3, 0x3a | r3 = 0x3a;
| }
| if (r7 == 8) {
0x000c1854 strbeq r3, [r4], 1 | *(r4) = r3;
| r4++;
| goto label_21;
| }
| }
| label_21:
0x000c1858 movs r3, 0 | r3 = 0;
0x000c185a strb r3, [r4], 1 | *(r4) = r3;
| r4++;
0x000c185e ldr r3, [sp, 0xc] | r3 = var_ch;
0x000c1860 subs r4, r4, r3 | r4 -= r3;
0x000c1862 cmp sb, r4 |
| if (sb > r4) {
0x000c1864 blo 0xc1886 |
0x000c1866 ldrd r0, r1, [sp, 8] | __asm ("ldrd r0, r1, [dest]");
0x000c186a bl 0x6a5a0 | strcpy (r0, r1)
0x000c186e add sp, 0x74 |
0x000c1870 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_9:
0x000c1874 ldr r3, [pc, 0x34] |
0x000c1876 mrc p15, 0, r2, c13, c0, 3 | __asm ("mrc p15, 0, r2, c13, c0, 3");
0x000c187a movs r1, 0x1c | r1 = 0x1c;
0x000c187c movs r0, 0 | r0 = 0;
0x000c187e add r3, pc |
0x000c1880 ldr r3, [r3] | r3 = *(0x18312e);
0x000c1882 str r1, [r2, r3] | *((r2 + r3)) = r1;
0x000c1884 b 0xc1698 | goto label_7;
| }
0x000c1886 ldr r3, [pc, 0x28] |
0x000c1888 mrc p15, 0, r2, c13, c0, 3 | __asm ("mrc p15, 0, r2, c13, c0, 3");
0x000c188c movs r1, 0x1c | r1 = 0x1c;
0x000c188e add r3, pc |
0x000c1890 ldr r3, [r3] | r3 = *(0x183144);
0x000c1892 str r1, [r2, r3] | *((r2 + r3)) = r1;
| do {
0x000c1894 movs r0, 0 | r0 = 0;
0x000c1896 b 0xc1698 | goto label_7;
| label_19:
0x000c1898 ldr r3, [pc, 0x18] |
0x000c189a mrc p15, 0, r2, c13, c0, 3 | __asm ("mrc p15, 0, r2, c13, c0, 3");
0x000c189e movs r1, 0x1c | r1 = 0x1c;
0x000c18a0 add r3, pc |
0x000c18a2 ldr r3, [r3] | r3 = *(0x183158);
0x000c18a4 str r1, [r2, r3] | *((r2 + r3)) = r1;
0x000c18a6 b 0xc1894 |
| } while (1);
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libc.so.6 @ 0xd96b0 */
| #include <stdint.h>
|
; (fcn) sym.openpty () | void openpty (int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| int16_t var_4h;
| int32_t var_4h_2;
| int16_t var_10h;
| int16_t var_1000h;
| int16_t var_1020h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x000d96b0 push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x000d96b4 sub.w sp, sp, 0x1000 |
0x000d96b8 sub sp, 0x14 |
0x000d96ba mov r8, r3 | r8 = r3;
0x000d96bc add r5, sp, 0x10 | r5 += var_10h;
0x000d96be movs r3, 0 | r3 = 0;
0x000d96c0 strb r3, [r5] | *(r5) = r3;
0x000d96c2 mov sl, r0 | sl = r0;
0x000d96c4 mov sb, r1 | sb = r1;
0x000d96c6 mov r7, r2 | r7 = r2;
0x000d96c8 str r5, [r5, -0x4] | *((r5 - 0x4)) = r5;
0x000d96cc bl 0xd919c | r0 = getpt ();
0x000d96d0 adds r3, r0, 1 | r3 = r0 + 1;
| if (r3 == r0) {
0x000d96d2 beq 0xd96e2 | goto label_3;
| }
0x000d96d4 mov r4, r0 | r4 = r0;
0x000d96d6 bl 0xd91ac | r0 = grantpt ();
0x000d96da cbz r0, 0xd96f2 |
| while (r0 != 0) {
0x000d96dc mov r0, r4 | r0 = r4;
0x000d96de bl 0x9ede0 | close (r0);
| label_3:
0x000d96e2 mov.w r6, -1 | r6 = -1;
| label_0:
0x000d96e6 mov r0, r6 | r0 = r6;
0x000d96e8 add.w sp, sp, 0x1000 |
0x000d96ec add sp, 0x14 |
0x000d96ee pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
0x000d96f2 mov r0, r4 | r0 = r4;
0x000d96f4 bl 0xd91f0 | r0 = unlockpt ();
0x000d96f8 mov r6, r0 | r6 = r0;
0x000d96fa cmp r0, 0 |
0x000d96fc bne 0xd96dc |
| }
0x000d96fe mov.w r2, 0x102 | r2 = 0x102;
0x000d9702 movw r1, 0x5441 | r1 = 0x5441;
0x000d9706 mov r0, r4 | r0 = r4;
0x000d9708 bl 0xa621c | r0 = ioctl_time64 ();
0x000d970c cmp.w r0, -1 |
0x000d9710 mov fp, r0 |
0x000d9712 it ne |
| if (r0 == -1) {
0x000d9714 movne r3, r5 | r3 = r5;
| }
| if (r0 == -1) {
0x000d9716 beq 0xd9798 | goto label_4;
| }
| label_2:
0x000d9718 cmp.w r8, 0 |
| if (r8 != 0) {
0x000d971c beq 0xd972c |
0x000d971e mov r2, r8 | r2 = r8;
0x000d9720 movs r1, 2 | r1 = 2;
0x000d9722 mov r0, fp | r0 = fp;
0x000d9724 str r3, [sp, 4] | var_4h = r3;
0x000d9726 bl 0xa59d8 | tcsetattr ();
0x000d972a ldr r3, [sp, 4] | r3 = var_4h;
| }
0x000d972c add.w r2, sp, 0x1020 | r2 += var_1020h;
0x000d9730 adds r2, 0x18 | r2 += 0x18;
0x000d9732 ldr r2, [r2] | r2 = *(r2);
| if (r2 != 0) {
0x000d9734 cbz r2, 0xd9744 |
0x000d9736 movw r1, 0x5414 | r1 = 0x5414;
0x000d973a mov r0, fp | r0 = fp;
0x000d973c str r3, [sp, 4] | var_4h = r3;
0x000d973e bl 0xa621c | ioctl_time64 ();
0x000d9742 ldr r3, [sp, 4] | r3 = var_4h;
| }
0x000d9744 str.w r4, [sl] | __asm ("str.w r4, [sl]");
0x000d9748 str.w fp, [sb] | __asm ("str.w fp, [sb]");
| if (r7 != 0) {
0x000d974c cbz r7, 0xd976c |
0x000d974e ldrb r2, [r3] | r2 = *(r3);
| if (r2 == 0) {
0x000d9750 cbnz r2, 0xd9760 |
0x000d9752 subs r1, r5, 4 | r1 -= var_4h_2;
0x000d9754 mov r0, r4 | r0 = r4;
0x000d9756 bl 0xd962c | r0 = fcn_000d962c (r0, r1);
| if (r0 != 0) {
0x000d975a cbnz r0, 0xd9782 | goto label_5;
| }
0x000d975c ldr r3, [r5, -0x4] | r3 = *((r5 - 0x4));
| }
0x000d9760 mov r1, r3 | r1 = r3;
0x000d9762 mov r0, r7 | r0 = r7;
0x000d9764 str r3, [sp, 4] | var_4h = r3;
0x000d9766 bl 0x6a5a0 | strcpy (r0, r1)
0x000d976a ldr r3, [sp, 4] | r3 = var_4h;
| }
| label_1:
0x000d976c cmp r3, r5 |
| if (r3 == r5) {
0x000d976e beq 0xd96e6 | goto label_0;
| }
0x000d9770 mov r0, r3 | r0 = r3;
0x000d9772 blx 0x1ded4 | fcn_0001ded4 ();
0x000d9776 mov r0, r6 | r0 = r6;
0x000d9778 add.w sp, sp, 0x1000 |
0x000d977c add sp, 0x14 |
0x000d977e pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_5:
0x000d9782 mov r0, r4 | r0 = r4;
0x000d9784 mov.w r6, -1 | r6 = -1;
0x000d9788 bl 0x9ede0 | close (r0);
0x000d978c mov r0, fp | r0 = fp;
0x000d978e bl 0x9ede0 | close (r0);
0x000d9792 ldr r3, [r5, -0x4] | r3 = *((r5 - 0x4));
0x000d9796 b 0xd976c | goto label_1;
| label_4:
0x000d9798 subs r1, r5, 4 | r1 -= var_4h_2;
0x000d979a mov r0, r4 | r0 = r4;
0x000d979c bl 0xd962c | r0 = fcn_000d962c (r0, r1);
| if (r0 != 0) {
0x000d97a0 cbnz r0, 0xd97ca | goto label_6;
| }
0x000d97a2 ldr r3, [r5, -0x4] | r3 = *((r5 - 0x4));
0x000d97a6 mov.w r1, 0x102 | r1 = 0x102;
0x000d97aa mov r0, r3 | r0 = r3;
0x000d97ac str r3, [sp, 4] | var_4h = r3;
0x000d97ae bl 0x9e3b0 | r0 = open64 ();
0x000d97b2 cmp.w r0, -1 |
0x000d97b6 ldr r3, [sp, 4] | r3 = var_4h;
0x000d97b8 mov fp, r0 |
| if (r0 != -1) {
0x000d97ba bne 0xd9718 | goto label_2;
| }
0x000d97bc mov r0, r4 | r0 = r4;
0x000d97be str r3, [sp, 4] | var_4h = r3;
0x000d97c0 mov r6, fp | r6 = fp;
0x000d97c2 bl 0x9ede0 | close (r0);
0x000d97c6 ldr r3, [sp, 4] | r3 = var_4h;
0x000d97c8 b 0xd976c | goto label_1;
| label_6:
0x000d97ca mov r0, r4 | r0 = r4;
0x000d97cc mov r6, fp | r6 = fp;
0x000d97ce bl 0x9ede0 | close (r0);
0x000d97d2 ldr r3, [r5, -0x4] | r3 = *((r5 - 0x4));
0x000d97d6 b 0xd976c | goto label_1;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libc.so.6 @ 0x2d574 */
| #include <stdint.h>
|
; (fcn) sym.realpath () | void realpath (int16_t arg_0h, int16_t arg_1h, int16_t arg_28h, int16_t arg_29h, int16_t arg_428h, int16_t arg_430h, int16_t arg_830h, int16_t arg_838h, uint32_t arg1, char * arg2) {
| char * dest;
| void * s2;
| size_t n;
| int16_t var_ch;
| int16_t var_10h;
| int16_t var_14h;
| int16_t var_18h;
| int16_t var_20h;
| int16_t var_20h_2;
| r0 = arg1;
| r1 = arg2;
0x0002d574 push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0002d578 subw sp, sp, 0xc3c | __asm ("subw sp, sp, aav.0x000000ff");
0x0002d57c add r4, sp, 0x20 | r4 += var_20h_2;
0x0002d57e mov.w r2, 0x400 | r2 = 0x400;
0x0002d582 add r7, sp, 0x28 | r7 += arg_28h;
0x0002d584 add.w sl, sp, 0x430 | sl += arg_430h;
0x0002d588 addw sb, sp, 0x838 | __asm ("addw sb, arg_838h");
0x0002d58c str r1, [sp] | *(sp) = r1;
0x0002d58e strd r7, r2, [r4] | __asm ("strd r7, r2, [r4]");
0x0002d592 str.w r2, [r4, 0x40c] | __asm ("str.w r2, aav.0x000000ff");
0x0002d596 str.w r2, [r4, 0x814] | __asm ("str.w r2, aav.0x000000ff");
0x0002d59a str.w sl, [r4, 0x408] | __asm ("str.w sl, aav.0x000000ff");
0x0002d59e str.w sb, [r4, 0x810] | __asm ("str.w sb, aav.0x000000ff");
0x0002d5a2 cmp r0, 0 |
| if (arg_0h == ) {
0x0002d5a4 beq.w 0x2d7be | goto label_19;
| }
0x0002d5a8 mov fp, r0 |
0x0002d5aa ldrb r0, [r0] | r0 = *(r0);
0x0002d5ac cmp r0, 0 |
| if (arg_0h == ) {
0x0002d5ae beq.w 0x2d6bc | goto label_20;
| }
0x0002d5b2 cmp r0, 0x2f |
| if (arg_0hx2f == ) {
0x0002d5b4 beq 0x2d608 | goto label_21;
| }
0x0002d5b6 mov r1, r2 | r1 = r2;
0x0002d5b8 mov r5, r7 | r5 = r7;
0x0002d5ba mrc p15, 0, r6, c13, c0, 3 | __asm ("mrc p15, 0, r6, c13, c0, 3");
0x0002d5be b 0x2d5c4 |
| while (r0 != 0) {
0x0002d5c0 ldrd r5, r1, [r4] | __asm ("ldrd r5, r1, [r4]");
0x0002d5c4 mov r0, r5 | r0 = r5;
0x0002d5c6 bl 0x9efc8 | r0 = getcwd ();
0x0002d5ca mov r2, r0 | r2 = r0;
0x0002d5cc ldr r3, [pc, 0x2e4] | r3 = *(0x2d8b4);
0x0002d5ce mov r0, r4 | r0 = r4;
0x0002d5d0 cmp r2, 0 |
| if (r2 != 0) {
0x0002d5d2 bne.w 0x2d738 | goto label_22;
| }
0x0002d5d6 add r3, pc | r3 += pc;
0x0002d5d8 ldr r3, [r3] | r3 = *(r3);
0x0002d5da ldr r3, [r6, r3] | r3 = *((r6 + r3));
0x0002d5dc cmp r3, 0x22 |
| if (r3 != 0x22) {
0x0002d5de bne.w 0x2d782 | goto label_23;
| }
0x0002d5e2 bl 0x677a8 | r0 = libc_scratch_buffer_grow ();
0x0002d5e6 cmp r0, 0 |
0x0002d5e8 bne 0x2d5c0 |
| }
| label_1:
0x0002d5ea mov.w fp, 0 |
| label_3:
0x0002d5ee ldr.w r0, [r4, 0x810] | r0 = *((r4 + 0x810));
0x0002d5f2 cmp r0, sb |
| if (r0 != sb) {
0x0002d5f4 beq 0x2d5fa |
0x0002d5f6 blx 0x1ded4 | fcn_0001ded4 ();
| }
0x0002d5fa ldr.w r0, [r4, 0x408] | r0 = *((r4 + 0x408));
0x0002d5fe cmp r0, sl |
| if (r0 == sl) {
0x0002d600 beq 0x2d6ce | goto label_24;
| }
0x0002d602 blx 0x1ded4 | fcn_0001ded4 ();
0x0002d606 b 0x2d6ce | goto label_24;
| label_21:
0x0002d608 add.w r5, sp, 0x29 | r5 += arg_29h;
0x0002d60c mov r8, r7 | r8 = r7;
0x0002d60e strb r0, [r4, 8] | *((r4 + 8)) = r0;
| label_2:
0x0002d610 mov r1, fp | r1 = fp;
0x0002d612 mov.w lr, 0 | lr = 0;
0x0002d616 strd lr, lr, [sp, 0xc] | __asm ("strd lr, lr, [sp, 0xc]");
0x0002d618 invalid |
| label_0:
0x0002d61a cmp r0, 0x2f |
0x0002d61c it ne |
| if (arg_0hx2f == ) {
0x0002d61e movne r3, r0 | r3 = r0;
| }
| if (arg_0hx2f != ) {
0x0002d620 bne 0x2d630 | goto label_25;
| }
| do {
0x0002d622 ldrb r3, [r1, 1]! | r3 = *((r1 += 1));
0x0002d626 cmp r3, 0x2f |
0x0002d628 beq 0x2d622 |
| } while (r3 == 0x2f);
0x0002d62a cmp r3, 0 |
| if (r3 == 0) {
0x0002d62c beq.w 0x2d750 | goto label_26;
| }
| label_25:
0x0002d630 mov r6, r1 | r6 = r1;
| do {
0x0002d632 mov fp, r6 |
0x0002d634 ldrb r0, [r6, 1]! | r0 = *((r6 += 1));
0x0002d638 cmp r0, 0 |
0x0002d63a it ne |
| if (r0 != 0) {
0x0002d63c cmpne r0, 0x2f | __asm ("cmpne r0, 0x2f");
| }
0x0002d63e bne 0x2d632 |
| } while (r0 != 0);
0x0002d640 subs r2, r6, r1 | r2 = r6 - r1;
| if (r2 == r6) {
0x0002d642 beq.w 0x2d750 | goto label_26;
| }
0x0002d646 cmp r2, 1 |
| if (r2 == 1) {
0x0002d648 beq 0x2d66a | goto label_27;
| }
0x0002d64a cmp r2, 2 |
0x0002d64c it eq |
| if (r2 == 2) {
0x0002d64e cmpeq r3, 0x2e | __asm ("cmpeq r3, 0x2e");
| }
| if (r2 != 2) {
0x0002d650 bne 0x2d66e | goto label_28;
| }
0x0002d652 ldrb r3, [r1, 1] | r3 = *((r1 + 1));
0x0002d654 cmp r3, 0x2e |
| if (r3 != 0x2e) {
0x0002d656 bne 0x2d66e | goto label_28;
| }
0x0002d658 add.w r3, r8, 1 | r3 = r8 + 1;
0x0002d65c cmp r5, r3 |
| if (r5 > r3) {
0x0002d65e bhi.w 0x2d826 | goto label_29;
| }
| do {
| label_7:
0x0002d662 cmp r0, 0 |
| if (r0 == 0) {
0x0002d664 beq 0x2d750 | goto label_26;
| }
0x0002d666 mov r1, r6 | r1 = r6;
0x0002d668 b 0x2d61a | goto label_0;
| label_27:
0x0002d66a cmp r3, 0x2e |
0x0002d66c beq 0x2d662 |
| } while (r3 == 0x2e);
| label_28:
0x0002d66e ldrb r3, [r5, -0x1] | r3 = *((r5 - 0x1));
0x0002d672 add.w ip, r2, 2 |
0x0002d676 cmp r3, 0x2f |
0x0002d678 itt ne |
| if (r3 == 0x2f) {
0x0002d67a movne r3, 0x2f | r3 = 0x2f;
| }
| if (r3 == 0x2f) {
0x0002d67c strbne r3, [r5], 1 | *(r5) = r3;
| r5++;
| }
0x0002d680 ldr r3, [r4, 4] | r3 = *((r4 + 4));
0x0002d682 add r3, r8 | r3 += r8;
0x0002d684 subs r3, r3, r5 | r3 -= r5;
0x0002d686 cmp r3, ip |
| if (r3 >= ip) {
0x0002d688 bhs 0x2d6ee | goto label_30;
| }
0x0002d68a mov r0, r8 | r0 = r8;
0x0002d68c str.w fp, [sp, 4] | __asm ("str.w fp, [s2]");
0x0002d690 mov r8, r6 | r8 = r6;
0x0002d692 mov r3, r5 | r3 = r5;
0x0002d694 mov r6, ip | r6 = ip;
0x0002d696 mov fp, r2 |
0x0002d698 mov ip, r0 |
0x0002d69a str r1, [sp, 8] | n = r1;
0x0002d69c b 0x2d6ac |
| while (r0 != 0) {
0x0002d69e ldrd ip, r1, [r4] | __asm ("ldrd ip, r1, [r4]");
0x0002d6a2 subs r1, r1, r5 | r1 -= r5;
0x0002d6a4 add.w r3, ip, r5 | r3 = ip + r5;
0x0002d6a8 cmp r1, r6 |
| if (r1 >= r6) {
0x0002d6aa bhs 0x2d6e2 | goto label_31;
| }
0x0002d6ac mov r0, r4 | r0 = r4;
0x0002d6ae sub.w r5, r3, ip | r5 = r3 - ip;
0x0002d6b2 bl 0x677f8 | r0 = libc_scratch_buffer_grow_preserve ();
0x0002d6b6 cmp r0, 0 |
0x0002d6b8 bne 0x2d69e |
| }
0x0002d6ba b 0x2d5ea | goto label_1;
| label_20:
0x0002d6bc movs r1, 2 | r1 = 2;
| label_4:
0x0002d6be ldr r3, [pc, 0x1f8] |
0x0002d6c0 mov.w fp, 0 |
0x0002d6c4 mrc p15, 0, r2, c13, c0, 3 | __asm ("mrc p15, 0, r2, c13, c0, 3");
0x0002d6c8 add r3, pc |
0x0002d6ca ldr r3, [r3] | r3 = *(0x5af86);
0x0002d6cc str r1, [r2, r3] | *((r2 + r3)) = r1;
| label_24:
0x0002d6ce ldr r0, [r4] | r0 = *(r4);
0x0002d6d0 cmp r0, r7 |
| if (r0 != r7) {
0x0002d6d2 beq 0x2d6d8 |
0x0002d6d4 blx 0x1ded4 | fcn_0001ded4 ();
| }
0x0002d6d8 mov r0, fp | r0 = fp;
0x0002d6da addw sp, sp, 0xc3c | __asm ("addw sp, dest");
0x0002d6de pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_31:
0x0002d6e2 mov r2, fp | r2 = fp;
0x0002d6e4 ldrd fp, r1, [sp, 4] | __asm ("ldrd fp, r1, [s2]");
0x0002d6e8 mov r6, r8 | r6 = r8;
0x0002d6ea mov r5, r3 | r5 = r3;
0x0002d6ec mov r8, ip | r8 = ip;
| label_30:
0x0002d6ee mov r0, r5 | r0 = r5;
0x0002d6f0 str r2, [sp, 4] | s2 = r2;
0x0002d6f2 blx 0x6d540 | memcpy (r0, r1, r2);
0x0002d6f4 vpmax.s32 d9, d6, d1 | __asm ("vpmax.s32 d9, d6, d1");
0x0002d6f8 mov r1, r0 | r1 = r0;
0x0002d6fa add.w r0, sp, 0x830 | r0 += arg_830h;
0x0002d6fe movs r3, 0 | r3 = 0;
0x0002d700 str r1, [sp, 0x1c] | var_20h = r1;
0x0002d702 strd r6, r2, [sp, 4] | __asm ("strd r6, r2, [sp, 4]");
0x0002d706 mov r6, r0 | r6 = r0;
0x0002d708 adds r5, r1, r2 | r5 = r1 + r2;
0x0002d70a strb r3, [r1, r2] | *((r1 + r2)) = r3;
0x0002d70c strd r5, fp, [sp, 0x14] | __asm ("strd r5, fp, [destx14]");
| do {
0x0002d710 ldr.w r2, [r4, 0x814] | r2 = *((r4 + 0x814));
0x0002d714 mov r0, r8 | r0 = r8;
0x0002d716 ldr.w r5, [r4, 0x810] | r5 = *((r4 + 0x810));
0x0002d71a add.w fp, r2, -1 |
0x0002d71c subs r3, 0xff | r3 -= 0xff;
0x0002d71e mov r2, fp | r2 = fp;
0x0002d720 mov r1, r5 | r1 = r5;
0x0002d722 bl 0x9f990 | r0 = readlink ();
0x0002d726 mov r3, r0 | r3 = r0;
0x0002d728 mov r0, r6 | r0 = r6;
0x0002d72a cmp fp, r3 |
| if (fp > r3) {
0x0002d72c bgt 0x2d7c2 | goto label_32;
| }
0x0002d72e bl 0x677a8 | r0 = libc_scratch_buffer_grow ();
0x0002d732 cmp r0, 0 |
0x0002d734 bne 0x2d710 |
| } while (r0 != 0);
0x0002d736 b 0x2d5ea | goto label_1;
| label_22:
0x0002d738 mov r0, r5 | r0 = r5;
0x0002d73a movs r1, 0 | r1 = 0;
0x0002d73c bl 0x68ed0 | r0 = rawmemchr ();
0x0002d740 mov r2, r0 | r2 = r0;
0x0002d742 ldrb.w r0, [fp] | r0 = *(fp);
0x0002d746 mov r8, r5 | r8 = r5;
0x0002d748 mov r5, r2 | r5 = r2;
0x0002d74a cmp r0, 0 |
| if (r0 != 0) {
0x0002d74c bne.w 0x2d610 | goto label_2;
| }
| label_26:
0x0002d750 add.w r3, r8, 1 | r3 = r8 + 1;
0x0002d754 cmp r5, r3 |
| if (r5 > r3) {
0x0002d756 bhi.w 0x2d8e8 | goto label_33;
| }
0x0002d75a movs r3, 0 | r3 = 0;
0x0002d75c strb r3, [r5] | *(r5) = r3;
0x0002d75e ldr r3, [sp] | r3 = *(sp);
0x0002d760 cmp r3, 0 |
| if (r3 == 0) {
0x0002d762 beq.w 0x2d8fe | goto label_16;
| }
| label_9:
0x0002d766 adds r5, 1 | r5++;
| label_15:
0x0002d768 sub.w r5, r5, r8 | r5 -= r8;
0x0002d76c cmp.w r5, 0x1000 |
| if (r5 > 0x1000) {
0x0002d770 bgt.w 0x2d908 | goto label_34;
| }
0x0002d774 ldr.w fp, [sp] | fp = *(sp);
0x0002d778 mov r1, r8 | r1 = r8;
0x0002d77a mov r0, fp | r0 = fp;
0x0002d77c bl 0x6a5a0 | strcpy (r0, r1)
0x0002d780 b 0x2d5ee | goto label_3;
| label_23:
0x0002d782 mov r8, r5 | r8 = r5;
| label_6:
0x0002d784 movs r3, 0 | r3 = 0;
0x0002d786 strb r3, [r5] | *(r5) = r3;
0x0002d788 ldr r3, [sp] | r3 = *(sp);
0x0002d78a cmp r3, 0 |
| if (r3 == 0) {
0x0002d78c beq.w 0x2d5ea | goto label_1;
| }
0x0002d790 adds r5, 1 | r5++;
0x0002d792 mrc p15, 0, r0, c13, c0, 3 | __asm ("mrc p15, 0, r0, c13, c0, 3");
| label_18:
0x0002d796 ldr r3, [pc, 0x124] |
0x0002d798 add r3, pc |
0x0002d79a ldr r3, [r3] | r3 = *(0x5b05a);
0x0002d79c ldr r3, [r0, r3] | r3 = *((r0 + r3));
0x0002d79e cmp r3, 2 |
| if (r3 == 2) {
0x0002d7a0 beq 0x2d7a8 | goto label_35;
| }
0x0002d7a2 cmp r3, 0xd |
| if (r3 != 0xd) {
0x0002d7a4 bne.w 0x2d5ea | goto label_1;
| }
| label_35:
0x0002d7a8 sub.w r5, r5, r8 | r5 -= r8;
0x0002d7ac cmp.w r5, 0x1000 |
| if (r5 > 0x1000) {
0x0002d7b0 bgt.w 0x2d5ea | goto label_1;
| }
0x0002d7b4 ldr r0, [sp] | r0 = *(sp);
0x0002d7b6 mov r1, r8 | r1 = r8;
0x0002d7b8 bl 0x6a5a0 | strcpy (r0, r1)
0x0002d7bc b 0x2d5ea | goto label_1;
| label_19:
0x0002d7be movs r1, 0x16 | r1 = 0x16;
0x0002d7c0 b 0x2d6be | goto label_4;
| label_32:
0x0002d7c2 cmp r3, 0 |
0x0002d7c4 ldrd r6, r2, [sp, 4] | __asm ("ldrd r6, r2, [s2]");
0x0002d7c8 ldrd fp, r1, [sp, 0x18] | __asm ("ldrd fp, r1, [var_18h]");
0x0002d7cc mov ip, r3 |
0x0002d7ce str r5, [sp, 4] | s2 = r5;
0x0002d7d0 ldr r5, [sp, 0x14] | r5 = var_14h;
| if (r3 >= 0) {
0x0002d7d2 bge 0x2d83c | goto label_36;
| }
0x0002d7d4 ldrb r3, [r6] | r3 = *(r6);
0x0002d7d6 cmp r3, 0x2f |
0x0002d7d8 it eq |
| if (r3 != 0x2f) {
0x0002d7da moveq r3, r6 | r3 = r6;
| }
| if (r3 != 0x2f) {
0x0002d7dc bne 0x2d80a | goto label_10;
| }
| do {
| label_5:
0x0002d7de mov ip, r3 |
0x0002d7e0 ldrb r0, [r3, 1]! | r0 = *((r3 += 1));
0x0002d7e4 cmp r0, 0x2f |
0x0002d7e6 beq 0x2d7de |
| } while (r0 == 0x2f);
0x0002d7e8 add.w ip, ip, 2 |
0x0002d7ec cmp r0, 0 |
| if (r0 == 0) {
0x0002d7ee beq.w 0x2d924 | goto label_37;
| }
0x0002d7f2 cmp r0, 0x2e |
| if (r0 != 0x2e) {
0x0002d7f4 bne 0x2d80a | goto label_10;
| }
0x0002d7f6 ldrb r0, [r3, 1] | r0 = *((r3 + 1));
0x0002d7f8 cmp r0, 0 |
| if (r0 == 0) {
0x0002d7fa beq.w 0x2d924 | goto label_37;
| }
0x0002d7fe cmp r0, 0x2e |
| if (r0 == 0x2e) {
0x0002d800 beq.w 0x2d918 | goto label_38;
| }
0x0002d804 cmp r0, 0x2f |
0x0002d806 mov r3, ip | r3 = ip;
| if (r0 == 0x2f) {
0x0002d808 beq 0x2d7de | goto label_5;
| }
| label_10:
0x0002d80a ldr r3, [pc, 0xb4] |
0x0002d80c mrc p15, 0, r2, c13, c0, 3 | __asm ("mrc p15, 0, r2, c13, c0, 3");
0x0002d810 add r3, pc |
0x0002d812 ldr r3, [r3] | r3 = *(0x5b0d6);
0x0002d814 ldr r3, [r2, r3] | r3 = *((r2 + r3));
0x0002d816 subs r3, 0x16 | r3 -= 0x16;
0x0002d818 it ne |
| if (r3 == 0x16) {
0x0002d81a movne r3, 1 | r3 = 1;
| }
| label_11:
0x0002d81c cmp r3, 0 |
| if (r3 != 0) {
0x0002d81e bne 0x2d784 | goto label_6;
| }
0x0002d820 ldrb.w r0, [fp, 1] | r0 = *(arg_1h);
0x0002d824 b 0x2d662 | goto label_7;
| label_29:
0x0002d826 subs r5, 1 | r5--;
0x0002d828 cmp r5, r8 |
| if (r5 < r8) {
0x0002d82a bls.w 0x2d662 | goto label_7;
| }
0x0002d82e mov r2, r5 | r2 = r5;
| label_8:
0x0002d830 ldrb r3, [r5, -0x1]! | r3 = *((r5 -= 0x1));
0x0002d834 cmp r3, 0x2f |
| if (r3 != 0x2f) {
0x0002d836 bne 0x2d8e0 | goto label_39;
| }
0x0002d838 mov r5, r2 | r5 = r2;
0x0002d83a b 0x2d662 | goto label_7;
| label_36:
0x0002d83c ldr r0, [sp, 0x10] | r0 = var_10h;
0x0002d83e ldr.w fp, [pc, 0x84] |
0x0002d842 adds r0, 1 | r0++;
0x0002d844 add fp, pc | fp = 0x5b10e;
0x0002d846 str r0, [sp, 0x10] | var_10h = r0;
0x0002d848 ldr.w r0, [fp] | r0 = *(0x5b10e);
0x0002d84c cmp r0, 0 |
| if (r0 == 0) {
0x0002d84e beq.w 0x2d99e | goto label_40;
| }
| label_13:
0x0002d852 cmp r0, 0 |
0x0002d854 it le |
| if (r0 > 0) {
0x0002d856 movle r0, 0x28 | r0 = 0x28;
| }
| if (r0 > 0) {
0x0002d858 ble 0x2d860 |
0x0002d85a cmp r0, 0x28 |
0x0002d85c it lo |
| if (r0 < 0x28) {
0x0002d85e movlo r0, 0x28 | r0 = 0x28;
| goto label_41;
| }
| }
| label_41:
0x0002d860 ldr r3, [sp, 0x10] | r3 = var_10h;
0x0002d862 cmp r3, r0 |
| if (r3 > r0) {
0x0002d864 bhi.w 0x2da0c | goto label_42;
| }
0x0002d868 ldr r3, [sp, 4] | r3 = s2;
0x0002d86a movs r2, 0 | r2 = 0;
0x0002d86c mov r0, r6 | r0 = r6;
0x0002d86e str.w ip, [sp, 0x14] | __asm ("str.w ip, [var_14h]");
0x0002d872 strb.w r2, [r3, ip] | *((r3 + ip)) = r2;
0x0002d876 ldr r3, [sp, 0xc] | r3 = var_ch;
0x0002d878 ldr.w r2, [r4, 0x408] | r2 = *((r4 + 0x408));
0x0002d87c str r2, [sp, 8] | n = r2;
0x0002d87e cmp r3, 0 |
| if (r3 == 0) {
0x0002d880 beq 0x2d944 | goto label_43;
| }
0x0002d882 bl 0x6ae40 | strlen ();
0x0002d886 ldr.w ip, [sp, 0x14] | ip = var_14h;
0x0002d88a mov r2, r0 | r2 = r0;
0x0002d88c ldr.w r1, [r4, 0x40c] | r1 = *((r4 + 0x40c));
0x0002d890 add.w fp, ip, r0 |
0x0002d894 ldr r0, [sp, 8] | r0 = n;
0x0002d896 cmp r1, fp |
0x0002d898 sub.w r3, r6, r0 | r3 = r6 - r0;
0x0002d89c str r3, [sp, 0x1c] | var_20h = r3;
| if (r1 > fp) {
0x0002d89e bhi.w 0x2d9c8 | goto label_44;
| }
| label_12:
0x0002d8a2 add.w r3, sp, 0x428 | r3 += arg_428h;
0x0002d8a6 strd ip, r8, [sp, 0x14] | __asm ("strd ip, r8, [sp, 0x14]");
0x0002d8aa str r2, [sp, 8] | n = r2;
0x0002d8ac mov r8, r5 | r8 = r5;
0x0002d8ae mov r5, r3 | r5 = r3;
0x0002d8b0 b 0x2d8d4 |
| while (r0 != 0) {
0x0002d8c8 ldr.w r2, [r4, 0x40c] | r2 = *((r4 + 0x40c));
0x0002d8cc ldr.w r1, [r4, 0x408] | r1 = *((r4 + 0x408));
0x0002d8d0 cmp fp, r2 |
| if (fp <= r2) {
0x0002d8d2 blo 0x2d9b8 | goto label_45;
| }
0x0002d8d4 mov r0, r5 | r0 = r5;
0x0002d8d6 bl 0x677f8 | r0 = libc_scratch_buffer_grow_preserve ();
0x0002d8da cmp r0, 0 |
0x0002d8dc bne 0x2d8c8 |
| }
0x0002d8de b 0x2d5ea | goto label_1;
| label_39:
0x0002d8e0 cmp r8, r5 |
0x0002d8e2 mov r2, r5 | r2 = r5;
| if (r8 != r5) {
0x0002d8e4 bne 0x2d830 | goto label_8;
| }
0x0002d8e6 b 0x2d662 | goto label_7;
| label_33:
0x0002d8e8 ldrb r3, [r5, -0x1] | r3 = *((r5 - 0x1));
0x0002d8ec cmp r3, 0x2f |
0x0002d8ee mov.w r3, 0 | r3 = 0;
| if (r3 == 0x2f) {
0x0002d8f2 beq 0x2d9d0 | goto label_46;
| }
0x0002d8f4 strb r3, [r5] | *(r5) = r3;
0x0002d8f6 ldr r3, [sp] | r3 = *(sp);
0x0002d8f8 cmp r3, 0 |
| if (r3 != 0) {
0x0002d8fa bne.w 0x2d766 | goto label_9;
| }
| label_16:
0x0002d8fe ldr r0, [r4] | r0 = *(r4);
0x0002d900 bl 0x6a858 | r0 = strdup ();
0x0002d904 mov fp, r0 |
0x0002d906 b 0x2d5ee | goto label_3;
| label_34:
0x0002d908 ldr r3, [pc, 0x120] |
0x0002d90a mrc p15, 0, r2, c13, c0, 3 | __asm ("mrc p15, 0, r2, c13, c0, 3");
0x0002d90e movs r1, 0x24 | r1 = 0x24;
0x0002d910 add r3, pc |
0x0002d912 ldr r3, [r3] | r3 = *(0x5b340);
0x0002d914 str r1, [r2, r3] | *((r2 + r3)) = r1;
0x0002d916 b 0x2d5ea | goto label_1;
| label_38:
0x0002d918 ldrb r3, [r3, 2] | r3 = *((r3 + 2));
0x0002d91a cmp r3, 0 |
0x0002d91c it ne |
| if (r3 == 0) {
0x0002d91e cmpne r3, 0x2f | __asm ("cmpne r3, 0x2f");
| goto label_47;
| }
| if (r3 != 0) {
| label_47:
0x0002d920 bne.w 0x2d80a | goto label_10;
| }
| label_37:
0x0002d924 ldr r3, [pc, 0x10c] |
0x0002d926 mvn r0, 0x63 | r0 = ~0x63;
0x0002d92a add r3, pc | r3 = 0x5b362;
0x0002d92c ldrh r3, [r3] | r3 = *(r3);
0x0002d92e strh r3, [r1, r2] | *((r1 + r2)) = r3;
0x0002d930 mov.w r3, 0x200 | r3 = 0x200;
0x0002d934 movs r2, 0 | r2 = 0;
0x0002d936 mov r1, r8 | r1 = r8;
0x0002d938 bl 0x9e89c | r0 = faccessat ();
0x0002d93c subs r3, r0, 0 | r3 = r0 - 0;
0x0002d93e it ne |
| if (r3 == r0) {
0x0002d940 movne r3, 1 | r3 = 1;
| }
0x0002d942 b 0x2d81c | goto label_11;
| label_43:
0x0002d944 bl 0x6ae40 | strlen ();
0x0002d948 ldr.w ip, [sp, 0x14] | ip = var_14h;
0x0002d94c mov r2, r0 | r2 = r0;
0x0002d94e ldr.w r1, [r4, 0x40c] | r1 = *((r4 + 0x40c));
0x0002d952 add.w fp, ip, r0 |
0x0002d956 cmp r1, fp |
0x0002d958 itt ls |
| if (r1 > fp) {
0x0002d95a ldrls r3, [sp, 0xc] | r3 = var_ch;
| }
| if (r1 <= fp) {
0x0002d95c strls r3, [sp, 0x1c] | var_20h = r3;
| goto label_48;
| }
| if (r1 < fp) {
| label_48:
0x0002d95e bls 0x2d8a2 | goto label_12;
| }
| do {
| label_14:
0x0002d960 mov r1, r6 | r1 = r6;
0x0002d962 ldr r6, [sp, 8] | r6 = n;
0x0002d964 adds r2, 1 | r2++;
0x0002d966 str.w ip, [sp, 8] | __asm ("str.w ip, [n]");
0x0002d96a add.w r0, r6, ip | r0 = r6 + ip;
0x0002d96e blx 0x68a80 | memmove ();
0x0002d972 ldr.w fp, [sp, 4] | fp = s2;
0x0002d976 mov r0, r6 | r0 = r6;
0x0002d978 ldr.w ip, [sp, 8] | ip = n;
0x0002d97c mov r1, fp | r1 = fp;
0x0002d97e mov r2, ip | r2 = ip;
0x0002d980 blx 0x6d540 | memcpy (r0, r1, r2);
0x0002d984 ldrb.w r2, [fp] | r2 = *(fp);
0x0002d988 mov r6, r0 | r6 = r0;
0x0002d98a add.w r3, r8, 1 | r3 = r8 + 1;
0x0002d98e cmp r2, 0x2f |
| if (r2 == 0x2f) {
0x0002d990 beq 0x2d9de | goto label_49;
| }
0x0002d992 cmp r5, r3 |
0x0002d994 ldrb r0, [r0] | r0 = *(r0);
| if (r5 > r3) {
0x0002d996 bhi 0x2d9ec | goto label_50;
| }
| label_17:
0x0002d998 movs r3, 1 | r3 = 1;
0x0002d99a str r3, [sp, 0xc] | var_ch = r3;
0x0002d99c b 0x2d662 | goto label_7;
| label_40:
0x0002d99e movs r0, 0xad | r0 = 0xad;
0x0002d9a0 strd r2, r1, [sp, 0x14] | __asm ("strd r2, r1, [sp, 0x14]");
0x0002d9a4 str r3, [sp, 8] | n = r3;
0x0002d9a6 bl 0x84e68 | sysconf ();
0x0002d9aa ldrd r2, r1, [sp, 0x14] | __asm ("ldrd r2, r1, [var_14h]");
0x0002d9ae ldr.w ip, [sp, 8] | ip = n;
0x0002d9b2 str.w r0, [fp] | __asm ("str.w r0, [fp]");
0x0002d9b6 b 0x2d852 | goto label_13;
| label_45:
0x0002d9b8 ldr r3, [sp, 0xc] | r3 = var_ch;
0x0002d9ba mov r5, r8 | r5 = r8;
0x0002d9bc ldr r2, [sp, 8] | r2 = n;
0x0002d9be ldrd ip, r8, [sp, 0x14] | __asm ("ldrd ip, r8, [var_14h]");
0x0002d9c2 str r1, [sp, 8] | n = r1;
0x0002d9c4 cmp r3, 0 |
0x0002d9c6 beq 0x2d960 |
| } while (r3 == 0);
| label_44:
0x0002d9c8 ldr r6, [sp, 0x1c] | r6 = var_20h;
0x0002d9ca ldr r3, [sp, 8] | r3 = n;
0x0002d9cc add r6, r3 | r6 += r3;
0x0002d9ce b 0x2d960 | goto label_14;
| label_46:
0x0002d9d0 strb r3, [r5, -0x1] | *((r5 - 0x1)) = r3;
0x0002d9d4 ldr r3, [sp] | r3 = *(sp);
0x0002d9d6 cmp r3, 0 |
| if (r3 != 0) {
0x0002d9d8 bne.w 0x2d768 | goto label_15;
| }
0x0002d9dc b 0x2d8fe | goto label_16;
| label_49:
0x0002d9de mov r5, r3 | r5 = r3;
0x0002d9e0 movs r3, 1 | r3 = 1;
0x0002d9e2 strb.w r2, [r8] | *(r8) = r2;
0x0002d9e6 str r3, [sp, 0xc] | var_ch = r3;
0x0002d9e8 ldrb r0, [r0] | r0 = *(r0);
0x0002d9ea b 0x2d662 | goto label_7;
| label_50:
0x0002d9ec subs r5, 1 | r5--;
0x0002d9ee cmp r5, r8 |
| if (r5 < r8) {
0x0002d9f0 bls 0x2d998 | goto label_17;
| }
0x0002d9f2 mov r3, r5 | r3 = r5;
| do {
0x0002d9f4 ldrb r2, [r5, -0x1]! | r2 = *((r5 -= 0x1));
0x0002d9f8 cmp r2, 0x2f |
| if (r2 == 0x2f) {
0x0002d9fa bne 0x2da04 |
0x0002d9fc mov r5, r3 | r5 = r3;
0x0002d9fe movs r3, 1 | r3 = 1;
0x0002da00 str r3, [sp, 0xc] | var_ch = r3;
0x0002da02 b 0x2d662 | goto label_7;
| }
0x0002da04 cmp r8, r5 |
0x0002da06 mov r3, r5 | r3 = r5;
0x0002da08 bne 0x2d9f4 |
| } while (r8 != r5);
0x0002da0a b 0x2d998 | goto label_17;
| label_42:
0x0002da0c ldr r3, [pc, 0x20] |
0x0002da0e mrc p15, 0, r0, c13, c0, 3 | __asm ("mrc p15, 0, r0, c13, c0, 3");
0x0002da12 movs r6, 0x28 | r6 = 0x28;
0x0002da14 add r3, pc |
0x0002da16 ldr r3, [r3] | r3 = *(0x5b448);
0x0002da18 str r6, [r0, r3] | *((r0 + r3)) = r6;
0x0002da1a movs r3, 0 | r3 = 0;
0x0002da1c strb r3, [r1, r2] | *((r1 + r2)) = r3;
0x0002da1e ldr r3, [sp] | r3 = *(sp);
0x0002da20 cmp r3, 0 |
| if (r3 == 0) {
0x0002da22 beq.w 0x2d5ea | goto label_1;
| }
0x0002da26 adds r5, 1 | r5++;
0x0002da28 b 0x2d796 | goto label_18;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/lib/libc.so.6 @ 0x69610 */
| #include <stdint.h>
|
; (fcn) sym.strcat () | void strcat (char * s1, const char * s2) {
| r0 = s1;
| r1 = s2;
0x00069610 push {r3, r4, r5, lr} |
0x00069612 mov r4, r0 | r4 = r0;
0x00069614 mov r5, r1 | r5 = r1;
0x00069616 bl 0x6ae40 | strlen ();
0x0006961a mov r1, r5 | r1 = r5;
0x0006961c add r0, r4 | r0 += r4;
0x0006961e bl 0x6a5a0 | strcpy (r0, r1)
0x00069622 mov r0, r4 | r0 = r4;
0x00069624 pop {r3, r4, r5, pc} |
| }
[*] Function strcpy used 12 times libc.so.6