[*] Binary protection state of feature-flag-service
Full RELRO Canary found NX enabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function system tear down of feature-flag-service
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/feature-flag-service @ 0x3338 */
| #include <stdint.h>
|
| #define SWAP32(n) ((uint32_t) (((n & 0x000000ff) << 24) | \
| ((n & 0x0000ff00) << 8) | \
| ((n & 0x00ff0000) >> 8) | \
| ((n & 0xff000000) >> 24)))
|
; (fcn) fcn.00003338 () | void fcn_00003338 (int16_t arg1, int16_t arg2) {
| int16_t var_0h;
| int16_t var_4h;
| r0 = arg1;
| r1 = arg2;
0x00003338 ldr r2, [pc, 0x78] |
0x0000333a ldr r3, [pc, 0x7c] | r3 = *(0x33ba);
0x0000333c push {r4, r5, r6, r7, lr} |
0x0000333e add.w r6, r0, 8 | r6 = r0 + 8;
0x00003342 add r2, pc | r2 = 0x66fa;
0x00003344 sub sp, 0xc |
0x00003346 ldr r3, [r2, r3] |
0x00003348 ldr r3, [r3] | r3 = *(0x66fa);
0x0000334a str r3, [sp, 4] | var_4h = r3;
0x0000334c mov.w r3, 0 | r3 = 0;
0x00003350 str r6, [r0] | *(r0) = r6;
| if (r1 == 0) {
0x00003352 cbz r1, 0x33a8 | goto label_0;
| }
0x00003354 mov r4, r0 | r4 = r0;
0x00003356 mov r0, r1 | r0 = r1;
0x00003358 mov r5, r1 | r5 = r1;
0x0000335a blx 0x291c | r0 = fcn_0000291c ();
0x0000335e cmp r0, 0xf |
0x00003360 add.w r7, r5, r0 | r7 = r5 + r0;
0x00003364 str r0, [sp] | *(sp) = r0;
0x00003366 bhi 0x3394 |
| while (1) {
0x00003368 mov r2, r7 | r2 = r7;
0x0000336a mov r1, r5 | r1 = r5;
0x0000336c mov r0, r6 | r0 = r6;
0x0000336e blx 0x27bc | fcn_000027bc ();
0x00003372 ldr r3, [sp] | r3 = *(sp);
0x00003374 movs r1, 0 | r1 = 0;
0x00003376 ldr r2, [r4] | r2 = *(r4);
0x00003378 str r3, [r4, 4] | *((r4 + 4)) = r3;
0x0000337a strb r1, [r2, r3] | *((r2 + r3)) = r1;
0x0000337c ldr r2, [pc, 0x3c] |
0x0000337e ldr r3, [pc, 0x38] | r3 = *(0x33ba);
0x00003380 add r2, pc | r2 = 0x6740;
0x00003382 ldr r3, [r2, r3] | r3 = *(0x6740);
0x00003384 ldr r2, [r3] | r2 = *(0x6740);
0x00003386 ldr r3, [sp, 4] | r3 = var_4h;
0x00003388 eors r2, r3 | r2 ^= r3;
0x0000338a mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x0000338e bne 0x33b0 | goto label_1;
| }
0x00003390 add sp, 0xc |
0x00003392 pop {r4, r5, r6, r7, pc} |
0x00003394 movs r2, 0 | r2 = 0;
0x00003396 mov r1, sp | r1 = sp;
0x00003398 mov r0, r4 | r0 = r4;
0x0000339a blx 0x297c | fcn_0000297c ();
0x0000339e ldr r3, [sp] | r3 = *(sp);
0x000033a0 mov r6, r0 | r6 = r0;
0x000033a2 str r0, [r4] | *(r4) = r0;
0x000033a4 str r3, [r4, 8] | *((r4 + 8)) = r3;
0x000033a6 b 0x3368 |
| }
| label_0:
0x000033a8 ldr r0, [pc, 0x14] |
0x000033aa add r0, pc | r0 = 0x676e;
0x000033ac blx 0x2698 | cxa_free_exception ();
| label_1:
0x000033b0 blx 0x27d4 | fcn_000027d4 ();
0x000033b4 rev16 r6, r5 | __asm ("rev16 r6, r5");
0x000033b6 movs r0, r0 |
0x000033b8 lsls r4, r2, 7 | r4 = r2 << 7;
0x000033ba movs r0, r0 |
0x000033bc rev r0, r6 | r6 = SWAP32 (r0);
0x000033be movs r0, r0 |
0x000033c0 ldrh r6, [r2, 4] | r6 = *((r2 + 4));
0x000033c2 movs r0, r0 |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/feature-flag-service @ 0x3d00 */
| #include <stdint.h>
|
; (fcn) fcn.00003d00 () | void fcn_00003d00 (int16_t arg1, int16_t arg2, int16_t arg3) {
| int16_t var_0h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| if (? >= ?) {
0x00003d00 ldrlt r4, [r0], -0xb14 | r4 = *(r0);
| r0 += -0xb14;
| }
0x00003d04 ldrd r4, r2, [r1] | __asm ("ldrd r4, r2, [r1]");
0x00003d08 add r3, pc | r3 += pc;
0x00003d0a ldr r1, [pc, 0x4c] |
0x00003d0c adds r3, 8 | r3 += 8;
0x00003d0e str r3, [r0] | *(r0) = r3;
0x00003d10 strd r4, r2, [r0, 4] | __asm ("strd r4, r2, [r0, 4]");
0x00003d14 add r1, pc | r1 = 0x7a72;
| if (r2 != 0) {
0x00003d16 cbz r2, 0x3d26 |
0x00003d18 ldr r3, [pc, 0x40] | r3 = *(0x3d5c);
0x00003d1a ldr r3, [r1, r3] | r3 = *((r1 + r3));
0x00003d1c ldrb r3, [r3] | r3 = *(r3);
| if (r3 == 0) {
0x00003d1e cbz r3, 0x3d38 | goto label_1;
| }
0x00003d20 ldr r3, [r2, 4] | r3 = *((r2 + 4));
0x00003d22 adds r3, 1 | r3++;
0x00003d24 str r3, [r2, 4] | *((r2 + 4)) = r3;
| }
| label_0:
0x00003d26 ldr r3, [pc, 0x38] |
0x00003d28 movs r2, 0 | r2 = 0;
0x00003d2a ldr r4, [sp], 4 | r4 = *(sp);
| sp += 4;
0x00003d2e strd r2, r2, [r0, 0x10] | __asm ("strd r2, r2, [r0, 0x10]");
0x00003d32 add r3, pc | r3 = 0x7a98;
0x00003d34 str r3, [r0, 0xc] | *((r0 + 0xc)) = r3;
0x00003d36 bx lr | return;
| label_1:
0x00003d38 adds r2, 4 | r2 += 4;
0x00003d3a dmb ish | __asm ("dmb ish");
| do {
0x00003d3e ldrex r3, [r2] | __asm ("ldrex r3, [r2]");
0x00003d42 adds r3, 1 | r3++;
0x00003d44 strex r1, r3, [r2] | __asm ("strex r1, r3, [r2]");
0x00003d48 cmp r1, 0 |
0x00003d4a bne 0x3d3e |
| } while (r1 != 0);
0x00003d4c dmb ish | __asm ("dmb ish");
0x00003d50 b 0x3d26 | goto label_0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/feature-flag-service @ 0x5174 */
| #include <stdint.h>
|
; (fcn) fcn.00005174 () | void fcn_00005174 (int16_t arg_0h, int16_t arg_18h, int16_t arg_1ch, int16_t arg_30h, int16_t arg_34h, int16_t arg_40h, int16_t arg1, int16_t arg2) {
| int16_t var_0h;
| int32_t var_4h;
| int32_t var_4h_2;
| int16_t var_ch;
| int16_t var_10h;
| int16_t var_14h;
| int16_t var_18h;
| int16_t var_20h;
| int16_t var_24h;
| int16_t var_28h;
| int16_t var_2ch;
| int16_t var_30h;
| int16_t var_34h;
| int16_t var_38h;
| int16_t var_3ch;
| int16_t var_40h;
| int16_t var_44h;
| int16_t var_48h;
| int16_t var_4ch;
| int16_t var_50h;
| int16_t var_54h;
| int16_t var_58h;
| int16_t var_5ch;
| int16_t var_64h;
| int16_t var_68h;
| int32_t var_68h_2;
| int16_t var_70h;
| int16_t var_74h;
| int16_t var_78h;
| int16_t var_7ch;
| int16_t var_8ch;
| int16_t var_90h;
| int16_t var_94h;
| int16_t var_98h;
| int16_t var_a8h;
| int16_t var_ach;
| int16_t var_b0h;
| int16_t var_c0h;
| int16_t var_c1h;
| int16_t var_c4h;
| int16_t var_c8h;
| int16_t var_cch;
| int16_t var_d0h;
| int16_t var_d4h;
| int16_t var_d8h;
| int16_t var_dch;
| r0 = arg1;
| r1 = arg2;
0x00005174 push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00005178 mov r2, r0 | r2 = r0;
0x0000517a sub sp, 0xe4 |
0x0000517c mov r4, r1 | r4 = r1;
0x0000517e add r3, sp, 0x68 | r3 += var_68h;
0x00005180 ldr r1, [r2, 4] | r1 = *((r2 + 4));
0x00005182 ldr.w r2, [pc, 0x64c] |
0x00005186 str r0, [sp, 0x48] | var_48h = r0;
0x00005188 mov r0, r3 | r0 = r3;
0x0000518a str r3, [sp, 0x5c] | var_5ch = r3;
0x0000518c ldr.w r3, [pc, 0x644] | r3 = *(0x57d4);
0x00005190 add r2, pc | r2 = 0xa966;
0x00005192 ldr r3, [r2, r3] |
0x00005194 ldr r3, [r3] | r3 = *(0xa966);
0x00005196 str r3, [sp, 0xdc] | var_dch = r3;
0x00005198 mov.w r3, 0 | r3 = 0;
0x0000519c ldr r3, [r1] | r3 = *(r1);
0x0000519e ldr r3, [r3, 0xc] | r3 = *((r3 + 0xc));
0x000051a0 blx r3 | uint32_t (*r3)(uint32_t, uint32_t, uint32_t, uint32_t) (r0, r1, r2, r3);
0x000051a2 ldr r3, [r4] | r3 = *(r4);
0x000051a4 ldr r2, [r4, 4] | r2 = *((r4 + 4));
0x000051a6 str r3, [sp, 0x40] | var_40h = r3;
0x000051a8 cmp r2, r3 |
0x000051aa str r2, [sp, 0x54] | var_54h = r2;
| if (r2 == r3) {
0x000051ac beq.w 0x5488 | goto label_23;
| }
0x000051b0 add r3, sp, 0x74 | r3 += var_74h;
0x000051b2 str r3, [sp, 0x58] | var_58h = r3;
0x000051b4 movw r3, 0xfff8 |
0x000051b8 movt r3, 0x7fff | r3 = 0x7ffffff8;
0x000051bc str r3, [sp, 0x34] | var_34h = r3;
0x000051be ldr.w r3, [pc, 0x618] |
0x000051c2 add r3, pc | r3 = 0xa9a0;
0x000051c4 str r3, [sp, 0x4c] | var_4ch = r3;
0x000051c6 add r3, sp, 0x7c | r3 += var_7ch;
0x000051c8 str r3, [sp, 0x50] | var_50h = r3;
| label_3:
0x000051ca ldr r3, [sp, 0x50] | r3 = var_50h;
0x000051cc str r3, [sp, 0x74] | var_74h = r3;
0x000051ce ldr r3, [sp, 0x40] | r3 = var_40h;
0x000051d0 ldrd r5, r4, [r3] | __asm ("ldrd r5, r4, [r3]");
0x000051d4 cmp r4, 0xf |
0x000051d6 str r4, [sp, 0x64] | var_64h = r4;
| if (r4 > 0xf) {
0x000051d8 bhi.w 0x5684 | goto label_24;
| }
0x000051dc cmp r4, 1 |
| if (r4 != 1) {
0x000051de bne.w 0x567a | goto label_25;
| }
0x000051e2 ldrb r3, [r5] | r3 = *(r5);
0x000051e4 strb.w r3, [sp, 0x7c] | var_7ch = r3;
| label_17:
0x000051e8 ldr r3, [sp, 0x50] | r3 = var_50h;
| label_18:
0x000051ea mov.w r8, 0 | r8 = 0;
0x000051ee str r4, [sp, 0x78] | var_78h = r4;
0x000051f0 strb.w r8, [r3, r4] | *((r3 + r4)) = r8;
0x000051f4 ldr r3, [sp, 0x40] | r3 = var_40h;
0x000051f6 ldrb r3, [r3, 0x18] | r3 = *((r3 + 0x18));
0x000051f8 strb.w r3, [sp, 0x8c] | var_8ch = r3;
0x000051fc ldrd fp, r3, [sp, 0x68] | __asm ("ldrd fp, r3, [var_68h]");
0x00005200 cmp fp, r3 |
0x00005202 str r3, [sp, 0x38] | var_38h = r3;
| if (fp == r3) {
0x00005204 beq.w 0x546a | goto label_19;
| }
0x00005208 add r3, sp, 0x90 | r3 += var_90h;
0x0000520a str r3, [sp, 0x44] | var_44h = r3;
0x0000520c add r3, sp, 0x98 | r3 += var_98h;
0x0000520e str r3, [sp, 0x24] | var_24h = r3;
0x00005210 add r3, sp, 0x64 | r3 += var_64h;
0x00005212 str r3, [sp, 0x20] | var_20h = r3;
| label_2:
0x00005214 ldr r3, [sp, 0x24] | r3 = var_24h;
0x00005216 str r3, [sp, 0x90] | var_90h = r3;
0x00005218 ldrd r5, r4, [fp] | __asm ("ldrd r5, r4, [fp]");
0x0000521c cmp r4, 0xf |
0x0000521e str r4, [sp, 0x64] | var_64h = r4;
| if (r4 > 0xf) {
0x00005220 bhi.w 0x5564 | goto label_26;
| }
0x00005224 cmp r4, 1 |
| if (r4 == 1) {
0x00005226 beq.w 0x555c | goto label_27;
| }
0x0000522a cmp r4, 0 |
| if (r4 != 0) {
0x0000522c bne.w 0x5670 | goto label_28;
| }
| label_7:
0x00005230 ldr r3, [sp, 0x24] | r3 = var_24h;
| label_8:
0x00005232 str r4, [sp, 0x94] | var_94h = r4;
0x00005234 strb.w r8, [r3, r4] | *((r3 + r4)) = r8;
0x00005238 add r3, sp, 0xb0 | r3 += var_b0h;
0x0000523a ldr.w r4, [fp, 0x1c] | r4 = *(arg_1ch);
0x0000523e str r3, [sp, 0x28] | var_28h = r3;
0x00005240 str r3, [sp, 0xa8] | var_a8h = r3;
0x00005242 cmp r4, 0xf |
0x00005244 ldr.w r5, [fp, 0x18] | r5 = *(arg_18h);
0x00005248 str r4, [sp, 0x64] | var_64h = r4;
| if (r4 > 0xf) {
0x0000524a bhi.w 0x5582 | goto label_29;
| }
0x0000524e cmp r4, 1 |
| if (r4 == 1) {
0x00005250 beq.w 0x5554 | goto label_30;
| }
0x00005254 cmp r4, 0 |
| if (r4 != 0) {
0x00005256 bne.w 0x566c | goto label_31;
| }
| label_6:
0x0000525a ldr r3, [sp, 0x28] | r3 = var_28h;
| label_9:
0x0000525c str r4, [sp, 0xac] | var_ach = r4;
0x0000525e add r5, sp, 0xc4 | r5 += var_c4h;
0x00005260 strb.w r8, [r3, r4] | *((r3 + r4)) = r8;
0x00005264 ldrh.w r3, [fp, 0x30] | r3 = *(arg_30h);
0x00005268 vmov.i32 d16, 0 | __asm ("vmov.i32 d16, 0");
0x0000526c strh.w r3, [sp, 0xc0] | var_c0h = r3;
0x00005270 ldrd r3, r4, [fp, 0x34] | __asm ("ldrd r3, r4, [arg_34h]");
0x00005274 str.w r8, [sp, 0xcc] | __asm ("str.w r8, [var_cch]");
0x00005278 vst1.32 {d16}, [r5] | __asm ("vst1.32 {d16}, [r5]");
0x0000527c subs r4, r4, r3 | r4 -= r3;
| if (r4 == r4) {
0x0000527e beq.w 0x5550 | goto label_32;
| }
0x00005282 ldr r3, [sp, 0x34] | r3 = var_34h;
0x00005284 cmp r4, r3 |
| if (r4 > r3) {
0x00005286 bhi.w 0x56a2 | goto label_33;
| }
0x0000528a mov r0, r4 | r0 = r4;
0x0000528c blx 0x2500 | r0 = sym ();
0x00005290 mov r7, r0 | r7 = r0;
| label_5:
0x00005292 vdup.32 d16, r7 | __asm ("vdup.32 d16, r7");
0x00005296 add r4, r7 | r4 += r7;
0x00005298 str r4, [sp, 0xcc] | var_cch = r4;
0x0000529a vst1.32 {d16}, [r5] | __asm ("vst1.32 {d16}, [r5]");
0x0000529e ldrd r6, sl, [fp, 0x34] | __asm ("ldrd r6, sl, [arg_34h]");
0x000052a2 cmp r6, sl |
| if (r6 == sl) {
0x000052a4 beq.w 0x5668 | goto label_34;
| }
0x000052a8 add.w r4, r7, 0x18 | r4 = r7 + 0x18;
0x000052ac str.w fp, [sp, 0x30] | __asm ("str.w fp, [var_30h]");
0x000052b0 str r7, [sp, 0x3c] | var_3ch = r7;
0x000052b2 str r5, [sp, 0x2c] | var_2ch = r5;
0x000052b4 b 0x52ce |
| while (r5 < 0xf) {
0x000052b6 cmp r5, 1 |
| if (r5 == 1) {
0x000052b8 beq 0x530a | goto label_35;
| }
| if (r5 != 0) {
0x000052ba cbnz r5, 0x52fa | goto label_36;
| }
| label_0:
0x000052bc adds r6, 0x18 | r6 += 0x18;
0x000052be str r5, [r4, -0x14] | *((r4 - 0x14)) = r5;
0x000052c2 cmp sl, r6 |
0x000052c4 add.w r4, r4, 0x18 | r4 += 0x18;
0x000052c8 strb.w r8, [r0, r5] | *((r0 + r5)) = r8;
| if (sl == r6) {
0x000052cc beq 0x5312 | goto label_37;
| }
0x000052ce ldr r5, [r6, 4] | r5 = *((r6 + 4));
0x000052d0 sub.w r0, r4, 0x10 | r0 = r4 - 0x10;
0x000052d4 str r0, [r4, -0x18] | *((r4 - 0x18)) = r0;
0x000052d8 sub.w sb, r4, 0x18 | sb = r4 - 0x18;
0x000052dc ldr r7, [r6] | r7 = *(r6);
0x000052de mov fp, r4 |
0x000052e0 cmp r5, 0xf |
0x000052e2 str r5, [sp, 0x64] | var_64h = r5;
0x000052e4 bls 0x52b6 |
| }
0x000052e6 ldr r1, [sp, 0x20] | r1 = var_20h;
0x000052e8 movs r2, 0 | r2 = 0;
0x000052ea mov r0, sb | r0 = sb;
0x000052ec blx 0x297c | fcn_0000297c ();
0x000052f0 ldr r3, [sp, 0x64] | r3 = var_64h;
0x000052f2 str r0, [r4, -0x18] | *((r4 - 0x18)) = r0;
0x000052f6 str r3, [r4, -0x10] | *((r4 - 0x10)) = r3;
| label_36:
0x000052fa mov r2, r5 | r2 = r5;
0x000052fc mov r1, r7 | r1 = r7;
0x000052fe blx 0x2910 | fcn_00002910 ();
0x00005302 ldr r5, [sp, 0x64] | r5 = var_64h;
0x00005304 ldr r0, [r4, -0x18] | r0 = *((r4 - 0x18));
0x00005308 b 0x52bc | goto label_0;
| label_35:
0x0000530a ldrb r3, [r7] | r3 = *(r7);
0x0000530c strb r3, [r4, -0x10] | *((r4 - 0x10)) = r3;
0x00005310 b 0x52bc | goto label_0;
| label_37:
0x00005312 mov r3, fp | r3 = fp;
0x00005314 ldrd r5, fp, [sp, 0x2c] | __asm ("ldrd r5, fp, [var_30h]");
0x00005316 ldrh r3, [r1, r4] | r3 = *((r1 + r4));
| label_13:
0x00005318 str r3, [sp, 0xc8] | var_c8h = r3;
0x0000531a ldrd r3, r4, [fp, 0x40] | __asm ("ldrd r3, r4, [arg_40h]");
0x0000531e vmov.i32 d16, 0 | __asm ("vmov.i32 d16, 0");
0x00005322 str.w r8, [sp, 0xd8] | __asm ("str.w r8, [var_d8h]");
0x00005326 subs r4, r4, r3 | r4 -= r3;
0x00005328 it eq |
| if (r4 != r4) {
0x0000532a moveq r7, r4 | r7 = r4;
| }
0x0000532c vstr d16, [sp, 0xd0] | __asm ("vstr d16, [sp, 0xd0]");
| if (r4 != r4) {
0x00005330 beq 0x5342 |
0x00005332 ldr r3, [sp, 0x34] | r3 = var_34h;
0x00005334 cmp r4, r3 |
| if (r4 > r3) {
0x00005336 bhi.w 0x56aa | goto label_38;
| }
0x0000533a mov r0, r4 | r0 = r4;
0x0000533c blx 0x2500 | r0 = sym ();
0x00005340 mov r7, r0 | r7 = r0;
| }
0x00005342 vdup.32 d16, r7 | __asm ("vdup.32 d16, r7");
0x00005346 add r4, r7 | r4 += r7;
0x00005348 str r4, [sp, 0xd8] | var_d8h = r4;
0x0000534a vstr d16, [sp, 0xd0] | __asm ("vstr d16, [sp, 0xd0]");
0x0000534e ldrd r6, r3, [fp, 0x40] | __asm ("ldrd r6, r3, [arg_40h]");
0x00005352 cmp r6, r3 |
| if (r6 == r3) {
0x00005354 beq.w 0x55a0 | goto label_39;
| }
0x00005358 str.w fp, [sp, 0x2c] | __asm ("str.w fp, [var_2ch]");
0x0000535c add.w r4, r7, 0x18 | r4 = r7 + 0x18;
0x00005360 mov fp, r3 |
0x00005362 str r7, [sp, 0x30] | var_30h = r7;
0x00005364 str r5, [sp, 0x3c] | var_3ch = r5;
0x00005366 b 0x5380 |
| while (r5 < 0xf) {
0x00005368 cmp r5, 1 |
| if (r5 == 1) {
0x0000536a beq 0x53bc | goto label_40;
| }
| if (r5 != 0) {
0x0000536c cbnz r5, 0x53ac | goto label_41;
| }
| label_1:
0x0000536e adds r6, 0x18 | r6 += 0x18;
0x00005370 str r5, [r4, -0x14] | *((r4 - 0x14)) = r5;
0x00005374 cmp fp, r6 |
0x00005376 add.w r4, r4, 0x18 | r4 += 0x18;
0x0000537a strb.w r8, [r0, r5] | *((r0 + r5)) = r8;
| if (fp == r6) {
0x0000537e beq 0x53c4 | goto label_42;
| }
0x00005380 ldr r5, [r6, 4] | r5 = *((r6 + 4));
0x00005382 sub.w r0, r4, 0x10 | r0 = r4 - 0x10;
0x00005386 str r0, [r4, -0x18] | *((r4 - 0x18)) = r0;
0x0000538a sub.w sl, r4, 0x18 | sl = r4 - 0x18;
0x0000538e ldr r7, [r6] | r7 = *(r6);
0x00005390 mov sb, r4 | sb = r4;
0x00005392 cmp r5, 0xf |
0x00005394 str r5, [sp, 0x64] | var_64h = r5;
0x00005396 bls 0x5368 |
| }
0x00005398 ldr r1, [sp, 0x20] | r1 = var_20h;
0x0000539a movs r2, 0 | r2 = 0;
0x0000539c mov r0, sl | r0 = sl;
0x0000539e blx 0x297c | fcn_0000297c ();
0x000053a2 ldr r3, [sp, 0x64] | r3 = var_64h;
0x000053a4 str r0, [r4, -0x18] | *((r4 - 0x18)) = r0;
0x000053a8 str r3, [r4, -0x10] | *((r4 - 0x10)) = r3;
| label_41:
0x000053ac mov r2, r5 | r2 = r5;
0x000053ae mov r1, r7 | r1 = r7;
0x000053b0 blx 0x2910 | fcn_00002910 ();
0x000053b4 ldr r5, [sp, 0x64] | r5 = var_64h;
0x000053b6 ldr r0, [r4, -0x18] | r0 = *((r4 - 0x18));
0x000053ba b 0x536e | goto label_1;
| label_40:
0x000053bc ldrb r3, [r7] | r3 = *(r7);
0x000053be strb r3, [r4, -0x10] | *((r4 - 0x10)) = r3;
0x000053c2 b 0x536e | goto label_1;
| label_42:
0x000053c4 ldr r2, [sp, 0x78] | r2 = var_78h;
0x000053c6 ldr r3, [sp, 0x94] | r3 = var_94h;
0x000053c8 ldr.w fp, [sp, 0x2c] | fp = var_2ch;
0x000053cc ldr r7, [sp, 0xd0] | r7 = var_d0h;
0x000053ce cmp r2, r3 |
0x000053d0 ldr r0, [sp, 0x74] | r0 = var_74h;
0x000053d2 ldr.w sl, [sp, 0x90] | sl = var_90h;
0x000053d6 str.w sb, [sp, 0xd4] | __asm ("str.w sb, [var_d4h]");
| if (r2 == r3) {
0x000053da beq.w 0x55b4 | goto label_43;
| }
0x000053de cmp sb, r7 |
| if (sb == r7) {
0x000053e0 beq 0x5402 | goto label_44;
| }
| label_12:
0x000053e2 add.w r4, r7, 8 | r4 = r7 + 8;
| do {
0x000053e6 ldr r0, [r4, -0x8] | r0 = *((r4 - 0x8));
0x000053ea cmp r4, r0 |
| if (r4 != r0) {
0x000053ec beq 0x53f6 |
0x000053ee ldr r1, [r7, 8] | r1 = *((r7 + 8));
0x000053f0 adds r1, 1 | r1++;
0x000053f2 blx 0x268c | sym ();
| }
0x000053f6 adds r7, 0x18 | r7 += 0x18;
0x000053f8 adds r4, 0x18 | r4 += 0x18;
0x000053fa cmp sb, r7 |
0x000053fc bne 0x53e6 |
| } while (sb != r7);
0x000053fe ldr r7, [sp, 0xd0] | r7 = var_d0h;
| if (r7 != 0) {
| label_10:
0x00005400 cbz r7, 0x540c |
| label_44:
0x00005402 ldr r1, [sp, 0xd8] | r1 = var_d8h;
0x00005404 mov r0, r7 | r0 = r7;
0x00005406 subs r1, r1, r7 | r1 -= r7;
0x00005408 blx 0x268c | sym ();
| }
0x0000540c ldrd r5, r6, [sp, 0xc4] | __asm ("ldrd r5, r6, [var_c4h]");
0x00005410 cmp r5, r6 |
| if (r5 == r6) {
0x00005412 beq 0x5432 | goto label_45;
| }
0x00005414 add.w r4, r5, 8 | r4 = r5 + 8;
| do {
0x00005418 ldr r0, [r4, -0x8] | r0 = *((r4 - 0x8));
0x0000541c cmp r4, r0 |
| if (r4 != r0) {
0x0000541e beq 0x5428 |
0x00005420 ldr r1, [r5, 8] | r1 = *((r5 + 8));
0x00005422 adds r1, 1 | r1++;
0x00005424 blx 0x268c | sym ();
| }
0x00005428 adds r5, 0x18 | r5 += 0x18;
0x0000542a adds r4, 0x18 | r4 += 0x18;
0x0000542c cmp r6, r5 |
0x0000542e bne 0x5418 |
| } while (r6 != r5);
0x00005430 ldr r6, [sp, 0xc4] | r6 = var_c4h;
| if (r6 != 0) {
| label_45:
0x00005432 cbz r6, 0x543e |
0x00005434 ldr r1, [sp, 0xcc] | r1 = var_cch;
0x00005436 mov r0, r6 | r0 = r6;
0x00005438 subs r1, r1, r6 | r1 -= r6;
0x0000543a blx 0x268c | sym ();
| }
0x0000543e ldr r0, [sp, 0xa8] | r0 = var_a8h;
0x00005440 ldr r3, [sp, 0x28] | r3 = var_28h;
0x00005442 cmp r0, r3 |
| if (r0 != r3) {
0x00005444 beq 0x544e |
0x00005446 ldr r1, [sp, 0xb0] | r1 = var_b0h;
0x00005448 adds r1, 1 | r1++;
0x0000544a blx 0x268c | sym ();
| }
0x0000544e ldr r0, [sp, 0x90] | r0 = var_90h;
0x00005450 ldr r3, [sp, 0x24] | r3 = var_24h;
0x00005452 cmp r0, r3 |
| if (r0 != r3) {
0x00005454 beq 0x545e |
0x00005456 ldr r1, [sp, 0x98] | r1 = var_98h;
0x00005458 adds r1, 1 | r1++;
0x0000545a blx 0x268c | sym ();
| }
0x0000545e ldr r3, [sp, 0x38] | r3 = var_38h;
0x00005460 add.w fp, fp, 0x4c |
0x00005464 cmp r3, fp |
| if (r3 != fp) {
0x00005466 bne.w 0x5214 | goto label_2;
| }
| label_19:
0x0000546a ldr r0, [sp, 0x74] | r0 = var_74h;
0x0000546c ldr r3, [sp, 0x50] | r3 = var_50h;
0x0000546e cmp r0, r3 |
| if (r0 != r3) {
0x00005470 beq 0x547a |
| label_20:
0x00005472 ldr r1, [sp, 0x7c] | r1 = var_7ch;
0x00005474 adds r1, 1 | r1++;
0x00005476 blx 0x268c | sym ();
| }
| label_21:
0x0000547a ldr r3, [sp, 0x40] | r3 = var_40h;
0x0000547c ldr r2, [sp, 0x54] | r2 = var_54h;
0x0000547e adds r3, 0x1c | r3 += 0x1c;
0x00005480 cmp r2, r3 |
0x00005482 str r3, [sp, 0x40] | var_40h = r3;
| if (r2 != r3) {
0x00005484 bne.w 0x51ca | goto label_3;
| }
| label_23:
0x00005488 ldrd r6, r8, [sp, 0x68] | __asm ("ldrd r6, r8, [var_68h]");
0x0000548c cmp r6, r8 |
| if (r6 == r8) {
0x0000548e beq 0x5522 | goto label_46;
| }
| label_4:
0x00005490 ldrd r5, r7, [r6, 0x40] | __asm ("ldrd r5, r7, [r6, 0x40]");
0x00005494 cmp r5, r7 |
| if (r5 == r7) {
0x00005496 beq 0x54b6 | goto label_47;
| }
0x00005498 add.w r4, r5, 8 | r4 = r5 + 8;
| do {
0x0000549c ldr r0, [r4, -0x8] | r0 = *((r4 - 0x8));
0x000054a0 cmp r4, r0 |
| if (r4 != r0) {
0x000054a2 beq 0x54ac |
0x000054a4 ldr r1, [r5, 8] | r1 = *((r5 + 8));
0x000054a6 adds r1, 1 | r1++;
0x000054a8 blx 0x268c | sym ();
| }
0x000054ac adds r5, 0x18 | r5 += 0x18;
0x000054ae adds r4, 0x18 | r4 += 0x18;
0x000054b0 cmp r7, r5 |
0x000054b2 bne 0x549c |
| } while (r7 != r5);
0x000054b4 ldr r7, [r6, 0x40] | r7 = *((r6 + 0x40));
| if (r7 != 0) {
| label_47:
0x000054b6 cbz r7, 0x54c2 |
0x000054b8 ldr r1, [r6, 0x48] | r1 = *((r6 + 0x48));
0x000054ba mov r0, r7 | r0 = r7;
0x000054bc subs r1, r1, r7 | r1 -= r7;
0x000054be blx 0x268c | sym ();
| }
0x000054c2 ldrd r5, r7, [r6, 0x34] | __asm ("ldrd r5, r7, [r6, 0x34]");
0x000054c6 cmp r5, r7 |
| if (r5 == r7) {
0x000054c8 beq 0x54e8 | goto label_48;
| }
0x000054ca add.w r4, r5, 8 | r4 = r5 + 8;
| do {
0x000054ce ldr r0, [r4, -0x8] | r0 = *((r4 - 0x8));
0x000054d2 cmp r0, r4 |
| if (r0 != r4) {
0x000054d4 beq 0x54de |
0x000054d6 ldr r1, [r5, 8] | r1 = *((r5 + 8));
0x000054d8 adds r1, 1 | r1++;
0x000054da blx 0x268c | sym ();
| }
0x000054de adds r5, 0x18 | r5 += 0x18;
0x000054e0 adds r4, 0x18 | r4 += 0x18;
0x000054e2 cmp r7, r5 |
0x000054e4 bne 0x54ce |
| } while (r7 != r5);
0x000054e6 ldr r7, [r6, 0x34] | r7 = *((r6 + 0x34));
| if (r7 != 0) {
| label_48:
0x000054e8 cbz r7, 0x54f4 |
0x000054ea ldr r1, [r6, 0x3c] | r1 = *((r6 + 0x3c));
0x000054ec mov r0, r7 | r0 = r7;
0x000054ee subs r1, r1, r7 | r1 -= r7;
0x000054f0 blx 0x268c | sym ();
| }
0x000054f4 ldr r0, [r6, 0x18] | r0 = *((r6 + 0x18));
0x000054f6 add.w r3, r6, 0x20 | r3 = r6 + 0x20;
0x000054fa cmp r0, r3 |
| if (r0 != r3) {
0x000054fc beq 0x5506 |
0x000054fe ldr r1, [r6, 0x20] | r1 = *((r6 + 0x20));
0x00005500 adds r1, 1 | r1++;
0x00005502 blx 0x268c | sym ();
| }
0x00005506 mov r3, r6 | r3 = r6;
0x00005508 ldr r0, [r3], 8 | r0 = *(r3);
| r3 += 8;
0x0000550c cmp r0, r3 |
| if (r0 != r3) {
0x0000550e beq 0x5518 |
0x00005510 ldr r1, [r6, 8] | r1 = *((r6 + 8));
0x00005512 adds r1, 1 | r1++;
0x00005514 blx 0x268c | sym ();
| }
0x00005518 adds r6, 0x4c | r6 += 0x4c;
0x0000551a cmp r8, r6 |
| if (r8 != r6) {
0x0000551c bne 0x5490 | goto label_4;
| }
0x0000551e ldr.w r8, [sp, 0x68] | r8 = var_68h;
| label_46:
0x00005522 cmp.w r8, 0 |
| if (r8 != 0) {
0x00005526 beq 0x5534 |
0x00005528 ldr r1, [sp, 0x70] | r1 = var_70h;
0x0000552a mov r0, r8 | r0 = r8;
0x0000552c sub.w r1, r1, r8 | r1 -= r8;
0x00005530 blx 0x268c | sym ();
| }
0x00005534 ldr r2, [pc, 0x2a4] |
0x00005536 ldr r3, [pc, 0x29c] | r3 = *(0x57d6);
0x00005538 add r2, pc | r2 = 0xad18;
0x0000553a ldr r3, [r2, r3] | r3 = *(0xad18);
0x0000553c ldr r2, [r3] | r2 = *(0xad18);
0x0000553e ldr r3, [sp, 0xdc] | r3 = var_dch;
0x00005540 eors r2, r3 | r2 ^= r3;
0x00005542 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00005546 bne.w 0x574c | goto label_49;
| }
0x0000554a add sp, 0xe4 |
0x0000554c pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_32:
0x00005550 mov r7, r4 | r7 = r4;
0x00005552 b 0x5292 | goto label_5;
| label_30:
0x00005554 ldrb r3, [r5] | r3 = *(r5);
0x00005556 strb.w r3, [sp, 0xb0] | var_b0h = r3;
0x0000555a b 0x525a | goto label_6;
| label_27:
0x0000555c ldrb r3, [r5] | r3 = *(r5);
0x0000555e strb.w r3, [sp, 0x98] | var_98h = r3;
0x00005562 b 0x5230 | goto label_7;
| label_26:
0x00005564 ldr r1, [sp, 0x20] | r1 = var_20h;
0x00005566 movs r2, 0 | r2 = 0;
0x00005568 ldr r0, [sp, 0x44] | r0 = var_44h;
0x0000556a blx 0x297c | fcn_0000297c ();
0x0000556e ldr r3, [sp, 0x64] | r3 = var_64h;
0x00005570 str r0, [sp, 0x90] | var_90h = r0;
0x00005572 str r3, [sp, 0x98] | var_98h = r3;
| label_15:
0x00005574 mov r2, r4 | r2 = r4;
0x00005576 mov r1, r5 | r1 = r5;
0x00005578 blx 0x2910 | fcn_00002910 ();
0x0000557c ldr r4, [sp, 0x64] | r4 = var_64h;
0x0000557e ldr r3, [sp, 0x90] | r3 = var_90h;
0x00005580 b 0x5232 | goto label_8;
| label_29:
0x00005582 ldr r1, [sp, 0x20] | r1 = var_20h;
0x00005584 movs r2, 0 | r2 = 0;
0x00005586 add r0, sp, 0xa8 | r0 += var_a8h;
0x00005588 blx 0x297c | fcn_0000297c ();
0x0000558c ldr r3, [sp, 0x64] | r3 = var_64h;
0x0000558e str r0, [sp, 0xa8] | var_a8h = r0;
0x00005590 str r3, [sp, 0xb0] | var_b0h = r3;
| label_14:
0x00005592 mov r2, r4 | r2 = r4;
0x00005594 mov r1, r5 | r1 = r5;
0x00005596 blx 0x2910 | fcn_00002910 ();
0x0000559a ldr r4, [sp, 0x64] | r4 = var_64h;
0x0000559c ldr r3, [sp, 0xa8] | r3 = var_a8h;
0x0000559e b 0x525c | goto label_9;
| label_39:
0x000055a0 ldr r2, [sp, 0x78] | r2 = var_78h;
0x000055a2 ldr r3, [sp, 0x94] | r3 = var_94h;
0x000055a4 ldr r0, [sp, 0x74] | r0 = var_74h;
0x000055a6 ldr.w sl, [sp, 0x90] | sl = var_90h;
0x000055aa cmp r2, r3 |
0x000055ac str r7, [sp, 0xd4] | var_d4h = r7;
| if (r2 != r3) {
0x000055ae bne.w 0x5400 | goto label_10;
| }
0x000055b2 mov sb, r7 | sb = r7;
| if (r2 != 0) {
| label_43:
0x000055b4 cbz r2, 0x55c0 |
0x000055b6 mov r1, sl | r1 = sl;
0x000055b8 blx 0x29b8 | r0 = fcn_000029b8 ();
0x000055bc cmp r0, 0 |
| if (r0 != 0) {
0x000055be bne 0x5660 | goto label_50;
| }
| }
0x000055c0 ldrd r2, r3, [sp, 0xc4] | __asm ("ldrd r2, r3, [var_c4h]");
0x000055c4 cmp r2, r3 |
| if (r2 == r3) {
0x000055c6 beq 0x56b6 | goto label_51;
| }
0x000055c8 ldr r6, [pc, 0x214] |
0x000055ca movs r4, 0 | r4 = 0;
0x000055cc ldr.w r8, [pc, 0x214] |
0x000055d0 add r6, pc | r6 = 0xadb4;
0x000055d2 add r8, pc | r8 = 0xadba;
0x000055d4 b 0x55f4 |
| while (r0 >= 0) {
| label_11:
0x000055d6 ldr r3, [sp, 0xc8] | r3 = var_c8h;
0x000055d8 movw r1, 0xaaab |
| /* if there is a right shift of 1, then it's a division by 1/3 */
0x000055dc movt r1, 0xaaaa | r1 = 0xaaaaaaab;
0x000055e0 adds r4, 1 | r4++;
0x000055e2 ldr r7, [sp, 0xd0] | r7 = var_d0h;
0x000055e4 subs r3, r3, r2 | r3 -= r2;
0x000055e6 asrs r3, r3, 3 | r3 >>= 3;
0x000055e8 mul r3, r1, r3 | r3 = r1 * r3;
0x000055ec cmp r4, r3 |
| if (r4 >= r3) {
0x000055ee bhs 0x56b2 | goto label_52;
| }
0x000055f0 ldr.w sl, [sp, 0x90] | sl = var_90h;
0x000055f4 ldr r1, [sp, 0x4c] | r1 = var_4ch;
0x000055f6 add.w r5, r4, r4, lsl 1 | r5 = r4 + (r4 << 1);
0x000055fa ldr r0, [sp, 0x48] | r0 = var_48h;
0x000055fc ldr.w r3, [r7, r5, lsl 3] | offset_0 = r5 << 3;
| r3 = *((r7 + offset_0));
0x00005600 ldr.w r2, [r2, r5, lsl 3] | offset_1 = r5 << 3;
| r2 = *((r2 + offset_1));
0x00005604 str r1, [sp, 0x10] | var_10h = r1;
0x00005606 ldrb.w r1, [sp, 0xc1] | r1 = var_c1h;
0x0000560a str.w sl, [sp, 0x14] | __asm ("str.w sl, [var_14h]");
0x0000560e strd r8, r6, [sp, 4] | __asm ("strd r8, r6, [var_4h]");
0x00005612 str r1, [sp, 0x18] | var_18h = r1;
0x00005614 ldr r1, [pc, 0x1d0] |
0x00005616 add r1, pc | r1 = 0xae02;
0x00005618 str r1, [sp] | *(sp) = r1;
0x0000561a movs r1, 0 | r1 = 0;
0x0000561c str r1, [sp, 0xc] | var_ch = r1;
0x0000561e ldr r0, [r0, 0x10] | r0 = *((r0 + 0x10));
0x00005620 blx 0x2658 | r0 = fcn_00002658 ();
0x00005624 cmp r0, 0 |
0x00005626 ldr r2, [sp, 0xc4] | r2 = var_c4h;
0x00005628 bge 0x55d6 |
| }
0x0000562a ldrb.w r3, [sp, 0xc1] | r3 = var_c1h;
0x0000562e ldr.w r7, [r2, r5, lsl 3] | offset_2 = r5 << 3;
| r7 = *((r2 + offset_2));
0x00005632 ldr.w sb, [sp, 0x90] | sb = var_90h;
| if (r3 == 0) {
0x00005636 cbz r3, 0x5674 | goto label_53;
| }
0x00005638 ldr r5, [pc, 0x1b0] |
0x0000563a add r5, pc | r5 = 0xae2a;
| label_16:
0x0000563c rsbs r0, r0, 0 | r0 -= ;
0x0000563e blx 0x2604 | fcn_00002604 ();
0x00005642 ldr r3, [pc, 0x1ac] |
0x00005644 mov.w r1, 0x100 | r1 = 0x100;
0x00005648 ldr r2, [pc, 0x1a8] |
0x0000564a strd r5, r0, [sp, 8] | __asm ("strd r5, r0, [var_ch]");
0x0000564e movs r0, 0 | r0 = 0;
0x00005650 add r3, pc | r3 = 0xae46;
0x00005652 strd r7, sb, [sp] | __asm ("strd r7, sb, [sp]");
0x00005656 add r2, pc | r2 = 0xae4e;
0x00005658 blx 0x25d4 | fcn_000025d4 ();
0x0000565c ldr r2, [sp, 0xc4] | r2 = var_c4h;
0x0000565e b 0x55d6 | goto label_11;
| label_50:
0x00005660 cmp r7, sb |
| if (r7 != sb) {
0x00005662 bne.w 0x53e2 | goto label_12;
| }
0x00005666 b 0x5400 | goto label_10;
| label_34:
0x00005668 mov r3, r7 | r3 = r7;
0x0000566a b 0x5318 | goto label_13;
| label_31:
0x0000566c ldr r0, [sp, 0x28] | r0 = var_28h;
0x0000566e b 0x5592 | goto label_14;
| label_28:
0x00005670 ldr r0, [sp, 0x24] | r0 = var_24h;
0x00005672 b 0x5574 | goto label_15;
| label_53:
0x00005674 ldr r5, [pc, 0x180] |
0x00005676 add r5, pc | r5 = 0xae72;
0x00005678 b 0x563c | goto label_16;
| label_25:
0x0000567a cmp r4, 0 |
| if (r4 == 0) {
0x0000567c beq.w 0x51e8 | goto label_17;
| }
0x00005680 ldr r0, [sp, 0x50] | r0 = var_50h;
0x00005682 b 0x5694 | goto label_54;
| label_24:
0x00005684 ldr r0, [sp, 0x58] | r0 = var_58h;
0x00005686 movs r2, 0 | r2 = 0;
0x00005688 add r1, sp, 0x64 | r1 += var_64h;
0x0000568a blx 0x297c | fcn_0000297c ();
0x0000568e ldr r3, [sp, 0x64] | r3 = var_64h;
0x00005690 str r0, [sp, 0x74] | var_74h = r0;
0x00005692 str r3, [sp, 0x7c] | var_7ch = r3;
| label_54:
0x00005694 mov r2, r4 | r2 = r4;
0x00005696 mov r1, r5 | r1 = r5;
0x00005698 blx 0x2910 | fcn_00002910 ();
0x0000569c ldr r4, [sp, 0x64] | r4 = var_64h;
0x0000569e ldr r3, [sp, 0x74] | r3 = var_74h;
0x000056a0 b 0x51ea | goto label_18;
| label_33:
0x000056a2 cmp r4, 0 |
| if (r4 >= 0) {
0x000056a4 bge 0x5744 | goto label_55;
| }
0x000056a6 blx 0x2710 | sd_bus_release_name_async ();
| label_38:
0x000056aa cmp r4, 0 |
| if (r4 >= 0) {
0x000056ac bge 0x5748 | goto label_56;
| }
0x000056ae blx 0x2710 | sd_bus_release_name_async ();
| label_52:
0x000056b2 ldr.w sb, [sp, 0xd4] | sb = var_d4h;
| label_51:
0x000056b6 cmp sb, r7 |
| if (sb == r7) {
0x000056b8 beq 0x56d8 | goto label_57;
| }
0x000056ba add.w r4, r7, 8 | r4 = r7 + 8;
| do {
0x000056be ldr r0, [r4, -0x8] | r0 = *((r4 - 0x8));
0x000056c2 cmp r4, r0 |
| if (r4 != r0) {
0x000056c4 beq 0x56ce |
0x000056c6 ldr r1, [r7, 8] | r1 = *((r7 + 8));
0x000056c8 adds r1, 1 | r1++;
0x000056ca blx 0x268c | sym ();
| }
0x000056ce adds r7, 0x18 | r7 += 0x18;
0x000056d0 adds r4, 0x18 | r4 += 0x18;
0x000056d2 cmp r7, sb |
0x000056d4 bne 0x56be |
| } while (r7 != sb);
0x000056d6 ldr r7, [sp, 0xd0] | r7 = var_d0h;
| if (r7 != 0) {
| label_57:
0x000056d8 cbz r7, 0x56e4 |
0x000056da ldr r1, [sp, 0xd8] | r1 = var_d8h;
0x000056dc mov r0, r7 | r0 = r7;
0x000056de subs r1, r1, r7 | r1 -= r7;
0x000056e0 blx 0x268c | sym ();
| }
0x000056e4 ldrd r5, r6, [sp, 0xc4] | __asm ("ldrd r5, r6, [var_c4h]");
0x000056e8 cmp r5, r6 |
| if (r5 == r6) {
0x000056ea beq 0x570a | goto label_58;
| }
0x000056ec add.w r4, r5, 8 | r4 = r5 + 8;
| do {
0x000056f0 ldr r0, [r4, -0x8] | r0 = *((r4 - 0x8));
0x000056f4 cmp r4, r0 |
| if (r4 != r0) {
0x000056f6 beq 0x5700 |
0x000056f8 ldr r1, [r5, 8] | r1 = *((r5 + 8));
0x000056fa adds r1, 1 | r1++;
0x000056fc blx 0x268c | sym ();
| }
0x00005700 adds r5, 0x18 | r5 += 0x18;
0x00005702 adds r4, 0x18 | r4 += 0x18;
0x00005704 cmp r6, r5 |
0x00005706 bne 0x56f0 |
| } while (r6 != r5);
0x00005708 ldr r6, [sp, 0xc4] | r6 = var_c4h;
| if (r6 != 0) {
| label_58:
0x0000570a cbz r6, 0x5716 |
0x0000570c ldr r1, [sp, 0xcc] | r1 = var_cch;
0x0000570e mov r0, r6 | r0 = r6;
0x00005710 subs r1, r1, r6 | r1 -= r6;
0x00005712 blx 0x268c | sym ();
| }
0x00005716 ldr r0, [sp, 0xa8] | r0 = var_a8h;
0x00005718 ldr r3, [sp, 0x28] | r3 = var_28h;
0x0000571a cmp r0, r3 |
| if (r0 != r3) {
0x0000571c beq 0x5726 |
0x0000571e ldr r1, [sp, 0xb0] | r1 = var_b0h;
0x00005720 adds r1, 1 | r1++;
0x00005722 blx 0x268c | sym ();
| }
0x00005726 ldr r0, [sp, 0x90] | r0 = var_90h;
0x00005728 ldr r3, [sp, 0x24] | r3 = var_24h;
0x0000572a cmp r0, r3 |
| if (r0 == r3) {
0x0000572c beq.w 0x546a | goto label_19;
| }
0x00005730 ldr r1, [sp, 0x98] | r1 = var_98h;
0x00005732 adds r1, 1 | r1++;
0x00005734 blx 0x268c | sym ();
0x00005738 ldr r0, [sp, 0x74] | r0 = var_74h;
0x0000573a ldr r3, [sp, 0x50] | r3 = var_50h;
0x0000573c cmp r0, r3 |
| if (r0 != r3) {
0x0000573e bne.w 0x5472 | goto label_20;
| }
0x00005742 b 0x547a | goto label_21;
| label_55:
0x00005744 blx 0x2574 | fcn_00002574 ();
| label_56:
0x00005748 blx 0x2574 | fcn_00002574 ();
| label_49:
0x0000574c blx 0x27d4 | fcn_000027d4 ();
0x00005750 ldr r7, [sp, 0x30] | r7 = var_30h;
0x00005752 ldr r5, [sp, 0x3c] | r5 = var_3ch;
0x00005754 blx 0x25a4 | fcn_000025a4 ();
| do {
0x00005758 cmp r7, sl |
| if (r7 == sl) {
0x0000575a beq 0x5768 | goto label_59;
| }
0x0000575c mov r0, r7 | r0 = r7;
0x0000575e adds r7, 0x18 | r7 += 0x18;
0x00005760 blx 0x2838 | fcn_00002838 ();
0x00005764 b 0x5758 |
| } while (1);
| label_59:
0x00005768 blx 0x2904 | fcn_00002904 ();
0x0000576c b 0x57b0 | goto label_60;
| label_22:
0x00005774 ldr r0, [sp, 0x58] | r0 = var_58h;
0x00005776 blx 0x2838 | fcn_00002838 ();
0x0000577a ldr r0, [sp, 0x5c] | r0 = var_5ch;
0x0000577c bl 0x6cf8 | r0 = fcn_00006cf8 (r0);
0x00005780 blx 0x27ec | fcn_000027ec ();
0x00005784 ldr r7, [sp, 0x3c] | r7 = var_3ch;
0x00005786 ldr r5, [sp, 0x2c] | r5 = var_2ch;
0x00005788 blx 0x25a4 | fcn_000025a4 ();
| do {
0x0000578c cmp r7, sb |
| if (r7 == sb) {
0x0000578e beq 0x579c | goto label_61;
| }
0x00005790 mov r0, r7 | r0 = r7;
0x00005792 adds r7, 0x18 | r7 += 0x18;
0x00005794 blx 0x2838 | fcn_00002838 ();
0x00005798 b 0x578c |
| } while (1);
| label_61:
0x0000579c blx 0x2904 | fcn_00002904 ();
0x000057a0 blx 0x2940 | fcn_00002940 ();
0x000057a4 mov r0, r5 | r0 = r5;
0x000057a6 bl 0x696c | fcn_0000696c (r0);
0x000057aa add r0, sp, 0xa8 | r0 += var_a8h;
0x000057ac blx 0x2838 | fcn_00002838 ();
| label_60:
0x000057b0 ldr r0, [sp, 0x44] | r0 = var_44h;
0x000057b2 blx 0x2838 | fcn_00002838 ();
0x000057b6 b 0x5774 | goto label_22;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/feature-flag-service @ 0x57fc */
| #include <stdint.h>
|
; (fcn) fcn.000057fc () | void fcn_000057fc (int16_t arg1, int16_t arg2) {
| int16_t var_4h;
| int16_t var_8h;
| int16_t var_ch;
| int16_t var_14h;
| int32_t var_14h_2;
| int32_t var_1ch;
| int32_t var_1ch_2;
| int16_t var_24h;
| int32_t var_24h_2;
| int16_t var_2ch;
| int16_t var_30h;
| int16_t var_34h;
| int16_t var_44h;
| r0 = arg1;
| r1 = arg2;
0x000057fc movs r3, 0 | r3 = 0;
0x000057fe push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00005802 str r3, [r0, 8] | *((r0 + 8)) = r3;
0x00005804 sub sp, 0x4c |
0x00005806 mov sb, r1 | sb = r1;
0x00005808 mov r6, r0 | r6 = r0;
0x0000580a ldr r3, [pc, 0x1e0] |
0x0000580c movs r1, 0x61 | r1 = 0x61;
0x0000580e ldr r4, [pc, 0x1e0] |
0x00005810 vmov.i32 d16, 0 | __asm ("vmov.i32 d16, 0");
0x00005814 add r3, pc | r3 = 0xb206;
0x00005816 ldr r2, [pc, 0x1dc] |
0x00005818 str r3, [sp, 0xc] | var_ch = r3;
0x0000581a mov r5, r3 | r5 = r3;
0x0000581c ldr r3, [pc, 0x1d8] | r3 = *(0x59f8);
0x0000581e add r4, pc | r4 = 0xb214;
0x00005820 vst1.32 {d16}, [r0] | __asm ("vst1.32 {d16}, [r0]");
0x00005824 add r2, pc | r2 = 0xb21e;
0x00005826 mov r0, sb | r0 = sb;
0x00005828 ldr r3, [r4, r3] |
0x0000582a ldr r3, [r3] | r3 = *(0xb214);
0x0000582c str r3, [sp, 0x44] | var_44h = r3;
0x0000582e mov.w r3, 0 | r3 = 0;
0x00005832 blx 0x2898 | r0 = fcn_00002898 ();
0x00005836 subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 < r0) {
0x00005838 blt.w 0x599a | goto label_3;
| }
0x0000583c ldr.w fp, [pc, 0x1bc] |
0x00005840 mov.w r8, 0 | r8 = 0;
0x00005844 add.w sl, sp, 0x2c | sl += var_2ch;
0x00005846 lsrs r4, r5, 8 | r4 = r5 >> 8;
0x00005848 add r3, sp, 0x14 | r3 += var_14h;
0x0000584a str r3, [sp, 4] | var_4h = r3;
0x0000584c add fp, pc | fp = 0xb24c;
| do {
0x0000584e ldr r2, [sp, 4] | r2 = var_4h;
0x00005850 mov r1, fp | r1 = fp;
0x00005852 mov r0, sb | r0 = sb;
0x00005854 str.w r8, [sp, 0x14] | __asm ("str.w r8, [var_14h]");
0x00005858 blx 0x2634 | r0 = fcn_00002634 ();
| label_0:
0x0000585c subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 < r0) {
0x0000585e blt 0x592e | goto label_4;
| }
| if (r4 == r0) {
0x00005860 beq 0x58fa | goto label_5;
| }
0x00005862 ldr r4, [sp, 0x14] | r4 = var_14h;
0x00005864 add r7, sp, 0x34 | r7 += var_34h;
0x00005866 str r7, [sp, 0x2c] | var_2ch = r7;
0x00005868 cmp r4, 0 |
| if (r4 == 0) {
0x0000586a beq 0x5920 | goto label_6;
| }
0x0000586c mov r0, r4 | r0 = r4;
0x0000586e blx 0x291c | fcn_0000291c ();
0x00005872 mov r1, r4 | r1 = r4;
0x00005874 adds r2, r4, r0 | r2 = r4 + r0;
0x00005876 mov r0, sl | r0 = sl;
0x00005878 bl 0x3758 | fcn_00003758 (r0, r1, r2);
0x0000587c ldrd r4, r3, [r6, 4] | __asm ("ldrd r4, r3, [r6, 4]");
0x00005880 cmp r4, r3 |
| if (r4 == r3) {
0x00005882 beq 0x58ca | goto label_7;
| }
0x00005884 ldr r5, [sp, 0x30] | r5 = var_30h;
0x00005886 add.w r0, r4, 8 | r0 = r4 + 8;
0x0000588a str r0, [r4] | *(r4) = r0;
0x0000588c ldr r3, [sp, 0x2c] | r3 = var_2ch;
0x0000588e cmp r5, 0xf |
0x00005890 str r5, [sp, 0x24] | var_24h = r5;
0x00005892 str r3, [sp, 8] | var_8h = r3;
| if (r5 > 0xf) {
0x00005894 bhi 0x58dc | goto label_8;
| }
0x00005896 cmp r5, 1 |
| if (r5 != 1) {
0x00005898 bne 0x58d6 | goto label_9;
| }
0x0000589a ldr r3, [sp, 8] | r3 = var_8h;
0x0000589c ldrb r3, [r3] | r3 = *(r3);
0x0000589e strb r3, [r4, 8] | *((r4 + 8)) = r3;
| label_2:
0x000058a0 str r5, [r4, 4] | *((r4 + 4)) = r5;
0x000058a2 strb.w r8, [r0, r5] | *((r0 + r5)) = r8;
0x000058a6 ldr r3, [r6, 4] | r3 = *((r6 + 4));
0x000058a8 adds r3, 0x18 | r3 += 0x18;
0x000058aa str r3, [r6, 4] | *((r6 + 4)) = r3;
| label_1:
0x000058ac ldr r0, [sp, 0x2c] | r0 = var_2ch;
0x000058ae cmp r0, r7 |
0x000058b0 beq 0x584e |
| } while (r0 == r7);
0x000058b2 ldr r1, [sp, 0x34] | r1 = var_34h;
0x000058b4 adds r1, 1 | r1++;
0x000058b6 blx 0x268c | sym ();
0x000058ba ldr r2, [sp, 4] | r2 = var_4h;
0x000058bc mov r1, fp | r1 = fp;
0x000058be mov r0, sb | r0 = sb;
0x000058c0 str.w r8, [sp, 0x14] | __asm ("str.w r8, [var_14h]");
0x000058c4 blx 0x2634 | fcn_00002634 ();
0x000058c8 b 0x585c | goto label_0;
| label_7:
0x000058ca mov r2, sl | r2 = sl;
0x000058cc mov r1, r4 | r1 = r4;
0x000058ce mov r0, r6 | r0 = r6;
0x000058d0 bl 0x6dc0 | fcn_00006dc0 (r0, r1, r2, r3, r4, r5);
0x000058d4 b 0x58ac | goto label_1;
| label_9:
0x000058d6 cmp r5, 0 |
| if (r5 == 0) {
0x000058d8 beq 0x58a0 | goto label_2;
| }
0x000058da b 0x58ec | goto label_10;
| label_8:
0x000058dc movs r2, 0 | r2 = 0;
0x000058de add r1, sp, 0x24 | r1 += var_24h;
0x000058e0 mov r0, r4 | r0 = r4;
0x000058e2 blx 0x297c | fcn_0000297c ();
0x000058e6 ldr r3, [sp, 0x24] | r3 = var_24h;
0x000058e8 str r0, [r4] | *(r4) = r0;
0x000058ea str r3, [r4, 8] | *((r4 + 8)) = r3;
| label_10:
0x000058ec mov r2, r5 | r2 = r5;
0x000058ee ldr r1, [sp, 8] | r1 = var_8h;
0x000058f0 blx 0x2910 | fcn_00002910 ();
0x000058f4 ldr r5, [sp, 0x24] | r5 = var_24h;
0x000058f6 ldr r0, [r4] | r0 = *(r4);
0x000058f8 b 0x58a0 | goto label_2;
| label_5:
0x000058fa mov r0, sb | r0 = sb;
0x000058fc blx 0x29dc | r0 = fcn_000029dc ();
0x00005900 subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 >= r0) {
0x00005902 blt 0x5964 |
0x00005904 ldr r2, [pc, 0xf8] |
0x00005906 ldr r3, [pc, 0xf0] | r3 = *(0x59fa);
0x00005908 add r2, pc | r2 = 0xb30c;
0x0000590a ldr r3, [r2, r3] | r3 = *(0xb30c);
0x0000590c ldr r2, [r3] | r2 = *(0xb30c);
0x0000590e ldr r3, [sp, 0x44] | r3 = var_44h;
0x00005910 eors r2, r3 | r2 ^= r3;
0x00005912 mov.w r3, 0 | r3 = 0;
| if (r2 == r3) {
0x00005916 bne 0x5928 |
0x00005918 mov r0, r6 | r0 = r6;
0x0000591a add sp, 0x4c |
0x0000591c pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_6:
0x00005920 ldr r0, [pc, 0xe0] |
0x00005922 add r0, pc | r0 = 0xb32a;
0x00005924 blx 0x2698 | cxa_free_exception ();
| }
0x00005928 blx 0x27d4 | fcn_000027d4 ();
0x0000592c b 0x59d6 | goto label_11;
| label_4:
0x0000592e movs r0, 0x10 | r0 = 0x10;
0x00005930 rsbs r4, r4, 0 | r4 -= ;
0x00005932 blx 0x25ec | r0 = fcn_000025ec ();
0x00005936 mov r5, r0 | r5 = r0;
0x00005938 blx 0x25f8 | fcn_000025f8 ();
0x0000593c ldr r3, [pc, 0xc8] |
0x0000593e mov r2, r0 | r2 = r0;
0x00005940 strd r4, r0, [sp, 0x1c] | __asm ("strd r4, r0, [var_1ch]");
0x00005944 mov r1, r4 | r1 = r4;
0x00005946 mov r0, r5 | r0 = r5;
0x00005948 add r3, pc | r3 = 0xb354;
0x0000594a bl 0x66e4 | fcn_000066e4 (r0, r1, r2);
0x0000594e ldr r1, [sp, 0xc] | r1 = var_ch;
0x00005950 mov r0, r5 | r0 = r5;
0x00005952 ldr r2, [pc, 0xb8] | r2 = *(0x5a0e);
0x00005954 ldr r3, [pc, 0xb8] | r3 = *(0x5a10);
0x00005956 ldr r2, [r1, r2] | r2 = *((r1 + r2));
0x00005958 str r2, [sp, 4] | var_4h = r2;
0x0000595a ldr r3, [r1, r3] | r3 = *((r1 + r3));
0x0000595c mov r1, r3 | r1 = r3;
0x0000595e str r3, [sp, 8] | var_8h = r3;
0x00005960 blx 0x2970 | fcn_00002970 ();
| }
0x00005964 movs r0, 0x10 | r0 = 0x10;
0x00005966 rsbs r4, r4, 0 | r4 -= ;
0x00005968 blx 0x25ec | r0 = fcn_000025ec ();
0x0000596c mov r5, r0 | r5 = r0;
0x0000596e blx 0x25f8 | fcn_000025f8 ();
0x00005972 ldr r3, [pc, 0xa0] |
0x00005974 mov r2, r0 | r2 = r0;
0x00005976 strd r4, r0, [sp, 0x24] | __asm ("strd r4, r0, [var_24h]");
0x0000597a mov r1, r4 | r1 = r4;
0x0000597c mov r0, r5 | r0 = r5;
0x0000597e add r3, pc | r3 = 0xb398;
0x00005980 bl 0x66e4 | fcn_000066e4 (r0, r1, r2);
0x00005984 ldr r1, [sp, 0xc] | r1 = var_ch;
0x00005986 mov r0, r5 | r0 = r5;
0x00005988 ldr r2, [pc, 0x80] | r2 = *(0x5a0c);
0x0000598a ldr r3, [pc, 0x84] | r3 = *(0x5a12);
0x0000598c ldr r2, [r1, r2] | r2 = *((r1 + r2));
0x0000598e str r2, [sp, 4] | var_4h = r2;
0x00005990 ldr r3, [r1, r3] | r3 = *((r1 + r3));
0x00005992 mov r1, r3 | r1 = r3;
0x00005994 str r3, [sp, 8] | var_8h = r3;
0x00005996 blx 0x2970 | fcn_00002970 ();
| label_3:
0x0000599a movs r0, 0x10 | r0 = 0x10;
0x0000599c rsbs r4, r4, 0 | r4 -= ;
0x0000599e blx 0x25ec | r0 = fcn_000025ec ();
0x000059a2 mov r5, r0 | r5 = r0;
0x000059a4 blx 0x25f8 | fcn_000025f8 ();
0x000059a8 ldr r3, [pc, 0x6c] |
0x000059aa mov r2, r0 | r2 = r0;
0x000059ac strd r4, r0, [sp, 0x14] | __asm ("strd r4, r0, [var_14h]");
0x000059b0 mov r1, r4 | r1 = r4;
0x000059b2 mov r0, r5 | r0 = r5;
0x000059b4 add r3, pc | r3 = 0xb3d0;
0x000059b6 bl 0x66e4 | fcn_000066e4 (r0, r1, r2);
0x000059ba ldr r1, [sp, 0xc] | r1 = var_ch;
0x000059bc mov r0, r5 | r0 = r5;
0x000059be ldr r2, [pc, 0x4c] | r2 = *(0x5a0e);
0x000059c0 ldr r3, [pc, 0x4c] | r3 = *(0x5a10);
0x000059c2 ldr r2, [r1, r2] | r2 = *((r1 + r2));
0x000059c4 str r2, [sp, 4] | var_4h = r2;
0x000059c6 ldr r3, [r1, r3] | r3 = *((r1 + r3));
0x000059c8 mov r1, r3 | r1 = r3;
0x000059ca str r3, [sp, 8] | var_8h = r3;
0x000059cc blx 0x2970 | fcn_00002970 ();
0x000059d0 mov r0, sl | r0 = sl;
0x000059d2 blx 0x2838 | fcn_00002838 ();
| do {
| label_11:
0x000059d6 mov r0, r6 | r0 = r6;
0x000059d8 bl 0x68f4 | r0 = fcn_000068f4 (r0);
0x000059dc blx 0x27ec | fcn_000027ec ();
0x000059e0 mov r0, r5 | r0 = r5;
0x000059e2 blx 0x26a4 | sym ();
0x000059e6 b 0x59d6 |
| } 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/bin/feature-flag-service @ 0x5bec */
| #include <stdint.h>
|
; (fcn) fcn.00005bec () | void fcn_00005bec (int16_t arg1, int16_t arg2) {
| int16_t var_0h;
| int16_t var_4h;
| int16_t var_8h;
| int16_t var_ch;
| int16_t var_10h;
| int16_t var_14h;
| int16_t var_18h;
| int16_t var_1ch;
| int32_t var_1ch_2;
| int32_t var_24h;
| int32_t var_24h_2;
| int16_t var_2ch;
| int32_t var_2ch_2;
| int16_t var_34h;
| int16_t var_38h;
| int16_t var_3ch;
| int16_t var_4ch;
| int16_t var_50h;
| int16_t var_54h;
| int32_t var_64h;
| int16_t var_68h;
| int16_t var_6ch;
| int16_t var_70h;
| int16_t var_80h;
| int16_t var_84h;
| r0 = arg1;
| r1 = arg2;
0x00005bec movs r3, 0 | r3 = 0;
0x00005bee push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00005bf2 str r3, [r0, 8] | *((r0 + 8)) = r3;
0x00005bf4 sub sp, 0x8c |
0x00005bf6 mov sb, r1 | sb = r1;
0x00005bf8 mov r7, r0 | r7 = r0;
0x00005bfa ldr r3, [pc, 0x288] |
0x00005bfc movs r1, 0x61 | r1 = 0x61;
0x00005bfe ldr r4, [pc, 0x288] |
0x00005c00 vmov.i32 d16, 0 | __asm ("vmov.i32 d16, 0");
0x00005c02 movs r0, r2 | r0 = r2;
0x00005c04 add r3, pc | r3 = 0xba8e;
0x00005c06 ldr r2, [pc, 0x284] |
0x00005c08 str r3, [sp, 0x14] | var_14h = r3;
0x00005c0a mov r5, r3 | r5 = r3;
0x00005c0c ldr r3, [pc, 0x280] | r3 = *(0x5e90);
0x00005c0e add r4, pc | r4 = 0xba9c;
0x00005c10 vst1.32 {d16}, [r0] | __asm ("vst1.32 {d16}, [r0]");
0x00005c14 add r2, pc | r2 = 0xbaa6;
0x00005c16 mov r0, sb | r0 = sb;
0x00005c18 ldr r3, [r4, r3] |
0x00005c1a ldr r3, [r3] | r3 = *(0xba9c);
0x00005c1c str r3, [sp, 0x84] | var_84h = r3;
0x00005c1e mov.w r3, 0 | r3 = 0;
0x00005c22 blx 0x2898 | r0 = fcn_00002898 ();
0x00005c26 subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 < r0) {
0x00005c28 blt.w 0x5dea | goto label_7;
| }
0x00005c2c add r3, sp, 0x1c | r3 += var_1ch;
0x00005c2e movs r6, 0 | r6 = 0;
0x00005c30 str r3, [sp, 8] | var_8h = r3;
0x00005c32 add r3, sp, 0x18 | r3 += var_18h;
0x00005c34 str r3, [sp, 4] | var_4h = r3;
0x00005c36 ldr r3, [pc, 0x25c] |
0x00005c38 add r3, pc | r3 = 0xbad2;
0x00005c3a str r3, [sp] | *(sp) = r3;
0x00005c3c add r3, sp, 0x34 | r3 += var_34h;
0x00005c3e str r3, [sp, 0xc] | var_ch = r3;
| do {
| label_0:
0x00005c40 ldrd r2, r3, [sp, 4] | __asm ("ldrd r2, r3, [var_4h]");
0x00005c44 mov r0, sb | r0 = sb;
0x00005c46 ldr r1, [sp] | r1 = *(sp);
0x00005c48 strd r6, r6, [sp, 0x18] | __asm ("strd r6, r6, [var_1ch]");
0x00005c4c blx 0x2634 | r0 = fcn_00002634 ();
0x00005c50 subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 < r0) {
0x00005c52 blt.w 0x5db4 | goto label_8;
| }
| if (r4 == r0) {
0x00005c56 beq.w 0x5d82 | goto label_9;
| }
0x00005c5a ldr r4, [sp, 0x18] | r4 = var_18h;
0x00005c5c add.w r8, sp, 0x3c | r8 += var_3ch;
0x00005c60 str.w r8, [sp, 0x34] | __asm ("str.w r8, [var_34h]");
0x00005c64 cmp r4, 0 |
| if (r4 == 0) {
0x00005c66 beq.w 0x5da8 | goto label_10;
| }
0x00005c6a mov r0, r4 | r0 = r4;
0x00005c6c blx 0x291c | fcn_0000291c ();
0x00005c70 mov r1, r4 | r1 = r4;
0x00005c72 adds r2, r4, r0 | r2 = r4 + r0;
0x00005c74 ldr r0, [sp, 0xc] | r0 = var_ch;
0x00005c76 bl 0x3758 | fcn_00003758 (r0, r1, r2);
0x00005c7a ldr r4, [sp, 0x38] | r4 = var_38h;
0x00005c7c add r5, sp, 0x54 | r5 += var_54h;
0x00005c7e ldr.w fp, [sp, 0x34] | fp = var_34h;
0x00005c82 add.w sl, sp, 0x4c | sl += var_4ch;
0x00005c86 str r5, [sp, 0x4c] | var_4ch = r5;
0x00005c88 cmp r4, 0xf |
0x00005c8a str r4, [sp, 0x2c] | var_2ch = r4;
| if (r4 > 0xf) {
0x00005c8c bhi 0x5d1a | goto label_11;
| }
0x00005c8e cmp r4, 1 |
| if (r4 != 1) {
0x00005c90 bne 0x5d12 | goto label_12;
| }
0x00005c92 ldrb.w r3, [fp] | r3 = *(fp);
0x00005c96 strb.w r3, [sp, 0x54] | var_54h = r3;
| label_1:
0x00005c9a mov r3, r5 | r3 = r5;
| label_2:
0x00005c9c str r4, [sp, 0x50] | var_50h = r4;
0x00005c9e add.w fp, sp, 0x70 |
0x00005ca2 strb r6, [r3, r4] | *((r3 + r4)) = r6;
0x00005ca4 ldr r3, [sp, 0x4c] | r3 = var_4ch;
0x00005ca6 ldr r4, [sp, 0x1c] | r4 = var_1ch;
0x00005ca8 cmp r3, r5 |
0x00005caa strd r4, fp, [sp, 0x64] | __asm ("strd r4, fp, [var_0hx64]");
| if (r3 == r5) {
0x00005cae beq 0x5d38 | goto label_13;
| }
0x00005cb0 str r3, [sp, 0x68] | var_68h = r3;
0x00005cb2 ldrd r3, r2, [sp, 0x50] | __asm ("ldrd r3, r2, [var_54h]");
0x00005cb6 str r2, [sp, 0x70] | var_70h = r2;
| label_3:
0x00005cb8 subs r1, r4, 0 | r1 = r4 - 0;
0x00005cba ldrd r4, r2, [r7, 4] | __asm ("ldrd r4, r2, [r7, 4]");
0x00005cbe it ne |
| if (r1 == r4) {
0x00005cc0 movne r1, 1 | r1 = 1;
| }
0x00005cc2 str r3, [sp, 0x6c] | var_6ch = r3;
0x00005cc4 strd r5, r6, [sp, 0x4c] | __asm ("strd r5, r6, [var_4ch]");
0x00005cc8 cmp r4, r2 |
0x00005cca strb.w r6, [sp, 0x54] | var_54h = r6;
0x00005cce strb.w r1, [sp, 0x80] | var_80h = r1;
| if (r4 == r2) {
0x00005cd2 beq 0x5d4c | goto label_14;
| }
0x00005cd4 add.w r0, r4, 8 | r0 = r4 + 8;
0x00005cd8 str r0, [r4] | *(r4) = r0;
0x00005cda ldr r2, [sp, 0x68] | r2 = var_68h;
0x00005cdc cmp r2, fp |
| if (r2 == fp) {
0x00005cde beq 0x5d68 | goto label_15;
| }
0x00005ce0 str r2, [r4] | *(r4) = r2;
0x00005ce2 ldr r2, [sp, 0x70] | r2 = var_70h;
0x00005ce4 str r2, [r4, 8] | *((r4 + 8)) = r2;
0x00005ce6 ldr r2, [r7, 4] | r2 = *((r7 + 4));
0x00005ce8 ldrb.w r1, [sp, 0x80] | r1 = var_80h;
| label_5:
0x00005cec adds r2, 0x1c | r2 += 0x1c;
0x00005cee str r3, [r4, 4] | *((r4 + 4)) = r3;
0x00005cf0 strb r1, [r4, 0x18] | *((r4 + 0x18)) = r1;
0x00005cf2 str r2, [r7, 4] | *((r7 + 4)) = r2;
| label_4:
0x00005cf4 ldr r0, [sp, 0x4c] | r0 = var_4ch;
0x00005cf6 cmp r0, r5 |
| if (r0 != r5) {
0x00005cf8 beq 0x5d02 |
0x00005cfa ldr r1, [sp, 0x54] | r1 = var_54h;
0x00005cfc adds r1, 1 | r1++;
0x00005cfe blx 0x268c | sym ();
| }
0x00005d02 ldr r0, [sp, 0x34] | r0 = var_34h;
0x00005d04 cmp r0, r8 |
0x00005d06 beq 0x5c40 |
| } while (r0 == r8);
0x00005d08 ldr r1, [sp, 0x3c] | r1 = var_3ch;
0x00005d0a adds r1, 1 | r1++;
0x00005d0c blx 0x268c | sym ();
0x00005d10 b 0x5c40 | goto label_0;
| label_12:
0x00005d12 cmp r4, 0 |
| if (r4 == 0) {
0x00005d14 beq 0x5c9a | goto label_1;
| }
0x00005d16 mov r0, r5 | r0 = r5;
0x00005d18 b 0x5d2a | goto label_16;
| label_11:
0x00005d1a movs r2, 0 | r2 = 0;
0x00005d1c add r1, sp, 0x2c | r1 += var_2ch;
0x00005d1e mov r0, sl | r0 = sl;
0x00005d20 blx 0x297c | fcn_0000297c ();
0x00005d24 ldr r3, [sp, 0x2c] | r3 = var_2ch;
0x00005d26 str r0, [sp, 0x4c] | var_4ch = r0;
0x00005d28 str r3, [sp, 0x54] | var_54h = r3;
| label_16:
0x00005d2a mov r2, r4 | r2 = r4;
0x00005d2c mov r1, fp | r1 = fp;
0x00005d2e blx 0x2910 | fcn_00002910 ();
0x00005d32 ldr r4, [sp, 0x2c] | r4 = var_2ch;
0x00005d34 ldr r3, [sp, 0x4c] | r3 = var_4ch;
0x00005d36 b 0x5c9c | goto label_2;
| label_13:
0x00005d38 ldr r3, [sp, 0x50] | r3 = var_50h;
0x00005d3a adds r2, r3, 1 | r2 = r3 + 1;
| if (r2 == r3) {
0x00005d3c beq 0x5cb8 | goto label_3;
| }
0x00005d3e mov r1, r5 | r1 = r5;
0x00005d40 mov r0, fp | r0 = fp;
0x00005d42 str r3, [sp, 0x10] | var_10h = r3;
0x00005d44 blx 0x2910 | fcn_00002910 ();
0x00005d48 ldr r3, [sp, 0x10] | r3 = var_10h;
0x00005d4a b 0x5cb8 | goto label_3;
| label_14:
0x00005d4c mov r1, r4 | r1 = r4;
0x00005d4e add r4, sp, 0x68 | r4 += var_68h;
0x00005d50 mov r2, r4 | r2 = r4;
0x00005d52 mov r0, r7 | r0 = r7;
0x00005d54 bl 0x7180 | fcn_00007180 (r0, r1, r2, r3, r4);
0x00005d58 ldr r0, [sp, 0x68] | r0 = var_68h;
0x00005d5a cmp r0, fp |
| if (r0 == fp) {
0x00005d5c beq 0x5cf4 | goto label_4;
| }
0x00005d5e ldr r1, [sp, 0x70] | r1 = var_70h;
0x00005d60 adds r1, 1 | r1++;
0x00005d62 blx 0x268c | sym ();
0x00005d66 b 0x5cf4 | goto label_4;
| label_15:
0x00005d68 adds r2, r3, 1 | r2 = r3 + 1;
0x00005d6a it eq |
| if (r2 == r3) {
0x00005d6c moveq r2, r4 | r2 = r4;
| goto label_17;
| }
| if (r2 == r3) {
| label_17:
0x00005d6e beq 0x5cec | goto label_5;
| }
0x00005d70 mov r1, fp | r1 = fp;
0x00005d72 str r3, [sp, 0x10] | var_10h = r3;
0x00005d74 blx 0x2910 | fcn_00002910 ();
0x00005d78 ldrb.w r1, [sp, 0x80] | r1 = var_80h;
0x00005d7c ldr r2, [r7, 4] | r2 = *((r7 + 4));
0x00005d7e ldr r3, [sp, 0x10] | r3 = var_10h;
0x00005d80 b 0x5cec | goto label_5;
| label_9:
0x00005d82 mov r0, sb | r0 = sb;
0x00005d84 blx 0x29dc | r0 = fcn_000029dc ();
0x00005d88 subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 < r0) {
0x00005d8a blt 0x5e36 | goto label_18;
| }
0x00005d8c ldr r2, [pc, 0x108] |
0x00005d8e ldr r3, [pc, 0x100] | r3 = *(0x5e92);
0x00005d90 add r2, pc | r2 = 0xbc2c;
0x00005d92 ldr r3, [r2, r3] | r3 = *(0xbc2c);
0x00005d94 ldr r2, [r3] | r2 = *(0xbc2c);
0x00005d96 ldr r3, [sp, 0x84] | r3 = var_84h;
0x00005d98 eors r2, r3 | r2 ^= r3;
0x00005d9a mov.w r3, 0 | r3 = 0;
| if (r2 == r3) {
0x00005d9e bne 0x5db0 |
0x00005da0 mov r0, r7 | r0 = r7;
0x00005da2 add sp, 0x8c |
0x00005da4 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_10:
0x00005da8 ldr r0, [pc, 0xf0] |
0x00005daa add r0, pc | r0 = 0xbc4a;
0x00005dac blx 0x2698 | cxa_free_exception ();
| }
0x00005db0 blx 0x27d4 | fcn_000027d4 ();
| label_8:
0x00005db4 movs r0, 0x10 | r0 = 0x10;
0x00005db6 rsbs r4, r4, 0 | r4 -= ;
0x00005db8 blx 0x25ec | r0 = fcn_000025ec ();
0x00005dbc mov r5, r0 | r5 = r0;
0x00005dbe blx 0x25f8 | fcn_000025f8 ();
0x00005dc2 ldr r3, [pc, 0xdc] |
0x00005dc4 mov r2, r0 | r2 = r0;
0x00005dc6 strd r4, r0, [sp, 0x24] | __asm ("strd r4, r0, [var_24h]");
0x00005dca mov r1, r4 | r1 = r4;
0x00005dcc mov r0, r5 | r0 = r5;
0x00005dce add r3, pc | r3 = 0xbc74;
0x00005dd0 bl 0x66e4 | fcn_000066e4 (r0, r1, r2);
0x00005dd4 ldr r1, [sp, 0x14] | r1 = var_14h;
0x00005dd6 mov r0, r5 | r0 = r5;
0x00005dd8 ldr r2, [pc, 0xc8] | r2 = *(0x5ea4);
0x00005dda ldr r3, [pc, 0xcc] | r3 = *(0x5eaa);
0x00005ddc ldr r2, [r1, r2] | r2 = *((r1 + r2));
0x00005dde str r2, [sp] | *(sp) = r2;
0x00005de0 ldr r3, [r1, r3] | r3 = *((r1 + r3));
0x00005de2 mov r1, r3 | r1 = r3;
0x00005de4 str r3, [sp, 4] | var_4h = r3;
0x00005de6 blx 0x2970 | fcn_00002970 ();
| label_7:
0x00005dea movs r0, 0x10 | r0 = 0x10;
0x00005dec rsbs r4, r4, 0 | r4 -= ;
0x00005dee blx 0x25ec | r0 = fcn_000025ec ();
0x00005df2 mov r5, r0 | r5 = r0;
0x00005df4 blx 0x25f8 | fcn_000025f8 ();
0x00005df8 ldr r3, [pc, 0xb0] |
0x00005dfa mov r2, r0 | r2 = r0;
0x00005dfc strd r4, r0, [sp, 0x1c] | __asm ("strd r4, r0, [var_1ch]");
0x00005e00 mov r1, r4 | r1 = r4;
0x00005e02 mov r0, r5 | r0 = r5;
0x00005e04 add r3, pc | r3 = 0xbcb4;
0x00005e06 bl 0x66e4 | fcn_000066e4 (r0, r1, r2);
0x00005e0a ldr r1, [sp, 0x14] | r1 = var_14h;
0x00005e0c mov r0, r5 | r0 = r5;
0x00005e0e ldr r2, [pc, 0x94] | r2 = *(0x5ea6);
0x00005e10 ldr r3, [pc, 0x94] | r3 = *(0x5ea8);
0x00005e12 ldr r2, [r1, r2] | r2 = *((r1 + r2));
0x00005e14 str r2, [sp] | *(sp) = r2;
0x00005e16 ldr r3, [r1, r3] | r3 = *((r1 + r3));
0x00005e18 mov r1, r3 | r1 = r3;
0x00005e1a str r3, [sp, 4] | var_4h = r3;
0x00005e1c blx 0x2970 | fcn_00002970 ();
| do {
0x00005e20 mov r0, r5 | r0 = r5;
0x00005e22 blx 0x26a4 | sym ();
| label_6:
0x00005e26 mov r0, r7 | r0 = r7;
0x00005e28 bl 0x6930 | r0 = fcn_00006930 (r0);
0x00005e2c blx 0x27ec | fcn_000027ec ();
0x00005e30 b 0x5e20 |
| } while (1);
| label_18:
0x00005e36 movs r0, 0x10 | r0 = 0x10;
0x00005e38 rsbs r4, r4, 0 | r4 -= ;
0x00005e3a blx 0x25ec | r0 = fcn_000025ec ();
0x00005e3e mov r5, r0 | r5 = r0;
0x00005e40 blx 0x25f8 | fcn_000025f8 ();
0x00005e44 ldr r3, [pc, 0x68] |
0x00005e46 mov r2, r0 | r2 = r0;
0x00005e48 strd r4, r0, [sp, 0x2c] | __asm ("strd r4, r0, [var_2ch]");
0x00005e4c mov r1, r4 | r1 = r4;
0x00005e4e mov r0, r5 | r0 = r5;
0x00005e50 add r3, pc | r3 = 0xbd04;
0x00005e52 bl 0x66e4 | fcn_000066e4 (r0, r1, r2);
0x00005e56 ldr r1, [sp, 0x14] | r1 = var_14h;
0x00005e58 mov r0, r5 | r0 = r5;
0x00005e5a ldr r2, [pc, 0x48] | r2 = *(0x5ea6);
0x00005e5c ldr r3, [pc, 0x48] | r3 = *(0x5ea8);
0x00005e5e ldr r2, [r1, r2] | r2 = *((r1 + r2));
0x00005e60 str r2, [sp] | *(sp) = r2;
0x00005e62 ldr r3, [r1, r3] | r3 = *((r1 + r3));
0x00005e64 mov r1, r3 | r1 = r3;
0x00005e66 str r3, [sp, 4] | var_4h = r3;
0x00005e68 blx 0x2970 | fcn_00002970 ();
0x00005e6c mov r0, r4 | r0 = r4;
0x00005e6e blx 0x2838 | fcn_00002838 ();
0x00005e72 mov r0, sl | r0 = sl;
0x00005e74 blx 0x2838 | fcn_00002838 ();
0x00005e78 ldr r0, [sp, 0xc] | r0 = var_ch;
0x00005e7a blx 0x2838 | fcn_00002838 ();
0x00005e7e b 0x5e26 | goto label_6;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/feature-flag-service @ 0x6148 */
| #include <stdint.h>
|
; (fcn) fcn.00006148 () | void fcn_00006148 (int16_t arg1, int16_t arg2) {
| int16_t var_0h;
| int16_t var_4h;
| int16_t var_8h;
| int16_t var_ch;
| int16_t var_14h;
| int32_t var_14h_2;
| int32_t var_1ch;
| int32_t var_1ch_2;
| int16_t var_24h;
| int16_t var_28h;
| int16_t var_2ch;
| int16_t var_34h;
| int16_t var_44h;
| int16_t var_4ch;
| int16_t var_5ch;
| r0 = arg1;
| r1 = arg2;
0x00006148 push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x0000614c mov sl, r1 | sl = r1;
0x0000614e ldr r4, [pc, 0x1e4] |
0x00006150 movs r3, 0 | r3 = 0;
0x00006152 sub sp, 0x64 |
0x00006154 mov r8, r0 | r8 = r0;
0x00006156 ldr r1, [pc, 0x1e0] | r1 = *(0x633a);
0x00006158 movs r2, 1 | r2 = 1;
0x0000615a add r4, pc | r4 = 0xc494;
0x0000615c ldr r1, [r4, r1] |
0x0000615e ldr r1, [r1] | r1 = imp._ZTVSt9basic_iosIcSt11char_traitsIcEE;
0x00006160 str r1, [sp, 0x5c] | var_5ch = r1;
0x00006162 mov.w r1, 0 | r1 = 0;
0x00006166 strd r3, r3, [r0, 8] | __asm ("strd r3, r3, [r0, 8]");
0x0000616a str r3, [r0, 0x14] | *((r0 + 0x14)) = r3;
0x0000616c movs r1, 0x61 | r1 = 0x61;
0x0000616e str r3, [r0, 0x18]! | *((r0 += 0x18)) = r3;
0x00006172 mov.w r3, 0x3f800000 | r3 = 0x3f800000;
0x00006176 str.w r2, [r8, 4] | __asm ("str.w r2, [r8, 4]");
0x0000617a str.w r3, [r8, 0x10] | __asm ("str.w r3, [r8, 0x10]");
0x0000617e ldr r2, [pc, 0x1bc] |
0x00006180 ldr r3, [pc, 0x1bc] |
0x00006182 str.w r0, [r8] | __asm ("str.w r0, [r8]");
0x00006186 mov r0, sl | r0 = sl;
0x00006188 add r2, pc | r2 = 0xc4ca;
0x0000618a add r3, pc | r3 = 0xc4ce;
0x0000618c str r3, [sp, 0xc] | var_ch = r3;
0x0000618e blx 0x2898 | r0 = fcn_00002898 ();
0x00006192 subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 < r0) {
0x00006194 blt.w 0x62f6 | goto label_2;
| }
0x00006198 add r3, sp, 0x14 | r3 += var_14h;
0x0000619a movs r7, 0 | r7 = 0;
0x0000619c str r3, [sp, 8] | var_8h = r3;
0x0000619e add r3, sp, 0x24 | r3 += var_24h;
0x000061a0 str r3, [sp] | *(sp) = r3;
0x000061a2 add.w sb, sp, 0x2c | sb += var_2ch;
0x000061a6 ldr r3, [pc, 0x19c] |
0x000061a8 add r3, pc | r3 = 0xc4f2;
0x000061aa str r3, [sp, 4] | var_4h = r3;
| do {
| label_0:
0x000061ac ldr r3, [sp] | r3 = *(sp);
0x000061ae mov r0, sl | r0 = sl;
0x000061b0 ldrd r1, r2, [sp, 4] | __asm ("ldrd r1, r2, [var_4h]");
0x000061b4 str r7, [sp, 0x14] | var_14h = r7;
0x000061b6 str r7, [sp, 0x24] | var_24h = r7;
0x000061b8 blx 0x2634 | r0 = fcn_00002634 ();
0x000061bc subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 < r0) {
0x000061be blt 0x62c0 | goto label_3;
| }
| if (r4 == r0) {
0x000061c0 beq 0x622a | goto label_4;
| }
0x000061c2 ldr r5, [sp, 0x14] | r5 = var_14h;
0x000061c4 add r4, sp, 0x34 | r4 += var_34h;
0x000061c6 str r4, [sp, 0x2c] | var_2ch = r4;
0x000061c8 cmp r5, 0 |
| if (r5 == 0) {
0x000061ca beq 0x6250 | goto label_5;
| }
0x000061cc mov r0, r5 | r0 = r5;
0x000061ce blx 0x291c | fcn_0000291c ();
0x000061d2 mov r1, r5 | r1 = r5;
0x000061d4 adds r2, r5, r0 | r2 = r5 + r0;
0x000061d6 mov r0, sb | r0 = sb;
0x000061d8 bl 0x3758 | fcn_00003758 (r0, r1, r2);
0x000061dc ldr.w fp, [sp, 0x24] | fp = var_24h;
0x000061e0 add r6, sp, 0x4c | r6 += var_4ch;
0x000061e2 add r5, sp, 0x44 | r5 += var_44h;
0x000061e4 str r6, [sp, 0x44] | var_44h = r6;
0x000061e6 cmp.w fp, 0 |
| if (fp == 0) {
0x000061ea beq 0x6258 | goto label_6;
| }
0x000061ec mov r0, fp | r0 = fp;
0x000061ee blx 0x291c | fcn_0000291c ();
0x000061f2 mov r1, fp | r1 = fp;
0x000061f4 add.w r2, fp, r0 | r2 = fp + r0;
0x000061f8 mov r0, r5 | r0 = r5;
0x000061fa bl 0x3758 | fcn_00003758 (r0, r1, r2);
0x000061fe mov r1, sb | r1 = sb;
0x00006200 mov r0, r8 | r0 = r8;
0x00006202 bl 0x7488 | fcn_00007488 (r0, r1);
0x00006206 mov r1, r5 | r1 = r5;
0x00006208 blx 0x261c | fcn_0000261c ();
0x0000620c ldr r0, [sp, 0x44] | r0 = var_44h;
0x0000620e cmp r0, r6 |
| if (r0 != r6) {
0x00006210 beq 0x621a |
0x00006212 ldr r1, [sp, 0x4c] | r1 = var_4ch;
0x00006214 adds r1, 1 | r1++;
0x00006216 blx 0x268c | sym ();
| }
0x0000621a ldr r0, [sp, 0x2c] | r0 = var_2ch;
0x0000621c cmp r0, r4 |
0x0000621e beq 0x61ac |
| } while (r0 == r4);
0x00006220 ldr r1, [sp, 0x34] | r1 = var_34h;
0x00006222 adds r1, 1 | r1++;
0x00006224 blx 0x268c | sym ();
0x00006228 b 0x61ac | goto label_0;
| label_4:
0x0000622a mov r0, sl | r0 = sl;
0x0000622c blx 0x29dc | r0 = fcn_000029dc ();
0x00006230 subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 >= r0) {
0x00006232 blt 0x6264 |
0x00006234 ldr r2, [pc, 0x110] |
0x00006236 ldr r3, [pc, 0x100] | r3 = *(0x633a);
0x00006238 add r2, pc | r2 = 0xc584;
0x0000623a ldr r3, [r2, r3] | r3 = *(0xc584);
0x0000623c ldr r2, [r3] | r2 = *(0xc584);
0x0000623e ldr r3, [sp, 0x5c] | r3 = var_5ch;
0x00006240 eors r2, r3 | r2 ^= r3;
0x00006242 mov.w r3, 0 | r3 = 0;
| if (r2 == r3) {
0x00006246 bne 0x6260 |
0x00006248 mov r0, r8 | r0 = r8;
0x0000624a add sp, 0x64 |
0x0000624c pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_5:
0x00006250 ldr r0, [pc, 0xf8] |
0x00006252 add r0, pc | r0 = 0xc5a2;
0x00006254 blx 0x2698 | cxa_free_exception ();
| label_6:
0x00006258 ldr r0, [pc, 0xf4] |
0x0000625a add r0, pc | r0 = 0xc5ae;
0x0000625c blx 0x2698 | cxa_free_exception ();
| }
0x00006260 blx 0x27d4 | fcn_000027d4 ();
| }
0x00006264 movs r0, 0x10 | r0 = 0x10;
0x00006266 rsbs r4, r4, 0 | r4 -= ;
0x00006268 blx 0x25ec | r0 = fcn_000025ec ();
0x0000626c mov r5, r0 | r5 = r0;
0x0000626e blx 0x25f8 | fcn_000025f8 ();
0x00006272 ldr r3, [pc, 0xe0] |
0x00006274 ldr r2, [sp] | r2 = *(sp);
0x00006276 str r0, [sp, 0x28] | var_28h = r0;
0x00006278 mov r0, r5 | r0 = r5;
0x0000627a str r4, [sp, 0x24] | var_24h = r4;
0x0000627c add r3, pc | r3 = 0xc5d6;
0x0000627e ldm r2, {r1, r2} | r1 = *(r2);
| r2 = *((r2 + 4));
0x00006280 bl 0x66e4 | fcn_000066e4 (r0, r1, r2);
0x00006284 ldr r1, [sp, 0xc] | r1 = var_ch;
0x00006286 mov r0, r5 | r0 = r5;
0x00006288 ldr r2, [pc, 0xcc] | r2 = *(0x6358);
0x0000628a ldr r3, [pc, 0xd0] | r3 = *(0x635e);
0x0000628c ldr r2, [r1, r2] | r2 = *((r1 + r2));
0x0000628e str r2, [sp] | *(sp) = r2;
0x00006290 ldr r3, [r1, r3] | r3 = *((r1 + r3));
0x00006292 mov r1, r3 | r1 = r3;
0x00006294 str r3, [sp, 4] | var_4h = r3;
0x00006296 blx 0x2970 | fcn_00002970 ();
0x0000629a mov r0, r5 | r0 = r5;
0x0000629c blx 0x2838 | fcn_00002838 ();
0x000062a0 mov r0, sb | r0 = sb;
0x000062a2 blx 0x2838 | fcn_00002838 ();
| do {
0x000062a6 mov r0, r8 | r0 = r8;
0x000062a8 bl 0x7038 | fcn_00007038 (r0, r1);
0x000062ac mov r0, r8 | r0 = r8;
0x000062ae bl 0x7088 | r0 = fcn_00007088 (r0);
0x000062b2 blx 0x27ec | fcn_000027ec ();
| label_1:
0x000062b6 mov r0, r5 | r0 = r5;
0x000062b8 blx 0x26a4 | sym ();
0x000062bc b 0x62a6 |
| } while (1);
| label_3:
0x000062c0 movs r0, 0x10 | r0 = 0x10;
0x000062c2 rsbs r4, r4, 0 | r4 -= ;
0x000062c4 blx 0x25ec | r0 = fcn_000025ec ();
0x000062c8 mov r5, r0 | r5 = r0;
0x000062ca blx 0x25f8 | fcn_000025f8 ();
0x000062ce ldr r3, [pc, 0x90] |
0x000062d0 mov r2, r0 | r2 = r0;
0x000062d2 strd r4, r0, [sp, 0x1c] | __asm ("strd r4, r0, [var_1ch]");
0x000062d6 mov r1, r4 | r1 = r4;
0x000062d8 mov r0, r5 | r0 = r5;
0x000062da add r3, pc | r3 = 0xc640;
0x000062dc bl 0x66e4 | fcn_000066e4 (r0, r1, r2);
0x000062e0 ldr r1, [sp, 0xc] | r1 = var_ch;
0x000062e2 mov r0, r5 | r0 = r5;
0x000062e4 ldr r2, [pc, 0x70] | r2 = *(0x6358);
0x000062e6 ldr r3, [pc, 0x74] | r3 = *(0x635e);
0x000062e8 ldr r2, [r1, r2] | r2 = *((r1 + r2));
0x000062ea str r2, [sp] | *(sp) = r2;
0x000062ec ldr r3, [r1, r3] | r3 = *((r1 + r3));
0x000062ee mov r1, r3 | r1 = r3;
0x000062f0 str r3, [sp, 4] | var_4h = r3;
0x000062f2 blx 0x2970 | fcn_00002970 ();
| label_2:
0x000062f6 movs r0, 0x10 | r0 = 0x10;
0x000062f8 rsbs r4, r4, 0 | r4 -= ;
0x000062fa blx 0x25ec | fcn_000025ec ();
0x000062fc ldrd r4, r6, [r8, -0x14]! | __asm ("ldrd r4, r6, [r8, -0x14]!");
0x00006300 blx 0x25f8 | fcn_000025f8 ();
0x00006304 ldr r3, [pc, 0x5c] |
0x00006306 mov r2, r0 | r2 = r0;
0x00006308 strd r4, r0, [sp, 0x14] | __asm ("strd r4, r0, [var_14h]");
0x0000630c mov r1, r4 | r1 = r4;
0x0000630e mov r0, r5 | r0 = r5;
0x00006310 add r3, pc | r3 = 0xc678;
0x00006312 bl 0x66e4 | fcn_000066e4 (r0, r1, r2);
0x00006316 ldr r1, [sp, 0xc] | r1 = var_ch;
0x00006318 mov r0, r5 | r0 = r5;
0x0000631a ldr r2, [pc, 0x3c] | r2 = *(0x635a);
0x0000631c ldr r3, [pc, 0x3c] | r3 = *(0x635c);
0x0000631e ldr r2, [r1, r2] | r2 = *((r1 + r2));
0x00006320 str r2, [sp] | *(sp) = r2;
0x00006322 ldr r3, [r1, r3] | r3 = *((r1 + r3));
0x00006324 mov r1, r3 | r1 = r3;
0x00006326 str r3, [sp, 4] | var_4h = r3;
0x00006328 blx 0x2970 | fcn_00002970 ();
0x0000632c b 0x62b6 | 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/bin/feature-flag-service @ 0x6860 */
| #include <stdint.h>
|
; (fcn) fcn.00006860 () | void fcn_00006860 (int16_t arg1) {
| r0 = arg1;
0x00006860 push {r3, r4, r5, r6, r7, lr} |
0x00006862 mov r6, r0 | r6 = r0;
0x00006864 ldrd r5, r7, [r0, 0x40] | __asm ("ldrd r5, r7, [r0, 0x40]");
0x00006868 cmp r5, r7 |
| if (r5 == r7) {
0x0000686a beq 0x688c | goto label_0;
| }
0x0000686c add.w r4, r5, 8 | r4 = r5 + 8;
| do {
0x00006870 ldr r0, [r4, -0x8] | r0 = *((r4 - 0x8));
0x00006874 cmp r4, r0 |
0x00006876 add.w r4, r4, 0x18 | r4 += 0x18;
| if (r4 != r0) {
0x0000687a beq 0x6884 |
0x0000687c ldr r1, [r5, 8] | r1 = *((r5 + 8));
0x0000687e adds r1, 1 | r1++;
0x00006880 blx 0x268c | sym ();
| }
0x00006884 adds r5, 0x18 | r5 += 0x18;
0x00006886 cmp r7, r5 |
0x00006888 bne 0x6870 |
| } while (r7 != r5);
0x0000688a ldr r7, [r6, 0x40] | r7 = *((r6 + 0x40));
| if (r7 != 0) {
| label_0:
0x0000688c cbz r7, 0x6898 |
0x0000688e ldr r1, [r6, 0x48] | r1 = *((r6 + 0x48));
0x00006890 mov r0, r7 | r0 = r7;
0x00006892 subs r1, r1, r7 | r1 -= r7;
0x00006894 blx 0x268c | sym ();
| }
0x00006898 ldrd r5, r7, [r6, 0x34] | __asm ("ldrd r5, r7, [r6, 0x34]");
0x0000689c cmp r5, r7 |
| if (r5 == r7) {
0x0000689e beq 0x68c0 | goto label_1;
| }
0x000068a0 add.w r4, r5, 8 | r4 = r5 + 8;
| do {
0x000068a4 ldr r0, [r4, -0x8] | r0 = *((r4 - 0x8));
0x000068a8 cmp r4, r0 |
0x000068aa add.w r4, r4, 0x18 | r4 += 0x18;
| if (r4 != r0) {
0x000068ae beq 0x68b8 |
0x000068b0 ldr r1, [r5, 8] | r1 = *((r5 + 8));
0x000068b2 adds r1, 1 | r1++;
0x000068b4 blx 0x268c | sym ();
| }
0x000068b8 adds r5, 0x18 | r5 += 0x18;
0x000068ba cmp r7, r5 |
0x000068bc bne 0x68a4 |
| } while (r7 != r5);
0x000068be ldr r7, [r6, 0x34] | r7 = *((r6 + 0x34));
| if (r7 != 0) {
| label_1:
0x000068c0 cbz r7, 0x68cc |
0x000068c2 ldr r1, [r6, 0x3c] | r1 = *((r6 + 0x3c));
0x000068c4 mov r0, r7 | r0 = r7;
0x000068c6 subs r1, r1, r7 | r1 -= r7;
0x000068c8 blx 0x268c | sym ();
| }
0x000068cc ldr r0, [r6, 0x18] | r0 = *((r6 + 0x18));
0x000068ce add.w r3, r6, 0x20 | r3 = r6 + 0x20;
0x000068d2 cmp r0, r3 |
| if (r0 != r3) {
0x000068d4 beq 0x68de |
0x000068d6 ldr r1, [r6, 0x20] | r1 = *((r6 + 0x20));
0x000068d8 adds r1, 1 | r1++;
0x000068da blx 0x268c | sym ();
| }
0x000068de mov r3, r6 | r3 = r6;
0x000068e0 ldr r0, [r3], 8 | r0 = *(r3);
| r3 += 8;
0x000068e4 cmp r0, r3 |
| if (r0 != r3) {
0x000068e6 beq 0x68f0 |
0x000068e8 ldr r1, [r6, 8] | r1 = *((r6 + 8));
0x000068ea adds r1, 1 | r1++;
0x000068ec blx 0x268c | sym ();
| }
0x000068f0 mov r0, r6 | r0 = r6;
0x000068f2 pop {r3, r4, r5, r6, r7, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/feature-flag-service @ 0x68f4 */
| #include <stdint.h>
|
; (fcn) fcn.000068f4 () | void fcn_000068f4 (int16_t arg1) {
| r0 = arg1;
0x000068f4 invalid |
0x000068f8 ldrd r5, r6, [r0] | __asm ("ldrd r5, r6, [r0]");
0x000068fc cmp r5, r6 |
| if (r5 == r6) {
0x000068fe beq 0x6920 | goto label_0;
| }
0x00006900 add.w r4, r5, 8 | r4 = r5 + 8;
| do {
0x00006904 ldr r0, [r4, -0x8] | r0 = *((r4 - 0x8));
0x00006908 cmp r0, r4 |
0x0000690a add.w r4, r4, 0x18 | r4 += 0x18;
| if (r0 != r4) {
0x0000690e beq 0x6918 |
0x00006910 ldr r1, [r5, 8] | r1 = *((r5 + 8));
0x00006912 adds r1, 1 | r1++;
0x00006914 blx 0x268c | sym ();
| }
0x00006918 adds r5, 0x18 | r5 += 0x18;
0x0000691a cmp r6, r5 |
0x0000691c bne 0x6904 |
| } while (r6 != r5);
0x0000691e ldr r6, [r7] | r6 = *(r7);
| if (r6 != 0) {
| label_0:
0x00006920 cbz r6, 0x692c |
0x00006922 ldr r1, [r7, 8] | r1 = *((r7 + 8));
0x00006924 mov r0, r6 | r0 = r6;
0x00006926 subs r1, r1, r6 | r1 -= r6;
0x00006928 blx 0x268c | sym ();
| }
0x0000692c mov r0, r7 | r0 = r7;
0x0000692e pop {r3, r4, r5, r6, r7, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/feature-flag-service @ 0x6930 */
| #include <stdint.h>
|
; (fcn) fcn.00006930 () | void fcn_00006930 (int16_t arg1) {
| r0 = arg1;
0x00006930 invalid |
0x00006934 ldrd r5, r6, [r0] | __asm ("ldrd r5, r6, [r0]");
0x00006936 ldrsb r0, [r0, r0] | r0 = *((r0 + r0));
0x00006938 cmp r5, r6 |
| if (r5 == r6) {
0x0000693a beq 0x695c | goto label_0;
| }
0x0000693c add.w r4, r5, 8 | r4 = r5 + 8;
| do {
0x00006940 ldr r0, [r4, -0x8] | r0 = *((r4 - 0x8));
0x00006944 cmp r4, r0 |
0x00006946 add.w r4, r4, 0x1c | r4 += 0x1c;
| if (r4 != r0) {
0x0000694a beq 0x6954 |
0x0000694c ldr r1, [r5, 8] | r1 = *((r5 + 8));
0x0000694e adds r1, 1 | r1++;
0x00006950 blx 0x268c | sym ();
| }
0x00006954 adds r5, 0x1c | r5 += 0x1c;
0x00006956 cmp r6, r5 |
0x00006958 bne 0x6940 |
| } while (r6 != r5);
0x0000695a ldr r6, [r7] | r6 = *(r7);
| if (r6 != 0) {
| label_0:
0x0000695c cbz r6, 0x6968 |
0x0000695e ldr r1, [r7, 8] | r1 = *((r7 + 8));
0x00006960 mov r0, r6 | r0 = r6;
0x00006962 subs r1, r1, r6 | r1 -= r6;
0x00006964 blx 0x268c | sym ();
| }
0x00006968 mov r0, r7 | r0 = r7;
0x0000696a pop {r3, r4, r5, r6, r7, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/feature-flag-service @ 0x6cf8 */
| #include <stdint.h>
|
; (fcn) fcn.00006cf8 () | void fcn_00006cf8 (int16_t arg1) {
| r0 = arg1;
0x00006cf8 invalid |
0x00006cfc mov r8, r0 | r8 = r0;
0x00006cfe ldrd r6, r7, [r0] | __asm ("ldrd r6, r7, [r0]");
0x00006d02 cmp r6, r7 |
| if (r6 == r7) {
0x00006d04 beq 0x6dac | goto label_1;
| }
| label_0:
0x00006d06 ldrd r5, sb, [r6, 0x40] | __asm ("ldrd r5, sb, [r6, 0x40]");
0x00006d0a cmp r5, sb |
| if (r5 == sb) {
0x00006d0c beq 0x6d30 | goto label_2;
| }
0x00006d0e add.w r4, r5, 8 | r4 = r5 + 8;
| do {
0x00006d12 ldr r0, [r4, -0x8] | r0 = *((r4 - 0x8));
0x00006d16 cmp r4, r0 |
0x00006d18 add.w r4, r4, 0x18 | r4 += 0x18;
| if (r4 != r0) {
0x00006d1c beq 0x6d26 |
0x00006d1e ldr r1, [r5, 8] | r1 = *((r5 + 8));
0x00006d20 adds r1, 1 | r1++;
0x00006d22 blx 0x268c | sym ();
| }
0x00006d26 adds r5, 0x18 | r5 += 0x18;
0x00006d28 cmp sb, r5 |
0x00006d2a bne 0x6d12 |
| } while (sb != r5);
0x00006d2c ldr.w sb, [r6, 0x40] | sb = *((r6 + 0x40));
| label_2:
0x00006d30 cmp.w sb, 0 |
| if (sb != 0) {
0x00006d34 beq 0x6d42 |
0x00006d36 ldr r1, [r6, 0x48] | r1 = *((r6 + 0x48));
0x00006d38 mov r0, sb | r0 = sb;
0x00006d3a sub.w r1, r1, sb | r1 -= sb;
0x00006d3e blx 0x268c | sym ();
| }
0x00006d42 ldrd r5, sb, [r6, 0x34] | __asm ("ldrd r5, sb, [r6, 0x34]");
0x00006d46 cmp r5, sb |
| if (r5 == sb) {
0x00006d48 beq 0x6d6c | goto label_3;
| }
0x00006d4a add.w r4, r5, 8 | r4 = r5 + 8;
| do {
0x00006d4e ldr r0, [r4, -0x8] | r0 = *((r4 - 0x8));
0x00006d52 cmp r0, r4 |
0x00006d54 add.w r4, r4, 0x18 | r4 += 0x18;
0x00006d56 lsls r0, r3, 0x10 | r0 = r3 << 0x10;
| if (r0 != r3) {
0x00006d58 beq 0x6d62 |
0x00006d5a ldr r1, [r5, 8] | r1 = *((r5 + 8));
0x00006d5c adds r1, 1 | r1++;
0x00006d5e blx 0x268c | sym ();
| }
0x00006d62 adds r5, 0x18 | r5 += 0x18;
0x00006d64 cmp sb, r5 |
0x00006d66 bne 0x6d4e |
| } while (sb != r5);
0x00006d68 ldr.w sb, [r6, 0x34] | sb = *((r6 + 0x34));
| label_3:
0x00006d6c cmp.w sb, 0 |
| if (sb != 0) {
0x00006d70 beq 0x6d7e |
0x00006d72 ldr r1, [r6, 0x3c] | r1 = *((r6 + 0x3c));
0x00006d74 mov r0, sb | r0 = sb;
0x00006d76 sub.w r1, r1, sb | r1 -= sb;
0x00006d7a blx 0x268c | sym ();
| }
0x00006d7e ldr r0, [r6, 0x18] | r0 = *((r6 + 0x18));
0x00006d80 add.w r3, r6, 0x20 | r3 = r6 + 0x20;
0x00006d84 cmp r0, r3 |
| if (r0 != r3) {
0x00006d86 beq 0x6d90 |
0x00006d88 ldr r1, [r6, 0x20] | r1 = *((r6 + 0x20));
0x00006d8a adds r1, 1 | r1++;
0x00006d8c blx 0x268c | sym ();
| }
0x00006d90 mov r3, r6 | r3 = r6;
0x00006d92 ldr r0, [r3], 8 | r0 = *(r3);
| r3 += 8;
0x00006d96 cmp r0, r3 |
| if (r0 != r3) {
0x00006d98 beq 0x6da2 |
0x00006d9a ldr r1, [r6, 8] | r1 = *((r6 + 8));
0x00006d9c adds r1, 1 | r1++;
0x00006d9e blx 0x268c | sym ();
| }
0x00006da2 adds r6, 0x4c | r6 += 0x4c;
0x00006da4 cmp r7, r6 |
| if (r7 != r6) {
0x00006da6 bne 0x6d06 | goto label_0;
| }
0x00006da8 ldr.w r7, [r8] | r7 = *(r8);
| if (r7 != 0) {
| label_1:
0x00006dac cbz r7, 0x6dba |
0x00006dae ldr.w r1, [r8, 8] | r1 = *((r8 + 8));
0x00006db2 mov r0, r7 | r0 = r7;
0x00006db4 subs r1, r1, r7 | r1 -= r7;
0x00006db6 blx 0x268c | sym ();
| }
0x00006dba mov r0, r8 | r0 = r8;
0x00006dbc pop.w {r3, r4, r5, r6, r7, r8, sb, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/feature-flag-service @ 0x6dc0 */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) fcn.00006dc0 () | void fcn_00006dc0 (int16_t arg_0h, int16_t arg_4h, int16_t arg_8h, int16_t arg1, int16_t arg2, int16_t arg3) {
| int16_t var_0h;
| int16_t var_4h;
| int16_t var_8h;
| int16_t var_ch;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x00006dc0 svcmi 0xf0e92d | __asm ("svcmi 0xf0e92d");
0x00006dc4 mov r8, r0 | r8 = r0;
0x00006dc6 ldrd r7, r4, [r0] | __asm ("ldrd r7, r4, [r0]");
0x00006dca sub sp, 0x14 |
0x00006dcc mov fp, r2 |
0x00006dce movw r2, 0x5555 |
0x00006dd2 ldr r0, [pc, 0x254] |
0x00006dd4 movt r2, 0x555 | r2 = 0x5555555;
0x00006dd8 ldr r3, [pc, 0x250] | r3 = *(0x702c);
0x00006dda subs r5, r4, r7 | r5 = r4 - r7;
0x00006ddc asrs r5, r5, 3 | r5 >>= 3;
0x00006dde add r0, pc | r0 = 0xde0c;
0x00006de0 ldr r3, [r0, r3] |
0x00006de2 ldr r3, [r3] | r3 = *(0xde0c);
0x00006de4 str r3, [sp, 0xc] | var_ch = r3;
0x00006de6 mov.w r3, 0 | r3 = 0;
0x00006dea movw r3, 0xaaab |
| /* if there is a right shift of 1, then it's a division by 1/3 */
0x00006dee movt r3, 0xaaaa | r3 = 0xaaaaaaab;
0x00006df2 mul r5, r3, r5 | r5 = r3 * r5;
0x00006df6 cmp r5, r2 |
| if (r5 == r2) {
0x00006df8 beq.w 0x6ff4 | goto label_6;
| }
0x00006dfc cmp r7, r4 |
0x00006dfe ite ne |
| if (r7 == r4) {
0x00006e00 movne r3, r5 | r3 = r5;
| }
| if (r7 != r4) {
0x00006e02 moveq r3, 1 | r3 = 1;
| }
0x00006e04 mov r6, r1 | r6 = r1;
0x00006e06 adds r5, r5, r3 | r5 += r3;
0x00006e08 sub.w r3, r1, r7 | r3 = r1 - r7;
| if (r5 >= r5) {
0x00006e0c bhs.w 0x6fa6 | goto label_7;
| }
0x00006e10 mov sb, r5 | sb = r5;
0x00006e12 cmp r5, 0 |
| if (r5 != 0) {
0x00006e14 bne.w 0x6fe2 | goto label_8;
| }
0x00006e16 strh r5, [r4, 6] | *((r4 + 6)) = r5;
| label_4:
0x00006e18 ldrd r2, sl, [fp] | __asm ("ldrd r2, sl, [fp]");
0x00006e1c add.w fp, sb, r3 |
0x00006e20 add.w r0, fp, 8 | r0 += arg_8h;
0x00006e24 str.w r0, [sb, r3] | __asm ("str.w r0, [sb, r3]");
0x00006e28 cmp.w sl, 0xf |
0x00006e2c str r2, [sp] | *(sp) = r2;
0x00006e2e str.w sl, [sp, 8] | __asm ("str.w sl, [var_8h]");
| if (sl > 0xf) {
0x00006e32 bhi.w 0x6fbc | goto label_9;
| }
0x00006e36 cmp.w sl, 1 |
| if (sl == 1) {
0x00006e3a beq 0x6e9e | goto label_10;
| }
0x00006e3c cmp.w sl, 0 |
| if (sl != 0) {
0x00006e40 bne.w 0x6fd0 | goto label_11;
| }
| label_5:
0x00006e44 cmp r6, r7 |
0x00006e46 mov.w r3, 0 | r3 = 0;
0x00006e4a str.w sl, [fp, 4] | __asm ("str.w sl, [arg_4h]");
0x00006e4e strb.w r3, [r0, sl] | *((r0 + sl)) = r3;
| if (r6 == r7) {
0x00006e52 beq 0x6eb6 | goto label_12;
| }
| label_1:
0x00006e54 add.w r3, sb, 8 | r3 = sb + 8;
0x00006e58 add.w fp, r7, 8 |
0x00006e5c mov sl, r7 | sl = r7;
0x00006e5e b 0x6e7e |
| while (r0 != fp) {
0x00006e60 ldr.w r2, [sl, 8] | r2 = *((sl + 8));
0x00006e64 str r0, [r3, -0x8] | *((r3 - 0x8)) = r0;
0x00006e68 str r2, [r3] | *(r3) = r2;
| label_0:
0x00006e6a add.w sl, sl, 0x18 | sl += 0x18;
0x00006e6e str r1, [r3, -0x4] | *((r3 - 0x4)) = r1;
0x00006e70 adds r4, r0, 0 | r4 = r0 + 0;
0x00006e72 cmp r6, sl |
0x00006e74 add.w fp, fp, 0x18 |
0x00006e78 add.w r3, r3, 0x18 | r3 += 0x18;
| if (r6 == sl) {
0x00006e7c beq 0x6efc | goto label_13;
| }
0x00006e7e str r3, [r3, -0x8] | *((r3 - 0x8)) = r3;
0x00006e82 ldrd r0, r1, [sl] | __asm ("ldrd r0, r1, [sl]");
0x00006e86 cmp r0, fp |
0x00006e88 bne 0x6e60 |
| }
0x00006e8a adds r2, r1, 1 | r2 = r1 + 1;
| if (r2 == r1) {
0x00006e8c beq 0x6e6a | goto label_0;
| }
0x00006e8e mov r1, fp | r1 = fp;
0x00006e90 mov r0, r3 | r0 = r3;
0x00006e92 blx 0x2910 | fcn_00002910 ();
0x00006e96 ldr.w r1, [sl, 4] | r1 = *((sl + 4));
0x00006e9a mov r3, r0 | r3 = r0;
0x00006e9c b 0x6e6a | goto label_0;
| label_10:
0x00006e9e ldr r3, [sp] | r3 = *(sp);
0x00006ea0 cmp r6, r7 |
0x00006ea2 ldrb r3, [r3] | r3 = *(r3);
0x00006ea4 str.w sl, [fp, 4] | __asm ("str.w sl, [arg_4h]");
0x00006ea8 strb.w r3, [fp, 8] | *(arg_8h) = r3;
0x00006eac mov.w r3, 0 | r3 = 0;
0x00006eb0 strb.w r3, [r0, sl] | *((r0 + sl)) = r3;
| if (r6 != r7) {
0x00006eb4 bne 0x6e54 | goto label_1;
| }
| label_12:
0x00006eb6 cmp r6, r4 |
0x00006eb8 mov r3, sb | r3 = sb;
0x00006eba add.w r2, r3, 0x18 | r2 = r3 + 0x18;
| if (r6 != r4) {
0x00006ebe bne 0x6f28 | goto label_14;
| }
| do {
| if (r7 != 0) {
| label_3:
0x00006ec0 cbz r7, 0x6ed2 |
0x00006ec2 ldr.w r1, [r8, 8] | r1 = *((r8 + 8));
0x00006ec6 mov r0, r7 | r0 = r7;
0x00006ec8 str r2, [sp] | *(sp) = r2;
0x00006eca subs r1, r1, r7 | r1 -= r7;
0x00006ecc blx 0x268c | sym ();
0x00006ed0 ldr r2, [sp] | r2 = *(sp);
| }
0x00006ed2 strd sb, r2, [r8] | __asm ("strd sb, r2, [r8]");
0x00006ed6 add.w r5, r5, r5, lsl 1 | r5 += (r5 << 1);
0x00006eda ldr r2, [pc, 0x154] |
0x00006edc ldr r3, [pc, 0x14c] | r3 = *(0x702c);
0x00006ede add.w r5, sb, r5, lsl 3 | r5 = sb + (r5 << 3);
0x00006ee2 add r2, pc | r2 = 0xdf18;
0x00006ee4 str.w r5, [r8, 8] | __asm ("str.w r5, [r8, 8]");
0x00006ee8 ldr r3, [r2, r3] | r3 = *(0xdf18);
0x00006eea ldr r2, [r3] | r2 = *(0xdf18);
0x00006eec ldr r3, [sp, 0xc] | r3 = var_ch;
0x00006eee eors r2, r3 | r2 ^= r3;
0x00006ef0 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00006ef4 bne 0x6ff0 | goto label_15;
| }
0x00006ef6 add sp, 0x14 |
0x00006ef8 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_13:
0x00006efc sub.w r3, r6, 0x18 | r3 = r6 - 0x18;
0x00006f00 movw r2, 0xaaab |
0x00006f04 subs r3, r3, r7 | r3 -= r7;
0x00006f06 movt r2, 0xaaa | r2 = 0xaaaaaab;
0x00006f0a lsrs r3, r3, 3 | r3 >>= 3;
0x00006f0c cmp r6, r4 |
0x00006f0e mul r3, r2, r3 | r3 = r2 * r3;
0x00006f12 bic r3, r3, 0xe0000000 | r3 = BIT_MASK (r3, 0xe0000000);
0x00006f16 add.w r3, r3, 1 | r3++;
0x00006f1a add.w r3, r3, r3, lsl 1 | r3 += (r3 << 1);
0x00006f1e add.w r3, sb, r3, lsl 3 | r3 = sb + (r3 << 3);
0x00006f22 add.w r2, r3, 0x18 | r2 = r3 + 0x18;
0x00006f26 beq 0x6ec0 |
| } while (r6 == r4);
| label_14:
0x00006f28 add.w fp, r6, 8 |
0x00006f2c strd sb, r5, [sp] | __asm ("strd sb, r5, [sp]");
0x00006f30 adds r3, 0x20 | r3 += 0x20;
0x00006f32 mov r5, fp | r5 = fp;
0x00006f34 mov sl, r6 | sl = r6;
0x00006f36 mov sb, r2 | sb = r2;
0x00006f38 mov fp, r4 |
0x00006f3a b 0x6f5a |
| while (r2 != r5) {
0x00006f3c str r2, [r3, -0x8] | *((r3 - 0x8)) = r2;
0x00006f40 ldr.w r2, [sl, 8] | r2 = *((sl + 8));
0x00006f44 str r2, [r3] | *(r3) = r2;
| label_2:
0x00006f46 add.w sl, sl, 0x18 | sl += 0x18;
0x00006f4a str r4, [r3, -0x4] | *((r3 - 0x4)) = r4;
0x00006f4e cmp fp, sl |
0x00006f50 add.w r5, r5, 0x18 | r5 += 0x18;
0x00006f54 add.w r3, r3, 0x18 | r3 += 0x18;
| if (fp == sl) {
0x00006f58 beq 0x6f7a | goto label_16;
| }
0x00006f5a ldr.w r2, [sl] | r2 = *(sl);
0x00006f5e ldr.w r4, [sl, 4] | r4 = *((sl + 4));
0x00006f62 str r3, [r3, -0x8] | *((r3 - 0x8)) = r3;
0x00006f66 cmp r2, r5 |
0x00006f68 bne 0x6f3c |
| }
0x00006f6a adds r2, r4, 1 | r2 = r4 + 1;
| if (r2 == r4) {
0x00006f6c beq 0x6f46 | goto label_2;
| }
0x00006f6e mov r0, r3 | r0 = r3;
0x00006f70 mov r1, r5 | r1 = r5;
0x00006f72 blx 0x2910 | r0 = fcn_00002910 ();
0x00006f76 mov r3, r0 | r3 = r0;
0x00006f78 b 0x6f46 | goto label_2;
| label_16:
0x00006f7a mov r4, fp | r4 = fp;
0x00006f7c movw r1, 0xaaab |
0x00006f80 subs r3, r4, r6 | r3 = r4 - r6;
0x00006f82 movt r1, 0xaaa | r1 = 0xaaaaaab;
0x00006f86 subs r3, 0x18 | r3 -= 0x18;
0x00006f88 mov r2, sb | r2 = sb;
0x00006f8a lsrs r3, r3, 3 | r3 >>= 3;
0x00006f8c ldr r5, [sp, 4] | r5 = var_4h;
0x00006f8e ldr.w sb, [sp] | sb = *(sp);
0x00006f92 mul r3, r1, r3 | r3 = r1 * r3;
0x00006f96 bic r3, r3, 0xe0000000 | r3 = BIT_MASK (r3, 0xe0000000);
0x00006f9a adds r3, 1 | r3++;
0x00006f9c add.w r3, r3, r3, lsl 1 | r3 += (r3 << 1);
0x00006fa0 add.w r2, r2, r3, lsl 3 | r2 += (r3 << 3);
0x00006fa4 b 0x6ec0 | goto label_3;
| label_7:
0x00006fa6 movw r0, 0xfff8 |
0x00006faa mov r5, r2 | r5 = r2;
0x00006fac movt r0, 0x7fff | r0 = 0x7ffffff8;
| do {
0x00006fb0 str r3, [sp] | *(sp) = r3;
0x00006fb2 blx 0x2500 | sym ();
0x00006fb4 invalid |
0x00006fb6 ldr r3, [sp] | r3 = *(sp);
0x00006fb8 mov sb, r0 | sb = r0;
0x00006fba b 0x6e18 | goto label_4;
| label_9:
0x00006fbc movs r2, 0 | r2 = 0;
0x00006fbe add r1, sp, 8 | r1 += var_8h;
0x00006fc0 mov r0, fp | r0 = fp;
0x00006fc2 blx 0x297c | fcn_0000297c ();
0x00006fc6 ldr r3, [sp, 8] | r3 = var_8h;
0x00006fc8 str.w r0, [fp] | __asm ("str.w r0, [fp]");
0x00006fcc str.w r3, [fp, 8] | __asm ("str.w r3, [arg_8h]");
| label_11:
0x00006fd0 mov r2, sl | r2 = sl;
0x00006fd2 ldr r1, [sp] | r1 = *(sp);
0x00006fd4 blx 0x2910 | fcn_00002910 ();
0x00006fd8 ldr.w sl, [sp, 8] | sl = var_8h;
0x00006fdc ldr.w r0, [fp] | r0 = *(fp);
0x00006fe0 b 0x6e44 | goto label_5;
| label_8:
0x00006fe2 cmp r5, r2 |
0x00006fe4 it hs |
| if (r5 < r2) {
0x00006fe6 movhs r5, r2 | r5 = r2;
| }
0x00006fe8 add.w r0, r5, r5, lsl 1 | r0 = r5 + (r5 << 1);
0x00006fec lsls r0, r0, 3 | r0 <<= 3;
0x00006fee b 0x6fb0 |
| } while (1);
| label_15:
0x00006ff0 blx 0x27d4 | fcn_000027d4 ();
| label_6:
0x00006ff4 ldr r0, [pc, 0x3c] |
0x00006ff6 add r0, pc | r0 = 0xe02e;
0x00006ff8 blx 0x2610 | fcn_00002610 ();
0x00006ffc blx 0x25a4 | fcn_000025a4 ();
0x00007000 cmp.w sb, 0 |
| if (sb == 0) {
0x00007004 bne 0x7010 |
0x00007006 mov r0, fp | r0 = fp;
0x00007008 blx 0x2838 | fcn_00002838 ();
0x0000700c blx 0x2904 | fcn_00002904 ();
| }
0x00007010 movs r1, 0x18 | r1 = 0x18;
0x00007012 mov r0, sb | r0 = sb;
0x00007014 mul r1, r5, r1 | r1 = r5 * r1;
0x00007016 bl 0x509010 | void (*0x509010)(uint32_t, uint32_t) (r0, r1);
0x0000701a invalid |
| }
r2dec has crashed (info: /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/feature-flag-service @ 0x7180).
Please report the bug at https://github.com/radareorg/r2dec-js/issues
Use the option '--issue' or the command 'pddi' to generate
the needed data for the issue.
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/feature-flag-service @ 0x76a0 */
| #include <stdint.h>
|
; (fcn) fcn.000076a0 () | void fcn_000076a0 (int16_t arg1, int16_t arg2) {
| r0 = arg1;
| r1 = arg2;
0x000076a0 invalid |
0x000076a4 mov r6, r1 | r6 = r1;
0x000076a6 adds r0, 8 | r0 += 8;
0x000076a8 mov r4, r1 | r4 = r1;
0x000076aa str r0, [r5] | *(r5) = r0;
0x000076ac ldr r3, [r6], 8 | r3 = *(r6);
| r6 += 8;
0x000076b0 ldr r2, [r1, 4] | r2 = *((r1 + 4));
0x000076b2 cmp r3, r6 |
| if (r3 == r6) {
0x000076b4 beq 0x76c8 | goto label_0;
| }
0x000076b6 str r3, [r5] | *(r5) = r3;
0x000076b8 ldr r3, [r1, 8] | r3 = *((r1 + 8));
0x000076ba str r3, [r5, 8] | *((r5 + 8)) = r3;
| do {
0x000076bc movs r3, 0 | r3 = 0;
0x000076be str r2, [r5, 4] | *((r5 + 4)) = r2;
0x000076c0 strd r6, r3, [r4] | __asm ("strd r6, r3, [r4]");
0x000076c4 strb r3, [r4, 8] | *((r4 + 8)) = r3;
0x000076c6 pop {r4, r5, r6, pc} |
| label_0:
0x000076c8 adds r2, 1 | r2++;
0x000076ca it eq |
| if (r2 != 1) {
0x000076cc moveq r2, -1 | r2 = -1;
| }
0x000076d0 beq 0x76bc |
| } while (r2 == 1);
0x000076d2 mov r1, r6 | r1 = r6;
0x000076d4 blx 0x2910 | fcn_00002910 ();
0x000076d8 ldr r2, [r4, 4] | r2 = *((r4 + 4));
0x000076da movs r3, 0 | r3 = 0;
0x000076dc strd r6, r3, [r4] | __asm ("strd r6, r3, [r4]");
0x000076e0 str r2, [r5, 4] | *((r5 + 4)) = r2;
0x000076e2 strb r3, [r4, 8] | *((r4 + 8)) = r3;
0x000076e4 pop {r4, r5, r6, pc} |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/feature-flag-service @ 0x8860 */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) fcn.00008860 () | void fcn_00008860 (int16_t arg1, int16_t arg2, int16_t arg3) {
| int16_t var_4ch;
| int16_t var_48h;
| int16_t var_44h;
| int16_t var_2ch;
| int16_t var_1ch;
| int16_t var_18h;
| int16_t var_14h;
| int16_t var_bp_10h;
| int16_t var_bp_ch;
| int16_t var_bp_8h;
| int16_t var_0h;
| int16_t var_4h;
| int16_t var_8h;
| int16_t var_ch;
| int16_t var_10h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x00008860 svcmi 0xf0e92d | __asm ("svcmi 0xf0e92d");
0x00008864 mov r7, r2 | r7 = r2;
0x00008866 ldrd r5, r6, [r0] | __asm ("ldrd r5, r6, [r0]");
0x0000886a movw r2, 0xca1b |
0x0000886c movs r2, 0x1b |
0x0000886e movt r2, 0x286b |
0x00008872 vpush {d8} | __asm ("vpush {d8}");
0x00008874 ldrh r2, [r0, 0x18] | r2 = *((r0 + 0x18));
0x00008876 sub sp, 0x1c |
0x00008878 subs r3, r6, r5 | r3 = r6 - r5;
0x0000887a str r0, [sp, 8] | var_8h = r0;
0x0000887c asrs r3, r3, 2 | r3 >>= 2;
0x0000887e mul r3, r2, r3 | r3 = r2 * r3;
0x00008880 bl 0x70c508 | void (*0x70c508)(uint32_t, uint32_t) (r2, r3);
0x00008884 lsls r3, r5, 9 | r3 = r5 << 9;
0x00008886 movt r2, 0x1af | r2 = 0x29efca1b;
0x0000888a cmp r3, r2 |
| if (r3 == r2) {
0x0000888c beq.w 0x8b52 | goto label_6;
| }
0x00008890 mov sb, r1 | sb = r1;
0x00008892 cmp r5, r6 |
0x00008894 ite ne |
| if (r5 == r6) {
0x00008896 movne r1, r3 | r1 = r3;
| }
| if (r5 != r6) {
0x00008898 moveq r1, 1 | r1 = 1;
| }
0x0000889a adds r3, r3, r1 | r3 += r1;
0x0000889c sub.w r4, sb, r5 | r4 = sb - r5;
| if (r3 >= r3) {
0x000088a0 bhs.w 0x8b1e | goto label_7;
| }
0x000088a4 cmp r3, 0 |
| if (r3 != 0) {
0x000088a6 bne.w 0x8b44 | goto label_8;
| }
0x000088aa mov r1, r7 | r1 = r7;
0x000088ac mov r0, r4 | r0 = r4;
0x000088ae bl 0x6aac | fcn_00006aac (r0, r1);
0x000088b2 mov.w sl, 0x4c | sl = 0x4c;
0x000088b6 movs r3, 0 | r3 = 0;
0x000088b8 str r3, [sp, 0xc] | var_ch = r3;
0x000088ba str r3, [sp, 4] | var_4h = r3;
| label_5:
0x000088bc cmp sb, r5 |
| if (sb == r5) {
0x000088be beq.w 0x8a26 | goto label_9;
| }
0x000088c2 ldr r3, [sp, 4] | r3 = var_4h;
0x000088c4 add.w r7, r5, 8 | r7 = r5 + 8;
0x000088c8 vmov.i32 d8, 0 | __asm ("vmov.i32 d8, 0");
0x000088cc add.w r4, r5, 0x20 | r4 = r5 + 0x20;
0x000088d0 strd r5, r6, [sp, 0x10] | __asm ("strd r5, r6, [var_2ch]");
0x000088d4 mov.w r8, 0 | r8 = 0;
0x000088d8 add.w fp, r3, 0x4c |
0x000088dc mov r6, r7 | r6 = r7;
| label_0:
0x000088de sub.w r0, fp, 0x44 | r0 = fp - 0x44;
0x000088e2 str.w fp, [sp] | __asm ("str.w fp, [sp]");
0x000088e6 str r0, [fp, -0x4c] | var_4ch = r0;
0x000088ea ldr r2, [r4, -0x20] | r2 = *((r4 - 0x20));
0x000088ee cmp r2, r6 |
| if (r2 == r6) {
0x000088f0 beq.w 0x8a00 | goto label_10;
| }
0x000088f4 str r2, [fp, -0x4c] | var_4ch = r2;
0x000088f8 ldr r2, [r4, -0x18] | r2 = *((r4 - 0x18));
0x000088fc str r2, [fp, -0x44] | var_44h = r2;
0x00008900 ldr r2, [r4, -0x1c] | r2 = *((r4 - 0x1c));
| label_2:
0x00008904 sub.w r0, fp, 0x2c | r0 = fp - 0x2c;
0x00008908 str r2, [fp, -0x48] | var_48h = r2;
0x0000890c strd r6, r8, [r4, -0x20] | __asm ("strd r6, r8, [r4, -0x20]");
0x00008910 strb r8, [r4, -0x18] | *((r4 - 0x18)) = r8;
0x00008914 str r0, [fp, -0x34] | var_ch = r0;
0x00008916 lsrs r4, r6, 0x10 | r4 = r6 >> 0x10;
0x00008918 ldr r2, [r4, -0x8] | r2 = *((r4 - 0x8));
0x0000891c cmp r2, r4 |
| if (r2 == r4) {
0x0000891e beq 0x89e6 | goto label_11;
| }
0x00008920 str r2, [fp, -0x34] | var_ch = r2;
0x00008924 ldr r2, [r4] | r2 = *(r4);
0x00008926 str r2, [fp, -0x2c] | var_2ch = r2;
0x0000892a ldr r2, [r4, -0x4] | r2 = *((r4 - 0x4));
| label_1:
0x0000892e str r2, [fp, -0x30] | var_10h = r2;
0x00008932 ldrh r2, [r4, 0x10] | r2 = *((r4 + 0x10));
0x00008934 strb.w r8, [r4] | *(r4) = r8;
0x00008938 strd r4, r8, [r4, -0x8] | __asm ("strd r4, r8, [r4, -0x8]");
0x0000893c strh r2, [fp, -0x1c] | var_1ch = r2;
0x00008940 ldr r2, [r4, 0x14] | r2 = *((r4 + 0x14));
0x00008942 str r2, [fp, -0x18] | var_18h = r2;
0x00008946 ldr r2, [r4, 0x18] | r2 = *((r4 + 0x18));
0x00008948 str r2, [fp, -0x14] | var_14h = r2;
0x0000894c ldr r2, [r4, 0x1c] | r2 = *((r4 + 0x1c));
0x0000894e str.w r8, [r4, 0x1c] | __asm ("str.w r8, [r4, 0x1c]");
0x00008952 str r2, [fp, -0x10] | var_bp_10h = r2;
0x00008956 add.w r2, r4, 0x14 | r2 = r4 + 0x14;
0x0000895a vst1.32 {d8}, [r2] | __asm ("vst1.32 {d8}, [r2]");
0x0000895e ldr r2, [r4, 0x20] | r2 = *((r4 + 0x20));
0x00008960 str r2, [fp, -0xc] | var_bp_ch = r2;
0x00008964 add.w r2, r4, 0x24 | r2 = r4 + 0x24;
0x00008968 vld1.32 {d16}, [r2] | __asm ("vld1.32 {d16}, [r2]");
0x0000896c sub.w r2, fp, 8 | r2 = fp - 8;
0x00008970 vst1.32 {d16}, [r2] | __asm ("vst1.32 {d16}, [r2]");
0x00008974 ldrd r7, sl, [r4, 0x14] | __asm ("ldrd r7, sl, [r4, 0x14]");
0x00008978 cmp r7, sl |
| if (r7 == sl) {
0x0000897a beq 0x899c | goto label_12;
| }
0x0000897c add.w r5, r7, 8 | r5 = r7 + 8;
| do {
0x00008980 ldr r0, [r5, -0x8] | r0 = *((r5 - 0x8));
0x00008984 cmp r5, r0 |
| if (r5 != r0) {
0x00008986 beq 0x8990 |
0x00008988 ldr r1, [r7, 8] | r1 = *((r7 + 8));
0x0000898a adds r1, 1 | r1++;
0x0000898c blx 0x268c | sym ();
| }
0x00008990 adds r7, 0x18 | r7 += 0x18;
0x00008992 adds r5, 0x18 | r5 += 0x18;
0x00008994 cmp sl, r7 |
0x00008996 bne 0x8980 |
| } while (sl != r7);
0x00008998 ldr.w sl, [r4, 0x14] | sl = *((r4 + 0x14));
| label_12:
0x0000899c cmp.w sl, 0 |
| if (sl != 0) {
0x000089a0 beq 0x89ae |
0x000089a2 ldr r1, [r4, 0x1c] | r1 = *((r4 + 0x1c));
0x000089a4 mov r0, sl | r0 = sl;
0x000089a6 sub.w r1, r1, sl | r1 -= sl;
0x000089aa blx 0x268c | sym ();
| }
0x000089ae ldr r0, [r4, -0x8] | r0 = *((r4 - 0x8));
0x000089b2 cmp r0, r4 |
| if (r0 != r4) {
0x000089b4 beq 0x89be |
0x000089b6 ldr r1, [r4] | r1 = *(r4);
0x000089b8 adds r1, 1 | r1++;
0x000089ba blx 0x268c | sym ();
| }
0x000089be ldr r0, [r4, -0x20] | r0 = *((r4 - 0x20));
0x000089c2 cmp r6, r0 |
| if (r6 != r0) {
0x000089c4 beq 0x89d0 |
0x000089c6 ldr r1, [r4, -0x18] | r1 = *((r4 - 0x18));
0x000089ca adds r1, 1 | r1++;
0x000089cc blx 0x268c | sym ();
| }
0x000089d0 add.w r2, r4, 0x4c | r2 = r4 + 0x4c;
0x000089d4 adds r4, 0x2c | r4 += 0x2c;
0x000089d6 cmp sb, r4 |
0x000089d8 add.w fp, fp, 0x4c |
0x000089dc add.w r6, r6, 0x4c | r6 += 0x4c;
| if (sb == r4) {
0x000089e0 beq 0x8a1c | goto label_13;
| }
0x000089e2 mov r4, r2 | r4 = r2;
0x000089e4 b 0x88de | goto label_0;
| label_11:
0x000089e6 ldr r2, [r4, -0x4] | r2 = *((r4 - 0x4));
0x000089ea adds r2, 1 | r2++;
0x000089ec it eq |
| if (r2 == 1) {
0x000089ee moveq r2, -1 | r2 = -1;
| goto label_14;
| }
| if (r2 == 1) {
| label_14:
0x000089f2 beq 0x892e | goto label_1;
| }
0x000089f4 mov r1, r4 | r1 = r4;
0x000089f6 blx 0x2910 | fcn_00002910 ();
0x000089fa ldr r2, [r4, -0x4] | r2 = *((r4 - 0x4));
0x000089fe b 0x892e | goto label_1;
| label_10:
0x00008a00 ldr r2, [r4, -0x1c] | r2 = *((r4 - 0x1c));
0x00008a04 adds r2, 1 | r2++;
0x00008a06 it eq |
| if (r2 == 1) {
0x00008a08 moveq r2, -1 | r2 = -1;
| goto label_15;
| }
| if (r2 == 1) {
| label_15:
0x00008a0c beq.w 0x8904 | goto label_2;
| }
0x00008a10 mov r1, r6 | r1 = r6;
0x00008a12 blx 0x2910 | fcn_00002910 ();
0x00008a16 ldr r2, [r4, -0x1c] | r2 = *((r4 - 0x1c));
0x00008a1a b 0x8904 | goto label_2;
| label_13:
0x00008a1c ldr r3, [sp] | r3 = *(sp);
0x00008a1e ldrd r5, r6, [sp, 0x10] | __asm ("ldrd r5, r6, [var_2ch]");
0x00008a22 add.w sl, r3, 0x4c | sl = r3 + 0x4c;
| label_9:
0x00008a26 cmp sb, r6 |
| if (sb == r6) {
0x00008a28 beq 0x8afa | goto label_16;
| }
0x00008a2a add.w r4, sl, 0x34 | r4 = sl + 0x34;
0x00008a2e add.w r7, sb, 0x20 | r7 = sb + 0x20;
0x00008a30 lsls r0, r4, 0x1c | r0 = r4 << 0x1c;
0x00008a32 mov r8, sb | r8 = sb;
0x00008a34 mov.w fp, 0 |
0x00008a36 lsrs r0, r0, 0xc | r0 >>= 0xc;
0x00008a38 str r5, [sp, 0x10] | var_10h = r5;
0x00008a3a b 0x8aa4 |
| while (r2 != r5) {
0x00008a3c str r2, [r4, -0x34] | *((r4 - 0x34)) = r2;
0x00008a40 ldr r2, [r7, -0x18] | r2 = *((r7 - 0x18));
0x00008a44 str r2, [r4, -0x2c] | *((r4 - 0x2c)) = r2;
| label_3:
0x00008a48 str r5, [r7, -0x20] | *((r7 - 0x20)) = r5;
0x00008a4c sub.w r0, r4, 0x14 | r0 = r4 - 0x14;
0x00008a50 ldrd r2, r5, [r7, -0x8] | __asm ("ldrd r2, r5, [r7, -0x8]");
0x00008a54 str r3, [r4, -0x30] | *((r4 - 0x30)) = r3;
0x00008a58 str fp, [r7, -0x1c] | *((r7 - 0x1c)) = fp;
0x00008a5c cmp r7, r2 |
0x00008a5e strb fp, [r7, -0x18] | *((r7 - 0x18)) = fp;
0x00008a60 pop {r3, r4} |
0x00008a62 str r0, [r4, -0x1c] | *((r4 - 0x1c)) = r0;
0x00008a64 lsrs r4, r3, 0x10 | r4 = r3 >> 0x10;
| if (r4 == r3) {
0x00008a66 beq 0x8acc | goto label_17;
| }
0x00008a68 str r2, [r4, -0x1c] | *((r4 - 0x1c)) = r2;
0x00008a6c ldr r2, [r7] | r2 = *(r7);
0x00008a6e str r2, [r4, -0x14] | *((r4 - 0x14)) = r2;
| label_4:
0x00008a72 ldrh r3, [r7, 0x10] | r3 = *((r7 + 0x10));
0x00008a74 add.w r2, r8, 0x44 | r2 = r8 + 0x44;
0x00008a78 str r5, [r4, -0x18] | *((r4 - 0x18)) = r5;
0x00008a7c adds r7, 0x4c | r7 += 0x4c;
0x00008a7e strh r3, [r4, -0x4] | *((r4 - 0x4)) = r3;
0x00008a82 add.w r3, r8, 0x34 | r3 = r8 + 0x34;
0x00008a86 add.w r8, r8, 0x4c | r8 += 0x4c;
0x00008a8a vld1.32 {d16, d17}, [r3] | __asm ("vld1.32 {d16, d17}, [r3]");
0x00008a8e mov r3, r4 | r3 = r4;
0x00008a90 cmp r6, r8 |
0x00008a92 add.w r4, r4, 0x4c | r4 += 0x4c;
0x00008a96 vst1.32 {d16, d17}, [r3]! | __asm ("vst1.32 {d16, d17}, [r3]!");
0x00008a9a vld1.32 {d16}, [r2] | __asm ("vld1.32 {d16}, [r2]");
0x00008a9e vst1.32 {d16}, [r3] | __asm ("vst1.32 {d16}, [r3]");
| if (r6 == r8) {
0x00008aa2 beq 0x8ad8 | goto label_18;
| }
0x00008aa4 ldr r2, [r7, -0x20] | r2 = *((r7 - 0x20));
0x00008aa8 add.w r5, r8, 8 | r5 = r8 + 8;
0x00008aac sub.w r0, r4, 0x2c | r0 = r4 - 0x2c;
0x00008ab0 ldr r3, [r7, -0x1c] | r3 = *((r7 - 0x1c));
0x00008ab4 str r0, [r4, -0x34] | *((r4 - 0x34)) = r0;
0x00008ab8 cmp r2, r5 |
0x00008aba bne 0x8a3c |
| }
0x00008abc adds r2, r3, 1 | r2 = r3 + 1;
| if (r2 == r3) {
0x00008abe beq 0x8a48 | goto label_3;
| }
0x00008ac0 mov r1, r5 | r1 = r5;
0x00008ac2 str r3, [sp] | *(sp) = r3;
0x00008ac4 blx 0x2910 | fcn_00002910 ();
0x00008ac8 ldr r3, [sp] | r3 = *(sp);
0x00008aca b 0x8a48 | goto label_3;
| label_17:
0x00008acc adds r2, r5, 1 | r2 = r5 + 1;
| if (r2 == r5) {
0x00008ace beq 0x8a72 | goto label_4;
| }
0x00008ad0 mov r1, r7 | r1 = r7;
0x00008ad2 blx 0x2910 | fcn_00002910 ();
0x00008ad6 b 0x8a72 | goto label_4;
| label_18:
0x00008ad8 sub.w r3, r6, sb | r3 = r6 - sb;
0x00008adc movw r2, 0xca1b |
0x00008ae0 subs r3, 0x4c | r3 -= 0x4c;
0x00008ae2 movt r2, 0x286b | r2 = 0x286bca1b;
0x00008ae6 lsrs r3, r3, 2 | r3 >>= 2;
0x00008ae8 ldr r5, [sp, 0x10] | r5 = var_10h;
0x00008aea mul r3, r2, r3 | r3 = r2 * r3;
0x00008aee movs r2, 0x4c | r2 = 0x4c;
0x00008af0 bic r3, r3, 0xc0000000 | r3 = BIT_MASK (r3, 0xc0000000);
0x00008af4 mla r2, r3, r2, r2 | __asm ("mla r2, r3, r2, r2");
0x00008af8 add sl, r2 | sl += r2;
| if (r5 != 0) {
| label_16:
0x00008afa cbz r5, 0x8b08 |
0x00008afc ldr r3, [sp, 8] | r3 = var_8h;
0x00008afe mov r0, r5 | r0 = r5;
0x00008b00 ldr r1, [r3, 8] | r1 = *((r3 + 8));
0x00008b02 subs r1, r1, r5 | r1 -= r5;
0x00008b04 blx 0x268c | sym ();
| }
0x00008b08 ldrd r2, r3, [sp, 4] | __asm ("ldrd r2, r3, [var_8h]");
0x00008b0c strd r2, sl, [r3] | __asm ("strd r2, sl, [r3]");
0x00008b10 ldr r2, [sp, 0xc] | r2 = var_ch;
0x00008b12 str r2, [r3, 8] | *((r3 + 8)) = r2;
0x00008b14 add sp, 0x1c |
0x00008b16 vpop {d8} | __asm ("vpop {d8}");
0x00008b1a pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_7:
0x00008b1e movw r8, 0xffc4 |
0x00008b22 movt r8, 0x7fff | r8 = 0x7fffffc4;
| do {
0x00008b26 mov r0, r8 | r0 = r8;
0x00008b28 blx 0x2500 | sym ();
0x00008b2c mov r1, r7 | r1 = r7;
0x00008b2e str r0, [sp, 4] | var_4h = r0;
0x00008b30 add r0, r4 | r0 += r4;
0x00008b32 bl 0x6aac | fcn_00006aac (r0, r1);
0x00008b36 ldr r3, [sp, 4] | r3 = var_4h;
0x00008b38 add.w r2, r3, r8 | r2 = r3 + r8;
0x00008b3c add.w sl, r3, 0x4c | sl = r3 + 0x4c;
0x00008b40 str r2, [sp, 0xc] | var_ch = r2;
0x00008b42 b 0x88bc | goto label_5;
| label_8:
0x00008b44 cmp r2, r3 |
0x00008b46 it hs |
| if (r2 < r3) {
0x00008b48 movhs r2, r3 | r2 = r3;
| }
0x00008b4a movs r3, 0x4c | r3 = 0x4c;
0x00008b4c mul r8, r3, r2 | r8 = r3 * r2;
0x00008b50 b 0x8b26 |
| } while (1);
| label_6:
0x00008b52 ldr r0, [pc, 0x2c] |
0x00008b54 add r0, pc | r0 = 0x116da;
0x00008b56 blx 0x2610 | fcn_00002610 ();
0x00008b5a blx 0x25a4 | fcn_000025a4 ();
0x00008b5e mov r0, r4 | r0 = r4;
0x00008b60 bl 0x6860 | r0 = fcn_00006860 (r0);
| do {
0x00008b64 blx 0x2904 | fcn_00002904 ();
0x00008b68 blx 0x25a4 | fcn_000025a4 ();
0x00008b6c ldr r0, [sp, 4] | r0 = var_4h;
0x00008b6e mov r1, r8 | r1 = r8;
0x00008b70 blx 0x268c | sym ();
0x00008b74 b 0x8b64 |
| } 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/bin/feature-flag-service @ 0x8c54 */
| #include <stdint.h>
|
; (fcn) fcn.00008c54 () | void fcn_00008c54 (int16_t arg_8h, int16_t arg1, int16_t arg2, int16_t arg3) {
| int16_t var_4h;
| int16_t var_8h;
| int16_t var_ch;
| int16_t var_10h;
| int16_t var_14h;
| int16_t var_18h;
| int16_t var_1ch;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x00008c54 push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00008c58 mov sb, r2 | sb = r2;
0x00008c5a ldr r2, [pc, 0x3a8] |
0x00008c5c sub sp, 0x24 |
0x00008c5e mov r8, r0 | r8 = r0;
0x00008c60 mov r4, r1 | r4 = r1;
0x00008c62 ldr r3, [pc, 0x3a4] | r3 = *(0x900a);
0x00008c64 add r2, pc | r2 = 0x11c6e;
0x00008c66 ldr r5, [r0] | r5 = *(r0);
0x00008c68 ldr r3, [r2, r3] |
0x00008c6a ldr r3, [r3] | r3 = *(0x11c6e);
0x00008c6c str r3, [sp, 0x1c] | var_1ch = r3;
0x00008c6e mov.w r3, 0 | r3 = 0;
0x00008c72 cmp r5, 0 |
| if (r5 == 0) {
0x00008c74 beq.w 0x8f2c | goto label_7;
| }
0x00008c78 movs r3, 0 | r3 = 0;
0x00008c7a str r3, [sp, 0x14] | var_14h = r3;
| label_5:
0x00008c7c ldr r4, [r4, 8] | r4 = *((r4 + 8));
0x00008c7e cmp r4, 0 |
| if (r4 == 0) {
0x00008c80 beq 0x8d82 | goto label_0;
| }
0x00008c82 ldr.w r6, [sb] | r6 = *(sb);
0x00008c86 cmp r6, 0 |
| if (r6 == 0) {
0x00008c88 beq.w 0x8d9e | goto label_8;
| }
0x00008c8c ldrd fp, sl, [r6, 0x5c] | __asm ("ldrd fp, sl, [r6, 0x5c]");
0x00008c90 movs r2, 0 | r2 = 0;
0x00008c92 ldr r3, [r6] | r3 = *(r6);
0x00008c94 mov r7, r6 | r7 = r6;
0x00008c96 cmp fp, sl |
0x00008c98 str.w r3, [sb] | __asm ("str.w r3, [sb]");
0x00008c9c add.w r3, r6, 0x1c | r3 = r6 + 0x1c;
0x00008ca0 str r2, [r7], 4 | *(r7) = r2;
| r7 += 4;
0x00008ca4 str r3, [sp, 4] | var_4h = r3;
| if (fp == sl) {
0x00008ca6 beq 0x8ccc | goto label_9;
| }
0x00008ca8 add.w r5, fp, 8 | r5 += arg_8h;
| do {
0x00008cac ldr r0, [r5, -0x8] | r0 = *((r5 - 0x8));
0x00008cb0 cmp r5, r0 |
| if (r5 != r0) {
0x00008cb2 beq 0x8cbe |
0x00008cb4 ldr.w r1, [fp, 8] | r1 = *(arg_8h);
0x00008cb8 adds r1, 1 | r1++;
0x00008cba blx 0x268c | sym ();
| }
0x00008cbe add.w fp, fp, 0x18 |
0x00008cc2 adds r5, 0x18 | r5 += 0x18;
0x00008cc4 cmp sl, fp |
0x00008cc6 bne 0x8cac |
| } while (sl != fp);
0x00008cc8 ldr.w sl, [r6, 0x5c] | sl = *((r6 + 0x5c));
| label_9:
0x00008ccc cmp.w sl, 0 |
| if (sl != 0) {
0x00008cd0 beq 0x8cde |
0x00008cd2 ldr r1, [r6, 0x64] | r1 = *((r6 + 0x64));
0x00008cd4 mov r0, sl | r0 = sl;
0x00008cd6 sub.w r1, r1, sl | r1 -= sl;
0x00008cda blx 0x268c | sym ();
| }
0x00008cde ldrd fp, sl, [r6, 0x50] | __asm ("ldrd fp, sl, [r6, 0x50]");
0x00008ce2 cmp fp, sl |
| if (fp == sl) {
0x00008ce4 beq 0x8d0a | goto label_10;
| }
0x00008ce6 add.w r5, fp, 8 | r5 += arg_8h;
| do {
0x00008cea ldr r0, [r5, -0x8] | r0 = *((r5 - 0x8));
0x00008cee cmp r5, r0 |
| if (r5 != r0) {
0x00008cf0 beq 0x8cfc |
0x00008cf2 ldr.w r1, [fp, 8] | r1 = *(arg_8h);
0x00008cf6 adds r1, 1 | r1++;
0x00008cf8 blx 0x268c | sym ();
| }
0x00008cfc add.w fp, fp, 0x18 |
0x00008d00 adds r5, 0x18 | r5 += 0x18;
0x00008d02 cmp sl, fp |
0x00008d04 bne 0x8cea |
| } while (sl != fp);
0x00008d06 ldr.w sl, [r6, 0x50] | sl = *((r6 + 0x50));
| label_10:
0x00008d0a cmp.w sl, 0 |
| if (sl != 0) {
0x00008d0e beq 0x8d1c |
0x00008d10 ldr r1, [r6, 0x58] | r1 = *((r6 + 0x58));
0x00008d12 mov r0, sl | r0 = sl;
0x00008d14 sub.w r1, r1, sl | r1 -= sl;
0x00008d18 blx 0x268c | sym ();
| }
0x00008d1c ldr r0, [r6, 0x34] | r0 = *((r6 + 0x34));
0x00008d1e add.w r3, r6, 0x3c | r3 = r6 + 0x3c;
0x00008d22 cmp r0, r3 |
| if (r0 != r3) {
0x00008d24 beq 0x8d2e |
0x00008d26 ldr r1, [r6, 0x3c] | r1 = *((r6 + 0x3c));
0x00008d28 adds r1, 1 | r1++;
0x00008d2a blx 0x268c | sym ();
| }
0x00008d2e ldr r0, [r6, 0x1c] | r0 = *((r6 + 0x1c));
0x00008d30 add.w r3, r6, 0x24 | r3 = r6 + 0x24;
0x00008d34 cmp r0, r3 |
| if (r0 != r3) {
0x00008d36 beq 0x8d40 |
0x00008d38 ldr r1, [r6, 0x24] | r1 = *((r6 + 0x24));
0x00008d3a adds r1, 1 | r1++;
0x00008d3c blx 0x268c | sym ();
| }
0x00008d40 ldr r0, [r6, 4] | r0 = *((r6 + 4));
0x00008d42 add.w r3, r6, 0xc | r3 = r6 + 0xc;
0x00008d46 cmp r0, r3 |
| if (r0 != r3) {
0x00008d48 beq 0x8d56 |
0x00008d4a ldr r1, [r6, 0xc] | r1 = *((r6 + 0xc));
0x00008d4c str r3, [sp, 8] | var_8h = r3;
0x00008d4e adds r1, 1 | r1++;
0x00008d50 blx 0x268c | sym ();
0x00008d54 ldr r3, [sp, 8] | r3 = var_8h;
| }
0x00008d56 str r3, [r6, 4] | *((r6 + 4)) = r3;
0x00008d58 ldrd fp, r5, [r4, 4] | __asm ("ldrd fp, r5, [r4, 4]");
0x00008d5c cmp r5, 0xf |
0x00008d5e str r5, [sp, 0x18] | var_18h = r5;
| if (r5 > 0xf) {
0x00008d60 bhi.w 0x8f64 | goto label_11;
| }
0x00008d64 cmp r5, 1 |
| if (r5 != 1) {
0x00008d66 bne.w 0x8f5c | goto label_12;
| }
0x00008d6a ldrb.w r2, [fp] | r2 = *(fp);
0x00008d6e strb r2, [r6, 0xc] | *((r6 + 0xc)) = r2;
| label_6:
0x00008d70 movs r2, 0 | r2 = 0;
0x00008d72 str r5, [r6, 8] | *((r6 + 8)) = r5;
0x00008d74 ldr r0, [sp, 4] | r0 = var_4h;
0x00008d76 add.w r1, r4, 0x1c | r1 = r4 + 0x1c;
0x00008d7a strb r2, [r3, r5] | *((r3 + r5)) = r2;
0x00008d7c bl 0x6aac | fcn_00006aac (r0, r1);
0x00008d80 b 0x8da6 |
| while (r5 == 0) {
| label_0:
0x00008d82 ldr r2, [pc, 0x288] |
0x00008d84 ldr r3, [pc, 0x280] | r3 = *(0x9008);
0x00008d86 add r2, pc | r2 = 0x11d98;
0x00008d88 ldr r3, [r2, r3] | r3 = *(0x11d98);
0x00008d8a ldr r2, [r3] | r2 = *(0x11d98);
0x00008d8c ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x00008d8e eors r2, r3 | r2 ^= r3;
0x00008d90 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00008d94 bne.w 0x8f94 | goto label_13;
| }
0x00008d98 add sp, 0x24 |
0x00008d9a pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_8:
0x00008d9e adds r0, r4, 4 | r0 = r4 + 4;
0x00008da0 bl 0x79d0 | r0 = fcn_000079d0 (r0);
0x00008da4 mov r6, r0 | r6 = r0;
0x00008da6 ldr r0, [r4, 0x68] | r0 = *((r4 + 0x68));
0x00008da8 str r0, [r6, 0x68] | *((r6 + 0x68)) = r0;
0x00008daa str.w r6, [r8, 8] | __asm ("str.w r6, [r8, 8]");
0x00008dac str r0, [r1] | *(r1) = r0;
0x00008dae ldr.w r1, [r8, 4] | r1 = *((r8 + 4));
0x00008db2 blx 0x25b0 | fcn_000025b0 ();
0x00008db4 invalid |
0x00008db8 ldr r2, [r3], 8 | r2 = *(r3);
| r3 += 8;
0x00008dbc str.w r3, [r2, r1, lsl 2] | __asm ("str.w r3, [r2, r1, lsl 2]");
0x00008dc0 ldr r5, [r4] | r5 = *(r4);
0x00008dc2 cmp r5, 0 |
0x00008dc4 beq 0x8d82 |
| }
0x00008dc6 ldr.w r4, [sb] | r4 = *(sb);
0x00008dca add r3, sp, 0x18 | r3 += var_18h;
0x00008dcc str r3, [sp, 0x10] | var_10h = r3;
0x00008dce cmp r4, 0 |
| if (r4 == 0) {
0x00008dd0 beq.w 0x8ef4 | goto label_14;
| }
| label_1:
0x00008dd4 ldr r2, [r4] | r2 = *(r4);
0x00008dd6 mov r3, r4 | r3 = r4;
0x00008dd8 ldrd fp, sl, [r4, 0x5c] | __asm ("ldrd fp, sl, [r4, 0x5c]");
0x00008ddc str.w r2, [sb] | __asm ("str.w r2, [sb]");
0x00008de0 movs r2, 0 | r2 = 0;
0x00008de2 cmp fp, sl |
0x00008de4 str r2, [r3], 4 | *(r3) = r2;
| r3 += 4;
0x00008de8 str r3, [sp, 8] | var_8h = r3;
0x00008dea add.w r3, r4, 0x1c | r3 = r4 + 0x1c;
0x00008dee str r3, [sp, 4] | var_4h = r3;
| if (fp == sl) {
0x00008df0 beq 0x8e16 | goto label_15;
| }
0x00008df2 add.w r7, fp, 8 | r7 += arg_8h;
| do {
0x00008df6 ldr r0, [r7, -0x8] | r0 = *((r7 - 0x8));
0x00008dfa cmp r7, r0 |
| if (r7 != r0) {
0x00008dfc beq 0x8e08 |
0x00008dfe ldr.w r1, [fp, 8] | r1 = *(arg_8h);
0x00008e02 adds r1, 1 | r1++;
0x00008e04 blx 0x268c | sym ();
| }
0x00008e08 add.w fp, fp, 0x18 |
0x00008e0c adds r7, 0x18 | r7 += 0x18;
0x00008e0e cmp sl, fp |
0x00008e10 bne 0x8df6 |
| } while (sl != fp);
0x00008e12 ldr.w sl, [r4, 0x5c] | sl = *((r4 + 0x5c));
| label_15:
0x00008e16 cmp.w sl, 0 |
| if (sl != 0) {
0x00008e1a beq 0x8e28 |
0x00008e1c ldr r1, [r4, 0x64] | r1 = *((r4 + 0x64));
0x00008e1e mov r0, sl | r0 = sl;
0x00008e20 sub.w r1, r1, sl | r1 -= sl;
0x00008e24 blx 0x268c | sym ();
| }
0x00008e28 ldrd fp, sl, [r4, 0x50] | __asm ("ldrd fp, sl, [r4, 0x50]");
0x00008e2c cmp fp, sl |
| if (fp == sl) {
0x00008e2e beq 0x8e54 | goto label_16;
| }
0x00008e30 add.w r7, fp, 8 | r7 += arg_8h;
| do {
0x00008e34 ldr r0, [r7, -0x8] | r0 = *((r7 - 0x8));
0x00008e38 cmp r0, r7 |
| if (r0 != r7) {
0x00008e3a beq 0x8e46 |
0x00008e3c ldr.w r1, [fp, 8] | r1 = *(arg_8h);
0x00008e40 adds r1, 1 | r1++;
0x00008e42 blx 0x268c | sym ();
| }
0x00008e46 add.w fp, fp, 0x18 |
0x00008e4a adds r7, 0x18 | r7 += 0x18;
0x00008e4c cmp sl, fp |
0x00008e4e bne 0x8e34 |
| } while (sl != fp);
0x00008e50 ldr.w sl, [r4, 0x50] | sl = *((r4 + 0x50));
| label_16:
0x00008e54 cmp.w sl, 0 |
| if (sl != 0) {
0x00008e58 beq 0x8e66 |
0x00008e5a ldr r1, [r4, 0x58] | r1 = *((r4 + 0x58));
0x00008e5c mov r0, sl | r0 = sl;
0x00008e5e sub.w r1, r1, sl | r1 -= sl;
0x00008e62 blx 0x268c | sym ();
| }
0x00008e66 ldr r0, [r4, 0x34] | r0 = *((r4 + 0x34));
0x00008e68 add.w r3, r4, 0x3c | r3 = r4 + 0x3c;
0x00008e6c cmp r0, r3 |
| if (r0 != r3) {
0x00008e6e beq 0x8e78 |
0x00008e70 ldr r1, [r4, 0x3c] | r1 = *((r4 + 0x3c));
0x00008e72 adds r1, 1 | r1++;
0x00008e74 blx 0x268c | sym ();
0x00008e76 invalid |
| }
0x00008e78 ldr r0, [r4, 0x1c] | r0 = *((r4 + 0x1c));
0x00008e7a add.w r3, r4, 0x24 | r3 = r4 + 0x24;
0x00008e7e cmp r0, r3 |
| if (r0 != r3) {
0x00008e80 beq 0x8e8a |
0x00008e82 ldr r1, [r4, 0x24] | r1 = *((r4 + 0x24));
0x00008e84 adds r1, 1 | r1++;
0x00008e86 blx 0x268c | sym ();
| }
0x00008e8a ldr r0, [r4, 4] | r0 = *((r4 + 4));
0x00008e8c add.w r3, r4, 0xc | r3 = r4 + 0xc;
0x00008e90 cmp r0, r3 |
| if (r0 != r3) {
0x00008e92 beq 0x8ea0 |
0x00008e94 ldr r1, [r4, 0xc] | r1 = *((r4 + 0xc));
0x00008e96 str r3, [sp, 0xc] | var_ch = r3;
0x00008e98 adds r1, 1 | r1++;
0x00008e9a blx 0x268c | sym ();
0x00008e9e ldr r3, [sp, 0xc] | r3 = var_ch;
| }
0x00008ea0 str r3, [r4, 4] | *((r4 + 4)) = r3;
0x00008ea2 ldrd fp, r7, [r5, 4] | __asm ("ldrd fp, r7, [r5, 4]");
0x00008ea6 cmp r7, 0xf |
0x00008ea8 str r7, [sp, 0x18] | var_18h = r7;
| if (r7 > 0xf) {
0x00008eaa bhi 0x8f0a | goto label_17;
| }
0x00008eac cmp r7, 1 |
| if (r7 != 1) {
0x00008eae bne 0x8f04 | goto label_18;
| }
0x00008eb0 ldrb.w r2, [fp] | r2 = *(fp);
0x00008eb4 strb r2, [r4, 0xc] | *((r4 + 0xc)) = r2;
| label_4:
0x00008eb6 mov.w r2, 0 | r2 = 0;
0x00008eba str r7, [r4, 8] | *((r4 + 8)) = r7;
0x00008ebc ldr r0, [sp, 4] | r0 = var_4h;
0x00008ebe add.w r1, r5, 0x1c | r1 = r5 + 0x1c;
0x00008ec2 strb r2, [r3, r7] | *((r3 + r7)) = r2;
0x00008ec4 bl 0x6aac | fcn_00006aac (r0, r1);
| label_2:
0x00008ec8 ldr r0, [r5, 0x68] | r0 = *((r5 + 0x68));
0x00008eca ldr.w r1, [r8, 4] | r1 = *((r8 + 4));
0x00008ece str r4, [r6] | *(r6) = r4;
0x00008ed0 str r0, [r4, 0x68] | *((r4 + 0x68)) = r0;
0x00008ed2 blx 0x25b0 | fcn_000025b0 ();
0x00008ed6 ldr.w r3, [r8] | r3 = *(r8);
0x00008eda ldr.w r2, [r3, r1, lsl 2] | offset_0 = r1 << 2;
| r2 = *((r3 + offset_0));
| if (r2 == 0) {
0x00008ede cbz r2, 0x8efe | goto label_19;
| }
| label_3:
0x00008ee0 ldr r5, [r5] | r5 = *(r5);
0x00008ee2 cmp r5, 0 |
| if (r5 == 0) {
0x00008ee4 beq.w 0x8d82 | goto label_0;
| }
0x00008ee6 add r7, sp, 0x134 | r7 = sp + 0x134;
0x00008ee8 mov r6, r4 | r6 = r4;
0x00008eea ldr.w r4, [sb] | r4 = *(sb);
0x00008eee cmp r4, 0 |
| if (r4 != 0) {
0x00008ef0 bne.w 0x8dd4 | goto label_1;
| }
| label_14:
0x00008ef4 adds r0, r5, 4 | r0 = r5 + 4;
0x00008ef6 bl 0x79d0 | r0 = fcn_000079d0 (r0);
0x00008efa mov r4, r0 | r4 = r0;
0x00008efc b 0x8ec8 | goto label_2;
| label_19:
0x00008efe str.w r6, [r3, r1, lsl 2] | __asm ("str.w r6, [r3, r1, lsl 2]");
0x00008f02 b 0x8ee0 | goto label_3;
| label_18:
0x00008f04 cmp r7, 0 |
| if (r7 == 0) {
0x00008f06 beq 0x8eb6 | goto label_4;
| }
0x00008f08 b 0x8f1c | goto label_20;
| label_17:
0x00008f0a ldr r1, [sp, 0x10] | r1 = var_10h;
0x00008f0c movs r2, 0 | r2 = 0;
0x00008f0e ldr r0, [sp, 8] | r0 = var_8h;
0x00008f10 blx 0x297c | fcn_0000297c ();
0x00008f14 ldr r2, [sp, 0x18] | r2 = var_18h;
0x00008f16 mov r3, r0 | r3 = r0;
0x00008f18 str r0, [r4, 4] | *((r4 + 4)) = r0;
0x00008f1a str r2, [r4, 0xc] | *((r4 + 0xc)) = r2;
| label_20:
0x00008f1c mov r2, r7 | r2 = r7;
0x00008f1e mov r0, r3 | r0 = r3;
0x00008f20 mov r1, fp | r1 = fp;
0x00008f22 blx 0x2910 | fcn_00002910 ();
0x00008f26 ldr r7, [sp, 0x18] | r7 = var_18h;
0x00008f28 ldr r3, [r4, 4] | r3 = *((r4 + 4));
0x00008f2a b 0x8eb6 | goto label_4;
| label_7:
0x00008f2c ldr r6, [r0, 4] | r6 = *((r0 + 4));
0x00008f2e cmp r6, 1 |
0x00008f30 ittt eq |
| if (r6 != 1) {
0x00008f32 moveq r3, r0 | r3 = r0;
| }
| if (r6 != 1) {
0x00008f34 streq r5, [r3, 0x18]! | *((r3 += 0x18)) = r5;
| }
| if (r6 == 1) {
0x00008f38 str r3, [sp, 0x14] | var_14h = r3;
| }
| if (r6 != 1) {
0x00008f3a beq 0x8f54 |
0x00008f3c cmp.w r6, 0x20000000 |
| if (r6 >= 0x20000000) {
0x00008f40 bhs 0x8f86 | goto label_21;
| }
0x00008f42 lsls r6, r6, 2 | r6 <<= 2;
0x00008f44 mov r0, r6 | r0 = r6;
0x00008f46 blx 0x2500 | sym ();
0x00008f4a mov r2, r6 | r2 = r6;
0x00008f4c mov r1, r5 | r1 = r5;
0x00008f4e str r0, [sp, 0x14] | var_14h = r0;
0x00008f50 blx 0x2670 | fcn_00002670 ();
| }
0x00008f54 ldr r3, [sp, 0x14] | r3 = var_14h;
0x00008f56 str.w r3, [r8] | __asm ("str.w r3, [r8]");
0x00008f5a b 0x8c7c | goto label_5;
| label_12:
0x00008f5c cmp r5, 0 |
| if (r5 == 0) {
0x00008f5e beq.w 0x8d70 | goto label_6;
| }
0x00008f62 b 0x8f76 | goto label_22;
| label_11:
0x00008f64 movs r2, 0 | r2 = 0;
0x00008f66 add r1, sp, 0x18 | r1 += var_18h;
0x00008f68 mov r0, r7 | r0 = r7;
0x00008f6a blx 0x297c | fcn_0000297c ();
0x00008f6e ldr r2, [sp, 0x18] | r2 = var_18h;
0x00008f70 mov r3, r0 | r3 = r0;
0x00008f72 str r0, [r6, 4] | *((r6 + 4)) = r0;
0x00008f74 str r2, [r6, 0xc] | *((r6 + 0xc)) = r2;
| label_22:
0x00008f76 mov r2, r5 | r2 = r5;
0x00008f78 mov r0, r3 | r0 = r3;
0x00008f7a mov r1, fp | r1 = fp;
0x00008f7c blx 0x2910 | fcn_00002910 ();
0x00008f80 ldr r5, [sp, 0x18] | r5 = var_18h;
0x00008f82 ldr r3, [r6, 4] | r3 = *((r6 + 4));
0x00008f84 b 0x8d70 | goto label_6;
| label_21:
0x00008f86 cmp.w r6, 0x40000000 |
| if (r6 > 0x40000000) {
0x00008f8a blo 0x8f90 |
0x00008f8c blx 0x2710 | sd_bus_release_name_async ();
| }
0x00008f90 blx 0x2574 | fcn_00002574 ();
| label_13:
0x00008f94 blx 0x27d4 | fcn_000027d4 ();
0x00008f98 blx 0x25a4 | fcn_000025a4 ();
0x00008f9c movs r1, 0x6c | r1 = 0x6c;
0x00008f9e mov r0, r4 | r0 = r4;
0x00008fa0 blx 0x268c | sym ();
0x00008fa4 blx 0x2904 | fcn_00002904 ();
| do {
0x00008fa8 blx 0x25a4 | fcn_000025a4 ();
0x00008fac movs r1, 0x6c | r1 = 0x6c;
0x00008fae mov r0, r6 | r0 = r6;
0x00008fb0 blx 0x268c | sym ();
0x00008fb4 blx 0x2904 | fcn_00002904 ();
0x00008fb8 blx 0x25a4 | fcn_000025a4 ();
0x00008fbc mov r0, r8 | r0 = r8;
0x00008fbe bl 0x70a0 | fcn_000070a0 (r0, r1);
0x00008fc2 ldr r3, [sp, 0x14] | r3 = var_14h;
| if (r3 != 0) {
0x00008fc4 cbz r3, 0x8fcc |
0x00008fc6 mov r0, r8 | r0 = r8;
0x00008fc8 bl 0x8848 | r0 = fcn_00008848 (r0);
| }
0x00008fcc blx 0x2904 | r0 = fcn_00002904 ();
0x00008fd0 mov r4, r0 | r4 = r0;
0x00008fd2 mov r0, r7 | r0 = r7;
0x00008fd4 blx 0x2838 | fcn_00002838 ();
0x00008fd8 mov r0, r4 | r0 = r4;
0x00008fda b 0x8fa8 |
| } 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/bin/feature-flag-service @ 0x9728 */
| #include <stdint.h>
|
; (fcn) fcn.00009728 () | void fcn_00009728 (uint32_t arg1, uint32_t arg2) {
| uint32_t var_0h_3;
| int16_t var_4h_2;
| int16_t var_8h;
| int16_t var_ch;
| int16_t var_0h;
| int16_t var_4h_3;
| int16_t var_ch_3;
| int16_t var_10h_2;
| int16_t var_14h;
| int16_t var_18h_2;
| int16_t var_1ch;
| int16_t var_20h;
| int16_t var_24h;
| int16_t var_28h_2;
| int16_t var_2ch;
| int16_t var_30h;
| int16_t var_34h;
| int16_t var_38h;
| int16_t var_3ch;
| int16_t var_40h;
| int16_t var_50h;
| int16_t var_54h;
| int16_t var_58h;
| int16_t var_68h;
| int16_t var_6ch;
| int16_t var_70h;
| int16_t var_80h;
| int16_t var_81h;
| int16_t var_84h;
| int16_t var_8ch;
| int16_t var_90h;
| int16_t var_94h;
| int16_t var_98h;
| int16_t var_9ch;
| int16_t var_0h_2;
| int16_t var_4h_4;
| int16_t var_ch_2;
| int16_t var_10h;
| int16_t var_18h;
| int16_t var_28h;
| int16_t var_30h_2;
| int16_t var_41h;
| int16_t var_44h;
| int16_t var_4ch;
| int16_t var_50h_2;
| int16_t var_54h_2;
| int16_t var_58h_2;
| int16_t var_5ch;
| r0 = arg1;
| r1 = arg2;
0x00009728 ldr r2, [pc, 0x214] |
0x0000972a cmp r1, r0 |
0x0000972c ldr r3, [pc, 0x214] | r3 = *(0x9944);
0x0000972e push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00009732 sub sp, 0x14 |
0x00009734 add r2, pc | r2 = 0x13078;
0x00009736 ldr r3, [r2, r3] |
0x00009738 ldr r3, [r3] | r3 = *(0x13078);
0x0000973a str r3, [sp, 0xc] | var_ch = r3;
0x0000973c mov.w r3, 0 | r3 = 0;
| if (r1 == r0) {
0x00009740 beq 0x97c6 | goto label_19;
| }
0x00009742 ldr r5, [r0] | r5 = *(r0);
0x00009744 mov sl, r1 | sl = r1;
0x00009746 ldr r3, [r0, 8] | r3 = *((r0 + 8));
0x00009748 mov r7, r0 | r7 = r0;
0x0000974a ldrd r4, r1, [r1] | __asm ("ldrd r4, r1, [r1]");
0x0000974e subs r3, r3, r5 | r3 -= r5;
0x00009750 sub.w r8, r1, r4 | r8 = r1 - r4;
0x00009754 cmp r3, r8 |
| if (r3 <= r8) {
0x00009756 blo.w 0x9894 | goto label_20;
| }
0x0000975a ldr.w sb, [r0, 4] | sb = *((r0 + 4));
0x0000975e sub.w r3, sb, r5 | r3 = sb - r5;
0x00009762 cmp r8, r3 |
| if (r8 > r3) {
0x00009764 bhi 0x97e2 | goto label_21;
| }
0x00009766 cmp.w r8, 0 |
| if (r8 <= 0) {
0x0000976a ble 0x97a0 | goto label_22;
| }
0x0000976c asr.w r6, r8, 3 | r6 = r8 >> 3;
0x00009770 movw r3, 0xaaab |
| /* if there is a right shift of 1, then it's a division by 1/3 */
0x00009774 movt r3, 0xaaaa | r3 = 0xaaaaaaab;
0x00009778 mul r6, r3, r6 | r6 = r3 * r6;
0x0000977c mov sb, r5 | sb = r5;
| do {
0x0000977e mov r1, r4 | r1 = r4;
0x00009780 mov r0, sb | r0 = sb;
0x00009782 adds r4, 0x18 | r4 += 0x18;
0x00009784 blx 0x261c | fcn_0000261c ();
0x00009788 subs r6, 1 | r6--;
0x0000978a add.w sb, sb, 0x18 | sb += 0x18;
0x0000978e bne 0x977e |
| } while (r6 != 1);
0x00009790 cmp.w r8, 0 |
0x00009794 ldr.w sb, [r7, 4] | sb = *((r7 + 4));
0x00009798 ite gt |
| if (r8 <= 0) {
0x0000979a movgt r3, r8 | r3 = r8;
| }
| if (r8 > 0) {
0x0000979c movle r3, 0x18 | r3 = 0x18;
| }
0x0000979e add r5, r3 | r5 += r3;
| label_22:
0x000097a0 cmp sb, r5 |
| if (sb == r5) {
0x000097a2 beq 0x97c0 | goto label_23;
| }
0x000097a4 add.w r4, r5, 8 | r4 = r5 + 8;
| do {
0x000097a8 ldr r0, [r4, -0x8] | r0 = *((r4 - 0x8));
0x000097ac cmp r4, r0 |
| if (r4 != r0) {
0x000097ae beq 0x97b8 |
0x000097b0 ldr r1, [r5, 8] | r1 = *((r5 + 8));
0x000097b2 adds r1, 1 | r1++;
0x000097b4 blx 0x268c | sym ();
| }
0x000097b8 adds r5, 0x18 | r5 += 0x18;
0x000097ba adds r4, 0x18 | r4 += 0x18;
0x000097bc cmp r5, sb |
0x000097be bne 0x97a8 |
| } while (r5 != sb);
| label_23:
0x000097c0 ldr r3, [r7] | r3 = *(r7);
0x000097c2 add r3, r8 | r3 += r8;
| label_0:
0x000097c4 str r3, [r7, 4] | *((r7 + 4)) = r3;
| label_19:
0x000097c6 ldr r2, [pc, 0x180] |
0x000097c8 ldr r3, [pc, 0x178] | r3 = *(0x9944);
0x000097ca add r2, pc | r2 = 0x13118;
0x000097cc ldr r3, [r2, r3] | r3 = *(0x13118);
0x000097ce ldr r2, [r3] | r2 = *(0x13118);
0x000097d0 ldr r3, [sp, 0xc] | r3 = var_ch;
0x000097d2 eors r2, r3 | r2 ^= r3;
0x000097d4 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x000097d8 bne.w 0x98fe | goto label_24;
| }
0x000097dc add sp, 0x14 |
0x000097de pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_21:
0x000097e2 asrs r6, r3, 3 | r6 = r3 >> 3;
0x000097e4 movw r2, 0xaaab |
0x000097e8 cmp r3, 0 |
| /* if there is a right shift of 1, then it's a division by 1/3 */
0x000097ea movt r2, 0xaaaa | r2 = 0xaaaaaaab;
0x000097ee mul r6, r2, r6 | r6 = r2 * r6;
| if (r3 <= 0) {
0x000097f2 ble 0x9812 | goto label_25;
| }
| do {
0x000097f4 mov r1, r4 | r1 = r4;
0x000097f6 mov r0, r5 | r0 = r5;
0x000097f8 adds r4, 0x18 | r4 += 0x18;
0x000097fa blx 0x261c | fcn_0000261c ();
0x000097fe subs r6, 1 | r6--;
0x00009800 add.w r5, r5, 0x18 | r5 += 0x18;
0x00009804 bne 0x97f4 |
| } while (r6 != 1);
0x00009806 ldrd r5, sb, [r7] | __asm ("ldrd r5, sb, [r7]");
0x0000980a ldrd r4, r1, [sl] | __asm ("ldrd r4, r1, [sl]");
0x0000980e sub.w r3, sb, r5 | r3 = sb - r5;
| label_25:
0x00009812 add r4, r3 | r4 += r3;
0x00009814 cmp r4, r1 |
0x00009816 it eq |
| if (r4 == r1) {
0x00009818 addeq r3, r5, r8 | r3 = r5 + r8;
| goto label_26;
| }
| if (r4 == r1) {
| label_26:
0x0000981c beq 0x97c4 | goto label_0;
| }
0x0000981e add r3, sp, 8 | r3 += var_8h;
0x00009820 add.w r5, sb, 0x18 | r5 = sb + 0x18;
0x00009824 strd r3, sb, [sp] | __asm ("strd r3, sb, [sp]");
0x00009828 mov sl, r7 | sl = r7;
0x0000982a mov sb, r1 | sb = r1;
0x0000982c b 0x9848 |
| while (r6 < 0xf) {
0x0000982e cmp r6, 1 |
| if (r6 == 1) {
0x00009830 beq 0x9882 | goto label_27;
| }
| if (r6 != 0) {
0x00009832 cbnz r6, 0x9872 | goto label_28;
| }
| label_1:
0x00009834 adds r4, 0x18 | r4 += 0x18;
0x00009836 mov.w r3, 0 | r3 = 0;
0x0000983a cmp r4, sb |
0x0000983c str r6, [r5, -0x14] | *((r5 - 0x14)) = r6;
0x00009840 add.w r5, r5, 0x18 | r5 += 0x18;
0x00009844 strb r3, [r0, r6] | *((r0 + r6)) = r3;
| if (r4 == sb) {
0x00009846 beq 0x988a | goto label_29;
| }
0x00009848 ldr r6, [r4, 4] | r6 = *((r4 + 4));
0x0000984a sub.w r0, r5, 0x10 | r0 = r5 - 0x10;
0x0000984e str r0, [r5, -0x18] | *((r5 - 0x18)) = r0;
0x00009852 sub.w fp, r5, 0x18 |
0x00009856 ldr r7, [r4] | r7 = *(r4);
0x00009858 cmp r6, 0xf |
0x0000985a str r6, [sp, 8] | var_8h = r6;
0x0000985c bls 0x982e |
| }
0x0000985e ldr r1, [sp] | r1 = *(sp);
0x00009860 movs r2, 0 | r2 = 0;
0x00009862 mov r0, fp | r0 = fp;
0x00009864 blx 0x297c | fcn_0000297c ();
0x00009868 ldr r3, [sp, 8] | r3 = var_8h;
0x0000986a str r0, [r5, -0x18] | *((r5 - 0x18)) = r0;
0x0000986e str r3, [r5, -0x10] | *((r5 - 0x10)) = r3;
| label_28:
0x00009872 mov r2, r6 | r2 = r6;
0x00009874 mov r1, r7 | r1 = r7;
0x00009876 blx 0x2910 | fcn_00002910 ();
0x00009878 strex lr, sb, [ip, 8] | __asm ("strex lr, sb, [ip, 8]");
0x0000987c ldr r0, [r5, -0x18] | r0 = *((r5 - 0x18));
0x00009880 b 0x9834 | goto label_1;
| label_27:
0x00009882 ldrb r3, [r7] | r3 = *(r7);
0x00009884 strb r3, [r5, -0x10] | *((r5 - 0x10)) = r3;
0x00009888 b 0x9834 | goto label_1;
| label_29:
0x0000988a ldr.w r3, [sl] | r3 = *(sl);
0x0000988e mov r7, sl | r7 = sl;
0x00009890 add r3, r8 | r3 += r8;
0x00009892 b 0x97c4 | goto label_0;
| label_20:
0x00009894 movw r3, 0xfff8 |
0x00009898 movt r3, 0x7fff | r3 = 0x7ffffff8;
0x0000989c cmp r8, r3 |
| if (r8 > r3) {
0x0000989e bhi 0x98fa | goto label_30;
| }
0x000098a0 mov r0, r8 | r0 = r8;
0x000098a2 str r1, [sp] | *(sp) = r1;
0x000098a4 blx 0x2500 | r0 = sym ();
0x000098a8 mov r6, r0 | r6 = r0;
0x000098aa ldr r1, [sp] | r1 = *(sp);
0x000098ac mov r0, r4 | r0 = r4;
0x000098ae mov r2, r6 | r2 = r6;
0x000098b0 bl 0xb5f0 | fcn_0000b5f0 (r0, r1, r2);
0x000098b4 ldrd r5, sb, [r7] | __asm ("ldrd r5, sb, [r7]");
0x000098b8 cmp r5, sb |
0x000098ba it ne |
| if (r5 == sb) {
0x000098bc addne r4, r5, 8 | r4 = r5 + 8;
| }
| if (r5 == sb) {
0x000098c0 beq 0x98de | goto label_31;
| }
| do {
0x000098c2 ldr r0, [r4, -0x8] | r0 = *((r4 - 0x8));
0x000098c6 cmp r4, r0 |
| if (r4 != r0) {
0x000098c8 beq 0x98d2 |
0x000098ca ldr r1, [r5, 8] | r1 = *((r5 + 8));
0x000098cc adds r1, 1 | r1++;
0x000098ce blx 0x268c | sym ();
| }
0x000098d2 adds r5, 0x18 | r5 += 0x18;
0x000098d4 adds r4, 0x18 | r4 += 0x18;
0x000098d6 cmp sb, r5 |
0x000098d8 bne 0x98c2 |
| } while (sb != r5);
0x000098da ldr.w sb, [r7] | sb = *(r7);
| label_31:
0x000098de cmp.w sb, 0 |
| if (sb != 0) {
0x000098e2 beq 0x98f0 |
0x000098e4 ldr r1, [r7, 8] | r1 = *((r7 + 8));
0x000098e6 mov r0, sb | r0 = sb;
0x000098e8 sub.w r1, r1, sb | r1 -= sb;
0x000098ec blx 0x268c | sym ();
| }
0x000098f0 add.w r3, r6, r8 | r3 = r6 + r8;
0x000098f4 str r6, [r7] | *(r7) = r6;
0x000098f6 str r3, [r7, 8] | *((r7 + 8)) = r3;
0x000098f8 b 0x97c4 | goto label_0;
| label_30:
0x000098fa blx 0x2710 | sd_bus_release_name_async ();
| label_24:
0x000098fe blx 0x27d4 | fcn_000027d4 ();
0x00009902 ldr.w sb, [sp, 4] | sb = var_4h_2;
0x00009906 blx 0x25a4 | fcn_000025a4 ();
| do {
0x0000990a cmp sb, fp |
| if (sb == fp) {
0x0000990c beq 0x992a | goto label_32;
| }
0x0000990e mov r0, sb | r0 = sb;
0x00009910 add.w sb, sb, 0x18 | sb += 0x18;
0x00009914 blx 0x2838 | fcn_00002838 ();
0x00009918 b 0x990a |
| } while (1);
| label_32:
0x0000992a blx 0x2904 | fcn_00002904 ();
0x0000992e blx 0x2940 | fcn_00002940 ();
0x00009932 blx 0x27ec | fcn_000027ec ();
0x00009936 blx 0x2940 | fcn_00002940 ();
0x0000993a blx 0x27ec | fcn_000027ec ();
0x0000993e nop |
0x00009940 ldrsb r4, [r7, r1] | r4 = *((r7 + r1));
0x00009942 movs r0, r0 |
0x00009944 lsls r4, r2, 7 | r4 = r2 << 7;
0x00009946 movs r0, r0 |
0x00009948 strb r6, [r4, r7] | *((r4 + r7)) = r6;
0x0000994a movs r0, r0 |
0x0000994c push.w {r4, r5, r6, r7, r8, sb, lr} |
0x00009950 mov r5, r1 | r5 = r1;
0x00009952 ldr r1, [pc, 0x19c] |
0x00009954 mov r4, r2 | r4 = r2;
0x00009956 sub sp, 0x64 |
0x00009958 movs r3, 0 | r3 = 0;
0x0000995a ldr r2, [pc, 0x198] | r2 = *(0x9af6);
0x0000995c add.w r8, sp, 0x28 | r8 += var_28h;
0x00009960 add r1, pc | r1 = 0x13456;
0x00009962 mov r6, r0 | r6 = r0;
0x00009964 add r7, sp, 0x18 | r7 += var_18h;
0x00009966 mov r0, r8 | r0 = r8;
0x00009968 ldr r2, [r1, r2] |
0x0000996a mov r1, r3 | r1 = r3;
0x0000996c ldr r2, [r2] | r2 = *(0x13456);
0x0000996e str r2, [sp, 0x5c] | var_5ch = r2;
0x00009970 mov.w r2, 0 | r2 = 0;
0x00009974 movs r2, 0x34 | r2 = 0x34;
0x00009976 str r3, [sp, 0xc] | var_ch_2 = r3;
0x00009978 blx 0x2670 | fcn_00002670 ();
0x0000997c str r7, [sp, 0x10] | var_10h = r7;
0x0000997e cmp r4, 0 |
| if (r4 == 0) {
0x00009980 beq.w 0x9ace | goto label_33;
| }
0x00009984 add.w sb, sp, 0x10 | sb += var_10h;
0x00009988 mov r0, r4 | r0 = r4;
0x0000998a blx 0x291c | fcn_0000291c ();
0x0000998e mov r1, r4 | r1 = r4;
0x00009990 adds r2, r4, r0 | r2 = r4 + r0;
0x00009992 mov r0, sb | r0 = sb;
0x00009994 bl 0x94b8 | fcn_000094b8 (r0, r1, r2);
0x00009998 ldr r2, [pc, 0x15c] |
0x0000999a mov r0, r8 | r0 = r8;
0x0000999c add.w r8, sp, 0x30 | r8 += var_30h_2;
0x000099a0 str.w r8, [sp, 0x28] | __asm ("str.w r8, [var_28h]");
0x000099a4 add r2, pc | r2 = 0x134a0;
0x000099a6 mov r1, r2 | r1 = r2;
0x000099a8 bl 0x94b8 | fcn_000094b8 (r0, r1, r2);
0x000099ac ldr r3, [pc, 0x14c] |
0x000099ae mov r0, r5 | r0 = r5;
0x000099b0 vmov.i32 q9, 0 | __asm ("vmov.i32 q9, 0");
0x000099b4 add r5, sp, 0xc | r5 += var_ch_2;
0x000099b6 vmov.i32 d16, 0 | __asm ("vmov.i32 d16, 0");
0x000099ba mov r1, r4 | r1 = r4;
0x000099bc add r3, pc | r3 = 0x134bc;
0x000099be ldr r2, [r3] | r2 = *(0x134bc);
0x000099c0 add r3, sp, 0x44 | r3 += var_ch_2;
0x000099c2 vst1.32 {d18, d19}, [r3] | __asm ("vst1.32 {d18, d19}, [r3]");
0x000099c6 add r3, sp, 0x54 | r3 += var_54h_2;
0x000099c8 vst1.32 {d16}, [r3] | __asm ("vst1.32 {d16}, [r3]");
0x000099cc mov r3, r5 | r3 = r5;
0x000099ce blx 0x2a3c | fcn_00002a3c ();
0x000099d2 ldr r3, [sp, 0xc] | r3 = var_ch_2;
0x000099d4 cmp r3, 0 |
| if (r3 == 0) {
0x000099d6 beq 0x9ab4 | goto label_34;
| }
0x000099d8 ldr r3, [pc, 0x124] |
0x000099da mov.w r1, 0x100 | r1 = 0x100;
0x000099de str r4, [sp, 4] | var_4h_4 = r4;
0x000099e0 movs r0, 0 | r0 = 0;
0x000099e2 ldr r2, [pc, 0x120] |
0x000099e4 add r3, pc |
0x000099e6 ldr r3, [r3] | r3 = *(0x134e8);
0x000099e8 add r2, pc | r2 = 0x134f2;
0x000099ea str r3, [sp] | *(sp) = r3;
0x000099ec ldr r3, [pc, 0x118] |
0x000099ee add r3, pc | r3 = 0x134fa;
0x000099f0 blx 0x25d4 | fcn_000025d4 ();
0x000099f4 mov r0, r5 | r0 = r5;
0x000099f6 blx 0x28e0 | fcn_000028e0 ();
0x000099fa mov r1, sb | r1 = sb;
0x000099fc mov r0, r6 | r0 = r6;
0x000099fe bl 0x6aac | fcn_00006aac (r0, r1);
0x00009a02 movs r3, 0 | r3 = 0;
0x00009a04 strb.w r3, [r6, 0x4c] | *((r6 + 0x4c)) = r3;
| label_2:
0x00009a08 ldrd r5, sb, [sp, 0x50] | __asm ("ldrd r5, sb, [var_18h]");
0x00009a0c cmp r5, sb |
| if (r5 == sb) {
0x00009a0e beq 0x9a30 | goto label_35;
| }
0x00009a10 add.w r4, r5, 8 | r4 = r5 + 8;
| do {
0x00009a14 ldr r0, [r4, -0x8] | r0 = *((r4 - 0x8));
0x00009a18 cmp r0, r4 |
| if (r0 != r4) {
0x00009a1a beq 0x9a24 |
0x00009a1c ldr r1, [r5, 8] | r1 = *((r5 + 8));
0x00009a1e adds r1, 1 | r1++;
0x00009a20 blx 0x268c | sym ();
| }
0x00009a24 adds r5, 0x18 | r5 += 0x18;
0x00009a26 adds r4, 0x18 | r4 += 0x18;
0x00009a28 cmp sb, r5 |
0x00009a2a bne 0x9a14 |
| } while (sb != r5);
0x00009a2c ldr.w sb, [sp, 0x50] | sb = var_18h;
| label_35:
0x00009a30 cmp.w sb, 0 |
| if (sb != 0) {
0x00009a34 beq 0x9a42 |
0x00009a36 ldr r1, [sp, 0x58] | r1 = var_58h_2;
0x00009a38 mov r0, sb | r0 = sb;
0x00009a3a sub.w r1, r1, sb | r1 -= sb;
0x00009a3e blx 0x268c | sym ();
| }
0x00009a42 ldrd r5, sb, [sp, 0x44] | __asm ("ldrd r5, sb, [var_ch_2]");
0x00009a46 cmp r5, sb |
| if (r5 == sb) {
0x00009a48 beq 0x9a6a | goto label_36;
| }
0x00009a4a add.w r4, r5, 8 | r4 = r5 + 8;
| do {
0x00009a4e ldr r0, [r4, -0x8] | r0 = *((r4 - 0x8));
0x00009a52 cmp r4, r0 |
| if (r4 != r0) {
0x00009a54 beq 0x9a5e |
0x00009a56 ldr r1, [r5, 8] | r1 = *((r5 + 8));
0x00009a58 adds r1, 1 | r1++;
0x00009a5a blx 0x268c | sym ();
| }
0x00009a5e adds r5, 0x18 | r5 += 0x18;
0x00009a60 adds r4, 0x18 | r4 += 0x18;
0x00009a62 cmp sb, r5 |
0x00009a64 bne 0x9a4e |
| } while (sb != r5);
0x00009a66 ldr.w sb, [sp, 0x44] | sb = var_ch_2;
| label_36:
0x00009a6a cmp.w sb, 0 |
| if (sb != 0) {
0x00009a6e beq 0x9a7c |
0x00009a70 ldr r1, [sp, 0x4c] | r1 = var_4ch;
0x00009a72 mov r0, sb | r0 = sb;
0x00009a74 sub.w r1, r1, sb | r1 -= sb;
0x00009a78 blx 0x268c | sym ();
| }
0x00009a7c ldr r0, [sp, 0x28] | r0 = var_28h;
0x00009a7e cmp r0, r8 |
| if (r0 != r8) {
0x00009a80 beq 0x9a8a |
0x00009a82 ldr r1, [sp, 0x30] | r1 = var_30h_2;
0x00009a84 adds r1, 1 | r1++;
0x00009a86 blx 0x268c | sym ();
| }
0x00009a8a ldr r0, [sp, 0x10] | r0 = var_10h;
0x00009a8c cmp r0, r7 |
| if (r0 != r7) {
0x00009a8e beq 0x9a98 |
0x00009a90 ldr r1, [sp, 0x18] | r1 = var_18h;
0x00009a92 adds r1, 1 | r1++;
0x00009a94 blx 0x268c | sym ();
| }
0x00009a98 ldr r2, [pc, 0x70] |
0x00009a9a ldr r3, [pc, 0x58] | r3 = *(0x9af6);
0x00009a9c add r2, pc | r2 = 0x135ac;
0x00009a9e ldr r3, [r2, r3] | r3 = *(0x135ac);
0x00009aa0 ldr r2, [r3] | r2 = *(0x135ac);
0x00009aa2 ldr r3, [sp, 0x5c] | r3 = var_5ch;
0x00009aa4 eors r2, r3 | r2 ^= r3;
0x00009aa6 mov.w r3, 0 | r3 = 0;
| if (r2 == r3) {
0x00009aaa bne 0x9ad6 |
0x00009aac mov r0, r6 | r0 = r6;
0x00009aae add sp, 0x64 |
0x00009ab0 pop.w {r4, r5, r6, r7, r8, sb, pc} |
| label_34:
0x00009ab4 subs r0, 0 |
0x00009ab6 mov r1, sb | r1 = sb;
0x00009ab8 it ne |
| if (r0 == 0) {
0x00009aba movne r0, 1 | r0 = 1;
| }
0x00009abc strb.w r0, [sp, 0x41] | var_41h = r0;
0x00009ac0 mov r0, r6 | r0 = r6;
0x00009ac2 bl 0x6aac | fcn_00006aac (r0, r1);
0x00009ac6 movs r3, 1 | r3 = 1;
0x00009ac8 strb.w r3, [r6, 0x4c] | *((r6 + 0x4c)) = r3;
0x00009acc b 0x9a08 | goto label_2;
| label_33:
0x00009ace ldr r0, [pc, 0x40] |
0x00009ad0 add r0, pc | r0 = 0x135e6;
0x00009ad2 blx 0x2698 | cxa_free_exception ();
| }
0x00009ad6 blx 0x27d4 | fcn_000027d4 ();
0x00009ada mov r0, sb | r0 = sb;
0x00009adc bl 0x6860 | r0 = fcn_00006860 (r0);
0x00009ae0 blx 0x27ec | fcn_000027ec ();
0x00009ae4 mov r0, sb | r0 = sb;
0x00009ae6 blx 0x2838 | fcn_00002838 ();
0x00009aea blx 0x27ec | fcn_000027ec ();
0x00009aee nop |
0x00009af0 strb r0, [r2, r1] | *((r2 + r1)) = r0;
0x00009af2 movs r0, r0 |
0x00009af4 lsls r4, r2, 7 | r4 = r2 << 7;
0x00009af6 movs r0, r0 |
0x00009af8 movs r7, 0x4c | r7 = 0x4c;
0x00009afa movs r0, r0 |
0x00009afc ldrh r4, [r3, r2] | r4 = *((r3 + r2));
0x00009afe movs r0, r0 |
0x00009b00 ldrh r4, [r6, r1] | r4 = *((r6 + r1));
0x00009b02 movs r0, r0 |
0x00009b04 movs r7, 0x88 | r7 = 0x88;
0x00009b06 movs r0, r0 |
0x00009b08 movs r7, 2 | r7 = 2;
0x00009b0a movs r0, r0 |
0x00009b0c strh r4, [r2, r4] | *((r2 + r4)) = r4;
0x00009b0e movs r0, r0 |
0x00009b10 movs r1, 0x70 | r1 = 0x70;
0x00009b12 movs r0, r0 |
0x00009b14 push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00009b18 mov r4, r2 | r4 = r2;
0x00009b1a ldr.w r2, [pc, 0x47c] |
0x00009b1e sub sp, 0xa4 |
0x00009b20 mov.w sb, 0 | sb = 0;
0x00009b24 add.w sl, sp, 0x68 | sl += var_68h;
0x00009b28 ldr.w r3, [pc, 0x470] | r3 = *(0x9f9c);
0x00009b2c mov r5, r0 | r5 = r0;
0x00009b2e add r2, pc | r2 = 0x13acc;
0x00009b30 mov r6, r1 | r6 = r1;
0x00009b32 mov r0, sl | r0 = sl;
0x00009b34 mov r1, sb | r1 = sb;
0x00009b36 ldr r3, [r2, r3] |
0x00009b38 movs r2, 0x34 | r2 = 0x34;
0x00009b3a add.w r8, sp, 0x58 | r8 += var_58h;
0x00009b3e ldr r3, [r3] | r3 = *(0x13acc);
0x00009b40 str r3, [sp, 0x9c] | var_9ch = r3;
0x00009b42 mov.w r3, 0 | r3 = 0;
0x00009b46 str.w sb, [sp, 0x28] | __asm ("str.w sb, [var_28h_2]");
0x00009b4a blx 0x2670 | fcn_00002670 ();
0x00009b4e add r3, sp, 0x50 | r3 += var_50h;
0x00009b50 str.w r8, [sp, 0x50] | __asm ("str.w r8, [var_50h]");
0x00009b54 str r3, [sp, 0xc] | var_ch_3 = r3;
0x00009b56 cmp r4, 0 |
| if (r4 == 0) {
0x00009b58 beq.w 0x9f64 | goto label_37;
| }
0x00009b5c mov r0, r4 | r0 = r4;
0x00009b5e blx 0x291c | r0 = fcn_0000291c ();
0x00009b62 cmp r0, 0xf |
0x00009b64 mov r7, r0 | r7 = r0;
0x00009b66 str r0, [sp, 0x34] | var_34h = r0;
| if (r0 > 0xf) {
0x00009b68 bhi.w 0x9ca2 | goto label_38;
| }
0x00009b6c cmp r0, 1 |
| if (r0 != 1) {
0x00009b6e bne.w 0x9c98 | goto label_39;
| }
0x00009b72 ldrb r3, [r4] | r3 = *(r4);
0x00009b74 strb.w r3, [sp, 0x58] | var_58h = r3;
| label_3:
0x00009b78 mov r1, r8 | r1 = r8;
| label_4:
0x00009b7a ldr.w r2, [pc, 0x424] |
0x00009b7e movs r3, 0 | r3 = 0;
0x00009b80 add.w sb, sp, 0x70 | sb += var_70h;
0x00009b84 str r7, [sp, 0x54] | var_54h = r7;
0x00009b86 mov r0, sl | r0 = sl;
0x00009b88 strb r3, [r1, r7] | *((r1 + r7)) = r3;
0x00009b8a add r2, pc | r2 = 0x13b30;
0x00009b8c str.w sb, [sp, 0x68] | __asm ("str.w sb, [var_68h]");
0x00009b90 mov r1, r2 | r1 = r2;
0x00009b92 bl 0x94b8 | fcn_000094b8 (r0, r1, r2);
0x00009b96 ldr.w r3, [pc, 0x40c] |
0x00009b9a add.w fp, sp, 0x84 |
0x00009b9e vmov.i32 d16, 0 | __asm ("vmov.i32 d16, 0");
0x00009ba2 add.w sl, sp, 0x28 | sl += var_28h_2;
0x00009ba6 vmov.i32 q9, 0 | __asm ("vmov.i32 q9, 0");
0x00009baa mov r1, r4 | r1 = r4;
0x00009bac add r3, pc | r3 = 0x13b56;
0x00009bae mov r0, r6 | r0 = r6;
0x00009bb0 ldr r2, [r3, 0x18] | r2 = *(0x13b6e);
0x00009bb2 add r3, sp, 0x94 | r3 += var_94h;
0x00009bb4 vst1.32 {d18, d19}, [fp] | __asm ("vst1.32 {d18, d19}, [fp]");
0x00009bb8 vst1.32 {d16}, [r3] | __asm ("vst1.32 {d16}, [r3]");
0x00009bbc mov r3, sl | r3 = sl;
0x00009bbe blx 0x28b0 | fcn_000028b0 ();
0x00009bc2 ldr r2, [sp, 0x28] | r2 = var_28h_2;
0x00009bc4 str r0, [sp, 0x10] | var_10h_2 = r0;
0x00009bc6 cmp r2, 0 |
| if (r2 == 0) {
0x00009bc8 beq 0x9cc0 | goto label_40;
| }
0x00009bca ldr r3, [pc, 0x3dc] |
0x00009bcc mov.w r1, 0x100 | r1 = 0x100;
0x00009bd0 str r4, [sp, 4] | var_4h_3 = r4;
0x00009bd2 movs r0, 0 | r0 = 0;
0x00009bd4 ldr r2, [pc, 0x3d4] |
0x00009bd6 add r3, pc |
0x00009bd8 ldr r3, [r3, 0x18] | r3 = *(0x13b9c);
0x00009bda add r2, pc | r2 = 0x13b8a;
0x00009bdc str r3, [sp] | *(sp) = r3;
0x00009bde ldr r3, [pc, 0x3d0] |
0x00009be0 add r3, pc | r3 = 0x13b96;
0x00009be2 blx 0x25d4 | fcn_000025d4 ();
| label_5:
0x00009be6 mov r0, sl | r0 = sl;
0x00009be8 blx 0x28e0 | fcn_000028e0 ();
| label_18:
0x00009bec ldr r1, [sp, 0xc] | r1 = var_ch_3;
0x00009bee mov r0, r5 | r0 = r5;
0x00009bf0 bl 0x6aac | fcn_00006aac (r0, r1);
0x00009bf4 movs r3, 0 | r3 = 0;
0x00009bf6 strb.w r3, [r5, 0x4c] | *((r5 + 0x4c)) = r3;
| label_7:
0x00009bfa ldrd r6, r7, [sp, 0x90] | __asm ("ldrd r6, r7, [var_58h]");
0x00009bfe cmp r6, r7 |
| if (r6 == r7) {
0x00009c00 beq 0x9c20 | goto label_41;
| }
0x00009c02 add.w r4, r6, 8 | r4 = r6 + 8;
| do {
0x00009c06 ldr r0, [r4, -0x8] | r0 = *((r4 - 0x8));
0x00009c0a cmp r4, r0 |
| if (r4 != r0) {
0x00009c0c beq 0x9c16 |
0x00009c0e ldr r1, [r6, 8] | r1 = *((r6 + 8));
0x00009c10 adds r1, 1 | r1++;
0x00009c12 blx 0x268c | sym ();
| }
0x00009c16 adds r6, 0x18 | r6 += 0x18;
0x00009c18 adds r4, 0x18 | r4 += 0x18;
0x00009c1a cmp r7, r6 |
0x00009c1c bne 0x9c06 |
| } while (r7 != r6);
0x00009c1e ldr r7, [sp, 0x90] | r7 = var_58h;
| if (r7 != 0) {
| label_41:
0x00009c20 cbz r7, 0x9c2c |
0x00009c22 ldr r1, [sp, 0x98] | r1 = var_98h;
0x00009c24 mov r0, r7 | r0 = r7;
0x00009c26 subs r1, r1, r7 | r1 -= r7;
0x00009c28 blx 0x268c | sym ();
| }
0x00009c2c ldrd r6, r7, [sp, 0x84] | __asm ("ldrd r6, r7, [var_50h]");
0x00009c30 cmp r6, r7 |
| if (r6 == r7) {
0x00009c32 beq 0x9c52 | goto label_42;
| }
0x00009c34 add.w r4, r6, 8 | r4 = r6 + 8;
| do {
0x00009c38 ldr r0, [r4, -0x8] | r0 = *((r4 - 0x8));
0x00009c3c cmp r4, r0 |
| if (r4 != r0) {
0x00009c3e beq 0x9c48 |
0x00009c40 ldr r1, [r6, 8] | r1 = *((r6 + 8));
0x00009c42 adds r1, 1 | r1++;
0x00009c44 blx 0x268c | sym ();
| }
0x00009c48 adds r6, 0x18 | r6 += 0x18;
0x00009c4a adds r4, 0x18 | r4 += 0x18;
0x00009c4c cmp r7, r6 |
0x00009c4e bne 0x9c38 |
| } while (r7 != r6);
0x00009c50 ldr r7, [sp, 0x84] | r7 = var_84h;
| if (r7 != 0) {
| label_42:
0x00009c52 cbz r7, 0x9c5e |
0x00009c54 ldr r1, [sp, 0x8c] | r1 = var_54h;
0x00009c56 mov r0, r7 | r0 = r7;
0x00009c58 subs r1, r1, r7 | r1 -= r7;
0x00009c5a blx 0x268c | sym ();
| }
0x00009c5e ldr r0, [sp, 0x68] | r0 = var_68h;
0x00009c60 cmp r0, sb |
| if (r0 != sb) {
0x00009c62 beq 0x9c6c |
0x00009c64 ldr r1, [sp, 0x70] | r1 = var_70h;
0x00009c66 adds r1, 1 | r1++;
0x00009c68 blx 0x268c | sym ();
| }
0x00009c6c ldr r0, [sp, 0x50] | r0 = var_50h;
0x00009c6e cmp r0, r8 |
| if (r0 != r8) {
0x00009c70 beq 0x9c7a |
0x00009c72 ldr r1, [sp, 0x58] | r1 = var_58h;
0x00009c74 adds r1, 1 | r1++;
0x00009c76 blx 0x268c | sym ();
| }
0x00009c7a ldr r2, [pc, 0x338] |
0x00009c7c ldr r3, [pc, 0x31c] | r3 = *(0x9f9c);
0x00009c7e add r2, pc | r2 = 0x13c38;
0x00009c80 ldr r3, [r2, r3] | r3 = *(0x13c38);
0x00009c82 ldr r2, [r3] | r2 = *(0x13c38);
0x00009c84 ldr r3, [sp, 0x9c] | r3 = var_9ch;
0x00009c86 eors r2, r3 | r2 ^= r3;
0x00009c88 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00009c8c bne.w 0x9f6c | goto label_43;
| }
0x00009c90 mov r0, r5 | r0 = r5;
0x00009c92 add sp, 0xa4 |
0x00009c94 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_39:
0x00009c98 cmp r0, 0 |
| if (r0 == 0) {
0x00009c9a beq.w 0x9b78 | goto label_3;
| }
0x00009c9e mov r0, r8 | r0 = r8;
0x00009ca0 b 0x9cb2 | goto label_44;
| label_38:
0x00009ca2 ldr r0, [sp, 0xc] | r0 = var_ch_3;
0x00009ca4 mov r2, sb | r2 = sb;
0x00009ca6 add r1, sp, 0x34 | r1 += var_34h;
0x00009ca8 blx 0x297c | fcn_0000297c ();
0x00009cac ldr r3, [sp, 0x34] | r3 = var_34h;
0x00009cae str r0, [sp, 0x50] | var_50h = r0;
0x00009cb0 str r3, [sp, 0x58] | var_58h = r3;
| label_44:
0x00009cb2 mov r2, r7 | r2 = r7;
0x00009cb4 mov r1, r4 | r1 = r4;
0x00009cb6 blx 0x2910 | fcn_00002910 ();
0x00009cba ldr r7, [sp, 0x34] | r7 = var_34h;
0x00009cbc ldr r1, [sp, 0x50] | r1 = var_50h;
0x00009cbe b 0x9b7a | goto label_4;
| label_40:
0x00009cc0 add r3, sp, 0x40 | r3 += var_40h;
0x00009cc2 str r3, [sp, 0x14] | var_14h = r3;
0x00009cc4 str r3, [sp, 0x38] | var_0h = r3;
0x00009cc6 add r3, sp, 0x38 | r3 += var_0h;
0x00009cc8 str r3, [sp, 0x18] | var_18h_2 = r3;
0x00009cca ldr r3, [sp, 0x10] | r3 = var_10h_2;
0x00009ccc cmp r3, 0 |
| if (r3 == 0) {
0x00009cce beq.w 0x9f70 | goto label_45;
| }
0x00009cd2 str r2, [sp, 0x1c] | var_1ch = r2;
0x00009cd4 blx 0x291c | r0 = fcn_0000291c ();
0x00009cd8 cmp r0, 0xf |
0x00009cda ldr r2, [sp, 0x1c] | r2 = var_1ch;
0x00009cdc mov r7, r0 | r7 = r0;
0x00009cde str r0, [sp, 0x34] | var_34h = r0;
| if (r0 > 0xf) {
0x00009ce0 bhi 0x9d72 | goto label_46;
| }
0x00009ce2 cmp r0, 1 |
| if (r0 == 1) {
0x00009ce4 beq 0x9d68 | goto label_47;
| }
0x00009ce6 cmp r0, 0 |
| if (r0 != 0) {
0x00009ce8 bne.w 0x9f26 | goto label_48;
| }
| do {
0x00009cec ldr r2, [sp, 0x14] | r2 = var_14h;
| label_6:
0x00009cee movs r3, 0 | r3 = 0;
0x00009cf0 str r7, [sp, 0x3c] | var_4h_3 = r7;
0x00009cf2 strb r3, [r2, r7] | *((r2 + r7)) = r3;
0x00009cf4 ldr r3, [sp, 0x38] | r3 = var_0h;
0x00009cf6 ldr r2, [sp, 0x14] | r2 = var_14h;
0x00009cf8 ldr r0, [sp, 0x68] | r0 = var_68h;
0x00009cfa cmp r3, r2 |
| if (r3 == r2) {
0x00009cfc beq 0x9dda | goto label_49;
| }
0x00009cfe str r3, [sp, 0x68] | var_68h = r3;
0x00009d00 cmp r0, sb |
0x00009d02 add r3, sp, 0x3c | r3 += var_4h_3;
0x00009d04 vld1.32 {d16}, [r3] | __asm ("vld1.32 {d16}, [r3]");
| if (r0 == sb) {
0x00009d08 beq 0x9df8 | goto label_50;
| }
0x00009d0a add r3, sp, 0x6c | r3 += var_34h;
0x00009d0c ldr r2, [sp, 0x70] | r2 = var_70h;
0x00009d0e vst1.32 {d16}, [r3] | __asm ("vst1.32 {d16}, [r3]");
0x00009d12 cmp r0, 0 |
| if (r0 == 0) {
0x00009d14 beq 0x9dfe | goto label_51;
| }
0x00009d16 str r2, [sp, 0x40] | var_40h = r2;
0x00009d18 str r0, [sp, 0x38] | var_0h = r0;
| label_8:
0x00009d1a movs r3, 0 | r3 = 0;
0x00009d1c str r3, [sp, 0x3c] | var_4h_3 = r3;
0x00009d1e strb r3, [r0] | *(r0) = r3;
0x00009d20 ldr r0, [sp, 0x38] | r0 = var_0h;
0x00009d22 ldr r3, [sp, 0x14] | r3 = var_14h;
0x00009d24 cmp r0, r3 |
| if (r0 != r3) {
0x00009d26 beq 0x9d30 |
0x00009d28 ldr r1, [sp, 0x40] | r1 = var_40h;
0x00009d2a adds r1, 1 | r1++;
0x00009d2c blx 0x268c | sym ();
| }
0x00009d30 ldr r0, [sp, 0x10] | r0 = var_10h_2;
0x00009d32 blx 0x2820 | fcn_00002820 ();
0x00009d36 ldr r3, [pc, 0x280] |
0x00009d38 mov r1, r4 | r1 = r4;
0x00009d3a mov r0, r6 | r0 = r6;
0x00009d3c add r3, pc | r3 = 0x13cfa;
0x00009d3e ldr r2, [r3, 0x30] | r2 = *(0x13d2a);
0x00009d40 mov r3, sl | r3 = sl;
0x00009d42 blx 0x2a3c | fcn_00002a3c ();
0x00009d46 ldr r7, [sp, 0x28] | r7 = var_28h_2;
| if (r7 == 0) {
0x00009d48 cbz r7, 0x9d8e | goto label_52;
| }
0x00009d4a ldr r3, [pc, 0x270] |
0x00009d4c mov.w r1, 0x100 | r1 = 0x100;
0x00009d50 str r4, [sp, 4] | var_4h_3 = r4;
0x00009d52 movs r0, 0 | r0 = 0;
0x00009d54 ldr r2, [pc, 0x268] |
0x00009d56 add r3, pc |
0x00009d58 ldr r3, [r3, 0x30] | r3 = *(0x13d48);
0x00009d5a add r2, pc | r2 = 0x13d1e;
0x00009d5c str r3, [sp] | *(sp) = r3;
0x00009d5e ldr r3, [pc, 0x264] |
0x00009d60 add r3, pc | r3 = 0x13d2a;
0x00009d62 blx 0x25d4 | fcn_000025d4 ();
0x00009d66 b 0x9be6 | goto label_5;
| label_47:
0x00009d68 ldr r3, [sp, 0x10] | r3 = var_10h_2;
0x00009d6a ldrb r3, [r3] | r3 = *(r3);
0x00009d6c strb.w r3, [sp, 0x40] | var_40h = r3;
0x00009d70 b 0x9cec |
| } while (1);
| label_46:
0x00009d72 ldr r0, [sp, 0x18] | r0 = var_18h_2;
0x00009d74 add r1, sp, 0x34 | r1 += var_34h;
0x00009d76 blx 0x297c | fcn_0000297c ();
0x00009d7a ldr r3, [sp, 0x34] | r3 = var_34h;
0x00009d7c str r0, [sp, 0x38] | var_0h = r0;
0x00009d7e str r3, [sp, 0x40] | var_40h = r3;
| label_16:
0x00009d80 mov r2, r7 | r2 = r7;
0x00009d82 ldr r1, [sp, 0x10] | r1 = var_10h_2;
0x00009d84 blx 0x2910 | fcn_00002910 ();
0x00009d88 ldrd r7, r2, [sp, 0x34] | __asm ("ldrd r7, r2, [var_34h]");
0x00009d8c b 0x9cee | goto label_6;
| label_52:
0x00009d8e ldr r3, [pc, 0x238] |
0x00009d90 subs r0, 0 |
0x00009d92 it ne |
| if (r0 == 0) {
0x00009d94 movne r0, 1 | r0 = 1;
| }
0x00009d96 str r7, [sp] | *(sp) = r7;
0x00009d98 strb.w r0, [sp, 0x80] | var_80h = r0;
0x00009d9c mov r1, r4 | r1 = r4;
0x00009d9e add r3, pc | r3 = 0x13d6c;
0x00009da0 mov r0, r6 | r0 = r6;
0x00009da2 ldr r2, [r3, 0x48] | r2 = *(0x13db4);
0x00009da4 add r3, sp, 0x2c | r3 += var_2ch;
0x00009da6 blx 0x2528 | r0 = fcn_00002528 ();
0x00009daa mov sl, r0 | sl = r0;
0x00009dac cmp r0, 0 |
| if (r0 == 0) {
0x00009dae beq.w 0x9f2a | goto label_53;
| }
0x00009db2 ldr r3, [sp, 0x2c] | r3 = var_2ch;
0x00009db4 cbnz r3, 0x9e0a |
| while (r6 == 0) {
| label_9:
0x00009db6 ldrb.w r3, [sp, 0x80] | r3 = var_80h;
0x00009dba mov r0, sl | r0 = sl;
0x00009dbc strb.w r3, [sp, 0x81] | var_81h = r3;
0x00009dc0 blx 0x27b0 | fcn_000027b0 ();
0x00009dc4 mov r0, r7 | r0 = r7;
0x00009dc6 blx 0x27b0 | fcn_000027b0 ();
0x00009dca ldr r1, [sp, 0xc] | r1 = var_ch_3;
0x00009dcc mov r0, r5 | r0 = r5;
0x00009dce bl 0x6aac | fcn_00006aac (r0, r1);
0x00009dd2 movs r3, 1 | r3 = 1;
0x00009dd4 strb.w r3, [r5, 0x4c] | *((r5 + 0x4c)) = r3;
0x00009dd8 b 0x9bfa | goto label_7;
| label_49:
0x00009dda ldr r2, [sp, 0x3c] | r2 = var_4h_3;
| if (r2 != 0) {
0x00009ddc cbz r2, 0x9dee |
0x00009dde cmp r2, 1 |
| if (r2 == 1) {
0x00009de0 beq.w 0x9f2e | goto label_54;
| }
0x00009de4 ldr r1, [sp, 0x14] | r1 = var_14h;
0x00009de6 blx 0x2910 | fcn_00002910 ();
0x00009dea ldr r2, [sp, 0x3c] | r2 = var_4h_3;
0x00009dec ldr r0, [sp, 0x68] | r0 = var_68h;
| }
| label_17:
0x00009dee movs r3, 0 | r3 = 0;
0x00009df0 str r2, [sp, 0x6c] | var_34h = r2;
0x00009df2 strb r3, [r0, r2] | *((r0 + r2)) = r3;
0x00009df4 ldr r0, [sp, 0x38] | r0 = var_0h;
0x00009df6 b 0x9d1a | goto label_8;
| label_50:
0x00009df8 add r3, sp, 0x6c | r3 += var_34h;
0x00009dfa vst1.32 {d16}, [r3] | __asm ("vst1.32 {d16}, [r3]");
| label_51:
0x00009dfe ldr r3, [sp, 0x14] | r3 = var_14h;
0x00009e00 str r3, [sp, 0x38] | var_0h = r3;
0x00009e02 add r3, sp, 0x40 | r3 += var_40h;
0x00009e04 mov r0, r3 | r0 = r3;
0x00009e06 str r3, [sp, 0x14] | var_14h = r3;
0x00009e08 b 0x9d1a | goto label_8;
0x00009e0a ldr r3, [pc, 0x1c0] |
0x00009e0c mov r0, r6 | r0 = r6;
0x00009e0e mov r1, r4 | r1 = r4;
0x00009e10 add r3, pc | r3 = 0x13de2;
0x00009e12 ldr r2, [r3, 0x60] | r2 = *(0x13e42);
0x00009e14 movs r3, 0 | r3 = 0;
0x00009e16 str r3, [sp] | *(sp) = r3;
0x00009e18 add r3, sp, 0x30 | r3 += var_30h;
0x00009e1a blx 0x2528 | fcn_00002528 ();
0x00009e1e ldrd r2, r3, [sp, 0x2c] | __asm ("ldrd r2, r3, [var_2ch]");
0x00009e22 mov r7, r0 | r7 = r0;
0x00009e24 cmp r2, r3 |
| if (r2 != r3) {
0x00009e26 bne.w 0x9f3a | goto label_55;
| }
0x00009e2a ldr.w r6, [sl] | r6 = *(sl);
0x00009e2e cmp r6, 0 |
0x00009e30 beq 0x9db6 |
| }
0x00009e32 subs r3, r0, 4 | r3 = r0 - 4;
0x00009e34 str.w sl, [sp, 0x1c] | __asm ("str.w sl, [var_1ch]");
0x00009e38 str r3, [sp, 0x10] | var_10h_2 = r3;
0x00009e3a add r3, sp, 0x34 | r3 += var_34h;
0x00009e3c str r3, [sp, 0x24] | var_24h = r3;
0x00009e3e add r3, sp, 0x90 | r3 += var_58h;
0x00009e40 str r3, [sp, 0x20] | var_20h = r3;
0x00009e42 b 0x9ec8 | goto label_56;
| label_10:
0x00009e44 cmp r0, 1 |
| if (r0 != 1) {
0x00009e46 bne 0x9f1e | goto label_57;
| }
0x00009e48 ldrb r3, [r6] | r3 = *(r6);
0x00009e4a strb.w r3, [sp, 0x40] | var_40h = r3;
| label_14:
0x00009e4e ldr r3, [sp, 0x14] | r3 = var_14h;
| label_11:
0x00009e50 mov.w r2, 0 | r2 = 0;
0x00009e54 str r4, [sp, 0x3c] | var_4h_3 = r4;
0x00009e56 ldr r1, [sp, 0x18] | r1 = var_18h_2;
0x00009e58 mov r0, fp | r0 = fp;
0x00009e5a strb r2, [r3, r4] | *((r3 + r4)) = r2;
0x00009e5c bl 0xb2d8 | fcn_0000b2d8 (r0, r1, r2, r3, r4);
0x00009e60 ldr r0, [sp, 0x38] | r0 = var_0h;
0x00009e62 ldr r3, [sp, 0x14] | r3 = var_14h;
0x00009e64 cmp r0, r3 |
| if (r0 != r3) {
0x00009e66 beq 0x9e70 |
0x00009e68 ldr r1, [sp, 0x40] | r1 = var_40h;
0x00009e6a adds r1, 1 | r1++;
0x00009e6c blx 0x268c | sym ();
| }
0x00009e70 ldr r3, [sp, 0x10] | r3 = var_10h_2;
0x00009e72 ldr r6, [r3, 4]! | r6 = *((r3 += 4));
0x00009e76 str r3, [sp, 0x10] | var_10h_2 = r3;
0x00009e78 ldr r3, [sp, 0x14] | r3 = var_14h;
0x00009e7a str r3, [sp, 0x38] | var_0h = r3;
0x00009e7c cmp r6, 0 |
| if (r6 == 0) {
0x00009e7e beq 0x9f5c | goto label_58;
| }
0x00009e80 mov r0, r6 | r0 = r6;
0x00009e82 blx 0x291c | r0 = fcn_0000291c ();
0x00009e86 cmp r0, 0xf |
0x00009e88 mov r4, r0 | r4 = r0;
0x00009e8a str r0, [sp, 0x34] | var_34h = r0;
| if (r0 > 0xf) {
0x00009e8c bhi 0x9f0c | goto label_59;
| }
0x00009e8e cmp r0, 1 |
| if (r0 != 1) {
0x00009e90 bne 0x9ef8 | goto label_60;
| }
0x00009e92 ldrb r3, [r6] | r3 = *(r6);
0x00009e94 strb.w r3, [sp, 0x40] | var_40h = r3;
| label_12:
0x00009e98 ldr r3, [sp, 0x14] | r3 = var_14h;
| label_13:
0x00009e9a mov.w r2, 0 | r2 = 0;
0x00009e9e str r4, [sp, 0x3c] | var_4h_3 = r4;
0x00009ea0 ldr r1, [sp, 0x18] | r1 = var_18h_2;
0x00009ea2 ldr r0, [sp, 0x20] | r0 = var_20h;
0x00009ea4 strb r2, [r3, r4] | *((r3 + r4)) = r2;
0x00009ea6 bl 0xb2d8 | fcn_0000b2d8 (r0, r1, r2, r3, r4);
0x00009eaa ldr r0, [sp, 0x38] | r0 = var_0h;
0x00009eac ldr r3, [sp, 0x14] | r3 = var_14h;
0x00009eae cmp r0, r3 |
| if (r0 != r3) {
0x00009eb0 beq 0x9eba |
0x00009eb2 ldr r1, [sp, 0x40] | r1 = var_40h;
0x00009eb4 adds r1, 1 | r1++;
0x00009eb6 blx 0x268c | sym ();
| }
0x00009eba ldr r3, [sp, 0x1c] | r3 = var_1ch;
0x00009ebc ldr r6, [r3, 4]! | r6 = *((r3 += 4));
0x00009ec0 str r3, [sp, 0x1c] | var_1ch = r3;
0x00009ec2 cmp r6, 0 |
| if (r6 == 0) {
0x00009ec4 beq.w 0x9db6 | goto label_9;
| }
| label_56:
0x00009ec8 ldr r3, [sp, 0x14] | r3 = var_14h;
0x00009eca mov r0, r6 | r0 = r6;
0x00009ecc str r3, [sp, 0x38] | var_0h = r3;
0x00009ece blx 0x291c | r0 = fcn_0000291c ();
0x00009ed2 cmp r0, 0xf |
0x00009ed4 mov r4, r0 | r4 = r0;
0x00009ed6 str r0, [sp, 0x34] | var_34h = r0;
| if (r0 < 0xf) {
0x00009ed8 bls 0x9e44 | goto label_10;
| }
0x00009eda ldr r1, [sp, 0x24] | r1 = var_24h;
0x00009edc movs r2, 0 | r2 = 0;
0x00009ede ldr r0, [sp, 0x18] | r0 = var_18h_2;
0x00009ee0 blx 0x297c | fcn_0000297c ();
0x00009ee4 ldr r3, [sp, 0x34] | r3 = var_34h;
0x00009ee6 str r0, [sp, 0x38] | var_0h = r0;
0x00009ee8 str r3, [sp, 0x40] | var_40h = r3;
| label_15:
0x00009eea mov r2, r4 | r2 = r4;
0x00009eec mov r1, r6 | r1 = r6;
0x00009eee blx 0x2910 | fcn_00002910 ();
0x00009ef2 ldrd r4, r3, [sp, 0x34] | __asm ("ldrd r4, r3, [var_34h]");
0x00009ef6 b 0x9e50 | goto label_11;
| label_60:
0x00009ef8 cmp r0, 0 |
| if (r0 == 0) {
0x00009efa beq 0x9e98 | goto label_12;
| }
0x00009efc ldr r0, [sp, 0x14] | r0 = var_14h;
| do {
0x00009efe mov r2, r4 | r2 = r4;
0x00009f00 mov r1, r6 | r1 = r6;
0x00009f02 blx 0x2910 | fcn_00002910 ();
0x00009f06 ldrd r4, r3, [sp, 0x34] | __asm ("ldrd r4, r3, [var_34h]");
0x00009f0a b 0x9e9a | goto label_13;
| label_59:
0x00009f0c ldr r1, [sp, 0x24] | r1 = var_24h;
0x00009f0e movs r2, 0 | r2 = 0;
0x00009f10 ldr r0, [sp, 0x18] | r0 = var_18h_2;
0x00009f12 blx 0x297c | fcn_0000297c ();
0x00009f16 ldr r3, [sp, 0x34] | r3 = var_34h;
0x00009f18 str r0, [sp, 0x38] | var_0h = r0;
0x00009f1a str r3, [sp, 0x40] | var_40h = r3;
0x00009f1c b 0x9efe |
| } while (1);
| label_57:
0x00009f1e cmp r0, 0 |
| if (r0 == 0) {
0x00009f20 beq 0x9e4e | goto label_14;
| }
0x00009f22 ldr r0, [sp, 0x14] | r0 = var_14h;
0x00009f24 b 0x9eea | goto label_15;
| label_48:
0x00009f26 ldr r0, [sp, 0x14] | r0 = var_14h;
0x00009f28 b 0x9d80 | goto label_16;
| label_53:
0x00009f2a mov r7, r0 | r7 = r0;
0x00009f2c b 0x9db6 | goto label_9;
| label_54:
0x00009f2e ldrb.w r3, [sp, 0x40] | r3 = var_40h;
0x00009f32 strb r3, [r0] | *(r0) = r3;
0x00009f34 ldr r2, [sp, 0x3c] | r2 = var_4h_3;
0x00009f36 ldr r0, [sp, 0x68] | r0 = var_68h;
0x00009f38 b 0x9dee | goto label_17;
| label_55:
0x00009f3a mov r0, sl | r0 = sl;
0x00009f3c blx 0x27b0 | fcn_000027b0 ();
0x00009f40 mov r0, r7 | r0 = r7;
0x00009f42 blx 0x27b0 | fcn_000027b0 ();
0x00009f46 ldr r3, [pc, 0x88] |
0x00009f48 mov.w r1, 0x100 | r1 = 0x100;
0x00009f4c ldr r2, [pc, 0x84] |
0x00009f4e movs r0, 0 | r0 = 0;
0x00009f50 str r4, [sp] | *(sp) = r4;
0x00009f52 add r3, pc | r3 = 0x13f28;
0x00009f54 add r2, pc | r2 = 0x13f2c;
0x00009f56 blx 0x25d4 | fcn_000025d4 ();
0x00009f5a b 0x9bec | goto label_18;
| label_58:
0x00009f5c ldr r0, [pc, 0x78] |
0x00009f5e add r0, pc | r0 = 0x13f3a;
0x00009f60 blx 0x2698 | cxa_free_exception ();
| label_37:
0x00009f64 ldr r0, [pc, 0x74] |
0x00009f66 add r0, pc | r0 = 0x13f46;
0x00009f68 blx 0x2698 | cxa_free_exception ();
| label_43:
0x00009f6c blx 0x27d4 | fcn_000027d4 ();
| label_45:
0x00009f70 ldr r0, [pc, 0x6c] |
0x00009f72 add r0, pc | r0 = 0x13f56;
0x00009f74 blx 0x2698 | cxa_free_exception ();
| do {
0x00009f78 ldr r0, [sp, 0x18] | r0 = var_18h_2;
0x00009f7a blx 0x2838 | fcn_00002838 ();
0x00009f7e ldr r0, [sp, 0xc] | r0 = var_ch_3;
0x00009f80 bl 0x6860 | r0 = fcn_00006860 (r0);
0x00009f84 blx 0x27ec | fcn_000027ec ();
0x00009f88 b 0x9f78 |
| } 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/bin/feature-flag-service @ 0xb3f8 */
| #include <stdint.h>
|
; (fcn) fcn.0000b3f8 () | void fcn_0000b3f8 (int16_t arg_30h, int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4) {
| int16_t var_14h_2;
| int16_t var_0h;
| int16_t var_8h;
| int16_t var_ch;
| int16_t var_10h;
| int16_t var_14h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
| r3 = arg4;
0x0000b3f8 push.w {r4, r5, r6, r7, r8, lr} |
0x0000b3fc sub sp, 0x18 |
0x0000b3fe ldr r4, [sp, 0x30] | r4 = *(arg_30h);
0x0000b400 mov r7, r2 | r7 = r2;
0x0000b402 mov r5, r3 | r5 = r3;
0x0000b404 mov r6, r1 | r6 = r1;
0x0000b406 ldr r1, [pc, 0xa0] | r1 = *(0xb4aa);
0x0000b408 str r4, [sp] | *(sp) = r4;
0x0000b40a mov r4, r0 | r4 = r0;
0x0000b40c ldr r3, [r0, 0xc] | r3 = *((r0 + 0xc));
0x0000b40e ldr r2, [r0, 4] | r2 = *((r0 + 4));
0x0000b410 ldr r0, [pc, 0x98] |
0x0000b412 add r0, pc | r0 = 0x168c2;
0x0000b414 ldr r1, [r0, r1] |
0x0000b416 add r0, sp, 0xc | r0 += var_ch;
0x0000b418 ldr r1, [r1] | r1 = *(0x168c2);
0x0000b41a str r1, [sp, 0x14] | var_14h = r1;
0x0000b41c mov.w r1, 0 | r1 = 0;
0x0000b420 ldr r1, [r4, 0x14] | r1 = *((r4 + 0x14));
0x0000b422 str r1, [sp, 8] | var_8h = r1;
0x0000b424 add.w r1, r4, 0x10 | r1 = r4 + 0x10;
0x0000b428 blx 0x2844 | fcn_00002844 ();
0x0000b42c ldrb.w r3, [sp, 0xc] | r3 = var_ch;
0x0000b430 cbnz r3, 0xb46c |
| while (1) {
0x0000b432 ldr.w r8, [r4] | r8 = *(r4);
0x0000b436 str r7, [r5, 0x68] | *((r5 + 0x68)) = r7;
0x0000b438 lsls r7, r6, 2 | r7 = r6 << 2;
0x0000b43a ldr.w r3, [r8, r6, lsl 2] | offset_0 = r6 << 2;
| r3 = *((r8 + offset_0));
| if (r3 == 0) {
0x0000b43e cbz r3, 0xb482 | goto label_1;
| }
0x0000b440 ldr r3, [r3] | r3 = *(r3);
0x0000b442 str r3, [r5] | *(r5) = r3;
0x0000b444 ldr.w r3, [r8, r6, lsl 2] | offset_1 = r6 << 2;
| r3 = *((r8 + offset_1));
0x0000b448 str r5, [r3] | *(r3) = r5;
| label_0:
0x0000b44a ldr r3, [r4, 0xc] | r3 = *((r4 + 0xc));
0x0000b44c ldr r2, [pc, 0x60] |
0x0000b44e adds r3, 1 | r3++;
0x0000b450 str r3, [r4, 0xc] | *((r4 + 0xc)) = r3;
0x0000b452 add r2, pc | r2 = 0x16906;
0x0000b454 ldr r3, [pc, 0x50] | r3 = *(0xb4a8);
0x0000b456 ldr r3, [r2, r3] | r3 = *(0x16906);
0x0000b458 ldr r2, [r3] | r2 = *(0x16906);
0x0000b45a ldr r3, [sp, 0x14] | r3 = var_14h;
0x0000b45c eors r2, r3 | r2 ^= r3;
0x0000b45e mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x0000b462 bne 0xb4a2 | goto label_2;
| }
0x0000b464 mov r0, r5 | r0 = r5;
0x0000b466 add sp, 0x18 |
0x0000b468 pop.w {r4, r5, r6, r7, r8, pc} |
0x0000b46c ldr r1, [sp, 0x10] | r1 = var_10h;
0x0000b46e add r2, sp, 8 | r2 += var_8h;
0x0000b470 mov r0, r4 | r0 = r4;
0x0000b472 bl 0x92b0 | fcn_000092b0 (r0, r1, r2, r3, r4);
0x0000b476 ldr r1, [r4, 4] | r1 = *((r4 + 4));
0x0000b478 mov r0, r7 | r0 = r7;
0x0000b47a blx 0x25b0 | fcn_000025b0 ();
0x0000b47e mov r6, r1 | r6 = r1;
0x0000b480 b 0xb432 |
| }
| label_1:
0x0000b482 ldr r3, [r4, 8] | r3 = *((r4 + 8));
0x0000b484 str r3, [r5] | *(r5) = r3;
0x0000b486 str r5, [r4, 8] | *((r4 + 8)) = r5;
0x0000b488 ldr r3, [r5] | r3 = *(r5);
| if (r3 != 0) {
0x0000b48a cbz r3, 0xb498 |
0x0000b48c ldr r0, [r3, 0x68] | r0 = *((r3 + 0x68));
0x0000b48e ldr r1, [r4, 4] | r1 = *((r4 + 4));
0x0000b490 blx 0x25b0 | fcn_000025b0 ();
0x0000b494 str.w r5, [r8, r1, lsl 2] | __asm ("str.w r5, [r8, r1, lsl 2]");
| }
0x0000b498 add.w r3, r4, 8 | r3 = r4 + 8;
0x0000b49c str.w r3, [r8, r7] | __asm ("str.w r3, [r8, r7]");
0x0000b4a0 b 0xb44a | goto label_0;
| label_2:
0x0000b4a2 blx 0x27d4 | fcn_000027d4 ();
0x0000b4a6 nop |
0x0000b4a8 lsls r4, r2, 7 | r4 = r2 << 7;
0x0000b4aa movs r0, r0 |
0x0000b4ac subs r1, 0x9e | r1 -= 0x9e;
0x0000b4ae movs r0, r0 |
0x0000b4b0 subs r1, 0x5e | r1 -= 0x5e;
0x0000b4b2 movs r0, r0 |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/bin/feature-flag-service @ 0xb6cc */
| #include <stdint.h>
|
; (fcn) fcn.0000b6cc () | void fcn_0000b6cc (int16_t arg1, int16_t arg2) {
| r0 = arg1;
| r1 = arg2;
0x0000b6cc invalid |
0x0000b6d0 lsls r0, r2, 0xc | r0 = r2 << 0xc;
0x0000b6d2 ldr r5, [r1, 4] | r5 = *((r1 + 4));
0x0000b6d4 mov r4, r1 | r4 = r1;
0x0000b6d6 movs r7, 0 | r7 = 0;
0x0000b6d8 mov r6, r0 | r6 = r0;
0x0000b6da ldr r1, [r1, 0xc] | r1 = *((r1 + 0xc));
0x0000b6dc strd r7, r5, [r0] | __asm ("strd r7, r5, [r0]");
0x0000b6e0 cmp r5, 1 |
0x0000b6e2 str r7, [r0, 8] | *((r0 + 8)) = r7;
0x0000b6e4 str r1, [r0, 0xc] | *((r0 + 0xc)) = r1;
0x0000b6e6 ldm.w r3, {r0, r1} | r0 = *(r3);
| r1 = *((r3 + 4));
0x0000b6ea add.w r3, r6, 0x10 | r3 = r6 + 0x10;
0x0000b6ee stm.w r3, {r0, r1} | *(r3) = r0;
| *((r3 + 4)) = r1;
0x0000b6f2 str r7, [r6, 0x18] | *((r6 + 0x18)) = r7;
0x0000b6f4 it eq |
| if (r5 != 1) {
0x0000b6f6 addeq r7, r6, 0x18 | r7 = r6 + 0x18;
| }
| if (r5 != 1) {
0x0000b6fa beq 0xb714 |
0x0000b6fc cmp.w r5, 0x20000000 |
| if (r5 >= 0x20000000) {
0x0000b700 bhs 0xb76e | goto label_1;
| }
0x0000b702 lsls r5, r5, 2 | r5 <<= 2;
0x0000b704 mov r0, r5 | r0 = r5;
0x0000b706 blx 0x2500 | sym ();
0x0000b70a mov r1, r7 | r1 = r7;
0x0000b70c mov r2, r5 | r2 = r5;
0x0000b70e mov r7, r0 | r7 = r0;
0x0000b710 blx 0x2670 | fcn_00002670 ();
| }
0x0000b714 ldr r5, [r4, 8] | r5 = *((r4 + 8));
0x0000b716 str r7, [r6] | *(r6) = r7;
| if (r5 == 0) {
0x0000b718 cbz r5, 0xb76a | goto label_2;
| }
0x0000b71a adds r0, r5, 4 | r0 = r5 + 4;
0x0000b71c bl 0xa2f4 | fcn_0000a2f4 (r0);
0x0000b720 ldr r3, [r5, 0x68] | r3 = *((r5 + 0x68));
0x0000b722 mov r4, r0 | r4 = r0;
0x0000b724 ldr r1, [r6, 4] | r1 = *((r6 + 4));
0x0000b726 str r3, [r0, 0x68] | *((r0 + 0x68)) = r3;
0x0000b728 mov r0, r3 | r0 = r3;
0x0000b72a str r4, [r6, 8] | *((r6 + 8)) = r4;
0x0000b72c blx 0x25b0 | fcn_000025b0 ();
0x0000b730 mov r3, r6 | r3 = r6;
0x0000b732 ldr r2, [r3], 8 | r2 = *(r3);
| r3 += 8;
0x0000b736 str.w r3, [r2, r1, lsl 2] | __asm ("str.w r3, [r2, r1, lsl 2]");
| do {
0x0000b73a ldr r5, [r5] | r5 = *(r5);
| if (r5 == 0) {
0x0000b73c cbz r5, 0xb76a | goto label_2;
| }
| label_0:
0x0000b73e adds r0, r5, 4 | r0 = r5 + 4;
0x0000b740 mov r7, r4 | r7 = r4;
0x0000b742 bl 0xa2f4 | fcn_0000a2f4 (r0);
0x0000b746 ldr r3, [r5, 0x68] | r3 = *((r5 + 0x68));
0x0000b748 mov r4, r0 | r4 = r0;
0x0000b74a ldr r1, [r6, 4] | r1 = *((r6 + 4));
0x0000b74c str r0, [r7] | *(r7) = r0;
0x0000b74e mov r0, r3 | r0 = r3;
0x0000b750 str r3, [r4, 0x68] | *((r4 + 0x68)) = r3;
0x0000b752 blx 0x25b0 | fcn_000025b0 ();
0x0000b756 ldr r3, [r6] | r3 = *(r6);
0x0000b758 ldr.w r2, [r3, r1, lsl 2] | offset_0 = r1 << 2;
| r2 = *((r3 + offset_0));
0x0000b75c cmp r2, 0 |
0x0000b75e bne 0xb73a |
| } while (r2 != 0);
0x0000b760 str.w r7, [r3, r1, lsl 2] | __asm ("str.w r7, [r3, r1, lsl 2]");
0x0000b764 ldr r5, [r5] | r5 = *(r5);
0x0000b766 cmp r5, 0 |
| if (r5 != 0) {
0x0000b768 bne 0xb73e | goto label_0;
| }
| label_2:
0x0000b76a mov r0, r6 | r0 = r6;
0x0000b76c pop {r3, r4, r5, r6, r7, pc} |
| label_1:
0x0000b76e cmp.w r5, 0x40000000 |
| if (r5 > 0x40000000) {
0x0000b772 blo 0xb778 |
0x0000b774 blx 0x2710 | sd_bus_release_name_async ();
| }
0x0000b778 blx 0x2574 | fcn_00002574 ();
| do {
0x0000b77c blx 0x25a4 | fcn_000025a4 ();
0x0000b780 mov r0, r6 | r0 = r6;
0x0000b782 bl 0x70a0 | fcn_000070a0 (r0, r1);
0x0000b786 mov r0, r6 | r0 = r6;
0x0000b788 bl 0x8848 | r0 = fcn_00008848 (r0);
0x0000b78c blx 0x2904 | fcn_00002904 ();
0x0000b790 b 0xb77c |
| } while (1);
| }
[*] Function system used 1 times feature-flag-service