[*] Binary protection state of agetty
Full RELRO Canary found NX enabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function printf tear down of agetty
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/sbin/agetty @ 0x412c */
| #include <stdint.h>
|
; (fcn) fcn.0000412c () | void fcn_0000412c (int16_t arg1) {
| char * * endptr;
| int16_t var_4h;
| r0 = arg1;
0x0000412c ldr r2, [pc, 0x70] |
0x0000412e ldr r3, [pc, 0x74] | r3 = *(0x41a6);
0x00004130 push {r4, r5, r6, lr} |
0x00004132 movs r4, 0 | r4 = 0;
0x00004134 add r2, pc | r2 = " %1$s [options] <line> [<baud_rate>,...] [<termtype>]\n %1$s [options] <baud_rate>,... <line> [<termtype>]\n";
0x00004136 sub sp, 8 |
0x00004138 mov r6, r0 | r6 = r0;
0x0000413a ldr r3, [r2, r3] |
0x0000413c ldr r3, [r3] | r3 = " %1$s [options] <line> [<baud_rate>,...] [<termtype>]\n %1$s [options] <baud_rate>,... <line> [<termtype>]\n";
0x0000413e str r3, [sp, 4] | var_4h = r3;
0x00004140 mov.w r3, 0 | r3 = 0;
0x00004144 str r4, [sp] | *(sp) = r4;
0x00004146 blx 0x1df8 | vasprintf_chk ()
0x0000414a movs r2, 0xa | r2 = 0xa;
0x0000414c mov r5, r0 | r5 = r0;
0x0000414e str r4, [r0] | *(r0) = r4;
0x00004150 mov r1, sp | r1 = sp;
0x00004152 mov r0, r6 | r0 = r6;
0x00004154 blx 0x1a8c | strtol (r0, r1, r2);
0x00004158 ldr r3, [r5] | r3 = *(r5);
| if (r3 != 0) {
0x0000415a cbnz r3, 0x4196 | goto label_0;
| }
0x0000415c ldr r2, [sp] | r2 = *(sp);
0x0000415e cmp r2, r4 |
0x00004160 it ne |
| if (r2 != r4) {
0x00004162 cmpne r2, r6 | __asm ("cmpne r2, r6");
| }
| if (r2 == r4) {
0x00004164 beq 0x417c | goto label_1;
| }
0x00004166 ldr r2, [pc, 0x40] |
0x00004168 movs r3, 0x32 | r3 = 0x32;
0x0000416a add r2, pc | r2 = 0x8318;
0x0000416c b 0x4174 |
| while (r0 != r3) {
0x0000416e ldr r3, [r2, 8]! | r3 = *((r2 += 8));
| if (r3 == 0) {
0x00004172 cbz r3, 0x417c | goto label_1;
| }
0x00004174 cmp r0, r3 |
0x00004176 bne 0x416e |
| }
0x00004178 ldr r0, [r2, 4] | r0 = *((r2 + 4));
0x0000417a b 0x417e | goto label_2;
| label_1:
0x0000417c mov r0, r3 | r0 = r3;
| do {
| label_2:
0x0000417e ldr r2, [pc, 0x2c] |
0x00004180 ldr r3, [pc, 0x20] | r3 = *(0x41a4);
0x00004182 add r2, pc | r2 = 0x8334;
0x00004184 ldr r3, [r2, r3] | r3 = *(0x8334);
0x00004186 ldr r2, [r3] | r2 = *(0x8334);
0x00004188 ldr r3, [sp, 4] | r3 = var_4h;
0x0000418a eors r2, r3 | r2 ^= r3;
0x0000418c mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00004190 bne 0x419a | goto label_3;
| }
0x00004192 add sp, 8 |
0x00004194 pop {r4, r5, r6, pc} |
| label_0:
0x00004196 mov r0, r4 | r0 = r4;
0x00004198 b 0x417e |
| } while (1);
| label_3:
0x0000419a blx 0x1bac | cfgetispeed ();
0x0000419e nop |
0x000041a0 ldr r0, [r7, 0x44] | r0 = *((r7 + 0x44));
0x000041a2 movs r0, r0 |
0x000041a4 lsls r0, r4, 8 | r0 = r4 << 8;
0x000041a6 movs r0, r0 |
0x000041a8 ldr r7, [pc, 0x3c8] | r7 = *(0x4574);
0x000041aa movs r0, r0 |
0x000041ac ldr r2, [r5, 0x40] | r2 = *((r5 + 0x40));
0x000041ae movs r0, r0 |
| }
r2dec has crashed (info: /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/sbin/agetty @ 0x469c).
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/sbin/agetty @ 0x4fa0 */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) fcn.00004fa0 () | void fcn_00004fa0 () {
| int16_t var_0h_2;
| int16_t var_ch_2;
| int16_t var_10h_2;
| int16_t var_14h_2;
| int16_t var_18h_3;
| FILE * stream;
| int16_t var_24h;
| int16_t var_2ch;
| int16_t var_38h;
| int16_t var_54h;
| int16_t var_58h;
| int16_t var_d4h;
| int16_t var_d8h;
| int16_t var_10c0h;
0x00004fa0 blmi 0xfe3179d4 | __asm ("blmi aav.0x00005e00");
0x00004fa4 push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00004fa8 sub.w sp, sp, 0x10c0 |
0x00004fac add r2, pc | r2 += pc;
0x00004fae ldr r4, [pc, 0x228] |
0x00004fb0 sub sp, 0x1c |
0x00004fb2 ldr r3, [r2, r3] | r3 = *((r2 + r3));
0x00004fb4 add.w r1, sp, 0x10c0 | r1 += var_10c0h;
0x00004fb8 add r4, pc | r4 = 0xa196;
0x00004fba adds r1, 0x14 | r1 += 0x14;
0x00004fbc ldr r3, [r3] | r3 = *(r3);
0x00004fbe str r3, [r1] | *(r1) = r3;
0x00004fc0 mov.w r3, 0 | r3 = 0;
0x00004fc4 ldr r3, [r4] | r3 = *(0xa196);
0x00004fc6 adds r3, 2 | r3 += 2;
| if (r3 == 2) {
0x00004fc8 beq.w 0x5142 | goto label_5;
| }
| label_3:
0x00004fcc ldr r3, [pc, 0x20c] |
0x00004fce add r4, sp, 0xd8 | r4 += var_d8h;
0x00004fd0 mov.w fp, 0 |
0x00004fd4 add r3, pc | r3 = 0xa1b4;
0x00004fd6 str r3, [sp, 0xc] | var_ch_2 = r3;
0x00004fd8 add r3, sp, 0x58 | r3 += var_58h;
0x00004fda str r3, [sp, 0x1c] | stream = r3;
0x00004fdc add r3, sp, 0x54 | r3 += var_54h;
0x00004fde str r3, [sp, 0x18] | var_18h_3 = r3;
| label_0:
0x00004fe0 ldr r6, [pc, 0x1fc] |
0x00004fe2 movs r2, 0x7c | r2 = 0x7c;
0x00004fe4 ldr r0, [sp, 0x1c] | r0 = stream;
0x00004fe6 movs r1, 0 | r1 = 0;
0x00004fe8 blx 0x1e28 | fgetc (r0);
0x00004fec add r6, pc | r6 = 0xa1d0;
0x00004fee movs r5, 1 | r5 = 1;
0x00004ff0 ldr r0, [r6] | r0 = *(0xa1d0);
0x00004ff2 str r5, [r4, -0x84] | *((r4 - 0x84)) = r5;
0x00004ff6 cmp r0, 0 |
0x00004ff8 it lt |
| if (r0 >= 0) {
0x00004ffa movlt r5, 0 | r5 = 0;
| }
| if (r0 >= 0) {
0x00004ffc blt 0x501c |
0x00004ffe blx 0x1c00 | vhangup ();
0x00005002 ldr r2, [r6] | r2 = *(r6);
0x00005004 add.w r0, r4, r0, lsl 2 | r0 = r4 + (r0 << 2);
0x00005008 ldr r3, [r0, -0x84] | r3 = *((r0 - 0x84));
0x0000500c and r1, r2, 0x1f | r1 = r2 & 0x1f;
0x00005010 lsls r5, r1 | r5 <<= r1;
0x00005012 orrs r5, r3 | r5 |= r3;
0x00005014 str r5, [r0, -0x84] | *((r0 - 0x84)) = r5;
0x00005016 ldrb r4, [r0, r2] | r4 = *((r0 + r2));
0x00005018 bic.w r5, r2, r2, asr 31 | r5 = BIT_MASK (r2, r2);
| }
0x0000501c ldr r6, [pc, 0x1c4] |
0x0000501e add r6, pc | r6 = 0xa206;
0x00005020 ldr r0, [r6, 4] | r0 = *(0xa20a);
0x00005022 cmp r0, 0 |
| if (r0 >= 0) {
0x00005024 blt 0x5048 |
0x00005026 blx 0x1c00 | vhangup ();
0x0000502a ldr r1, [r6, 4] | r1 = *((r6 + 4));
0x0000502c add.w r0, r4, r0, lsl 2 | r0 = r4 + (r0 << 2);
0x00005030 movs r3, 1 | r3 = 1;
0x00005032 ldr r2, [r0, -0x84] | r2 = *((r0 - 0x84));
0x00005036 cmp r5, r1 |
0x00005038 it lt |
| if (r5 >= r1) {
0x0000503a movlt r5, r1 | r5 = r1;
| }
0x0000503c and r1, r1, 0x1f | r1 &= 0x1f;
0x00005040 lsls r3, r1 | r3 <<= r1;
0x00005042 orrs r3, r2 | r3 |= r2;
0x00005044 str r3, [r0, -0x84] | *((r0 - 0x84)) = r3;
| }
0x00005048 movs r3, 0 | r3 = 0;
0x0000504a ldr r1, [sp, 0x18] | r1 = var_18h_3;
0x0000504c adds r0, r5, 1 | r0 = r5 + 1;
0x0000504e mov r2, r3 | r2 = r3;
0x00005050 str.w fp, [sp] | __asm ("str.w fp, [sp]");
0x00005054 blx 0x1b54 | r0 = fcn_00001b54 ();
0x00005058 cmp r0, 0 |
| if (r0 < 0) {
0x0000505a blt.w 0x51c6 | goto label_6;
| }
0x0000505e ldr r3, [r4, -0x84] | r3 = *((r4 - 0x84));
0x00005062 ands r6, r3, 1 | r6 = r3 & 1;
0x00005066 str r6, [sp, 0x14] | var_14h_2 = r6;
| if (r6 != r3) {
0x00005068 bne 0x50fa | goto label_4;
| }
0x0000506a ldr r5, [pc, 0x17c] |
0x0000506c add r5, pc | r5 = 0xa25a;
0x0000506e ldr r0, [r5, 4] | r0 = *(0xa25e);
0x00005070 cmp r0, 0 |
| if (r0 < 0) {
0x00005072 blt.w 0x5188 | goto label_7;
| }
0x00005076 blx 0x1c00 | r0 = vhangup ();
0x0000507a mov r3, r0 | r3 = r0;
0x0000507c ldr r0, [r5, 4] | r0 = *((r5 + 4));
0x0000507e add.w r3, r4, r3, lsl 2 | r3 = r4 + (r3 << 2);
0x00005082 and r1, r0, 0x1f | r1 = r0 & 0x1f;
0x00005086 ldr r2, [r3, -0x84] | r2 = *((r3 - 0x84));
0x0000508a movs r3, 1 | r3 = 1;
0x0000508c lsls r3, r1 | r3 <<= r1;
0x0000508e tst r3, r2 |
| if ((r3 & r2) == 0) {
0x00005090 beq 0x5188 | goto label_7;
| }
0x00005092 add.w sl, sp, 0xd4 | sl += var_d4h;
0x00005096 str r6, [sp, 0x10] | var_10h_2 = r6;
0x00005098 add.w sb, sp, 0x38 | sb += var_38h;
0x0000509c add.w r8, sp, 0x2c | r8 += var_2ch;
0x000050a0 add r7, sp, 0x24 | r7 += var_24h;
0x000050a2 mov.w r6, 0x1000 | r6 = 0x1000;
0x000050a6 mov r5, sl | r5 = sl;
| do {
0x000050a8 movs r3, 0xc | r3 = 0xc;
0x000050aa mov.w sl, 1 | sl = 1;
0x000050ae movs r2, 0x40 | r2 = 0x40;
0x000050b0 mov r1, sb | r1 = sb;
0x000050b2 strd r5, r6, [r4, -0xb4] | __asm ("strd r5, r6, [r4, -0xb4]");
0x000050b6 str r8, [r4, -0xa0] | *((r4 - 0xa0)) = r8;
0x000050ba strd r3, r7, [r4, -0x9c] | __asm ("strd r3, r7, [r4, -0x9c]");
0x000050be strd fp, fp, [r4, -0x90] | __asm ("strd fp, fp, [r4, -0x90]");
0x000050c2 str fp, [r4, -0x88] | *((r4 - 0x88)) = fp;
0x000050c6 str sl, [r4, -0x94] | *((r4 - 0x94)) = sl;
0x000050ca blx 0x1f7c | r0 = fcn_00001f7c ();
0x000050ce cmp r0, 0 |
| if (r0 < 0) {
0x000050d0 blt 0x50e8 | goto label_8;
| }
0x000050d2 cmp r0, 0xf |
| if (r0 > 0xf) {
0x000050d4 ble 0x50e2 |
0x000050d6 ldr r2, [r4, -0x4] | r2 = *((r4 - 0x4));
0x000050da cmp r0, r2 |
0x000050dc it hs |
| if (r0 >= r2) {
0x000050de cmphs r2, 0xf | __asm ("cmphs r2, 0xf");
| }
| if (r0 > r2) {
0x000050e0 bhi 0x5132 | goto label_9;
| }
| }
| label_2:
0x000050e2 ldr r3, [sp, 0xc] | r3 = var_ch_2;
0x000050e4 ldr r0, [r3, 4] | r0 = *((r3 + 4));
0x000050e6 b 0x50a8 |
| } while (1);
| label_8:
0x000050e8 blx 0x1df8 | r0 = vasprintf_chk ()
0x000050ec ldr r3, [r0] | r3 = *(r0);
0x000050ee cmp r3, 0xb |
| if (r3 != 0xb) {
0x000050f0 bne 0x5120 | goto label_10;
| }
| label_1:
0x000050f2 ldr r3, [sp, 0x10] | r3 = var_10h_2;
0x000050f4 cmp r3, 0 |
| if (r3 == 0) {
0x000050f6 beq.w 0x4fe0 | goto label_0;
| }
| label_4:
0x000050fa ldr r2, [pc, 0xf0] |
0x000050fc add.w r1, sp, 0x10c0 | r1 += var_10c0h;
0x00005100 ldr r3, [pc, 0xd0] | r3 = *(0x51d4);
0x00005102 adds r1, 0x14 | r1 += 0x14;
0x00005104 add r2, pc | r2 = 0xa2f6;
0x00005106 ldr r3, [r2, r3] | r3 = *(0xa2f6);
0x00005108 ldr r2, [r3] | r2 = *(0xa2f6);
0x0000510a ldr r3, [r1] | r3 = *(r1);
0x0000510c eors r2, r3 | r2 ^= r3;
0x0000510e mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00005112 bne 0x51cc | goto label_11;
| }
0x00005114 ldr r0, [sp, 0x14] | r0 = var_14h_2;
0x00005116 add.w sp, sp, 0x10c0 |
0x0000511a add sp, 0x1c |
0x0000511c pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| do {
| label_10:
0x00005120 ldr r5, [pc, 0xcc] |
0x00005122 add r5, pc | r5 = 0xa316;
0x00005124 ldr r0, [r5, 4] | r0 = *(0xa31a);
0x00005126 blx 0x2018 | fcn_00002018 ();
0x0000512a mvn r3, 1 | r3 = ~1;
0x0000512e str r3, [r5, 4] | *((r5 + 4)) = r3;
0x00005130 b 0x50f2 | goto label_1;
| label_9:
0x00005132 ldrh r2, [r4] | r2 = *(r4);
0x00005134 subs r2, 2 | r2 -= 2;
0x00005136 uxth r2, r2 | r2 = (int16_t) r2;
0x00005138 cmp r2, 1 |
0x0000513a bls 0x5120 |
| } while (r2 < 1);
0x0000513c str.w sl, [sp, 0x10] | __asm ("str.w sl, [var_10h_2]");
0x00005140 b 0x50e2 | goto label_2;
| label_5:
0x00005142 ldr r6, [pc, 0xb0] |
0x00005144 movs r1, 0x40 | r1 = 0x40;
0x00005146 mov.w r2, 0x180 | r2 = 0x180;
0x0000514a movt r1, 8 | r1 = (r1 & 0xFFFF) | 0x80000;
0x0000514e add r6, pc | r6 = 0xa348;
0x00005150 mov r0, r6 | r0 = r6;
0x00005152 blx 0x1cb4 | r0 = getenv (r0);
0x00005156 subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 >= r0) {
0x00005158 blt 0x517c |
0x0000515a mov.w r0, 0x800 |
0x0000515e movt r0, 8 | r0 = 0x80800;
0x00005162 blx 0x2024 | r0 = fcn_00002024 ();
0x00005166 cmp r0, 0 |
0x00005168 str r0, [r4] | *(r4) = r0;
| if (r0 > 0) {
0x0000516a ble 0x5174 |
0x0000516c movs r2, 6 | r2 = 6;
0x0000516e mov r1, r6 | r1 = r6;
0x00005170 blx 0x1dec | errno_location ();
| }
0x00005174 mov r0, r5 | r0 = r5;
0x00005176 blx 0x2018 | fcn_00002018 ();
0x0000517a b 0x4fcc | goto label_3;
| }
0x0000517c ldr r0, [pc, 0x78] |
0x0000517e mov r1, r6 | r1 = r6;
0x00005180 add r0, pc | r0 = 0xa37c;
0x00005182 bl 0x469c | fcn_0000469c (r0);
0x00005186 b 0x4fcc | goto label_3;
| label_7:
0x00005188 ldr r5, [pc, 0x70] |
0x0000518a add r5, pc | r5 = 0xa38a;
0x0000518c ldr r0, [r5] | r0 = *(0xa38a);
0x0000518e cmp r0, 0 |
| if (r0 < 0) {
0x00005190 blt 0x50fa | goto label_4;
| }
0x00005192 blx 0x1c00 | r0 = vhangup ();
0x00005196 add.w r4, r4, r0, lsl 2 | r4 += (r0 << 2);
0x0000519a ldr r0, [r5] | r0 = *(r5);
0x0000519c movs r3, 1 | r3 = 1;
0x0000519e ldr r2, [r4, -0x84] | r2 = *((r4 - 0x84));
0x000051a2 and r1, r0, 0x1f | r1 = r0 & 0x1f;
0x000051a6 lsls r3, r1 | r3 <<= r1;
0x000051a8 tst r3, r2 |
| if ((r3 & r2) == 0) {
0x000051aa beq 0x50fa | goto label_4;
| }
0x000051ac ldr r5, [pc, 0x50] |
0x000051ae add r4, sp, 0xd4 | r4 += var_d4h;
0x000051b0 add r5, pc | r5 = 0xa3b4;
0x000051b2 b 0x51b6 |
| while (r0 > 0) {
0x000051b4 ldr r0, [r5] | r0 = *(r5);
0x000051b6 mov.w r2, 0x110 | r2 = 0x110;
0x000051ba mov r1, r4 | r1 = r4;
0x000051bc blx 0x1abc | r0 = read (r0, r1, r2);
0x000051c0 cmp r0, 0 |
0x000051c2 bgt 0x51b4 |
| }
0x000051c4 b 0x50fa | goto label_4;
| label_6:
0x000051c6 movs r3, 1 | r3 = 1;
0x000051c8 str r3, [sp, 0x14] | var_14h_2 = r3;
0x000051ca b 0x50fa | goto label_4;
| label_11:
0x000051cc blx 0x1bac | cfgetispeed ();
0x000051d0 ldrsh r0, [r0, r0] | r0 = *((r0 + r0));
0x000051d2 movs r0, r0 |
0x000051d4 lsls r0, r4, 8 | r0 = r4 << 8;
0x000051d6 movs r0, r0 |
0x000051d8 str r4, [r1, 4] | *((r1 + 4)) = r4;
0x000051da movs r0, r0 |
0x000051dc str r0, [r6] | *(r6) = r0;
0x000051de movs r0, r0 |
0x000051e0 str r0, [r3] | *(r3) = r0;
0x000051e2 movs r0, r0 |
0x000051e4 ldrsh r6, [r4, r7] | r6 = *((r4 + r7));
0x000051e6 movs r0, r0 |
0x000051e8 ldrsh r0, [r3, r6] | r0 = *((r3 + r6));
0x000051ea movs r0, r0 |
0x000051ec ldrb r0, [r5, r2] | r0 = *((r5 + r2));
0x000051ee movs r0, r0 |
0x000051f0 ldrsh r2, [r4, r3] | r2 = *((r4 + r3));
0x000051f2 movs r0, r0 |
0x000051f4 cmp r7, 0x1a |
0x000051f6 movs r0, r0 |
0x000051f8 cmp r6, 0xfc |
0x000051fa movs r0, r0 |
0x000051fc ldrsh r2, [r7, r1] | r2 = *((r7 + r1));
0x000051fe movs r0, r0 |
0x00005200 ldrsh r4, [r2, r1] | r4 = *((r2 + r1));
0x00005202 movs r0, r0 |
0x00005204 mov r3, r1 | r3 = r1;
0x00005206 push {r4, r5, r6, lr} |
0x00005208 ubfx r5, r0, 0xa, 1 | r5 = (r0 >> 0xa) & ((1 << 1) - 1);
0x0000520c ldr r6, [r3, 0xc] | r6 = *((r3 + 0xc));
0x0000520e lsls r5, r5, 1 | r5 <<= 1;
0x00005210 ubfx r0, r0, 0xe, 1 | r0 = (r0 >> 0xe) & ((1 << 1) - 1);
0x00005214 ldr r1, [r1] | r1 = *(r1);
0x00005216 orr ip, r6, 0x8a00 |
0x0000521a ldr r4, [r3, 4] | r4 = *((r3 + 4));
0x0000521c orr.w r0, r5, r0, lsl 2 | r0 = r5 | (r0 << 2);
0x00005220 orr ip, ip, 0x1b |
| if (r5 == 0) {
0x00005224 cbnz r5, 0x5246 |
0x00005226 ldr r5, [r3, 8] | r5 = *((r3 + 8));
0x00005228 bic ip, r6, 0x1000 | ip = BIT_MASK (r6, 0x1000);
0x0000522c bic ip, ip, 0xf | ip = BIT_MASK (ip, 0xf);
0x00005230 orr ip, ip, 0x8a00 |
0x00005234 bic r5, r5, 0x300 | r5 = BIT_MASK (r5, 0x300);
0x00005238 orr ip, ip, 0x10 |
0x0000523c orr r5, r5, 0x4b8 | r5 |= 0x4b8;
0x00005240 orr r5, r5, 7 | r5 |= 7;
0x00005244 str r5, [r3, 8] | *((r3 + 8)) = r5;
| }
0x00005246 lsls r0, r0, 0x1d | r0 <<= 0x1d;
0x00005248 bic lr, r4, 0xff00 | lr = BIT_MASK (r4, 0xff00);
0x0000524c itete mi |
| if (r0 < r0) {
0x0000524e bicmi r1, r1, 0x1ae0 | __asm ("bicmi r1, r1, sym.imp.sigprocmask");
| }
| if (r0 < r0) {
0x00005250 strpl r7, [r2, r7] | *((r2 + r7)) = r7;
| }
| if (r0 < r0) {
0x00005252 bicmi r1, r1, 0x5a80 | __asm ("bicmi r1, r1, 0x5a80");
| }
| if (r0 >= r0) {
0x00005256 bic r1, r1, 1 | r1 = BIT_MASK (r1, 1);
| }
0x0000525a bic r1, r1, 0x61 | r1 = BIT_MASK (r1, 0x61);
0x0000525e bic lr, lr, 0xfa | lr = BIT_MASK (lr, 0xfa);
0x00005262 ite mi |
| if (r0 >= r0) {
0x00005264 orrmi r1, r1, 0x6500 | r1 |= 0x6500;
| }
| if (r0 >= r0) {
0x00005268 orr r1, r1, 0x2500 | r1 |= 0x2500;
| }
0x0000526c orr r4, lr, 5 | r4 = lr | 5;
0x0000526e lsls r5, r0, 0x10 | r5 = r0 << 0x10;
0x00005270 orr r1, r1, 2 | r1 |= 2;
0x00005274 mov r0, r3 | r0 = r3;
0x00005276 vldr d16, [pc, 0x60] | __asm ("vldr d16, [0x000052dc]");
0x0000527a vldr d17, [pc, 0x64] | __asm ("vldr d17, [0x000052e4]");
0x0000527e str r4, [r3, 4] | *((r3 + 4)) = r4;
0x00005280 mov r4, r2 | r4 = r2;
0x00005282 str r1, [r0], 0x11 | *(r0) = r1;
| r0 += 0x11;
0x00005286 movs r1, 0 | r1 = 0;
0x00005288 vst1.8 {d16, d17}, [r0] | __asm ("vst1.8 {d16, d17}, [r0]");
0x0000528c strb.w r1, [r3, 0x21] | *((r3 + 0x21)) = r1;
| if (r2 != 0) {
0x00005290 cbz r2, 0x52a2 |
0x00005292 bic ip, ip, 0x5c0 | ip = BIT_MASK (ip, 0x5c0);
0x00005296 bic ip, ip, 4 | ip = BIT_MASK (ip, 4);
0x0000529a orr r4, ip, 0x8a00 | r4 = ip | 0x8a00;
0x0000529e orr r4, r4, 0x3b | r4 |= 0x3b;
| }
0x000052a2 mov r2, r3 | r2 = r3;
0x000052a4 movs r1, 1 | r1 = 1;
0x000052a6 movs r0, 0 | r0 = 0;
0x000052a8 str r4, [r3, 0xc] | *((r3 + 0xc)) = r4;
0x000052aa blx 0x1c84 | r0 = vsyslog_chk ();
0x000052ae cbnz r0, 0x52ca |
| while (1) {
0x000052b0 movs r2, 0 | r2 = 0;
0x000052b2 movs r1, 3 | r1 = 3;
0x000052b4 mov r0, r2 | r0 = r2;
0x000052b6 blx 0x1ec8 | fcn_00001ec8 ();
0x000052ba pop.w {r4, r5, r6, lr} |
0x000052be bic r2, r0, 0x800 | r2 = BIT_MASK (r0, 0x800);
0x000052c2 movs r1, 4 | r1 = 4;
0x000052c4 movs r0, 0 | r0 = 0;
0x000052c6 b.w 0x1ec4 | void (*0x1ec4)() ();
0x000052ca ldr r0, [pc, 0x1c] |
0x000052cc add r0, pc | r0 = 0xa5ba;
0x000052ce bl 0x469c | fcn_0000469c (r0);
0x000052d2 b 0x52b0 |
| }
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/sbin/agetty @ 0x555c */
| #include <stdint.h>
|
; (fcn) fcn.0000555c () | void fcn_0000555c (int16_t arg1, int16_t arg2, int16_t arg3) {
| int16_t var_0h_2;
| int32_t var_0h_3;
| int32_t var_6h;
| size_t size;
| int16_t var_10h;
| int32_t var_84h;
| size_t nitems;
| void * buf;
| int16_t var_128h;
| int16_t var_129h;
| int16_t var_12ch;
| void * var_0h_4;
| int16_t var_0h_5;
| int16_t var_158h;
| int16_t var_0h;
| int16_t var_8h;
| int16_t var_ch_2;
| char * s;
| int16_t var_3h;
| int16_t var_7ch;
| int16_t var_4h;
| int16_t var_ch_4;
| int16_t var_10h_2;
| int32_t var_14h;
| int32_t var_14h_2;
| int32_t var_1ch;
| int32_t var_1ch_2;
| int32_t var_24h;
| int32_t var_24h_2;
| int16_t var_2ch;
| int16_t var_34h;
| FILE * stream;
| int16_t var_134h;
| int16_t var_0h_6;
| int16_t var_ch;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x0000555c push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x00005560 mov r7, r2 | r7 = r2;
0x00005562 ldr r2, [pc, 0x16c] |
0x00005564 mov sl, r1 | sl = r1;
0x00005566 mov r4, r0 | r4 = r0;
0x00005568 ldr r3, [pc, 0x168] | r3 = *(0x56d4);
0x0000556a ldr r6, [r1] | r6 = *(r1);
0x0000556c add r2, pc | r2 = 0xac42;
0x0000556e vpush {d8} | __asm ("vpush {d8}");
0x00005570 ldrh r2, [r0, 0x18] | r2 = *((r0 + 0x18));
0x00005572 sub sp, 0x14 |
0x00005574 ldr r3, [r2, r3] |
0x00005576 ands r6, r6, 0x20000 | r6 &= 0x20000;
0x0000557a ldr.w r8, [r7, 4] | r8 = *((r7 + 4));
0x0000557e ldr r3, [r3] | r3 = *(0xac42);
0x00005580 str r3, [sp, 0xc] | var_ch = r3;
0x00005582 mov.w r3, 0 | r3 = 0;
0x00005586 beq 0x55d8 |
| while (r3 != 0xb) {
| label_0:
0x00005588 ldrb r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x0000558a lsls r2, r3, 0x1f | r2 = r3 << 0x1f;
| if (r2 < r3) {
0x0000558c bpl 0x559a |
0x0000558e ldr.w r0, [sl] | r0 = *(sl);
0x00005592 ands r0, r0, 0x1000 | r0 &= 0x1000;
| if (r0 == r0) {
0x00005596 beq.w 0x56ae | goto label_33;
| }
| }
| label_7:
0x0000559a ldr.w sl, [r4, 8] | sl = *((r4 + 8));
0x0000559e cmp.w sl, 0 |
| if (sl != 0) {
0x000055a2 bne 0x564c | goto label_34;
| }
| label_4:
0x000055a4 ldrb r3, [r4, 0x10] | r3 = *((r4 + 0x10));
0x000055a6 lsls r3, r3, 0x1e | r3 <<= 0x1e;
| if (r3 < r3) {
0x000055a8 bmi 0x563c | goto label_35;
| }
| label_3:
0x000055aa ldr r0, [r4, 0xc] | r0 = *((r4 + 0xc));
0x000055ac blx 0x1af0 | fcn_00001af0 ();
0x000055b0 ldr r2, [r4, 4] | r2 = *((r4 + 4));
0x000055b2 movs r3, 0 | r3 = 0;
0x000055b4 strd r3, r3, [r4, 4] | __asm ("strd r3, r3, [r4, 4]");
0x000055b8 ldr r3, [pc, 0x118] | r3 = *(0x56d4);
0x000055ba str r2, [r4, 0xc] | *((r4 + 0xc)) = r2;
0x000055bc ldr r2, [pc, 0x118] |
0x000055be add r2, pc | r2 = 0xac9a;
0x000055c0 ldr r3, [r2, r3] | r3 = *(0xac9a);
0x000055c2 ldr r2, [r3] | r2 = *(0xac9a);
0x000055c4 ldr r3, [sp, 0xc] | r3 = var_ch;
0x000055c6 eors r2, r3 | r2 ^= r3;
0x000055c8 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x000055cc bne 0x56c0 | goto label_36;
| }
0x000055ce add sp, 0x14 |
0x000055d0 vpop {d8} | __asm ("vpop {d8}");
0x000055d4 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
0x000055d8 ldr.w sb, [pc, 0x100] |
0x000055dc mov.w fp, 2 |
0x000055e0 blx 0x1df8 | vasprintf_chk ()
0x000055e4 vldr d8, [pc, 0xe0] | __asm ("vldr d8, [0x000056cc]");
0x000055e8 mov r5, r0 | r5 = r0;
0x000055ea add sb, pc | sb = 0xacca;
| label_1:
0x000055ec mov r2, fp | r2 = fp;
0x000055ee mov r1, sb | r1 = sb;
0x000055f0 movs r0, 1 | r0 = 1;
0x000055f2 str r6, [r5] | *(r5) = r6;
0x000055f4 blx 0x1e58 | r0 = fileno (r0);
0x000055f8 cmp r0, 0 |
0x000055fa ldr r3, [r5] | r3 = *(r5);
| if (r0 <= 0) {
0x000055fc ble 0x561a | goto label_37;
| }
0x000055fe subs.w fp, fp, r0 |
| if (fp != fp) {
0x00005602 bne 0x5634 | goto label_38;
| }
0x00005604 cmp r3, 0xb |
0x00005606 bne 0x5588 |
| }
0x00005608 vldr d16, [pc, 0xbc] | __asm ("vldr d16, [0x000056cc]");
0x0000560c mov r1, fp | r1 = fp;
0x0000560e mov r0, sp | r0 = sp;
0x00005610 vstr d16, [sp] | __asm ("vstr d16, [sp]");
0x00005614 blx 0x1afc | fcn_00001afc ();
0x00005616 orns r7, r2, r6, ror 26 | __asm ("orns r7, r2, r6, ror 26");
| label_37:
0x0000561a cmp r3, 4 |
0x0000561c it ne |
| if (r3 == 4) {
0x0000561e cmpne r3, 0xb | __asm ("cmpne r3, 0xb");
| goto label_39;
| }
| if (r3 != 4) {
| label_39:
0x00005620 bne 0x5588 | goto label_0;
| }
0x00005622 cmp r3, 0xb |
| if (r3 != 0xb) {
0x00005624 bne 0x55ec | goto label_1;
| }
| label_2:
0x00005626 movs r1, 0 | r1 = 0;
0x00005628 mov r0, sp | r0 = sp;
0x0000562a vstr d8, [sp] | __asm ("vstr d8, [sp]");
0x0000562e blx 0x1afc | fcn_00001afc ();
0x00005632 b 0x55ec | goto label_1;
| label_38:
0x00005634 cmp r3, 0xb |
0x00005636 add sb, r0 | sb += r0;
| if (r3 != 0xb) {
0x00005638 bne 0x55ec | goto label_1;
| }
0x0000563a b 0x5626 | goto label_2;
| label_35:
0x0000563c mov r2, r7 | r2 = r7;
0x0000563e movs r1, 1 | r1 = 1;
0x00005640 str.w r8, [r7, 4] | __asm ("str.w r8, [r7, 4]");
0x00005644 movs r0, 0 | r0 = 0;
0x00005646 blx 0x1c84 | vsyslog_chk ();
0x0000564a b 0x55aa | goto label_3;
| label_34:
0x0000564c ldr r6, [r4, 4] | r6 = *((r4 + 4));
0x0000564e mov.w sb, 0 | sb = 0;
0x00005652 blx 0x1df8 | vasprintf_chk ()
0x00005656 vldr d8, [pc, 0x70] | __asm ("vldr d8, [0x000056cc]");
0x0000565a mov r5, r0 | r5 = r0;
| label_5:
0x0000565c mov r2, sl | r2 = sl;
0x0000565e mov r1, r6 | r1 = r6;
0x00005660 movs r0, 1 | r0 = 1;
0x00005662 str.w sb, [r5] | __asm ("str.w sb, [r5]");
0x00005664 str r0, [sp] | *(sp) = r0;
0x00005666 blx 0x1e58 | r0 = fileno (r0);
0x0000566a cmp r0, 0 |
0x0000566c ldr r3, [r5] | r3 = *(r5);
| if (r0 <= 0) {
0x0000566e ble 0x568c | goto label_40;
| }
0x00005670 subs.w sl, sl, r0 | sl -= r0;
| if (sl != sl) {
0x00005674 bne 0x56a6 | goto label_41;
| }
0x00005676 cmp r3, 0xb |
| if (r3 != 0xb) {
0x00005678 bne 0x55a4 | goto label_4;
| }
0x0000567a vldr d16, [pc, 0x4c] | __asm ("vldr d16, [0x000056cc]");
0x0000567e mov r1, sl | r1 = sl;
0x00005680 mov r0, sp | r0 = sp;
0x00005682 vstr d16, [sp] | __asm ("vstr d16, [sp]");
0x00005686 blx 0x1afc | fcn_00001afc ();
0x0000568a b 0x55a4 | goto label_4;
| label_40:
0x0000568c cmp r3, 4 |
0x0000568e it ne |
| if (r3 == 4) {
0x00005690 cmpne r3, 0xb | __asm ("cmpne r3, 0xb");
| goto label_42;
| }
| if (r3 != 4) {
| label_42:
0x00005692 bne 0x55a4 | goto label_4;
| }
0x00005694 cmp r3, 0xb |
| if (r3 != 0xb) {
0x00005696 bne 0x565c | goto label_5;
| }
| label_6:
0x00005698 movs r1, 0 | r1 = 0;
0x0000569a mov r0, sp | r0 = sp;
0x0000569c vstr d8, [sp] | __asm ("vstr d8, [sp]");
0x000056a0 blx 0x1afc | fcn_00001afc ();
0x000056a4 b 0x565c | goto label_5;
| label_41:
0x000056a6 cmp r3, 0xb |
0x000056a8 add r6, r0 | r6 += r0;
| if (r3 != 0xb) {
0x000056aa bne 0x565c | goto label_5;
| }
0x000056ac b 0x5698 | goto label_6;
| label_33:
0x000056ae ldr r3, [r7, 4] | r3 = *((r7 + 4));
0x000056b0 mov r2, r7 | r2 = r7;
0x000056b2 movs r1, 1 | r1 = 1;
0x000056b4 orr r3, r3, 5 | r3 |= 5;
0x000056b8 str r3, [r7, 4] | *((r7 + 4)) = r3;
0x000056ba blx 0x1c84 | vsyslog_chk ();
0x000056bc invalid |
0x000056be b 0x559a | goto label_7;
| label_36:
0x000056c0 blx 0x1bac | cfgetispeed ();
0x000056c4 nop.w |
0x000056c8 movs r0, r0 |
0x000056ca movs r0, r0 |
0x000056cc uxth r0, r0 | r0 = (int16_t) r0;
0x000056ce lsrs r6, r4, 0x1b | r6 = r4 >> 0x1b;
0x000056d0 ldr r0, [r0, r1] | r0 = *((r0 + r1));
0x000056d2 movs r0, r0 |
0x000056d4 lsls r0, r4, 8 | r0 = r4 << 8;
0x000056d6 movs r0, r0 |
0x000056d8 ldrsb r6, [r5, r7] | r6 = *((r5 + r7));
0x000056da movs r0, r0 |
0x000056dc cmp r3, 0x42 |
0x000056de movs r0, r0 |
0x000056e0 ldr r3, [pc, 0x2e4] |
0x000056e2 push.w {r4, r5, r6, r7, r8, sb, sl, fp, lr} |
0x000056e6 mov sb, r2 | sb = r2;
0x000056e8 vpush {d8} | __asm ("vpush {d8}");
0x000056ec sub sp, 0x13c |
0x000056ee add r3, pc | r3 = 0xb0ba;
0x000056f0 mov r6, r1 | r6 = r1;
0x000056f2 ldr r2, [pc, 0x2d8] |
0x000056f4 mov r1, r3 | r1 = r3;
0x000056f6 str r3, [sp, 4] | var_4h = r3;
0x000056f8 mov r7, r0 | r7 = r0;
0x000056fa ldr r3, [pc, 0x2d4] | r3 = *(0x59d2);
0x000056fc mov.w r8, 0 | r8 = 0;
0x00005700 add r2, pc | r2 = 0xb0d2;
0x00005702 ldr.w sl, [pc, 0x2d0] |
0x00005706 vldr d8, [pc, 0x2b8] | __asm ("vldr d8, [0x000059c4]");
0x0000570a ldr r3, [r2, r3] |
0x0000570c add sl, pc | sl = 0xb0e6;
0x0000570e ldr r3, [r3] | r3 = imp.__aeabi_unwind_cpp_pr0;
0x00005710 str r3, [sp, 0x134] | var_134h = r3;
0x00005712 mov.w r3, 0 | r3 = 0;
| do {
| label_9:
0x00005716 mov r2, sb | r2 = sb;
0x00005718 mov r1, r6 | r1 = r6;
0x0000571a mov r0, r7 | r0 = r7;
0x0000571c bl 0x555c | fcn_0000555c (r0, r1, r2);
0x00005720 ldr r3, [r6] | r3 = *(r6);
0x00005722 lsls r2, r3, 0x10 | r2 = r3 << 0x10;
| if (r2 >= r3) {
0x00005724 bpl 0x57d8 | goto label_43;
| }
0x00005726 mov r0, sl | r0 = sl;
0x00005728 blx 0x1cd8 | r0 = malloc (r0);
0x0000572c bl 0x4fa0 | r0 = fcn_00004fa0 ();
0x00005730 cmp r0, 0 |
| if (r0 != 0) {
0x00005732 bne 0x57ca | goto label_44;
| }
0x00005734 mov r2, sb | r2 = sb;
0x00005736 mov r1, r6 | r1 = r6;
0x00005738 mov r0, r7 | r0 = r7;
0x0000573a bl 0x52ec | fcn_000052ec (r0, r1, r2);
0x0000573e ldr r4, [r7, 0xc] | r4 = *((r7 + 0xc));
| if (r4 != 0) {
0x00005740 cbz r4, 0x5750 |
0x00005742 ldr r1, [r7, 4] | r1 = *((r7 + 4));
| if (r1 == 0) {
0x00005744 cbz r1, 0x5750 | goto label_45;
| }
0x00005746 mov r0, r4 | r0 = r4;
0x00005748 blx 0x1a74 | r0 = strcmp (r0, r1);
0x0000574c mov r5, r0 | r5 = r0;
| if (r0 == 0) {
0x0000574e cbz r0, 0x57be | goto label_46;
| }
| }
| label_45:
0x00005750 ldr r3, [r6] | r3 = *(r6);
0x00005752 lsls r3, r3, 0x13 | r3 <<= 0x13;
0x00005754 bpl 0x5716 |
| } while (r3 >= r3);
0x00005756 ldr r5, [pc, 0x280] |
0x00005758 mov.w fp, 9 |
0x0000575c blx 0x1df8 | r0 = vasprintf_chk ()
0x00005760 mov r4, r0 | r4 = r0;
0x00005762 add r5, pc | r5 = 0xb140;
| do {
| label_8:
0x00005764 mov r2, fp | r2 = fp;
0x00005766 mov r1, r5 | r1 = r5;
0x00005768 movs r0, 1 | r0 = 1;
0x0000576a str.w r8, [r4] | __asm ("str.w r8, [r4]");
0x0000576e blx 0x1e58 | r0 = fileno (r0);
0x00005772 cmp r0, 0 |
0x00005774 ldr r3, [r4] | r3 = *(r4);
| if (r0 <= 0) {
0x00005776 ble 0x5792 | goto label_47;
| }
0x00005778 subs.w fp, fp, r0 |
| if (fp == fp) {
0x0000577c beq 0x57ac | goto label_48;
| }
0x0000577e cmp r3, 0xb |
0x00005780 add r5, r0 | r5 += r0;
0x00005782 bne 0x5764 |
| } while (r3 != 0xb);
0x00005784 movs r1, 0 | r1 = 0;
0x00005786 add r0, sp, 0x10 | r0 += var_10h_2;
0x00005788 vstr d8, [sp, 0x10] | __asm ("vstr d8, [sp, 0x10]");
0x0000578c blx 0x1afc | fcn_00001afc ();
0x00005790 b 0x5764 | goto label_8;
| label_47:
0x00005792 cmp r3, 4 |
0x00005794 it ne |
| if (r3 == 4) {
0x00005796 cmpne r3, 0xb | __asm ("cmpne r3, 0xb");
| goto label_49;
| }
| if (r3 != 4) {
| label_49:
0x00005798 bne 0x5716 | goto label_9;
| }
0x0000579a cmp r3, 0xb |
| if (r3 != 0xb) {
0x0000579c bne 0x5764 | goto label_8;
| }
0x0000579e movs r1, 0 | r1 = 0;
0x000057a0 add r0, sp, 0x10 | r0 += var_10h_2;
0x000057a2 vstr d8, [sp, 0x10] | __asm ("vstr d8, [sp, 0x10]");
0x000057a4 ldrh r4, [r0, 0x18] | r4 = *((r0 + 0x18));
0x000057a6 blx 0x1afc | fcn_00001afc ();
0x000057aa b 0x5764 | goto label_8;
| label_48:
0x000057ac cmp r3, 0xb |
| if (r3 != 0xb) {
0x000057ae bne 0x5716 | goto label_9;
| }
0x000057b0 mov r1, fp | r1 = fp;
0x000057b2 add r0, sp, 0x10 | r0 += var_10h_2;
0x000057b4 vstr d8, [sp, 0x10] | __asm ("vstr d8, [sp, 0x10]");
0x000057b8 blx 0x1afc | fcn_00001afc ();
0x000057bc b 0x5716 | goto label_9;
| label_46:
0x000057be mov r0, r4 | r0 = r4;
0x000057c0 blx 0x1af0 | fcn_00001af0 ();
0x000057c4 ldr r3, [r7, 4] | r3 = *((r7 + 4));
0x000057c6 str r5, [r7, 4] | *((r7 + 4)) = r5;
0x000057c8 str r3, [r7, 0xc] | *((r7 + 0xc)) = r3;
| label_44:
0x000057ca ldr r2, [sp, 4] | r2 = var_4h;
0x000057cc ldr r3, [pc, 0x20c] | r3 = *(0x59dc);
0x000057ce ldr r3, [r2, r3] | r3 = *((r2 + r3));
0x000057d0 ldr r0, [r3] | r0 = *(0x59dc);
0x000057d2 blx 0x2000 | fcn_00002000 ();
0x000057d4 invalid |
| label_43:
0x000057d8 lsls r5, r3, 0xb | r5 = r3 << 0xb;
| if (r5 < r3) {
0x000057da bmi 0x5870 | goto label_50;
| }
0x000057dc ldr r0, [r6, 8] | r0 = *((r6 + 8));
0x000057de cmp r0, 0 |
| if (r0 == 0) {
0x000057e0 beq 0x5898 | goto label_51;
| }
0x000057e2 lsls r3, r3, 0xd | r3 <<= 0xd;
| if (r3 < r3) {
0x000057e4 bmi 0x5878 | goto label_13;
| }
| label_11:
0x000057e6 bl 0x42fc | r0 = fcn_000042fc ();
0x000057ea mov r7, r0 | r7 = r0;
0x000057ec cmp r0, 0 |
| if (r0 == 0) {
0x000057ee beq 0x5874 | goto label_52;
| }
0x000057f0 movs r1, 0x2e | r1 = 0x2e;
0x000057f2 add.w r8, sp, 0xc | r8 += var_ch_4;
0x000057f6 blx 0x1d74 | setenv (r0, r1, r2);
0x000057fa ldr r3, [r6] | r3 = *(r6);
0x000057fc movs r2, 0 | r2 = 0;
0x000057fe str.w r2, [r8] | __asm ("str.w r2, [r8]");
0x00005800 movs r0, 0 | r0 = 0;
0x00005802 ands r3, r3, 0x80000 | r3 &= 0x80000;
| if (r3 != r3) {
0x00005806 bne 0x58e0 | goto label_53;
| }
| if (r0 != 0) {
0x00005808 cbz r0, 0x580c |
0x0000580a strb r3, [r0] | *(r0) = r3;
| }
| label_14:
0x0000580c mov sb, r7 | sb = r7;
| label_15:
0x0000580e mov r0, sb | r0 = sb;
0x00005810 blx 0x1d68 | r0 = strchr (r0, r1);
0x00005814 mov r5, r0 | r5 = r0;
0x00005816 blx 0x1df8 | r0 = vasprintf_chk ()
0x0000581a mov r4, r0 | r4 = r0;
0x0000581c cmp r5, 0 |
| if (r5 == 0) {
0x0000581e beq.w 0x5958 | goto label_21;
| }
0x00005822 vldr d8, [pc, 0x19c] | __asm ("vldr d8, [0x000059c4]");
0x00005826 mov.w sl, 0 | sl = 0;
| do {
| label_10:
0x0000582a mov r2, r5 | r2 = r5;
0x0000582c mov r1, sb | r1 = sb;
0x0000582e movs r0, 1 | r0 = 1;
0x00005830 str.w sl, [r4] | __asm ("str.w sl, [r4]");
0x00005834 blx 0x1e58 | r0 = fileno (r0);
0x00005838 cmp r0, 0 |
0x0000583a ldr r3, [r4] | r3 = *(r4);
| if (r0 <= 0) {
0x0000583c ble 0x591e | goto label_54;
| }
0x0000583e subs r5, r5, r0 | r5 -= r0;
| if (r5 == r5) {
0x00005840 beq.w 0x5954 | goto label_55;
| }
0x00005844 cmp r3, 0xb |
0x00005846 add sb, r0 | sb += r0;
0x00005848 bne 0x582a |
| } while (r3 != 0xb);
0x0000584a movs r1, 0 | r1 = 0;
0x0000584c add r0, sp, 0x10 | r0 += var_10h_2;
0x0000584e vstr d8, [sp, 0x10] | __asm ("vstr d8, [sp, 0x10]");
0x00005852 blx 0x1afc | fcn_00001afc ();
0x00005856 b 0x582a | goto label_10;
| label_12:
0x00005858 add r5, sp, 0x10 | r5 += var_10h_2;
0x0000585a movw r1, 0x4b64 | r1 = 0x4b64;
0x0000585c adds r1, 0x64 | r1 += 0x64;
0x0000585e mov r2, r5 | r2 = r5;
0x00005860 str r0, [r5] | *(r5) = r0;
0x00005862 blx 0x1c78 | r0 = tcsetattr ();
0x00005866 mov r7, r0 | r7 = r0;
0x00005868 cmp r0, 0 |
| if (r0 == 0) {
0x0000586a beq.w 0x5a1a | goto label_56;
| }
| label_22:
0x0000586e ldr r3, [r6] | r3 = *(r6);
| label_50:
0x00005870 lsls r1, r3, 0xd | r1 = r3 << 0xd;
| if (r1 >= r3) {
0x00005872 bpl 0x57e6 | goto label_11;
| }
| label_52:
0x00005874 ldr r3, [r6, 8] | r3 = *((r6 + 8));
| if (r3 == 0) {
0x00005876 cbz r3, 0x58a0 | goto label_57;
| }
| label_13:
0x00005878 ldr r2, [pc, 0x164] |
0x0000587a ldr r3, [pc, 0x154] | r3 = *(0x59d2);
0x0000587c add r2, pc | r2 = 0xb260;
0x0000587e ldr r3, [r2, r3] | r3 = *(0xb260);
0x00005880 ldr r2, [r3] | r2 = *(0xb260);
0x00005882 ldr r3, [sp, 0x134] | r3 = var_134h;
0x00005884 eors r2, r3 | r2 ^= r3;
0x00005886 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x0000588a bne.w 0x5aac | goto label_58;
| }
0x0000588e add sp, 0x13c |
0x00005890 vpop {d8} | __asm ("vpop {d8}");
0x00005894 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_51:
0x00005898 lsls r4, r3, 0x13 | r4 = r3 << 0x13;
| if (r4 < r3) {
0x0000589a bmi 0x5858 | goto label_12;
| }
0x0000589c lsls r2, r3, 0xd | r2 = r3 << 0xd;
| if (r2 >= r3) {
0x0000589e bpl 0x57e6 | goto label_11;
| }
| label_57:
0x000058a0 ldr r6, [pc, 0x140] |
0x000058a2 movs r4, 7 | r4 = 7;
0x000058a4 blx 0x1df8 | vasprintf_chk ()
0x000058a8 movs r7, 0 | r7 = 0;
0x000058aa mov r5, r0 | r5 = r0;
0x000058ac add r6, pc | r6 = 0xb294;
0x000058ae vldr d8, [pc, 0x110] | __asm ("vldr d8, [0x000059c4]");
| label_16:
0x000058b2 mov r2, r4 | r2 = r4;
0x000058b4 mov r1, r6 | r1 = r6;
0x000058b6 movs r0, 1 | r0 = 1;
0x000058b8 str r7, [r5] | *(r5) = r7;
0x000058ba blx 0x1e58 | r0 = fileno (r0);
0x000058be cmp r0, 0 |
0x000058c0 ldr r3, [r5] | r3 = *(r5);
| if (r0 <= 0) {
0x000058c2 ble 0x593a | goto label_59;
| }
0x000058c4 subs r4, r4, r0 | r4 -= r0;
| if (r4 != r4) {
0x000058c6 bne.w 0x59ec | goto label_60;
| }
0x000058ca cmp r3, 0xb |
| if (r3 != 0xb) {
0x000058cc bne 0x5878 | goto label_13;
| }
0x000058ce vldr d16, [pc, 0xf0] | __asm ("vldr d16, [0x000059c4]");
0x000058d2 mov r1, r4 | r1 = r4;
0x000058d4 add r0, sp, 0x10 | r0 += var_10h_2;
0x000058d6 vstr d16, [sp, 0x10] | __asm ("vstr d16, [sp, 0x10]");
0x000058da blx 0x1afc | fcn_00001afc ();
0x000058de b 0x5878 | goto label_13;
| label_53:
0x000058e0 cmp r0, 0 |
| if (r0 != 0) {
0x000058e2 bne 0x580c | goto label_14;
| }
0x000058e4 movs r3, 2 | r3 = 2;
0x000058e6 add r2, sp, 0x10 | r2 += var_10h_2;
0x000058e8 strd r0, r0, [sp, 0x14] | __asm ("strd r0, r0, [var_14h]");
0x000058ec mov r1, r0 | r1 = r0;
0x000058ee strd r0, r0, [sp, 0x1c] | __asm ("strd r0, r0, [var_1ch]");
0x000058f2 strd r0, r0, [sp, 0x24] | __asm ("strd r0, r0, [var_24h]");
0x000058f6 str r0, [sp, 0x2c] | var_2ch = r0;
0x000058f8 mov r0, r7 | r0 = r7;
0x000058fa str r3, [r2] | *(r2) = r3;
0x000058fc mov r3, r8 | r3 = r8;
0x000058fe blx 0x1fa0 | r0 = fcn_00001fa0 ();
0x00005902 cmp r0, 0 |
| if (r0 != 0) {
0x00005904 bne 0x580c | goto label_14;
| }
0x00005906 ldr.w r3, [r8] | r3 = *(r8);
0x0000590a cmp r3, 0 |
| if (r3 == 0) {
0x0000590c beq.w 0x580c | goto label_14;
| }
0x00005910 ldr.w sb, [r3, 0x18] | sb = *((r3 + 0x18));
0x00005914 cmp.w sb, 0 |
0x00005916 lsrs r0, r0, 0x1c | r0 >>= 0x1c;
0x00005918 it eq |
| if (r0 != r0) {
0x0000591a moveq sb, r7 | sb = r7;
| }
0x0000591c b 0x580e | goto label_15;
| label_54:
0x0000591e cmp r3, 4 |
0x00005920 it ne |
| if (r3 != 4) {
0x00005922 cmpne r3, 0xb | __asm ("cmpne r3, 0xb");
| }
| if (r3 != 4) {
0x00005924 bne 0x5958 | goto label_21;
| }
0x00005926 cmp r3, 0xb |
| if (r3 != 0xb) {
0x00005928 bne.w 0x582a | goto label_10;
| }
0x0000592c movs r1, 0 | r1 = 0;
0x0000592e add r0, sp, 0x10 | r0 += var_10h_2;
0x00005930 vstr d8, [sp, 0x10] | __asm ("vstr d8, [sp, 0x10]");
0x00005934 blx 0x1afc | fcn_00001afc ();
0x00005938 b 0x582a | goto label_10;
| label_59:
0x0000593a cmp r3, 4 |
0x0000593c it ne |
| if (r3 == 4) {
0x0000593e cmpne r3, 0xb | __asm ("cmpne r3, 0xb");
| goto label_61;
| }
| if (r3 != 4) {
| label_61:
0x00005940 bne 0x5878 | goto label_13;
| }
0x00005942 cmp r3, 0xb |
| if (r3 != 0xb) {
0x00005944 bne 0x58b2 | goto label_16;
| }
| label_19:
0x00005946 movs r1, 0 | r1 = 0;
0x00005948 add r0, sp, 0x10 | r0 += var_10h_2;
0x0000594a vstr d8, [sp, 0x10] | __asm ("vstr d8, [sp, 0x10]");
0x0000594e blx 0x1afc | fcn_00001afc ();
0x00005952 b 0x58b2 | goto label_16;
| label_55:
0x00005954 cmp r3, 0xb |
| if (r3 == 0xb) {
0x00005956 beq 0x5a08 | goto label_62;
| }
| label_21:
0x00005958 ldr r5, [pc, 0x8c] |
0x0000595a mov.w sl, 1 | sl = 1;
0x0000595e vldr d8, [pc, 0x60] | __asm ("vldr d8, [0x000059c4]");
0x00005962 mov.w sb, 0 | sb = 0;
0x00005966 add r5, pc | r5 = 0xb352;
| label_17:
0x00005968 mov r2, sl | r2 = sl;
0x0000596a mov r1, r5 | r1 = r5;
0x0000596c movs r0, 1 | r0 = 1;
0x0000596e str.w sb, [r4] | __asm ("str.w sb, [r4]");
0x00005970 str r0, [sp] | *(sp) = r0;
0x00005972 blx 0x1e58 | r0 = fileno (r0);
0x00005976 cmp r0, 0 |
0x00005978 ldr r3, [r4] | r3 = *(r4);
| if (r0 <= 0) {
0x0000597a ble 0x5998 | goto label_63;
| }
0x0000597c subs.w sl, sl, r0 | sl -= r0;
| if (sl != sl) {
0x00005980 bne 0x59b2 | goto label_64;
| }
0x00005982 cmp r3, 0xb |
| if (r3 == 0xb) {
0x00005984 beq 0x59f6 | goto label_65;
| }
| do {
| label_20:
0x00005986 ldr.w r0, [r8] | r0 = *(r8);
| if (r0 != 0) {
0x0000598a cbz r0, 0x5990 |
0x0000598c blx 0x1f94 | fcn_00001f94 ();
| }
0x00005990 mov r0, r7 | r0 = r7;
0x00005992 blx 0x1af0 | fcn_00001af0 ();
0x00005994 invalid |
| label_63:
0x00005998 cmp r3, 4 |
0x0000599a it ne |
| if (r3 != 4) {
0x0000599c cmpne r3, 0xb | __asm ("cmpne r3, 0xb");
| }
0x0000599e bne 0x5986 |
| } while (r3 != 4);
0x000059a0 cmp r3, 0xb |
| if (r3 != 0xb) {
0x000059a2 bne 0x5968 | goto label_17;
| }
| label_18:
0x000059a4 movs r1, 0 | r1 = 0;
0x000059a6 add r0, sp, 0x10 | r0 += var_10h_2;
0x000059a8 vstr d8, [sp, 0x10] | __asm ("vstr d8, [sp, 0x10]");
0x000059ac blx 0x1afc | fcn_00001afc ();
0x000059b0 b 0x5968 | goto label_17;
| label_64:
0x000059b2 cmp r3, 0xb |
0x000059b4 add r5, r0 | r5 += r0;
| if (r3 != 0xb) {
0x000059b6 bne 0x5968 | goto label_17;
| }
0x000059b8 b 0x59a4 | goto label_18;
| label_60:
0x000059ec cmp r3, 0xb |
0x000059ee add r6, r0 | r6 += r0;
| if (r3 != 0xb) {
0x000059f0 bne.w 0x58b2 | goto label_16;
| }
0x000059f4 b 0x5946 | goto label_19;
| label_65:
0x000059f6 vldr d16, [pc, 0xb8] | __asm ("vldr d16, [0x00005ab4]");
0x000059fa mov r1, sl | r1 = sl;
0x000059fc add r0, sp, 0x10 | r0 += var_10h_2;
0x000059fe vstr d16, [sp, 0x10] | __asm ("vstr d16, [sp, 0x10]");
0x00005a02 blx 0x1afc | fcn_00001afc ();
0x00005a06 b 0x5986 | goto label_20;
| label_62:
0x00005a08 vldr d16, [pc, 0xa4] | __asm ("vldr d16, [0x00005ab4]");
0x00005a0c mov r1, r5 | r1 = r5;
0x00005a0e add r0, sp, 0x10 | r0 += var_10h_2;
0x00005a10 vstr d16, [sp, 0x10] | __asm ("vstr d16, [sp, 0x10]");
0x00005a14 blx 0x1afc | fcn_00001afc ();
0x00005a18 b 0x5958 | goto label_21;
| label_56:
0x00005a1a mov r1, r0 | r1 = r0;
0x00005a1c movs r2, 0xfc | r2 = 0xfc;
0x00005a1e str r0, [sp, 0x34] | var_34h = r0;
0x00005a20 add r0, sp, 0x38 | r0 += stream;
0x00005a22 blx 0x1e28 | fgetc (r0);
0x00005a26 ldr r0, [pc, 0x90] |
0x00005a28 mov r1, r7 | r1 = r7;
0x00005a2a add r4, sp, 0x34 | r4 += var_34h;
0x00005a2c add r0, pc | r0 = 0xb4ea;
0x00005a2e blx 0x1e88 | strtoimax (r0, r1, r2);
0x00005a32 ldr r3, [r5] | r3 = *(r5);
| if (r0 != 0) {
0x00005a34 cbnz r0, 0x5a64 | goto label_66;
| }
0x00005a36 ands r1, r3, 2 | r1 = r3 & 2;
| if (r1 == r3) {
0x00005a3a beq 0x5a9e | goto label_67;
| }
| label_23:
0x00005a3c and r2, r3, 0x44 | r2 = r3 & 0x44;
0x00005a40 cmp r2, 4 |
| if (r2 == 4) {
0x00005a42 beq 0x5a8c | goto label_68;
| }
| label_25:
0x00005a44 and r3, r3, 0x11 | r3 &= 0x11;
0x00005a48 cmp r3, 1 |
| if (r3 == 1) {
0x00005a4a beq 0x5a7c | goto label_69;
| }
| label_24:
0x00005a4c ldrsb.w r3, [r4] | r3 = *(r4);
0x00005a50 cmp r3, 0 |
| if (r3 == 0) {
0x00005a52 beq.w 0x586e | goto label_22;
| }
0x00005a56 ldr r1, [pc, 0x64] |
0x00005a58 mov r2, r4 | r2 = r4;
0x00005a5a movs r0, 1 | r0 = 1;
0x00005a5c add r1, pc | r1 = 0xb51e;
0x00005a5e blx 0x1e40 | strtod (r0, r1);
0x00005a62 b 0x586e | goto label_22;
| label_66:
0x00005a64 and r2, r3, 0x22 | r2 = r3 & 0x22;
0x00005a68 cmp r2, 2 |
| if (r2 != 2) {
0x00005a6a bne 0x5a3c | goto label_23;
| }
0x00005a6c ldr r2, [pc, 0x50] |
0x00005a6e mov r1, r7 | r1 = r7;
0x00005a70 mov r0, r4 | r0 = r4;
0x00005a72 add r2, pc | r2 = 0xb536;
0x00005a74 bl 0x4468 | fcn_00004468 (r0, r1, r2);
0x00005a78 ldr r3, [r5] | r3 = *(r5);
0x00005a7a b 0x5a3c | goto label_23;
| label_69:
0x00005a7c ldr r2, [pc, 0x44] |
0x00005a7e mov r0, r4 | r0 = r4;
0x00005a80 ldr r1, [pc, 0x44] |
0x00005a82 add r2, pc | r2 = 0xb54a;
0x00005a84 add r1, pc | r1 = 0xb550;
0x00005a86 bl 0x4468 | fcn_00004468 (r0, r1, r2);
0x00005a8a b 0x5a4c | goto label_24;
| label_68:
0x00005a8c ldr r2, [pc, 0x3c] |
0x00005a8e mov r0, r4 | r0 = r4;
0x00005a90 ldr r1, [pc, 0x3c] |
0x00005a92 add r2, pc | r2 = 0xb562;
0x00005a94 add r1, pc | r1 = 0xb568;
0x00005a96 bl 0x4468 | fcn_00004468 (r0, r1, r2);
0x00005a9a ldr r3, [r5] | r3 = *(r5);
0x00005a9c b 0x5a44 | goto label_25;
| label_67:
0x00005a9e ldr r2, [pc, 0x34] |
0x00005aa0 mov r0, r4 | r0 = r4;
0x00005aa2 add r2, pc | r2 = 0xb57c;
0x00005aa4 bl 0x4468 | fcn_00004468 (r0, r1, r2);
0x00005aa8 ldr r3, [r5] | r3 = *(r5);
0x00005aaa b 0x5a3c | goto label_23;
| label_58:
0x00005aac blx 0x1bac | r0 = cfgetispeed ();
0x00005ab0 movs r0, r0 |
0x00005ab2 movs r0, r0 |
0x00005ab4 uxth r0, r0 | r0 = (int16_t) r0;
0x00005ab6 lsrs r6, r4, 0x1b | r6 = r4 >> 0x1b;
0x00005ab8 movs r7, 0x34 | r7 = 0x34;
0x00005aba movs r0, r0 |
0x00005abc movs r7, 0x54 | r7 = 0x54;
0x00005abe movs r0, r0 |
0x00005ac0 movs r7, 0xe | r7 = 0xe;
0x00005ac2 movs r0, r0 |
0x00005ac4 movs r7, 0x1e | r7 = 0x1e;
0x00005ac6 movs r0, r0 |
0x00005ac8 movs r7, 0x18 | r7 = 0x18;
0x00005aca movs r0, r0 |
0x00005acc movs r6, 0xfa | r6 = 0xfa;
0x00005ace movs r0, r0 |
0x00005ad0 movs r7, 8 | r7 = 8;
0x00005ad2 movs r0, r0 |
0x00005ad4 movs r6, 0xce | r6 = 0xce;
0x00005ad6 movs r0, r0 |
0x00005ad8 push {r4, r5, r6, lr} |
0x00005ada sub sp, 0x80 |
0x00005adc ldr r5, [pc, 0xb0] |
0x00005ade add r6, sp, 0xc | r6 += var_ch_2;
0x00005ae0 movs r2, 0x6e | r2 = 0x6e;
0x00005ae2 mov r0, r6 | r0 = r6;
0x00005ae4 ldr r3, [pc, 0xac] | r3 = *(0x5b94);
0x00005ae6 movs r4, 1 | r4 = 1;
0x00005ae8 add r5, pc | r5 = 0xb67c;
0x00005aea ldr r1, [pc, 0xac] |
0x00005aec ldr r3, [r5, r3] |
0x00005aee add r1, pc | r1 = 0xb68c;
0x00005af0 ldr r3, [r3] | r3 = imp.__aeabi_unwind_cpp_pr0;
0x00005af2 str r3, [sp, 0x7c] | var_7ch = r3;
0x00005af4 mov.w r3, 0 | r3 = 0;
0x00005af8 blx 0x1b24 | fcn_00001b24 ();
0x00005afc movw r1, 0x801 |
0x00005b00 movs r2, 0 | r2 = 0;
0x00005b02 movt r1, 8 | r1 = 0x80801;
0x00005b06 mov r0, r4 | r0 = r4;
0x00005b08 str r4, [sp, 8] | var_8h = r4;
0x00005b0a blx 0x1fb8 | r0 = fcn_00001fb8 ();
0x00005b0e subs r5, r0, 0 | r5 = r0 - 0;
| if (r5 < r0) {
0x00005b10 blt 0x5b54 | goto label_70;
| }
0x00005b12 movs r3, 4 | r3 = 4;
0x00005b14 mov r1, r4 | r1 = r4;
0x00005b16 str r3, [sp] | *(sp) = r3;
0x00005b18 movs r2, 0x10 | r2 = 0x10;
0x00005b1a add r3, sp, 8 | r3 += var_8h;
0x00005b1c blx 0x1a98 | r0 = setsockopt ();
0x00005b20 cmp r0, 0 |
| if (r0 < 0) {
0x00005b22 blt 0x5b5e | goto label_71;
| }
0x00005b24 add.w r0, sp, 0xf | r0 += s;
0x00005b28 blx 0x1d68 | strchr (r0, r1);
0x00005b2c mov r1, r6 | r1 = r6;
0x00005b2e adds r2, r0, 3 | r2 += var_3h;
0x00005b30 mov r0, r5 | r0 = r5;
0x00005b32 blx 0x2030 | r0 = fcn_00002030 ();
0x00005b36 cmp r0, 0 |
| if (r0 < 0) {
0x00005b38 blt 0x5b72 | goto label_72;
| }
| do {
| label_26:
0x00005b3a ldr r2, [pc, 0x60] |
0x00005b3c ldr r3, [pc, 0x54] | r3 = *(0x5b94);
0x00005b3e add r2, pc | r2 = 0xb6e0;
0x00005b40 ldr r3, [r2, r3] | r3 = imp.__aeabi_unwind_cpp_pr0;
0x00005b42 ldr r2, [r3] | r2 = imp.__aeabi_unwind_cpp_pr0;
0x00005b44 ldr r3, [sp, 0x7c] | r3 = var_7ch;
0x00005b46 eors r2, r3 | r2 ^= r3;
0x00005b48 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00005b4c bne 0x5b8c | goto label_73;
| }
0x00005b4e mov r0, r5 | r0 = r5;
0x00005b50 add sp, 0x80 |
0x00005b52 pop {r4, r5, r6, pc} |
| label_70:
0x00005b54 ldr r0, [pc, 0x48] |
0x00005b56 add r0, pc | r0 = 0xb6fa;
0x00005b58 blx 0x1da4 | nice ();
0x00005b5c b 0x5b3a |
| } while (1);
| label_71:
0x00005b5e ldr r0, [pc, 0x44] |
0x00005b60 add r0, pc | r0 = 0xb70a;
0x00005b62 blx 0x1da4 | nice ();
0x00005b66 mov r0, r5 | r0 = r5;
0x00005b68 blx 0x2018 | fcn_00002018 ();
| do {
0x00005b6c mov.w r5, -1 | r5 = -1;
0x00005b70 b 0x5b3a | goto label_26;
| label_72:
0x00005b72 blx 0x1df8 | r0 = vasprintf_chk ()
0x00005b76 ldr r3, [r0] | r3 = *(r0);
0x00005b78 cmp r3, 0x6f |
| if (r3 != 0x6f) {
0x00005b7a beq 0x5b84 |
0x00005b7c ldr r0, [pc, 0x28] |
0x00005b7e add r0, pc | r0 = 0xb72a;
0x00005b80 blx 0x1da4 | nice ();
| }
0x00005b84 mov r0, r5 | r0 = r5;
0x00005b86 blx 0x2018 | fcn_00002018 ();
0x00005b8a b 0x5b6c |
| } while (1);
| label_73:
0x00005b8c blx 0x1bac | cfgetispeed ();
0x00005b90 strh r4, [r0, r3] | *((r0 + r3)) = r4;
0x00005b92 movs r0, r0 |
0x00005b94 lsls r0, r4, 8 | r0 = r4 << 8;
0x00005b96 movs r0, r0 |
0x00005b98 adds r7, 0xee | r7 += 0xee;
0x00005b9a movs r0, r0 |
0x00005b9c strh r6, [r5, r1] | *((r5 + r1)) = r6;
0x00005b9e movs r0, r0 |
0x00005ba0 adds r6, 0xfe | r6 += 0xfe;
0x00005ba2 movs r0, r0 |
0x00005ba4 adds r7, 0xc | r7 += 0xc;
0x00005ba6 movs r0, r0 |
0x00005ba8 adds r7, 0x12 | r7 += 0x12;
0x00005baa movs r0, r0 |
0x00005bac push {r0, r1, r2, r3} |
0x00005bae ldr r2, [pc, 0x230] |
0x00005bb0 ldr r3, [pc, 0x230] | r3 = *(0x5de4);
0x00005bb2 add r2, pc | r2 = 0xb998;
0x00005bb4 push.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x00005bb8 vpush {d8} | __asm ("vpush {d8}");
0x00005bbc sub sp, 0x130 |
0x00005bbe add r0, sp, 0x10 | r0 += var_10h;
0x00005bc0 add r6, sp, 0x98 | r6 += nitems;
0x00005bc2 ldr r3, [r2, r3] |
0x00005bc4 movs r7, 0 | r7 = 0;
0x00005bc6 ldr r5, [sp, 0x158] | r5 = var_158h;
0x00005bc8 ldr r3, [r3] | r3 = imp.__aeabi_unwind_cpp_pr0;
0x00005bca str r3, [sp, 0x12c] | var_12ch = r3;
0x00005bcc mov.w r3, 0 | r3 = 0;
0x00005bd0 blx 0x1eec | fcn_00001eec ();
0x00005bd4 add r1, sp, 0xc | r1 += size;
0x00005bd6 movs r2, 1 | r2 = 1;
0x00005bd8 mov.w r3, 0x10000000 | r3 = 0x10000000;
0x00005bdc str r2, [r1] | *(r1) = r2;
0x00005bde movs r0, 0xd | r0 = 0xd;
0x00005be0 mov r2, r6 | r2 = r6;
0x00005be2 str.w r3, [r1, 0x84] | __asm ("str.w r3, [var_84h]");
0x00005be6 blx 0x1c60 | fwrite (r0, r1, r2, r3);
0x00005bea cmp r5, 0x50 |
0x00005bec strb.w r7, [sp, 0x129] | var_129h = r7;
| if (r5 == 0x50) {
0x00005bf0 beq 0x5c52 | goto label_74;
| }
0x00005bf2 cmp r5, 0x51 |
| if (r5 == 0x51) {
0x00005bf4 beq 0x5c2a | goto label_75;
| }
0x00005bf6 cmp r5, 0x3f |
| if (r5 != 0x3f) {
0x00005bf8 beq 0x5c04 |
0x00005bfa ldr r0, [pc, 0x1ec] |
0x00005bfc mov r1, r5 | r1 = r5;
0x00005bfe add r0, pc | r0 = 0xb9ec;
0x00005c00 blx 0x1da4 | nice ();
| }
0x00005c04 movs r0, 0 | r0 = 0;
| do {
0x00005c06 ldr r2, [pc, 0x1e4] |
0x00005c08 ldr r3, [pc, 0x1d8] | r3 = *(0x5de4);
0x00005c0a add r2, pc | r2 = 0xb9fc;
0x00005c0c ldr r3, [r2, r3] | r3 = imp.__aeabi_unwind_cpp_pr0;
0x00005c0e ldr r2, [r3] | r2 = imp.__aeabi_unwind_cpp_pr0;
0x00005c10 ldr r3, [sp, 0x12c] | r3 = var_12ch;
0x00005c12 eors r2, r3 | r2 ^= r3;
0x00005c14 mov.w r3, 0 | r3 = 0;
0x00005c16 lsls r0, r0, 0xc | r0 <<= 0xc;
| if (r0 != r0) {
0x00005c18 bne.w 0x5dd2 | goto label_76;
| }
0x00005c1c add sp, 0x130 |
0x00005c1e vpop {d8} | __asm ("vpop {d8}");
0x00005c22 pop.w {r4, r5, r6, r7, r8, sb, sl, lr} |
0x00005c26 add sp, 0x10 |
0x00005c28 bx lr | return;
| label_75:
0x00005c2a bl 0x5ad8 | r0 = void (*0x5ad8)(uint32_t, uint32_t, uint32_t) (r0, r1, r2);
0x00005c2e subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 >= r0) {
0x00005c30 bge 0x5ca4 | goto label_77;
| }
| label_27:
0x00005c32 movs r3, 0 | r3 = 0;
0x00005c34 strb.w r3, [sp, 0x124] | buf = r3;
| label_30:
0x00005c38 movs r2, 0 | r2 = 0;
0x00005c3a mov r1, r6 | r1 = r6;
0x00005c3c movs r0, 0xd | r0 = 0xd;
0x00005c3e blx 0x1c60 | fwrite (r0, r1, r2, r3);
0x00005c42 ldrb.w r0, [sp, 0x124] | r0 = buf;
0x00005c46 sub.w r0, r0, 6 | r0 -= 6;
0x00005c48 movs r6, r0 | r6 = r0;
0x00005c4a clz r0, r0 | r0 &= r0;
0x00005c4e lsrs r0, r0, 5 | r0 >>= 5;
0x00005c50 b 0x5c06 |
| } while (1);
| label_74:
0x00005c52 bl 0x5ad8 | r0 = void (*0x5ad8)(uint32_t, uint32_t, uint32_t) (r0, r1, r2);
0x00005c56 subs r4, r0, 0 | r4 = r0 - 0;
| if (r4 < r0) {
0x00005c58 blt 0x5c32 | goto label_27;
| }
0x00005c5a strb.w r5, [sp, 0x128] | var_128h = r5;
0x00005c5e mov.w sl, 2 | sl = 2;
0x00005c62 blx 0x1df8 | vasprintf_chk ()
0x00005c66 vldr d8, [pc, 0x170] | __asm ("vldr d8, [0x00005ddc]");
0x00005c6a mov r8, r0 | r8 = r0;
0x00005c6c add.w sb, sp, 0x128 | sb += var_128h;
0x00005c70 mov r5, sp | r5 = sp;
| do {
| label_28:
0x00005c72 mov r2, sl | r2 = sl;
0x00005c74 mov r1, sb | r1 = sb;
0x00005c76 mov r0, r4 | r0 = r4;
0x00005c78 str.w r7, [r8] | __asm ("str.w r7, [r8]");
0x00005c7c blx 0x1e58 | r0 = fileno (r0);
0x00005c80 cmp r0, 0 |
0x00005c82 ldr.w r3, [r8] | r3 = *(r8);
| if (r0 <= 0) {
0x00005c86 ble.w 0x5d8e | goto label_78;
| }
0x00005c8a subs.w sl, sl, r0 | sl -= r0;
| if (sl == sl) {
0x00005c8e beq 0x5cec | goto label_79;
| }
0x00005c90 cmp r3, 0xb |
0x00005c92 add sb, r0 | sb += r0;
0x00005c94 bne 0x5c72 |
| } while (r3 != 0xb);
0x00005c96 movs r1, 0 | r1 = 0;
0x00005c98 mov r0, r5 | r0 = r5;
0x00005c9a vstr d8, [sp] | __asm ("vstr d8, [sp]");
0x00005c9e blx 0x1afc | fcn_00001afc ();
0x00005ca2 b 0x5c72 | goto label_28;
| label_77:
0x00005ca4 strb.w r5, [sp, 0x128] | var_128h = r5;
0x00005ca8 mov.w sl, 2 | sl = 2;
0x00005cac blx 0x1df8 | vasprintf_chk ()
0x00005cb0 vldr d8, [pc, 0x124] | __asm ("vldr d8, [0x00005ddc]");
0x00005cb4 mov r8, r0 | r8 = r0;
0x00005cb6 add.w sb, sp, 0x128 | sb += var_128h;
0x00005cba mov r5, sp | r5 = sp;
| do {
| label_29:
0x00005cbc mov r2, sl | r2 = sl;
0x00005cbe mov r1, sb | r1 = sb;
0x00005cc0 mov r0, r4 | r0 = r4;
0x00005cc2 str.w r7, [r8] | __asm ("str.w r7, [r8]");
0x00005cc6 blx 0x1e58 | r0 = fileno (r0);
0x00005cca cmp r0, 0 |
0x00005ccc ldr.w r3, [r8] | r3 = *(r8);
| if (r0 <= 0) {
0x00005cd0 ble 0x5d74 | goto label_80;
| }
0x00005cd2 subs.w sl, sl, r0 | sl -= r0;
| if (sl == sl) {
0x00005cd6 beq 0x5cec | goto label_79;
| }
0x00005cd8 cmp r3, 0xb |
0x00005cda add sb, r0 | sb += r0;
0x00005cdc bne 0x5cbc |
| } while (r3 != 0xb);
0x00005cde movs r1, 0 | r1 = 0;
0x00005ce0 mov r0, r5 | r0 = r5;
0x00005ce2 vstr d8, [sp] | __asm ("vstr d8, [sp]");
0x00005ce6 blx 0x1afc | fcn_00001afc ();
0x00005cea b 0x5cbc | goto label_29;
| label_79:
0x00005cec cmp r3, 0xb |
| if (r3 == 0xb) {
0x00005cee beq 0x5daa | goto label_81;
| }
| label_31:
0x00005cf0 movs r2, 0 | r2 = 0;
0x00005cf2 movs r3, 3 | r3 = 3;
0x00005cf4 strb.w r2, [sp, 0x124] | buf = r2;
0x00005cf8 strd r4, r3, [r5] | __asm ("strd r4, r3, [r5]");
0x00005cfc b 0x5d08 |
| while (r0 < 0) {
0x00005cfe blx 0x1df8 | r0 = vasprintf_chk ()
0x00005d02 ldr r3, [r0] | r3 = *(r0);
0x00005d04 cmp r3, 4 |
| if (r3 != 4) {
0x00005d06 bne 0x5d6c | goto label_82;
| }
0x00005d08 mov.w r2, 0x3e8 | r2 = 0x3e8;
0x00005d0c movs r1, 1 | r1 = 1;
0x00005d0e mov r0, r5 | r0 = r5;
0x00005d10 blx 0x1c48 | r0 = cfsetospeed ();
0x00005d14 cmp r0, 0 |
0x00005d16 blt 0x5cfe |
| }
0x00005d18 cmp r0, 1 |
| if (r0 != 1) {
0x00005d1a bne 0x5d6c | goto label_82;
| }
0x00005d1c ldrh r3, [r5, 6] | r3 = var_6h;
0x00005d1e lsls r3, r3, 0x1e | r3 <<= 0x1e;
| if (r3 == r3) {
0x00005d20 beq 0x5d6c | goto label_82;
| }
0x00005d22 movs r3, 0 | r3 = 0;
0x00005d24 movs r7, 2 | r7 = 2;
0x00005d26 mov sb, r3 | sb = r3;
0x00005d28 add.w r8, sp, 0x124 | r8 += buf;
0x00005d2c strh.w r3, [sp, 0x124] | buf = r3;
| label_32:
0x00005d30 mov r2, r7 | r2 = r7;
0x00005d32 mov r1, r8 | r1 = r8;
0x00005d34 mov r0, r4 | r0 = r4;
0x00005d36 blx 0x1abc | r0 = read (r0, r1, r2);
0x00005d3a cmp r0, 0 |
| if (r0 < 0) {
0x00005d3c blt 0x5d58 | goto label_83;
| }
| if (r0 == 0) {
| do {
0x00005d3e beq 0x5d6c | goto label_82;
| }
0x00005d40 subs r7, r7, r0 | r7 -= r0;
0x00005d42 add r8, r0 | r8 += r0;
| if (r7 == r7) {
0x00005d44 beq 0x5d6c | goto label_82;
| }
0x00005d46 mov r2, r7 | r2 = r7;
0x00005d48 mov r1, r8 | r1 = r8;
0x00005d4a mov r0, r4 | r0 = r4;
0x00005d4c mov.w sb, 0 | sb = 0;
0x00005d50 blx 0x1abc | r0 = read (r0, r1, r2);
0x00005d54 cmp r0, 0 |
0x00005d56 bge 0x5d3e |
| } while (r0 >= 0);
| label_83:
0x00005d58 blx 0x1df8 | r0 = vasprintf_chk ()
0x00005d5c ldr r3, [r0] | r3 = *(r0);
0x00005d5e cmp r3, 4 |
0x00005d60 it ne |
| if (r3 != 4) {
0x00005d62 cmpne r3, 0xb | __asm ("cmpne r3, 0xb");
| }
| if (r3 == 4) {
0x00005d64 bne 0x5d6c |
0x00005d66 cmp.w sb, 5 |
| if (sb != 5) {
0x00005d6a bne 0x5dbc | goto label_84;
| }
| }
| label_82:
0x00005d6c mov r0, r4 | r0 = r4;
0x00005d6e blx 0x2018 | fcn_00002018 ();
0x00005d72 b 0x5c38 | goto label_30;
| label_80:
0x00005d74 cmp r3, 4 |
0x00005d76 it ne |
| if (r3 == 4) {
0x00005d78 cmpne r3, 0xb | __asm ("cmpne r3, 0xb");
| goto label_85;
| }
| if (r3 != 4) {
| label_85:
0x00005d7a bne 0x5cf0 | goto label_31;
| }
0x00005d7c cmp r3, 0xb |
| if (r3 != 0xb) {
0x00005d7e bne 0x5cbc | goto label_29;
| }
0x00005d80 movs r1, 0 | r1 = 0;
0x00005d82 mov r0, r5 | r0 = r5;
0x00005d84 vstr d8, [sp] | __asm ("vstr d8, [sp]");
0x00005d88 blx 0x1afc | fcn_00001afc ();
0x00005d8c b 0x5cbc | goto label_29;
| label_78:
0x00005d8e cmp r3, 4 |
0x00005d90 it ne |
| if (r3 == 4) {
0x00005d92 cmpne r3, 0xb | __asm ("cmpne r3, 0xb");
| goto label_86;
| }
| if (r3 != 4) {
| label_86:
0x00005d94 bne 0x5cf0 | goto label_31;
| }
0x00005d96 cmp r3, 0xb |
| if (r3 != 0xb) {
0x00005d98 bne.w 0x5c72 | goto label_28;
| }
0x00005d9c movs r1, 0 | r1 = 0;
0x00005d9e mov r0, r5 | r0 = r5;
0x00005da0 vstr d8, [sp] | __asm ("vstr d8, [sp]");
0x00005da4 blx 0x1afc | fcn_00001afc ();
0x00005da8 b 0x5c72 | goto label_28;
| label_81:
0x00005daa vldr d16, [pc, 0x2c] | __asm ("vldr d16, [0x00005ddc]");
0x00005dae mov r1, sl | r1 = sl;
0x00005db0 mov r0, r5 | r0 = r5;
0x00005db2 vstr d16, [sp] | __asm ("vstr d16, [sp]");
0x00005db6 blx 0x1afc | fcn_00001afc ();
0x00005dba b 0x5cf0 | goto label_31;
| label_84:
0x00005dbc vldr d16, [pc, 0x18] | __asm ("vldr d16, [0x00005ddc]");
0x00005dc0 movs r1, 0 | r1 = 0;
0x00005dc2 mov r0, r5 | r0 = r5;
0x00005dc4 add.w sb, sb, 1 | sb++;
0x00005dc8 vstr d16, [sp] | __asm ("vstr d16, [sp]");
0x00005dcc blx 0x1afc | fcn_00001afc ();
0x00005dd0 b 0x5d30 | goto label_32;
| label_76:
0x00005dd2 blx 0x1bac | cfgetispeed ();
0x00005dd6 nop |
0x00005dd8 movs r0, r0 |
0x00005dda movs r0, r0 |
0x00005ddc uxth r0, r0 | r0 = (int16_t) r0;
0x00005dde lsrs r6, r4, 0x1b | r6 = r4 >> 0x1b;
0x00005de0 str r2, [r7, r7] | *((r7 + r7)) = r2;
0x00005de2 movs r0, r0 |
0x00005de4 lsls r0, r4, 8 | r0 = r4 << 8;
0x00005de6 movs r0, r0 |
0x00005de8 adds r6, 0xb2 | r6 += 0xb2;
0x00005dea movs r0, r0 |
0x00005dec str r2, [r4, r6] | *((r4 + r6)) = r2;
0x00005dee 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/sbin/agetty @ 0x63a4 */
| #include <stdint.h>
|
| #define BIT_MASK(t,v) ((t)(-((v)!= 0)))&(((t)-1)>>((sizeof(t)*CHAR_BIT)-(v)))
|
; (fcn) fcn.000063a4 () | void fcn_000063a4 (int16_t arg_1h, 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;
| int16_t var_24h;
| int16_t var_28h;
| int16_t var_2ch;
| r0 = arg1;
| r1 = arg2;
| label_23:
0x00005e98 svcmi 0xf0e92d | __asm ("svcmi 0xf0e92d");
0x00005e9c sub sp, 0x34 |
0x00005e9e str r2, [sp, 8] | var_8h = r2;
0x00005ea0 mov r6, r0 | r6 = r0;
0x00005ea2 ldr.w r2, [pc, 0x4ec] |
0x00005ea6 vmov.i32 d16, 0 | __asm ("vmov.i32 d16, 0");
0x00005eaa ldr.w r3, [pc, 0x4e8] | r3 = *(0x6396);
0x00005eae add r2, pc | r2 = 0xc244;
0x00005eb0 str r1, [sp, 4] | var_4h = r1;
0x00005eb2 vstr d16, [r1] | __asm ("vstr d16, [r1]");
0x00005eb6 ldr r3, [r2, r3] |
0x00005eb8 ldr r3, [r3] | r3 = imp.__aeabi_unwind_cpp_pr0;
0x00005eba str r3, [sp, 0x2c] | var_2ch = r3;
0x00005ebc mov.w r3, 0 | r3 = 0;
0x00005ec0 blx 0x1df8 | vasprintf_chk ()
0x00005ec2 invalid |
0x00005ec6 cmp r6, 0 |
| if (r6 == 0) {
0x00005ec8 beq.w 0x6000 | goto label_7;
| }
0x00005ecc ldrsb.w r7, [r6] | r7 = *(r6);
0x00005ed0 cmp r7, 0 |
| if (r7 == 0) {
0x00005ed2 beq.w 0x6000 | goto label_7;
| }
0x00005ed6 blx 0x1d2c | r0 = getpid ();
0x00005eda ldr r1, [r0] | r1 = *(r0);
0x00005edc uxtb r3, r7 | r3 = (int8_t) r7;
0x00005ede mov sb, r0 | sb = r0;
0x00005ee0 ldrh.w r3, [r1, r3, lsl 1] | offset_0 = r3 << 1;
| r3 = *((r1 + offset_0));
0x00005ee2 adds r0, 0x13 | r0 += 0x13;
0x00005ee4 lsls r0, r3, 0x12 | r0 = r3 << 0x12;
| if (r0 >= r3) {
0x00005ee6 bpl 0x5ef8 | goto label_24;
| }
0x00005ee8 mov r3, r6 | r3 = r6;
| do {
0x00005eea ldrsb r7, [r3, 1]! | r7 = *((r3 += 1));
0x00005eee uxtb r2, r7 | r2 = (int8_t) r7;
0x00005ef0 ldrh.w r2, [r1, r2, lsl 1] | offset_1 = r2 << 1;
| r2 = *((r1 + offset_1));
0x00005ef2 movs r0, 0x12 | r0 = 0x12;
0x00005ef4 lsls r2, r2, 0x12 | r2 <<= 0x12;
0x00005ef6 bmi 0x5eea |
| } while (r2 < r2);
| label_24:
0x00005ef8 cmp r7, 0x2d |
| if (r7 == 0x2d) {
0x00005efa beq.w 0x6000 | goto label_7;
| }
0x00005efe ldr r4, [sp] | r4 = *(sp);
0x00005f00 movs r2, 0 | r2 = 0;
0x00005f02 add r1, sp, 0x28 | r1 += var_28h;
0x00005f04 mov r0, r6 | r0 = r6;
0x00005f06 str r2, [sp, 0x28] | var_28h = r2;
0x00005f08 str r2, [r4] | *(r4) = r2;
0x00005f0a str r1, [sp, 0xc] | var_ch = r1;
0x00005f0c blx 0x1e70 | fprintf_chk ()
0x00005f10 ldr.w r8, [sp, 0x28] | r8 = var_28h;
0x00005f14 mov r3, r0 | r3 = r0;
0x00005f16 mov sl, r1 | sl = r1;
0x00005f18 str r0, [sp, 0x10] | var_10h = r0;
0x00005f1a cmp r8, r6 |
| if (r8 == r6) {
0x00005f1c beq.w 0x60c8 | goto label_25;
| }
0x00005f20 ldr r0, [r4] | r0 = *(r4);
0x00005f22 cmp r0, 0 |
| if (r0 != 0) {
0x00005f24 bne 0x6026 | goto label_26;
| }
| label_1:
0x00005f26 cmp.w r8, 0 |
| if (r8 == 0) {
0x00005f2a beq.w 0x60da | goto label_21;
| }
0x00005f2e ldrsb.w r3, [r8] | r3 = *(r8);
0x00005f32 cmp r3, 0 |
| if (r3 == 0) {
0x00005f34 beq.w 0x60da | goto label_21;
| }
0x00005f38 movs r6, 0 | r6 = 0;
0x00005f3a mov fp, r6 |
0x00005f3c mov r7, r6 | r7 = r6;
| label_0:
0x00005f3e ldrsb.w r3, [r8, 1] | r3 = *((r8 + 1));
0x00005f42 cmp r3, 0x69 |
| if (r3 == 0x69) {
0x00005f44 beq 0x6040 | goto label_27;
| }
0x00005f46 bic r2, r3, 0x20 | r2 = BIT_MASK (r3, 0x20);
0x00005f4a cmp r2, 0x42 |
| if (r2 != 0x42) {
0x00005f4c bne.w 0x60c2 | goto label_28;
| }
0x00005f50 ldrsb.w r3, [r8, 2] | r3 = *((r8 + 2));
0x00005f54 cmp r3, 0 |
| if (r3 == 0) {
0x00005f56 beq.w 0x6364 | goto label_29;
| }
| label_4:
0x00005f5a blx 0x1f34 | r0 = fcn_00001f34 ();
0x00005f5e cmp r0, 0 |
| if (r0 == 0) {
0x00005f60 beq 0x6000 | goto label_7;
| }
0x00005f62 ldr r5, [r0] | r5 = *(r0);
0x00005f64 cmp r5, 0 |
| if (r5 == 0) {
0x00005f66 beq 0x6000 | goto label_7;
| }
0x00005f68 mov r0, r5 | r0 = r5;
0x00005f6a blx 0x1d68 | strchr (r0, r1);
0x00005f6e orrs.w r3, fp, r7 | r3 = fp | r7;
0x00005f72 mov r4, r0 | r4 = r0;
| if (r3 != fp) {
0x00005f74 bne 0x6000 | goto label_7;
| }
0x00005f76 ldrsb.w r3, [r8] | r3 = *(r8);
0x00005f7a cmp r3, 0 |
| if (r3 == 0) {
0x00005f7c beq 0x6000 | goto label_7;
| }
0x00005f7e mov r0, r5 | r0 = r5;
0x00005f80 mov r2, r4 | r2 = r4;
0x00005f82 mov r1, r8 | r1 = r8;
0x00005f84 blx 0x1fe8 | r0 = fcn_00001fe8 ();
0x00005f88 cmp r0, 0 |
| if (r0 != 0) {
0x00005f8a bne 0x6000 | goto label_7;
| }
0x00005f8c ldrsb.w r3, [r8, r4] | r3 = *((r8 + r4));
0x00005f90 add.w r2, r8, r4 | r2 = r8 + r4;
0x00005f92 lsls r4, r0, 8 | r4 = r0 << 8;
0x00005f94 mov r4, r2 | r4 = r2;
0x00005f96 cmp r3, 0x30 |
| if (r3 != 0x30) {
0x00005f98 bne 0x5faa | goto label_30;
| }
| do {
0x00005f9a mov r5, r4 | r5 = r4;
0x00005f9c ldrsb r3, [r4, 1]! | r3 = *((r4 += 1));
0x00005fa0 cmp r3, 0x30 |
0x00005fa2 beq 0x5f9a |
| } while (r3 == 0x30);
0x00005fa4 adds r6, 1 | r6++;
0x00005fa6 subs r6, r6, r2 | r6 -= r2;
0x00005fa8 add r6, r5 | r6 += r5;
| label_30:
0x00005faa ldr.w r2, [sb] | r2 = *(sb);
0x00005fae ldrh.w r3, [r2, r3, lsl 1] | offset_2 = r3 << 1;
| r3 = *((r2 + offset_2));
0x00005fb2 lsls r3, r3, 0x14 | r3 <<= 0x14;
0x00005fb4 itt pl |
| if (r3 < r3) {
0x00005fb6 movpl r8, r4 | r8 = r4;
| }
| if (r3 >= r3) {
0x00005fb8 strpl r4, [sp, 0x28] | var_28h = r4;
| goto label_31;
| }
| if (r3 >= r3) {
| label_31:
0x00005fba bpl 0x5f3e | goto label_0;
| }
0x00005fbc ldr r3, [sp] | r3 = *(sp);
0x00005fbe movs r2, 0 | r2 = 0;
0x00005fc0 ldr r1, [sp, 0xc] | r1 = var_ch;
0x00005fc2 mov r0, r4 | r0 = r4;
0x00005fc4 str r2, [sp, 0x28] | var_28h = r2;
0x00005fc6 str r2, [r3] | *(r3) = r2;
0x00005fc8 blx 0x1e70 | fprintf_chk ()
0x00005fcc ldr.w r8, [sp, 0x28] | r8 = var_28h;
0x00005fd0 mov fp, r0 |
0x00005fd2 ldr r3, [sp] | r3 = *(sp);
0x00005fd4 mov r7, r1 | r7 = r1;
0x00005fd6 cmp r8, r4 |
0x00005fd8 ldr r0, [r3] | r0 = *(r3);
| if (r8 == r4) {
0x00005fda beq.w 0x636a | goto label_32;
| }
0x00005fde cmp r0, 0 |
| if (r0 == 0) {
0x00005fe0 beq 0x60d2 | goto label_33;
| }
0x00005fe2 adds.w r2, fp, -1 | r2 = fp + -1;
0x00005fe6 adc r3, r1, -1 | __asm ("adc r3, r1, -1");
0x00005fea adds r2, 2 | r2 += 2;
0x00005fec sbcs r3, r3, -1 | __asm ("sbcs r3, r3, -1");
| if (r2 >= 2) {
0x00005ff0 bhs 0x6036 | goto label_8;
| }
| label_9:
0x00005ff2 cmp.w r8, 0 |
| if (r8 == 0) {
0x00005ff6 beq 0x6000 | goto label_7;
| }
0x00005ff8 ldrsb.w r3, [r8] | r3 = *(r8);
0x00005ffc cmp r3, 0 |
| if (r3 != 0) {
0x00005ffe bne 0x5f3e | goto label_0;
| }
| label_7:
0x00006000 movs r3, 0x16 | r3 = 0x16;
0x00006002 mvn r0, 0x15 | r0 = ~0x15;
| label_3:
0x00006006 ldr r2, [sp] | r2 = *(sp);
0x00006008 str r3, [r2] | *(r2) = r3;
| label_2:
0x0000600a ldr r2, [pc, 0x38c] |
0x0000600c ldr r3, [pc, 0x384] | r3 = *(0x6394);
0x0000600e add r2, pc | r2 = 0xc3ac;
0x00006010 ldr r3, [r2, r3] | r3 = imp.__aeabi_unwind_cpp_pr0;
0x00006012 ldr r2, [r3] | r2 = imp.__aeabi_unwind_cpp_pr0;
0x00006014 ldr r3, [sp, 0x2c] | r3 = var_2ch;
0x00006016 eors r2, r3 | r2 ^= r3;
0x00006018 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x0000601c bne.w 0x638c | goto label_34;
| }
0x00006020 add sp, 0x34 |
0x00006022 pop.w {r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_26:
0x00006026 subs r2, r3, 1 | r2 = r3 - 1;
0x00006028 adc r3, r1, -1 | __asm ("adc r3, r1, -1");
0x0000602c adds r2, 2 | r2 += 2;
0x0000602e sbcs r3, r3, -1 | __asm ("sbcs r3, r3, -1");
0x00006030 adds r3, 0xff | r3 += 0xff;
| if (r3 <= 0xff) {
0x00006032 blo.w 0x5f26 | goto label_1;
| }
| label_8:
0x00006036 rsbs r0, r0, 0 | r0 -= ;
| label_13:
0x00006038 cmp r0, 0 |
| if (r0 >= 0) {
0x0000603a bge 0x600a | goto label_2;
| }
0x0000603c rsbs r3, r0, 0 | r3 = r0 - ;
0x0000603e b 0x6006 | goto label_3;
| label_27:
0x00006040 ldrsb.w r3, [r8, 2] | r3 = *((r8 + 2));
0x00006044 bic r3, r3, 0x20 | r3 = BIT_MASK (r3, 0x20);
0x00006048 cmp r3, 0x42 |
| if (r3 != 0x42) {
0x0000604a bne 0x5f5a | goto label_4;
| }
0x0000604c ldrsb.w r3, [r8, 3] | r3 = *((r8 + 3));
0x00006050 cmp r3, 0 |
| if (r3 != 0) {
0x00006052 bne 0x5f5a | goto label_4;
| }
| label_6:
0x00006054 mov.w sb, 0x400 | sb = 0x400;
| label_20:
0x00006058 ldr r5, [pc, 0x340] |
0x0000605a ldrsb.w r4, [r8] | r4 = *(r8);
0x0000605e add r5, pc | r5 = 0xc3fe;
0x00006060 mov r1, r4 | r1 = r4;
0x00006062 mov r0, r5 | r0 = r5;
0x00006064 blx 0x1d74 | r0 = setenv (r0, r1, r2);
0x00006068 cmp r0, 0 |
| if (r0 == 0) {
0x0000606a beq 0x60e6 | goto label_35;
| }
0x0000606c subs r1, r0, r5 | r1 = r0 - r5;
0x0000606e add.w ip, r1, 1 |
| label_10:
0x00006072 cmp.w ip, 0 |
| if (ip == 0) {
0x00006076 beq.w 0x6372 | goto label_36;
| }
0x0000607a movs r3, 0 | r3 = 0;
0x0000607c cmp.w sl, 0 |
| if (sl != 0) {
0x00006080 bne 0x60fe | goto label_37;
| }
| label_11:
0x00006082 cmp r3, 0 |
| if (r3 != 0) {
0x00006084 bne 0x611a | goto label_38;
| }
0x00006086 ldr r0, [sp, 0x10] | r0 = var_10h;
0x00006088 subs r3, r1, 1 | r3 = r1 - 1;
0x0000608a mov r2, sl | r2 = sl;
0x0000608c b 0x6094 |
| while (r2 == 0) {
| label_5:
0x0000608e subs r3, 1 | r3--;
0x00006090 cmp r4, 0 |
| if (r4 != 0) {
0x00006092 bne 0x6116 | goto label_39;
| }
0x00006094 mul r4, sb, r2 | r4 = sb * r2;
0x00006098 adds r5, r3, 1 | r5 = r3 + 1;
0x0000609a umull r0, r2, r0, sb | r0:r2 = r0 * sb;
0x0000609e add r2, r4 | r2 += r4;
| if (r5 == r3) {
0x000060a0 beq.w 0x635c | goto label_40;
| }
0x000060a4 movs r4, 0 | r4 = 0;
0x000060a6 cmp r2, 0 |
0x000060a8 beq 0x608e |
| }
0x000060aa umull r4, lr, r0, sb | r4:lr = r0 * sb;
0x000060ae umull r5, r4, sb, r2 | r5:r4 = sb * r2;
0x000060b2 adds.w r5, r5, lr | r5 += lr;
0x000060b6 adc r4, r4, 0 | __asm ("adc r4, r4, 0");
0x000060ba subs r4, 0 |
0x000060bc it ne |
| if (r4 == 0) {
0x000060be movne r4, 1 | r4 = 1;
| }
0x000060c0 b 0x608e | goto label_5;
| label_28:
0x000060c2 cmp r3, 0 |
| if (r3 == 0) {
0x000060c4 beq 0x6054 | goto label_6;
| }
0x000060c6 b 0x5f5a | goto label_4;
| label_25:
0x000060c8 ldr r3, [sp] | r3 = *(sp);
0x000060ca ldr r0, [r3] | r0 = *(r3);
0x000060cc cmp r0, 0 |
| if (r0 == 0) {
0x000060ce beq 0x6000 | goto label_7;
| }
0x000060d0 b 0x6036 | goto label_8;
| label_33:
0x000060d2 orrs.w r3, fp, r1 | r3 = fp | r1;
| if (r3 != fp) {
0x000060d6 bne 0x5ff2 | goto label_9;
| }
0x000060d8 b 0x5f3e | goto label_0;
| label_21:
0x000060da ldr r3, [sp, 4] | r3 = var_4h;
0x000060dc movs r0, 0 | r0 = 0;
0x000060de ldr r2, [sp, 0x10] | r2 = var_10h;
0x000060e0 strd r2, sl, [r3] | __asm ("strd r2, sl, [r3]");
0x000060e4 b 0x600a | goto label_2;
| label_35:
0x000060e6 mov r1, r4 | r1 = r4;
0x000060e8 ldr r4, [pc, 0x2b4] |
0x000060ea add r4, pc | r4 = 0xc48e;
0x000060ec mov r0, r4 | r0 = r4;
0x000060ee blx 0x1d74 | r0 = setenv (r0, r1, r2);
0x000060f2 cmp r0, 0 |
| if (r0 == 0) {
0x000060f4 beq 0x6000 | goto label_7;
| }
0x000060f6 subs r1, r0, r4 | r1 = r0 - r4;
0x000060f8 add.w ip, r1, 1 |
0x000060fc b 0x6072 | goto label_10;
| label_37:
0x000060fe ldr r3, [sp, 0x10] | r3 = var_10h;
0x00006100 umull r3, r0, r3, sb | r3:r0 = r3 * sb;
0x00006104 umull r2, r3, sb, sl | r2:r3 = sb * sl;
0x00006108 adds r2, r2, r0 | r2 += r0;
0x0000610a adc r3, r3, 0 | __asm ("adc r3, r3, 0");
0x0000610e subs r3, 0 |
0x00006110 it ne |
| if (r3 == 0) {
0x00006112 movne r3, 1 | r3 = 1;
| }
0x00006114 b 0x6082 | goto label_11;
| label_39:
0x00006116 mov sl, r2 | sl = r2;
0x00006118 str r0, [sp, 0x10] | var_10h = r0;
| label_38:
0x0000611a mvn r0, 0x21 | r0 = ~0x21;
| label_19:
0x0000611e ldr r3, [sp, 8] | r3 = var_8h;
| if (r3 != 0) {
0x00006120 cbz r3, 0x6126 |
0x00006122 str.w ip, [r3] | __asm ("str.w ip, [r3]");
| }
0x00006126 orrs.w r3, fp, r7 | r3 = fp | r7;
| if (r3 == fp) {
0x0000612a beq 0x616a | goto label_22;
| }
0x0000612c subs r1, 1 | r1--;
0x0000612e movs r2, 1 | r2 = 1;
0x00006130 movs r3, 0 | r3 = 0;
0x00006132 b 0x6138 |
| while (r3 == 0) {
| label_12:
0x00006134 subs r1, 1 | r1--;
| if (r4 != 0) {
0x00006136 cbnz r4, 0x6174 | goto label_41;
| }
0x00006138 mul r4, sb, r3 | r4 = sb * r3;
0x0000613c umull r2, r3, r2, sb | r2:r3 = r2 * sb;
0x00006140 add r3, r4 | r3 += r4;
0x00006142 adds r4, r1, 1 | r4 = r1 + 1;
| if (r4 == r1) {
0x00006144 beq 0x6174 | goto label_41;
| }
0x00006146 movs r4, 0 | r4 = 0;
0x00006148 cmp r3, 0 |
0x0000614a beq 0x6134 |
| }
0x0000614c umull r4, ip, r2, sb | r4:ip = r2 * sb;
0x00006150 umull r5, r4, sb, r3 | r5:r4 = sb * r3;
0x00006154 adds.w r5, r5, ip | r5 += ip;
0x00006158 adc r4, r4, 0 | __asm ("adc r4, r4, 0");
0x0000615c subs r4, 0 |
0x0000615e it ne |
| if (r4 == 0) {
0x00006160 movne r4, 1 | r4 = 1;
| }
0x00006162 b 0x6134 | goto label_12;
| label_17:
0x00006164 ldr r0, [sp, 0x24] | r0 = var_24h;
0x00006166 ldr.w sl, [sp, 0x18] | sl = var_18h;
| label_22:
0x0000616a ldr r3, [sp, 4] | r3 = var_4h;
0x0000616c ldr r2, [sp, 0x10] | r2 = var_10h;
0x0000616e strd r2, sl, [r3] | __asm ("strd r2, sl, [r3]");
0x00006172 b 0x6038 | goto label_13;
| label_41:
0x00006174 cmp.w fp, 0xb |
0x00006178 strd r2, r3, [sp, 0x1c] | __asm ("strd r2, r3, [sp, 0x1c]");
0x0000617c sbcs r3, r7, 0 | __asm ("sbcs r3, r7, 0");
| if (fp <= 0xb) {
0x00006180 blo.w 0x6382 | goto label_42;
| }
0x00006184 movs r1, 0x13 | r1 = 0x13;
0x00006186 movs r3, 0xa | r3 = 0xa;
0x00006188 mov.w r8, 0 | r8 = 0;
| label_15:
0x0000618c subs r1, 1 | r1--;
| if (r1 != 1) {
0x0000618e bne 0x6254 | goto label_43;
| }
0x00006190 movw r1, 0xcccd |
0x00006194 str r3, [sp, 0xc] | var_ch = r3;
0x00006196 adds.w r3, fp, r7 | r3 = fp + r7;
0x0000619a movt r1, 0xcccc | r1 = 0xcccccccd;
0x0000619e adc r3, r3, 0 | __asm ("adc r3, r3, 0");
0x000061a2 mov.w r2, -0x33333334 | r2 = -0x33333334;
0x000061a6 umull ip, lr, r1, r3 | ip:lr = r1 * r3;
0x000061aa bic ip, lr, 3 | ip = BIT_MASK (lr, 3);
0x000061ae add.w ip, ip, lr, lsr 2 |
0x000061b2 sub.w r3, r3, ip | r3 -= ip;
0x000061b6 subs.w r3, fp, r3 | r3 = fp - r3;
0x000061ba mul r2, r3, r2 | r2 = r3 * r2;
0x000061be sbc r7, r7, 0 | __asm ("sbc r7, r7, 0");
0x000061c2 mla r2, r1, r7, r2 | __asm ("mla r2, r1, r7, r2");
0x000061c6 umull r3, r1, r3, r1 | r3:r1 = r3 * r1;
0x000061ca lsrs r3, r3, 1 | r3 >>= 1;
0x000061cc add r2, r1 | r2 += r1;
0x000061ce lsrs r7, r2, 1 | r7 = r2 >> 1;
0x000061d0 orr.w fp, r3, r2, lsl 31 |
| label_16:
0x000061d4 cmp r6, 0 |
| if (r6 == 0) {
0x000061d6 beq 0x627a | goto label_44;
| }
0x000061d8 movw sb, 0x9999 |
0x000061dc movw lr, 0xcccd |
0x000061e0 ldr r1, [sp, 0xc] | r1 = var_ch;
0x000061e2 movt sb, 0x1999 | sb = 0x19999999;
0x000061e6 movt lr, 0xcccc | lr = 0xcccccccd;
0x000061ea movs r2, 0 | r2 = 0;
0x000061ec mov.w r5, -0x66666667 | r5 = -0x66666667;
0x000061f0 mov.w r4, -0x33333334 | r4 = -0x33333334;
0x000061f4 str r0, [sp, 8] | var_8h = r0;
0x000061f6 b 0x6232 |
| while (r5 <= r1) {
0x000061f8 adds.w r3, fp, r7 | r3 = fp + r7;
0x000061fc adc r3, r3, 0 | __asm ("adc r3, r3, 0");
0x00006200 umull r0, ip, lr, r3 | r0:ip = lr * r3;
0x00006204 bic r0, ip, 3 | r0 = BIT_MASK (ip, 3);
0x00006208 add.w r0, r0, ip, lsr 2 | r0 += (ip >> 2);
0x0000620c subs r3, r3, r0 | r3 -= r0;
0x0000620e subs.w r3, fp, r3 | r3 = fp - r3;
0x00006212 mul r0, r4, r3 | r0 = r4 * r3;
0x00006216 sbc r7, r7, 0 | __asm ("sbc r7, r7, 0");
0x0000621a mla r0, lr, r7, r0 | __asm ("mla r0, lr, r7, r0");
0x0000621e umull r3, r7, r3, lr | r3:r7 = r3 * lr;
0x00006222 lsrs r3, r3, 1 | r3 >>= 1;
0x00006224 add r0, r7 | r0 += r7;
0x00006226 lsrs r7, r0, 1 | r7 = r0 >> 1;
0x00006228 orr.w fp, r3, r0, lsl 31 |
| label_14:
0x0000622c adds r2, 1 | r2++;
0x0000622e cmp r2, r6 |
| if (r2 == r6) {
0x00006230 beq 0x6276 | goto label_45;
| }
0x00006232 cmp r5, r1 |
0x00006234 sbcs.w r3, sb, r8 | __asm ("sbcs.w r3, sb, r8");
0x00006238 blo 0x61f8 |
| }
0x0000623a lsl.w r0, r8, 2 | r0 = r8 << 2;
0x0000623e lsls r3, r1, 2 | r3 = r1 << 2;
0x00006240 orr.w r0, r0, r1, lsr 30 | r0 |= (r1 >> 30);
0x00006244 adds r3, r3, r1 | r3 += r1;
0x00006246 adc.w r0, r8, r0 | __asm ("adc.w r0, r8, r0");
0x0000624a adds r3, r3, r3 | r3 += r3;
0x0000624c adcs r0, r0 | __asm ("adcs r0, r0");
0x0000624e mov r1, r3 | r1 = r3;
0x00006250 mov r8, r0 | r8 = r0;
0x00006252 b 0x622c | goto label_14;
| label_43:
0x00006254 lsl.w r2, r8, 2 | r2 = r8 << 2;
0x00006258 lsls r4, r3, 2 | r4 = r3 << 2;
0x0000625a orr.w r2, r2, r3, lsr 30 | r2 |= (r3 >> 30);
0x0000625e adds r3, r4, r3 | r3 = r4 + r3;
0x00006260 adc.w r8, r8, r2 | __asm ("adc.w r8, r8, r2");
0x00006264 adds r3, r3, r3 | r3 += r3;
0x00006266 adc.w r8, r8, r8 | __asm ("adc.w r8, r8, r8");
0x0000626a cmp r3, fp |
0x0000626c sbcs.w r2, r8, r7 | __asm ("sbcs.w r2, r8, r7");
| if (r3 <= fp) {
0x00006270 blo 0x618c | goto label_15;
| }
0x00006272 str r3, [sp, 0xc] | var_ch = r3;
0x00006274 b 0x61d4 | goto label_16;
| label_45:
0x00006276 ldr r0, [sp, 8] | r0 = var_8h;
0x00006278 str r1, [sp, 0xc] | var_ch = r1;
| label_44:
0x0000627a movw r6, 0xcccd |
0x0000627e movs r3, 0 | r3 = 0;
0x00006280 str.w r8, [sp, 0x14] | __asm ("str.w r8, [var_14h]");
0x00006284 movt r6, 0xcccc | r6 = 0xcccccccd;
0x00006288 mov.w sb, 1 | sb = 1;
0x0000628c mov r8, r3 | r8 = r3;
0x0000628e str r0, [sp, 0x24] | var_24h = r0;
0x00006290 str.w sl, [sp, 0x18] | __asm ("str.w sl, [var_18h]");
0x00006294 b 0x62a4 | goto label_46;
| label_18:
0x00006296 ldr r3, [sp, 8] | r3 = var_8h;
0x00006298 cmp.w sl, 0xa |
0x0000629c sbcs r3, r3, 0 | __asm ("sbcs r3, r3, 0");
| if (sl <= 0xa) {
0x000062a0 blo.w 0x6164 | goto label_17;
| }
| label_46:
0x000062a4 adds.w r4, fp, r7 | r4 = fp + r7;
0x000062a8 str r7, [sp, 8] | var_8h = r7;
0x000062aa adc r4, r4, 0 | __asm ("adc r4, r4, 0");
0x000062ae mov sl, fp | sl = fp;
0x000062b0 umull r3, r5, r6, r4 | r3:r5 = r6 * r4;
0x000062b4 mov r2, sb | r2 = sb;
0x000062b6 mov r3, r8 | r3 = r8;
0x000062b8 ldr r0, [sp, 0xc] | r0 = var_ch;
0x000062ba ldr r1, [sp, 0x14] | r1 = var_14h;
0x000062bc bic ip, r5, 3 | ip = BIT_MASK (r5, 3);
0x000062c0 add.w ip, ip, r5, lsr 2 |
0x000062c4 sub.w ip, r4, ip |
0x000062c8 subs.w r4, fp, ip | r4 = fp - ip;
0x000062cc sbc r5, r7, 0 | __asm ("sbc r5, r7, 0");
0x000062d0 mov.w r7, -0x33333334 | r7 = -0x33333334;
0x000062d4 mul r7, r7, r4 | r7 *= r4;
0x000062d8 umull fp, r4, r4, r6 | fp:r4 = r4 * r6;
0x000062dc mla r7, r6, r5, r7 | __asm ("mla r7, r6, r5, r7");
0x000062e0 movs r5, 5 | r5 = 5;
0x000062e2 add r7, r4 | r7 += r4;
0x000062e4 and r4, fp, 1 | r4 = fp & 1;
0x000062e8 umull r4, r5, r4, r5 | r4:r5 = r4 * r5;
0x000062ec lsr.w fp, fp, 1 |
0x000062f0 orr.w fp, fp, r7, lsl 31 |
0x000062f4 lsrs r7, r7, 1 | r7 >>= 1;
0x000062f6 adds.w r4, r4, ip | r4 += ip;
0x000062fa adc r5, r5, 0 | __asm ("adc r5, r5, 0");
0x000062fe bl 0x7d68 | fcn_00007d68 (r0, r1, r2, r3);
0x00006302 lsl.w r2, r8, 2 | r2 = r8 << 2;
0x00006306 lsl.w r3, sb, 2 | r3 = sb << 2;
0x0000630a orr.w r2, r2, sb, lsr 30 | r2 |= (sb >> 30);
0x0000630e adds.w r3, r3, sb | r3 += sb;
0x00006312 adc.w r2, r8, r2 | __asm ("adc.w r2, r8, r2");
0x00006316 adds r3, r3, r3 | r3 += r3;
0x00006318 adcs r2, r2 | __asm ("adcs r2, r2");
0x0000631a cmp r0, r4 |
0x0000631c sbcs.w ip, r1, r5 | __asm ("sbcs.w ip, r1, r5");
0x00006320 mov sb, r3 | sb = r3;
0x00006322 ite hs |
| if (r0 < r4) {
0x00006324 movhs r3, 1 | r3 = 1;
| }
| if (r0 >= r4) {
0x00006326 movlo r3, 0 | r3 = 0;
| }
0x00006328 cmp r4, 0 |
0x0000632a ite eq |
| if (r4 != 0) {
0x0000632c moveq r3, 0 | r3 = 0;
| }
| if (r4 == 0) {
0x0000632e andne r3, r3, 1 | r3 &= 1;
| }
0x00006332 mov r8, r2 | r8 = r2;
0x00006334 cmp r3, 0 |
| if (r3 == 0) {
0x00006336 beq 0x6296 | goto label_18;
| }
0x00006338 mov r2, r4 | r2 = r4;
0x0000633a mov r3, r5 | r3 = r5;
0x0000633c bl 0x7d68 | fcn_00007d68 (r0, r1, r2, r3);
0x00006340 mov r3, r1 | r3 = r1;
0x00006342 mov r2, r0 | r2 = r0;
0x00006344 ldrd r0, r1, [sp, 0x1c] | __asm ("ldrd r0, r1, [var_1ch]");
0x00006348 bl 0x7d68 | fcn_00007d68 (r0, r1, r2, r3);
0x0000634c ldr r3, [sp, 0x10] | r3 = var_10h;
0x0000634e adds r0, r0, r3 | r0 += r3;
0x00006350 ldr r3, [sp, 0x18] | r3 = var_18h;
0x00006352 str r0, [sp, 0x10] | var_10h = r0;
0x00006354 adc.w r3, r3, r1 | __asm ("adc.w r3, r3, r1");
0x00006358 str r3, [sp, 0x18] | var_18h = r3;
0x0000635a b 0x6296 | goto label_18;
| label_40:
0x0000635c str r0, [sp, 0x10] | var_10h = r0;
0x0000635e mov sl, r2 | sl = r2;
0x00006360 movs r0, 0 | r0 = 0;
0x00006362 b 0x611e | goto label_19;
| label_29:
0x00006364 mov.w sb, 0x3e8 | sb = 0x3e8;
0x00006368 b 0x6058 | goto label_20;
| label_32:
0x0000636a cmp r0, 0 |
| if (r0 == 0) {
0x0000636c beq.w 0x6000 | goto label_7;
| }
0x00006370 b 0x6036 | goto label_8;
| label_36:
0x00006372 ldr r3, [sp, 8] | r3 = var_8h;
0x00006374 cmp r3, 0 |
| if (r3 == 0) {
0x00006376 beq.w 0x60da | goto label_21;
| }
0x0000637a mov r0, ip | r0 = ip;
0x0000637c str.w ip, [r3] | __asm ("str.w ip, [r3]");
0x00006380 b 0x616a | goto label_22;
| label_42:
0x00006382 movs r3, 0xa | r3 = 0xa;
0x00006384 mov.w r8, 0 | r8 = 0;
0x00006388 str r3, [sp, 0xc] | var_ch = r3;
0x0000638a b 0x61d4 | goto label_16;
| label_34:
0x0000638c blx 0x1bac | cfgetispeed ();
0x00006390 ldr r6, [pc, 0x3f8] | r6 = *(0x678c);
0x00006392 movs r0, r0 |
0x00006394 lsls r0, r4, 8 | r0 = r4 << 8;
0x00006396 movs r0, r0 |
0x00006398 ldr r5, [pc, 0x278] | r5 = *(0x6614);
0x0000639a movs r0, r0 |
0x0000639c adds r4, 0x5e | r4 += 0x5e;
0x0000639e movs r0, r0 |
0x000063a0 adds r3, 0xde | r3 += 0xde;
0x000063a2 movs r0, r0 |
0x000063a4 movs r2, 0 | r2 = 0;
0x000063a6 b.w 0x5e98 | goto label_23;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/sbin/agetty @ 0x6504 */
| #include <stdint.h>
|
; (fcn) fcn.00006504 () | void fcn_00006504 (int16_t arg1, int16_t arg2, int16_t arg3) {
| int16_t var_0h;
| int16_t var_4h;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x00006504 push.w {r4, r5, r6, r7, r8, lr} |
0x00006508 movs r7, 0 | r7 = 0;
0x0000650a ldr r4, [pc, 0x70] |
0x0000650c sub sp, 8 |
0x0000650e mov r8, r1 | r8 = r1;
0x00006510 mov r6, r2 | r6 = r2;
0x00006512 ldr r3, [pc, 0x6c] | r3 = *(0x6582);
0x00006514 add r4, pc | r4 = 0xca96;
0x00006516 ldr r3, [r4, r3] |
0x00006518 mov r4, r0 | r4 = r0;
0x0000651a ldr r3, [r3] | r3 = imp.__aeabi_unwind_cpp_pr0;
0x0000651c str r3, [sp, 4] | var_4h = r3;
0x0000651e mov.w r3, 0 | r3 = 0;
0x00006522 str r7, [sp] | *(sp) = r7;
0x00006524 blx 0x1df8 | r0 = vasprintf_chk ()
0x00006528 str r7, [r0] | *(r0) = r7;
| if (r4 == 0) {
0x0000652a cbz r4, 0x6572 | goto label_0;
| }
0x0000652c ldrsb.w r3, [r4] | r3 = *(r4);
| if (r3 == 0) {
0x00006530 cbz r3, 0x6572 | goto label_0;
| }
0x00006532 mov r5, r0 | r5 = r0;
0x00006534 mov r2, r6 | r2 = r6;
0x00006536 mov r1, sp | r1 = sp;
0x00006538 mov r0, r4 | r0 = r4;
0x0000653a blx 0x1e94 | r0 = fclose (r0);
0x0000653e mov r2, r0 | r2 = r0;
0x00006540 ldr r0, [r5] | r0 = *(r5);
0x00006542 mov r3, r1 | r3 = r1;
0x00006544 strd r2, r3, [r8] | __asm ("strd r2, r3, [r8]");
| if (r0 != 0) {
0x00006548 cbnz r0, 0x6572 | goto label_0;
| }
0x0000654a ldr r3, [sp] | r3 = *(sp);
0x0000654c cmp r3, r4 |
| if (r3 == r4) {
0x0000654e beq 0x6572 | goto label_0;
| }
| if (r3 == 0) {
0x00006550 cbz r3, 0x6558 | goto label_1;
| }
0x00006552 ldrsb.w r3, [r3] | r3 = *(r3);
0x00006556 cbnz r3, 0x6572 |
| while (1) {
| label_1:
0x00006558 ldr r2, [pc, 0x28] |
0x0000655a ldr r3, [pc, 0x24] | r3 = *(0x6582);
0x0000655c add r2, pc | r2 = 0xcae4;
0x0000655e ldr r3, [r2, r3] | r3 = imp.__aeabi_unwind_cpp_pr0;
0x00006560 ldr r2, [r3] | r2 = imp.__aeabi_unwind_cpp_pr0;
0x00006562 ldr r3, [sp, 4] | r3 = var_4h;
0x00006564 eors r2, r3 | r2 ^= r3;
0x00006566 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x0000656a bne 0x6578 | goto label_2;
| }
0x0000656c add sp, 8 |
0x0000656e pop.w {r4, r5, r6, r7, r8, pc} |
| label_0:
0x00006572 mvn r0, 0x15 | r0 = ~0x15;
0x00006576 b 0x6558 |
| }
| label_2:
0x00006578 blx 0x1bac | cfgetispeed ();
0x0000657c ldr r0, [pc, 0x260] | r0 = *(0x67e0);
0x0000657e movs r0, r0 |
0x00006580 lsls r0, r4, 8 | r0 = r4 << 8;
0x00006582 movs r0, r0 |
0x00006584 ldr r0, [pc, 0x140] | r0 = *(0x66c8);
0x00006586 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/sbin/agetty @ 0x6588 */
| #include <stdint.h>
|
; (fcn) fcn.00006588 () | void fcn_00006588 (int16_t arg1, int16_t arg2, int16_t arg3) {
| int16_t var_0h_2;
| int16_t var_4h_2;
| int16_t var_0h_3;
| int16_t var_ch;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x00006588 mvnsmi lr, 0xb4000 | __asm ("mvnsmi lr, 0xb4000");
0x0000658c mov.w sb, 0 | sb = 0;
0x00006590 ldr r4, [pc, 0x94] |
0x00006592 sub sp, 0xc |
0x00006594 mov r8, r1 | r8 = r1;
0x00006596 mov r7, r2 | r7 = r2;
0x00006598 ldr r3, [pc, 0x90] | r3 = *(0x662c);
0x0000659a add r4, pc | r4 = 0xcbc6;
0x0000659c ldr r3, [r4, r3] |
0x0000659e mov r4, r0 | r4 = r0;
0x000065a0 ldr r3, [r3] | r3 = imp.__aeabi_unwind_cpp_pr0;
0x000065a2 str r3, [sp, 4] | var_4h_2 = r3;
0x000065a4 mov.w r3, 0 | r3 = 0;
0x000065a8 str.w sb, [sp] | __asm ("str.w sb, [sp]");
0x000065ac blx 0x1df8 | r0 = vasprintf_chk ()
0x000065b0 str.w sb, [r0] | __asm ("str.w sb, [r0]");
| if (r4 == 0) {
0x000065b4 cbz r4, 0x65d4 | goto label_0;
| }
0x000065b6 ldrsb.w r3, [r4] | r3 = *(r4);
| if (r3 == 0) {
0x000065ba cbz r3, 0x65d4 | goto label_0;
| }
0x000065bc mov r6, sp | r6 = sp;
0x000065be mov r5, r0 | r5 = r0;
0x000065c0 mov r2, r7 | r2 = r7;
0x000065c2 mov r1, r6 | r1 = r6;
0x000065c4 mov r0, r4 | r0 = r4;
0x000065c6 blx 0x1e94 | fclose (r0);
0x000065ca cmp r1, 0 |
0x000065cc itt lt |
| if (r1 >= 0) {
0x000065ce movlt r3, 0x22 | r3 = 0x22;
| }
| if (r1 >= 0) {
0x000065d0 strlt r3, [r5] | *(r5) = r3;
| }
0x000065d2 bge 0x65f2 |
| while (r0 != 0) {
| label_0:
0x000065d4 mvn r0, 0x15 | r0 = ~0x15;
| label_1:
0x000065d8 ldr r2, [pc, 0x54] |
0x000065da ldr r3, [pc, 0x50] | r3 = *(0x662e);
0x000065dc add r2, pc | r2 = 0xcc10;
0x000065de ldr r3, [r2, r3] | r3 = imp.__aeabi_unwind_cpp_pr0;
0x000065e0 ldr r2, [r3] | r2 = imp.__aeabi_unwind_cpp_pr0;
0x000065e2 ldr r3, [sp, 4] | r3 = var_4h_2;
0x000065e4 eors r2, r3 | r2 ^= r3;
0x000065e6 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x000065ea bne 0x6622 | goto label_2;
| }
0x000065ec add sp, 0xc |
0x000065ee pop.w {r4, r5, r6, r7, r8, sb, pc} |
0x000065f2 mov r2, r7 | r2 = r7;
0x000065f4 mov r1, r6 | r1 = r6;
0x000065f6 mov r0, r4 | r0 = r4;
0x000065f8 str.w sb, [r5] | __asm ("str.w sb, [r5]");
0x000065fc blx 0x1e70 | r0 = fprintf_chk ()
0x00006600 mov r2, r0 | r2 = r0;
0x00006602 ldr r0, [r5] | r0 = *(r5);
0x00006604 mov r3, r1 | r3 = r1;
0x00006606 strd r2, r3, [r8] | __asm ("strd r2, r3, [r8]");
0x0000660a cmp r0, 0 |
0x0000660c bne 0x65d4 |
| }
0x0000660e ldr r3, [sp] | r3 = *(sp);
0x00006610 cmp r3, r4 |
| if (r3 == r4) {
0x00006612 beq 0x65d4 | goto label_0;
| }
0x00006614 cmp r3, 0 |
| if (r3 == 0) {
0x00006616 beq 0x65d8 | goto label_1;
| }
0x00006618 ldrsb.w r3, [r3] | r3 = *(r3);
0x0000661c cmp r3, 0 |
| if (r3 == 0) {
0x0000661e beq 0x65d8 | goto label_1;
| }
0x00006620 b 0x65d4 | goto label_0;
| label_2:
0x00006622 blx 0x1bac | cfgetispeed ();
0x00006626 nop |
0x00006628 ldr r0, [pc, 0x48] | r0 = *(0x6674);
0x0000662a movs r0, r0 |
0x0000662c lsls r0, r4, 8 | r0 = r4 << 8;
0x0000662e movs r0, r0 |
0x00006630 blx sl | r0 = sl (r0);
0x00006632 movs r0, r0 |
0x00006634 ldr.w ip, [pc, 0x68] |
0x00006638 ldr r3, [pc, 0x68] | r3 = *(0x66a4);
0x0000663a push {r4, lr} |
0x0000663c sub sp, 0x10 |
0x0000663e add ip, pc | ip = 0xcce2;
0x00006640 mov r4, r1 | r4 = r1;
0x00006642 mov r1, sp | r1 = sp;
0x00006644 ldr.w r3, [ip, r3] |
0x00006648 ldr r3, [r3] | r3 = imp.__aeabi_unwind_cpp_pr0;
0x0000664a str r3, [sp, 0xc] | var_ch = r3;
0x0000664c mov.w r3, 0 | r3 = 0;
0x00006650 bl 0x6504 | r0 = fcn_00006504 (r0, r1, r2);
| if (r0 != 0) {
0x00006654 cbnz r0, 0x6672 | goto label_3;
| }
0x00006656 ldrd r2, r3, [sp] | __asm ("ldrd r2, r3, [sp]");
0x0000665a mov.w ip, -1 |
0x0000665e adds.w r1, r2, -0x80000000 | r1 = r2 + -0x80000000;
0x00006662 adc r3, r3, 0 | __asm ("adc r3, r3, 0");
0x00006666 cmp ip, r1 |
0x00006668 sbcs.w r3, r0, r3 | __asm ("sbcs.w r3, r0, r3");
0x0000666c it hs |
| if (ip < r1) {
0x0000666e strhs r2, [r4] | *(r4) = r2;
| }
0x00006670 blo 0x668a |
| while (1) {
| label_3:
0x00006672 ldr r2, [pc, 0x34] |
0x00006674 ldr r3, [pc, 0x2c] | r3 = *(0x66a4);
0x00006676 add r2, pc | r2 = 0xcd24;
0x00006678 ldr r3, [r2, r3] | r3 = imp.__aeabi_unwind_cpp_pr0;
0x0000667a ldr r2, [r3] | r2 = imp.__aeabi_unwind_cpp_pr0;
0x0000667c ldr r3, [sp, 0xc] | r3 = var_ch;
0x0000667e eors r2, r3 | r2 ^= r3;
0x00006680 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00006684 bne 0x669a | goto label_4;
| }
0x00006686 add sp, 0x10 |
0x00006688 pop {r4, pc} |
0x0000668a blx 0x1df8 | vasprintf_chk ()
0x0000668e movs r2, 0x22 | r2 = 0x22;
0x00006690 mov r3, r0 | r3 = r0;
0x00006692 str r2, [r3] | *(r3) = r2;
0x00006694 mvn r0, 0x21 | r0 = ~0x21;
0x00006698 b 0x6672 |
| }
| label_4:
0x0000669a blx 0x1bac | cfgetispeed ();
0x0000669e nop |
0x000066a0 bx sp | return uint32_t (*sp)() ();
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/sbin/agetty @ 0x671c */
| #include <stdint.h>
|
; (fcn) fcn.0000671c () | void fcn_0000671c (int16_t arg_30h, int16_t arg_34h, int16_t arg_3ch, int16_t arg1, int16_t arg2, int16_t arg3) {
| int16_t var_0h_4;
| int16_t var_4h_2;
| char * ptr;
| int16_t var_4h;
| int16_t var_0h_2;
| int32_t var_0h_6;
| int16_t var_ch_2;
| int16_t var_0h;
| int32_t var_0h_5;
| int16_t var_ch;
| r0 = arg1;
| r1 = arg2;
| r2 = arg3;
0x0000671c mvnsmi lr, 0xb4000 | __asm ("mvnsmi lr, 0xb4000");
0x00006720 mov r5, r2 | r5 = r2;
0x00006722 mov r2, r1 | r2 = r1;
0x00006724 ldr r1, [pc, 0xa0] |
0x00006726 sub sp, 0x14 |
0x00006728 mov r6, r0 | r6 = r0;
0x0000672a ldr r3, [pc, 0xa0] | r3 = *(0x67ce);
0x0000672c add r1, pc | r1 = 0xcef8;
0x0000672e vmov.i32 d16, 0 | __asm ("vmov.i32 d16, 0");
0x00006732 ldr r7, [sp, 0x30] | r7 = *(arg_30h);
0x00006734 ldr r3, [r1, r3] |
0x00006736 mov r1, sp | r1 = sp;
0x00006738 ldrd r4, sb, [sp, 0x34] | __asm ("ldrd r4, sb, [arg_34h]");
0x0000673c ldr.w r8, [sp, 0x3c] | r8 = *(arg_3ch);
0x00006740 ldr r3, [r3] | r3 = imp.__aeabi_unwind_cpp_pr0;
0x00006742 str r3, [sp, 0xc] | var_ch = r3;
0x00006744 mov.w r3, 0 | r3 = 0;
0x00006748 vstr d16, [sp] | __asm ("vstr d16, [sp]");
0x0000674c bl 0x6504 | r0 = fcn_00006504 (r0, r1, r2);
| if (r0 != 0) {
0x00006750 cbz r0, 0x676e |
0x00006752 blx 0x1df8 | r0 = vasprintf_chk ()
0x00006756 ldr r3, [r0] | r3 = *(r0);
0x00006758 ldr r1, [pc, 0x74] |
0x0000675a cmp r3, 0x22 |
0x0000675c add r1, pc | r1 = 0xcf30;
0x0000675e ldr r0, [r1] | r0 = imp.__aeabi_unwind_cpp_pr0;
| if (r3 == 0x22) {
0x00006760 beq 0x678e | goto label_2;
| }
0x00006762 ldr r1, [pc, 0x70] |
0x00006764 mov r3, r6 | r3 = r6;
0x00006766 mov r2, r5 | r2 = r5;
0x00006768 add r1, pc | r1 = 0xcf42;
0x0000676a blx 0x1ef8 | fcn_00001ef8 ();
| }
0x0000676e orrs.w r3, r7, r4 | r3 = r7 | r4;
0x00006772 ldrd r0, r1, [sp] | __asm ("ldrd r0, r1, [sp]");
| if (r3 != r7) {
0x00006776 beq 0x679a |
0x00006778 cmp r0, r7 |
0x0000677a sbcs.w r4, r1, r4 | __asm ("sbcs.w r4, r1, r4");
| if (r0 >= r7) {
0x0000677e bge 0x679a | goto label_3;
| }
| label_0:
0x00006780 blx 0x1df8 | vasprintf_chk ()
0x00006784 ldr r3, [pc, 0x50] |
0x00006786 movs r2, 0x22 | r2 = 0x22;
0x00006788 str r2, [r0] | *(r0) = r2;
0x0000678a add r3, pc | r3 = 0xcf66;
0x0000678c ldr r0, [r3] | r0 = imp.__aeabi_unwind_cpp_pr0;
| label_2:
0x0000678e ldr r1, [pc, 0x4c] |
0x00006790 mov r3, r6 | r3 = r6;
0x00006792 mov r2, r5 | r2 = r5;
0x00006794 add r1, pc | r1 = 0xcf76;
0x00006796 blx 0x1c30 | iswprint (r0);
| }
| label_3:
0x0000679a orrs.w r3, sb, r8 | r3 = sb | r8;
0x0000679e bne 0x67ba |
| while (sb >= r0) {
0x000067a0 ldr r2, [pc, 0x3c] |
0x000067a2 ldr r3, [pc, 0x28] | r3 = *(0x67ce);
0x000067a4 add r2, pc | r2 = 0xcf88;
0x000067a6 ldr r3, [r2, r3] | r3 = imp.__aeabi_unwind_cpp_pr0;
0x000067a8 ldr r2, [r3] | r2 = imp.__aeabi_unwind_cpp_pr0;
0x000067aa ldr r3, [sp, 0xc] | r3 = var_ch;
0x000067ac eors r2, r3 | r2 ^= r3;
0x000067ae mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x000067b2 bne 0x67c4 | goto label_4;
| }
0x000067b4 add sp, 0x14 |
0x000067b6 pop.w {r4, r5, r6, r7, r8, sb, pc} |
0x000067ba cmp sb, r0 |
0x000067bc sbcs.w r8, r8, r1 | __asm ("sbcs.w r8, r8, r1");
0x000067c0 bge 0x67a0 |
| }
0x000067c2 b 0x6780 | goto label_0;
| label_4:
0x000067c4 blx 0x1bac | r0 = cfgetispeed ();
0x000067c8 mov r8, r0 | r8 = r0;
0x000067ca movs r0, r0 |
0x000067cc lsls r0, r4, 8 | r0 = r4 << 8;
0x000067ce movs r0, r0 |
0x000067d0 ldr r3, [pc, 0x10] | r3 = *(0x67e4);
0x000067d2 movs r0, r0 |
0x000067d4 cmp r5, 0x6c |
0x000067d6 movs r0, r0 |
0x000067d8 ldr r2, [pc, 0x358] | r2 = *(0x6b34);
0x000067da movs r0, r0 |
0x000067dc cmp r5, 0x40 |
0x000067de movs r0, r0 |
0x000067e0 mov r0, r1 | r0 = r1;
0x000067e2 movs r0, r0 |
0x000067e4 push {r4, r5, r6, r7, lr} |
0x000067e6 mov r4, r2 | r4 = r2;
0x000067e8 mov r2, r1 | r2 = r1;
0x000067ea ldr r1, [pc, 0x9c] |
0x000067ec sub sp, 0x14 |
0x000067ee mov r5, r0 | r5 = r0;
0x000067f0 ldr r3, [pc, 0x98] | r3 = *(0x688c);
0x000067f2 add r1, pc | r1 = 0xd080;
0x000067f4 ldrd r7, r6, [sp, 0x28] | __asm ("ldrd r7, r6, [var_0h]");
0x000067f8 vmov.i32 d16, 0 | __asm ("vmov.i32 d16, 0");
0x000067fc ldr r3, [r1, r3] |
0x000067fe mov r1, sp | r1 = sp;
0x00006800 ldr r3, [r3] | r3 = imp.__aeabi_unwind_cpp_pr0;
0x00006802 str r3, [sp, 0xc] | var_ch_2 = r3;
0x00006804 mov.w r3, 0 | r3 = 0;
0x00006806 lsls r0, r0, 0xc | r0 <<= 0xc;
0x00006808 vstr d16, [sp] | __asm ("vstr d16, [sp]");
0x0000680c bl 0x6588 | fcn_00006588 (r0, r1, r2);
0x00006810 orr.w ip, r7, r6 |
0x00006814 clz r1, r0 | r1 &= r0;
0x00006816 invalid |
0x0000681a cmp.w ip, 0 |
0x0000681e it eq |
| if (ip != 0) {
0x00006820 moveq r1, 0 | r1 = 0;
| }
| if (r1 == 0) {
0x00006822 cbz r1, 0x6848 | goto label_5;
| }
0x00006824 ldrd r0, r1, [sp] | __asm ("ldrd r0, r1, [sp]");
0x00006828 cmp r7, r0 |
0x0000682a sbcs r6, r1 | __asm ("sbcs r6, r1");
| if (r7 >= r0) {
0x0000682c bhs 0x684e | goto label_6;
| }
0x0000682e blx 0x1df8 | vasprintf_chk ()
0x00006832 ldr r3, [pc, 0x5c] |
0x00006834 movs r2, 0x22 | r2 = 0x22;
0x00006836 str r2, [r0] | *(r0) = r2;
0x00006838 add r3, pc | r3 = 0xd0ce;
0x0000683a ldr r0, [r3] | r0 = imp.__aeabi_unwind_cpp_pr0;
| do {
0x0000683c ldr r1, [pc, 0x54] |
0x0000683e mov r3, r5 | r3 = r5;
0x00006840 mov r2, r4 | r2 = r4;
0x00006842 add r1, pc | r1 = 0xd0da;
0x00006844 blx 0x1c30 | r0 = iswprint (r0);
| if (r0 == 0) {
| label_5:
0x00006848 cbnz r0, 0x6866 |
0x0000684a ldrd r0, r1, [sp] | __asm ("ldrd r0, r1, [sp]");
| label_6:
0x0000684e ldr r2, [pc, 0x48] |
0x00006850 ldr r3, [pc, 0x38] | r3 = *(0x688c);
0x00006852 add r2, pc | r2 = 0xd0f0;
0x00006854 ldr r3, [r2, r3] | r3 = imp.__aeabi_unwind_cpp_pr0;
0x00006856 ldr r2, [r3] | r2 = imp.__aeabi_unwind_cpp_pr0;
0x00006858 ldr r3, [sp, 0xc] | r3 = var_ch_2;
0x0000685a eors r2, r3 | r2 ^= r3;
0x0000685c mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00006860 bne 0x6882 | goto label_7;
| }
0x00006862 add sp, 0x14 |
0x00006864 pop {r4, r5, r6, r7, pc} |
| }
0x00006866 blx 0x1df8 | r0 = vasprintf_chk ()
0x0000686a ldr r2, [r0] | r2 = *(r0);
0x0000686c ldr r3, [pc, 0x2c] |
0x0000686e cmp r2, 0x22 |
0x00006870 add r3, pc | r3 = 0xd110;
0x00006872 ldr r0, [r3] | r0 = imp.__aeabi_unwind_cpp_pr0;
0x00006874 beq 0x683c |
| } while (r2 == 0x22);
0x00006876 ldr r1, [pc, 0x28] |
0x00006878 mov r3, r5 | r3 = r5;
0x0000687a mov r2, r4 | r2 = r4;
0x0000687c add r1, pc | r1 = 0xd122;
0x0000687e blx 0x1ef8 | fcn_00001ef8 ();
| label_7:
0x00006882 blx 0x1bac | cfgetispeed ();
0x00006886 nop |
0x00006888 cmp sl, r7 |
0x0000688a movs r0, r0 |
0x0000688c lsls r0, r4, 8 | r0 = r4 << 8;
0x0000688e movs r0, r0 |
0x00006890 ldr r2, [pc, 0xa0] | r2 = *(0x6934);
0x00006892 movs r0, r0 |
0x00006894 cmp r4, 0x92 |
0x00006896 movs r0, r0 |
0x00006898 cmp r2, fp |
0x0000689a movs r0, r0 |
0x0000689c ldr r1, [pc, 0x3c0] | r1 = *(0x6c60);
0x0000689e movs r0, r0 |
0x000068a0 cmp r4, 0x58 |
0x000068a2 movs r0, r0 |
0x000068a4 ldr r2, [pc, 0x88] |
0x000068a6 ldr r3, [pc, 0x8c] | r3 = *(0x6936);
0x000068a8 push {r4, r5, r6, r7, lr} |
0x000068aa mov r4, r0 | r4 = r0;
0x000068ac add r2, pc | r2 = 0xd1e0;
0x000068ae sub sp, 0xc |
0x000068b0 movs r6, 0 | r6 = 0;
0x000068b2 mov r7, r1 | r7 = r1;
0x000068b4 ldr r3, [r2, r3] |
0x000068b6 ldr r3, [r3] | r3 = imp.__aeabi_unwind_cpp_pr0;
0x000068b8 str r3, [sp, 4] | var_4h = r3;
0x000068ba mov.w r3, 0 | r3 = 0;
0x000068be str r6, [sp] | *(sp) = r6;
0x000068c0 blx 0x1df8 | r0 = vasprintf_chk ()
0x000068c4 str r6, [r0] | *(r0) = r6;
| if (r4 == 0) {
0x000068c6 cbz r4, 0x68ce | goto label_1;
| }
0x000068c8 ldrsb.w r3, [r4] | r3 = *(r4);
0x000068cc cbnz r3, 0x68e0 |
| while (r3 == r4) {
| label_1:
0x000068ce ldr r0, [pc, 0x68] |
0x000068d0 mov r3, r4 | r3 = r4;
0x000068d2 ldr r1, [pc, 0x68] |
0x000068d4 mov r2, r7 | r2 = r7;
0x000068d6 add r0, pc |
0x000068d8 ldr r0, [r0] | r0 = imp.__aeabi_unwind_cpp_pr0;
0x000068da add r1, pc | r1 = 0xd21c;
0x000068dc blx 0x1ef8 | r0 = fcn_00001ef8 ();
0x000068e0 mov r5, r0 | r5 = r0;
0x000068e2 mov r1, sp | r1 = sp;
0x000068e4 mov r0, r4 | r0 = r4;
0x000068e6 blx 0x1e4c | write (r0, r1, r2);
0x000068ea ldr r3, [r5] | r3 = *(r5);
| if (r3 != 0) {
0x000068ec cbnz r3, 0x6916 | goto label_8;
| }
0x000068ee ldr r3, [sp] | r3 = *(sp);
0x000068f0 cmp r3, r4 |
0x000068f2 beq 0x68ce |
| }
| if (r3 == 0) {
0x000068f4 cbz r3, 0x68fe | goto label_9;
| }
0x000068f6 ldrsb.w r3, [r3] | r3 = *(r3);
0x000068fa cmp r3, 0 |
| if (r3 != 0) {
0x000068fc bne 0x68ce | goto label_1;
| }
| label_9:
0x000068fe ldr r2, [pc, 0x40] |
0x00006900 ldr r3, [pc, 0x30] | r3 = *(0x6934);
0x00006902 add r2, pc | r2 = 0xd248;
0x00006904 ldr r3, [r2, r3] | r3 = imp.__aeabi_unwind_cpp_pr0;
0x00006906 ldr r2, [r3] | r2 = imp.__aeabi_unwind_cpp_pr0;
0x00006908 ldr r3, [sp, 4] | r3 = var_4h;
0x0000690a eors r2, r3 | r2 ^= r3;
0x0000690c mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00006910 bne 0x692c | goto label_10;
| }
0x00006912 add sp, 0xc |
0x00006914 pop {r4, r5, r6, r7, pc} |
| label_8:
0x00006916 ldr r2, [pc, 0x2c] |
0x00006918 cmp r3, 0x22 |
0x0000691a add r2, pc | r2 = 0xd264;
0x0000691c ldr r0, [r2] | r0 = imp.__aeabi_unwind_cpp_pr0;
| if (r3 != 0x22) {
0x0000691e bne 0x68ce | goto label_1;
| }
0x00006920 ldr r1, [pc, 0x24] |
0x00006922 mov r3, r4 | r3 = r4;
0x00006924 mov r2, r7 | r2 = r7;
0x00006926 add r1, pc | r1 = 0xd272;
0x00006928 blx 0x1c30 | r0 = iswprint (r0);
| label_10:
0x0000692c blx 0x1bac | r0 = cfgetispeed ();
0x00006930 cmp r0, r0 |
0x00006932 movs r0, r0 |
0x00006934 lsls r0, r4, 8 | r0 = r4 << 8;
0x00006936 movs r0, r0 |
0x00006938 ldr r1, [pc, 0x228] | r1 = *(0x6b64);
0x0000693a movs r0, r0 |
0x0000693c cmp r3, 0xfa |
0x0000693e movs r0, r0 |
0x00006940 add sl, r5 | sl += r5;
0x00006942 movs r0, r0 |
0x00006944 ldr r1, [pc, 0x118] | r1 = *(0x6a60);
0x00006946 movs r0, r0 |
0x00006948 cmp r3, 0xae |
0x0000694a 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/sbin/agetty @ 0x694c */
| #include <stdint.h>
|
; (fcn) fcn.0000694c () | void fcn_0000694c (int16_t arg1, int16_t arg2) {
| char * * endptr;
| int16_t var_4h_2;
| int16_t var_0h;
| int16_t var_4h;
| r0 = arg1;
| r1 = arg2;
0x0000694c blmi 0x8d91dc | __asm ("blmi aav.0x00004458");
0x00006950 push {r4, r5, r6, r7, lr} |
0x00006952 mov r4, r0 | r4 = r0;
0x00006954 add r2, pc | r2 += pc;
0x00006956 sub sp, 0xc |
0x00006958 movs r6, 0 | r6 = 0;
0x0000695a mov r7, r1 | r7 = r1;
0x0000695c ldr r3, [r2, r3] | r3 = *((r2 + r3));
0x0000695e ldr r3, [r3] | r3 = *(r3);
0x00006960 str r3, [sp, 4] | var_4h = r3;
0x00006962 mov.w r3, 0 | r3 = 0;
0x00006966 str r6, [sp] | *(sp) = r6;
0x00006968 blx 0x1df8 | r0 = vasprintf_chk ()
0x0000696c str r6, [r0] | *(r0) = r6;
| if (r4 == 0) {
0x0000696e cbz r4, 0x6976 | goto label_0;
| }
0x00006970 ldrsb.w r3, [r4] | r3 = *(r4);
0x00006974 cbnz r3, 0x6988 |
| while (r3 == r4) {
| label_0:
0x00006976 ldr r0, [pc, 0x68] |
0x00006978 mov r3, r4 | r3 = r4;
0x0000697a ldr r1, [pc, 0x68] |
0x0000697c mov r2, r7 | r2 = r7;
0x0000697e add r0, pc |
0x00006980 ldr r0, [r0] | r0 = imp.__aeabi_unwind_cpp_pr0;
0x00006982 add r1, pc | r1 = 0xd36c;
0x00006984 blx 0x1ef8 | r0 = fcn_00001ef8 ();
0x00006988 mov r5, r0 | r5 = r0;
0x0000698a mov r1, sp | r1 = sp;
0x0000698c mov r0, r4 | r0 = r4;
0x0000698e blx 0x1b48 | fcn_00001b48 ();
0x00006992 ldr r3, [r5] | r3 = *(r5);
| if (r3 != 0) {
0x00006994 cbnz r3, 0x69be | goto label_2;
| }
0x00006996 ldr r3, [sp] | r3 = *(sp);
0x00006998 cmp r3, r4 |
0x0000699a beq 0x6976 |
| }
| if (r3 == 0) {
0x0000699c cbz r3, 0x69a6 | goto label_3;
| }
0x0000699e ldrsb.w r3, [r3] | r3 = *(r3);
0x000069a2 cmp r3, 0 |
| if (r3 != 0) {
0x000069a4 bne 0x6976 | goto label_0;
| }
| label_3:
0x000069a6 ldr r2, [pc, 0x40] |
0x000069a8 ldr r3, [pc, 0x30] | r3 = *(0x69dc);
0x000069aa add r2, pc | r2 = 0xd398;
0x000069ac ldr r3, [r2, r3] | r3 = imp.__aeabi_unwind_cpp_pr0;
0x000069ae ldr r2, [r3] | r2 = imp.__aeabi_unwind_cpp_pr0;
0x000069b0 ldr r3, [sp, 4] | r3 = var_4h;
0x000069b2 eors r2, r3 | r2 ^= r3;
0x000069b4 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x000069b8 bne 0x69d4 | goto label_4;
| }
0x000069ba add sp, 0xc |
0x000069bc pop {r4, r5, r6, r7, pc} |
| label_2:
0x000069be ldr r2, [pc, 0x2c] |
0x000069c0 cmp r3, 0x22 |
0x000069c2 add r2, pc | r2 = 0xd3b4;
0x000069c4 ldr r0, [r2] | r0 = imp.__aeabi_unwind_cpp_pr0;
| if (r3 != 0x22) {
0x000069c6 bne 0x6976 | goto label_0;
| }
0x000069c8 ldr r1, [pc, 0x24] |
0x000069ca mov r3, r4 | r3 = r4;
0x000069cc mov r2, r7 | r2 = r7;
0x000069ce add r1, pc | r1 = 0xd3c2;
0x000069d0 blx 0x1c30 | r0 = iswprint (r0);
| label_4:
0x000069d4 blx 0x1bac | cfgetispeed ();
0x000069d8 add r0, fp | r0 += fp;
0x000069da movs r0, r0 |
0x000069dc lsls r0, r4, 8 | r0 = r4 << 8;
0x000069de movs r0, r0 |
0x000069e0 ldr r0, [pc, 0x388] | r0 = *(0x6d6c);
0x000069e2 movs r0, r0 |
0x000069e4 cmp r3, 0x52 |
0x000069e6 movs r0, r0 |
0x000069e8 add r2, r0 | r2 += r0;
0x000069ea movs r0, r0 |
0x000069ec ldr r0, [pc, 0x278] | r0 = *(0x6c68);
0x000069ee movs r0, r0 |
0x000069f0 cmp r3, 6 |
0x000069f2 movs r0, r0 |
0x000069f4 ldr r2, [pc, 0x8c] |
0x000069f6 ldr r3, [pc, 0x90] | r3 = *(0x6a8a);
0x000069f8 push {r4, r5, r6, r7, lr} |
0x000069fa mov r4, r0 | r4 = r0;
0x000069fc add r2, pc | r2 = 0xd484;
0x000069fe sub sp, 0xc |
0x00006a00 movs r6, 0 | r6 = 0;
0x00006a02 mov r7, r1 | r7 = r1;
0x00006a04 ldr r3, [r2, r3] |
0x00006a06 ldr r3, [r3] | r3 = imp.__aeabi_unwind_cpp_pr0;
0x00006a08 str r3, [sp, 4] | var_4h_2 = r3;
0x00006a0a mov.w r3, 0 | r3 = 0;
0x00006a0e str r6, [sp] | *(sp) = r6;
0x00006a10 blx 0x1df8 | r0 = vasprintf_chk ()
0x00006a14 str r6, [r0] | *(r0) = r6;
| if (r4 == 0) {
0x00006a16 cbz r4, 0x6a1e | goto label_1;
| }
0x00006a18 ldrsb.w r3, [r4] | r3 = *(r4);
0x00006a1c cbnz r3, 0x6a30 |
| while (r3 == r4) {
| label_1:
0x00006a1e ldr r0, [pc, 0x6c] |
0x00006a20 mov r3, r4 | r3 = r4;
0x00006a22 ldr r1, [pc, 0x6c] |
0x00006a24 mov r2, r7 | r2 = r7;
0x00006a26 add r0, pc |
0x00006a28 ldr r0, [r0] | r0 = imp.__aeabi_unwind_cpp_pr0;
0x00006a2a add r1, pc | r1 = 0xd4c0;
0x00006a2c blx 0x1ef8 | r0 = fcn_00001ef8 ();
0x00006a30 mov r5, r0 | r5 = r0;
0x00006a32 movs r2, 0xa | r2 = 0xa;
0x00006a34 mov r1, sp | r1 = sp;
0x00006a36 mov r0, r4 | r0 = r4;
0x00006a38 blx 0x1a8c | strtol (r0, r1, r2);
0x00006a3c ldr r3, [r5] | r3 = *(r5);
| if (r3 != 0) {
0x00006a3e cbnz r3, 0x6a68 | goto label_5;
| }
0x00006a40 ldr r3, [sp] | r3 = *(sp);
0x00006a42 cmp r3, r4 |
0x00006a44 beq 0x6a1e |
| }
| if (r3 == 0) {
0x00006a46 cbz r3, 0x6a50 | goto label_6;
| }
0x00006a48 ldrsb.w r3, [r3] | r3 = *(r3);
0x00006a4c cmp r3, 0 |
| if (r3 != 0) {
0x00006a4e bne 0x6a1e | goto label_1;
| }
| label_6:
0x00006a50 ldr r2, [pc, 0x40] |
0x00006a52 ldr r3, [pc, 0x34] | r3 = *(0x6a8a);
0x00006a54 add r2, pc | r2 = 0xd4ec;
0x00006a56 ldr r3, [r2, r3] | r3 = imp.__aeabi_unwind_cpp_pr0;
0x00006a58 ldr r2, [r3] | r2 = imp.__aeabi_unwind_cpp_pr0;
0x00006a5a ldr r3, [sp, 4] | r3 = var_4h_2;
0x00006a5c eors r2, r3 | r2 ^= r3;
0x00006a5e mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x00006a62 bne 0x6a7e | goto label_7;
| }
0x00006a64 add sp, 0xc |
0x00006a66 pop {r4, r5, r6, r7, pc} |
| label_5:
0x00006a68 ldr r2, [pc, 0x2c] |
0x00006a6a cmp r3, 0x22 |
0x00006a6c add r2, pc | r2 = 0xd508;
0x00006a6e ldr r0, [r2] | r0 = imp.__aeabi_unwind_cpp_pr0;
| if (r3 != 0x22) {
0x00006a70 bne 0x6a1e | goto label_1;
| }
0x00006a72 ldr r1, [pc, 0x28] |
0x00006a74 mov r3, r4 | r3 = r4;
0x00006a76 mov r2, r7 | r2 = r7;
0x00006a78 add r1, pc | r1 = 0xd51a;
0x00006a7a blx 0x1c30 | r0 = iswprint (r0);
| label_7:
0x00006a7e blx 0x1bac | cfgetispeed ();
0x00006a82 nop |
0x00006a84 bics r0, r6 | __asm ("bics r0, r6");
0x00006a86 movs r0, r0 |
0x00006a88 lsls r0, r4, 8 | r0 = r4 << 8;
0x00006a8a movs r0, r0 |
0x00006a8c ldr r0, [pc, 0xe8] | r0 = *(0x6b78);
0x00006a8e movs r0, r0 |
0x00006a90 cmp r2, 0xaa |
0x00006a92 movs r0, r0 |
0x00006a94 muls r0, r3, r0 | r0 = r3 * r0;
0x00006a96 movs r0, r0 |
0x00006a98 invalid |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-80367616.squashfs_v4_le_extract/usr/sbin/agetty @ 0x786c */
| #include <stdint.h>
|
; (fcn) fcn.0000786c () | void fcn_0000786c () {
| char * * endptr;
| int16_t var_4h;
0x0000786c blmi 0x81a0f0 | __asm ("blmi aav.0x00003538");
0x00007870 push {r4, r5, r6, lr} |
0x00007872 sub sp, 8 |
0x00007874 add r2, pc | r2 += pc;
0x00007876 ldr r3, [r2, r3] | r3 = *((r2 + r3));
0x00007878 ldr r3, [r3] | r3 = *(r3);
0x0000787a str r3, [sp, 4] | var_4h = r3;
0x0000787c mov.w r3, 0 | r3 = 0;
0x00007880 blx 0x1cc0 | r0 = getttynam ();
| if (r0 == 0) {
0x00007884 cbz r0, 0x78e0 | goto label_0;
| }
0x00007886 mov r4, r0 | r4 = r0;
0x00007888 movs r6, 0 | r6 = 0;
0x0000788a str r6, [sp] | *(sp) = r6;
0x0000788c blx 0x1df8 | vasprintf_chk ()
0x00007890 movs r2, 0xa | r2 = 0xa;
0x00007892 mov r5, r0 | r5 = r0;
0x00007894 str r6, [r0] | *(r0) = r6;
0x00007896 mov r1, sp | r1 = sp;
0x00007898 mov r0, r4 | r0 = r4;
0x0000789a blx 0x1a8c | strtol (r0, r1, r2);
0x0000789e ldr r3, [r5] | r3 = *(r5);
| if (r3 != 0) {
0x000078a0 cbnz r3, 0x78e0 | goto label_0;
| }
0x000078a2 ldr r2, [sp] | r2 = *(sp);
| if (r2 == 0) {
0x000078a4 cbz r2, 0x78e0 | goto label_0;
| }
0x000078a6 ldrsb.w r3, [r2] | r3 = *(r2);
0x000078aa cmp r2, r4 |
0x000078ac sub.w r3, r3, r6 | r3 -= r6;
0x000078b0 clz r3, r3 | r3 &= r3;
0x000078b4 lsr.w r3, r3, 5 | r3 >>= 5;
0x000078b8 it ls |
| if (r2 > r4) {
0x000078ba movls r3, 0 | r3 = 0;
| }
0x000078bc cmp r0, r6 |
0x000078be ite le |
| if (r0 > r6) {
0x000078c0 movle r3, 0 | r3 = 0;
| }
| if (r0 <= r6) {
0x000078c2 andgt r3, r3, 1 | r3 &= 1;
| }
0x000078c6 cbz r3, 0x78e0 |
| while (1) {
0x000078c8 ldr r2, [pc, 0x28] |
0x000078ca ldr r3, [pc, 0x24] | r3 = *(0x78f2);
0x000078cc add r2, pc | r2 = 0xf1c4;
0x000078ce ldr r3, [r2, r3] | r3 = *(0xf1c4);
0x000078d0 ldr r2, [r3] | r2 = *(0xf1c4);
0x000078d2 ldr r3, [sp, 4] | r3 = var_4h;
0x000078d4 eors r2, r3 | r2 ^= r3;
0x000078d6 mov.w r3, 0 | r3 = 0;
| if (r2 != r3) {
0x000078da bne 0x78e6 | goto label_1;
| }
0x000078dc add sp, 8 |
0x000078de pop {r4, r5, r6, pc} |
| label_0:
0x000078e0 mov.w r0, -1 | r0 = -1;
0x000078e4 b 0x78c8 |
| }
| label_1:
0x000078e6 blx 0x1bac | cfgetispeed ();
0x000078ea nop |
0x000078ec adds r5, 0x38 | r5 += 0x38;
0x000078ee movs r0, r0 |
0x000078f0 lsls r0, r4, 8 | r0 = r4 << 8;
0x000078f2 movs r0, r0 |
0x000078f4 adds r4, 0xe0 | r4 += 0xe0;
0x000078f6 movs r0, r0 |
| }
[*] Function printf used 28 times agetty