void __fastcall Java_com_xxxx_util_jni_Codec_bd3ms(int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8)
{
char *v8; // r6@0
size_t v9; // r8@0
const char *v10; // r9@0
const char *v11; // r10@0
signed int v12; // r11@0
__pid_t v13; // r0@1
FILE *v14; // r4@1
size_t v15; // r0@8
int v16; // r1@8
int v17; // r2@12
signed int v18; // r0@12
unsigned int v19; // r1@12
int v20; // r1@13
int *v21; // r2@13
int v22; // t1@14
int v23; // r1@16
unsigned int v24; // r0@22
int v25; // r1@22
int v26; // r0@24
int v27; // r0@26
char *v28; // r1@27
char v29; // r3@27
int v37; // r1@32
unsigned int v38; // r0@33
signed int v39; // r1@33
signed int v40; // r0@37
signed int v41; // r0@40
int v45; // r1@43
int v46; // r5@44
int v47; // [sp+Ch] [bp-1144h]@1
int v48; // [sp+10h] [bp-1140h]@1
int v49; // [sp+20h] [bp-1130h]@0
char s1[4]; // [sp+28h] [bp-1128h]@2
unsigned int v51; // [sp+2Ch] [bp-1124h]@40
unsigned int v52; // [sp+30h] [bp-1120h]@7
int v53; // [sp+34h] [bp-111Ch]@24
char s; // [sp+428h] [bp-D28h]@1
char v55; // [sp+528h] [bp-C28h]@1
char v56[1008]; // [sp+538h] [bp-C18h]@31
char v57; // [sp+928h] [bp-828h]@1
char v58[1008]; // [sp+938h] [bp-818h]@30
char v59; // [sp+D28h] [bp-428h]@1
char v60[1012]; // [sp+D38h] [bp-418h]@30
int v61; // [sp+112Ch] [bp-24h]@1
__int64 savedregs; // [sp+1150h] [bp+0h]@23
v47 = a4;
v48 = a1;
v61 = _stack_chk_guard;
_aeabi_memclr8(&v59, 1024);
_aeabi_memclr8(&v57, 1024);
_aeabi_memclr8(&v55, 1024);
v17 = (*(_QWORD *)(((unsigned int)dword_3304 + 3) & 0xFFFFFFFC) >> 32) ^ 0x24CDB52B;
v18 = 1736219389;
v19 = v17 - (*(_QWORD *)(((unsigned int)dword_3304 + 3) & 0xFFFFFFFC) ^ 0x777509AA);
if ( (signed int)v19 >= 4 )
{
v8 = (char *)1;
v20 = (v19 >> 2) + 1;
v21 = (int *)(v17 + (((unsigned int)dword_3304 + 3) & 0xFFFFFFFC) - 4);
do
{
v22 = *v21;
--v21;
--v20;
v18 ^= v22;
}
while ( v20 > 1 );
}
if ( v18 != (*(_DWORD *)((((unsigned int)dword_3304 + 3) & 0xFFFFFFFC) + 8) ^ 0x3D312CED) )
{
v23 = (v18 & 0x1F) + 200;
do
{
--v23;
v18 ^= 2 * v18;
}
while ( v23 );
JUMPOUT(__CS__, v47);
}
if ( *(unsigned __int8 *)Java_com_xxxx_util_jni_Codec_bd3ms == 223
&& *((unsigned __int8 *)Java_com_xxxx_util_jni_Codec_bd3ms + 1) == 248
&& *(&loc_31BA + 1) == 240 )
{
v24 = 197113785;
v25 = 0;
do
{
v24 -= *((_DWORD *)&savedregs + v25) ^ 0x57B6D8B5;
*((_DWORD *)&savedregs + v25++) = v24 >> 9;
}
while ( v25 != 45 );
}
v53 = 314;
v26 = 1;
while ( 1 )
{
switch ( v26 )
{
case 21:
v10 = (const char *)sub_B140(v60, v58, v8);
v9 = 0;
v12 = strlen(v10);
v52 = v53 + -17 * ((unsigned int)(56118 * v53) >> 20);
v26 = 51 - (v53 + -17 * ((unsigned int)(56118 * v53) >> 20));
v53 = 343 - (v53 + -17 * ((unsigned int)(56118 * v53) >> 20));
continue;
case 20:
v56[v9] = v10[v9];
++v9;
v52 = v53 - (((unsigned int)(51404 * v53) >> 16) & 0xFFFC);
v26 = 81 - (v53 - (((unsigned int)(51404 * v53) >> 16) & 0xFFFC));
v53 = 373 - (v53 - (((unsigned int)(51404 * v53) >> 16) & 0xFFFC));
continue;
case 15:
v9 = 0;
_R2 = -101;
_R1 = (unsigned int)(40649 * v53) >> 22;
__asm { SMLABB.W R0, R1, R2, R0 }
v52 = _R0;
v37 = _R0;
v26 = 14 - _R0;
v53 = 319 - v37;
continue;
case 14:
v38 = v53 + -66 * ((unsigned int)(58606 * v53) >> 22);
v53 = 349 - (v53 + -66 * ((unsigned int)(58606 * v53) >> 22));
v39 = 65;
if ( (signed int)v9 < v12 )
v39 = 62;
v26 = v39 - v38;
continue;
case 11:
v60[v9] = v11[v9];
++v9;
v53 = 301;
v26 = 4;
continue;
case 7:
*(_DWORD *)s1 = v53 + -24 * ((unsigned int)(43251 * v53) >> 20);
_CF = v9 >= strlen((const char *)&unk_1F029);
v40 = 45;
v53 = 333 - *(_DWORD *)s1;
if ( !_CF )
v40 = 24;
v26 = v40 - *(_DWORD *)s1;
continue;
case 4:
v51 = v53 + -20 * ((unsigned int)(43734 * v53) >> 20);
_CF = v9 >= strlen(v11);
v41 = 76;
v53 = 371 - v51;
if ( !_CF )
v41 = 72;
v26 = v41 - v51;
continue;
case 1:
v11 = (const char *)(*(int (__cdecl **)())(*(_DWORD *)v49 + 676))();
if ( byte_1F028[0] & 1 )
{
++byte_1F028[0];
v27 = 0;
do
{
v28 = &byte_1F028[v27];
v29 = v27++ + 82;
v28[1] ^= v29;
}
while ( v27 != 35 );
}
v8 = (char *)strlen((const char *)&unk_1F029);
v53 = 301;
v26 = 4;
v9 = 0;
continue;
case 0:
v58[v9] = byte_1F028[v9 + 1];
++v9;
_R2 = -294;
_R1 = (unsigned int)(47933 * v53) >> 23;
__asm { SMLABB.W R0, R1, R2, R0 }
v52 = _R0;
v45 = _R0;
v26 = 22 - _R0;
v53 = 327 - v45;
continue;
case 2:
goto LABEL_45;
case 23:
v46 = v49;
(*(void (__fastcall **)(char *))(*(_DWORD *)v49 + 668))(v56);
(*(void (__fastcall **)(int, const char *))(*(_DWORD *)v46 + 680))(v46, v11);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v46 + 92))(v46, v48);
LABEL_45:
if ( _stack_chk_guard == v61 )
JUMPOUT(__CS__, a8);
_stack_chk_fail(_stack_chk_guard - v61);
return;
case 3:
case 5:
case 6:
case 8:
case 9:
case 10:
case 12:
case 13:
case 16:
case 17:
case 18:
case 19:
case 22:
continue;
}
}
}