int __fastcall sub_2E3B8(int *a1, int a2, int a3, int a4, int a5, int a6, int a7)
{
int *v7; // r6
int v8; // r0
int v9; // r1
unsigned int v10; // r5
char *v11; // r4
int v12; // r4
unsigned int v13; // r0
size_t v14; // r0
const char *v15; // r4
size_t v16; // r0
const char *v17; // r4
size_t v18; // r0
const char *v19; // r0
unsigned __int8 *v20; // r6
int v21; // r0
int v22; // r5
int *v23; // r6
int v25; // [sp+10h] [bp-11Ch]
const char *v26; // [sp+14h] [bp-118h]
char *s; // [sp+18h] [bp-114h]
int *v28; // [sp+24h] [bp-108h]
char v29; // [sp+28h] [bp-104h]
unsigned int v30; // [sp+2Ch] [bp-100h]
unsigned int v31; // [sp+30h] [bp-FCh]
void *v32; // [sp+34h] [bp-F8h]
char v33; // [sp+38h] [bp-F4h]
char v34; // [sp+4Ch] [bp-E0h]
int v35; // [sp+11Ch] [bp-10h]
v7 = a1;
v8 = sub_30548(&unk_96004, a1, a2, a3, a6);
v9 = *v7;
if ( !v8 )
{
v12 = (*(v9 + 668))(v7, "Illegal signature");
goto LABEL_24;
}
v25 = (*(v9 + 676))(v7, a6, 0);
v32 = 0;
v31 = 0;
v30 = 0;
v26 = sub_2E0C0();
v10 = strlen(v26);
if ( v10 >= 0xFFFFFFF0 )
goto LABEL_26;
v28 = v7;
if ( v10 >= 0xB )
{
v11 = operator new((v10 + 16) & 0xFFFFFFF0);
v32 = v11;
v30 = (v10 + 16) & 0xFFFFFFF0 | 1;
v31 = v10;
}
else
{
LOBYTE(v30) = 2 * v10;
v11 = &v30 + 1;
if ( !v10 )
goto LABEL_9;
}
_aeabi_memcpy(v11, v26, v10);
LABEL_9:
v11[v10] = 0;
v13 = v30 >> 1;
if ( v30 & 1 )
v13 = v31;
if ( v13 )
{
sub_2F7E4(&v29);
s = (*(*v7 + 676))(v7, a5, 0);
sub_2E91C(&v30, &dword_2E5FC, 1);
if ( a7 )
{
v14 = strlen(s);
sub_2E91C(&v30, s, v14);
}
else
{
v15 = s;
if ( *s )
{
v16 = strlen(s);
}
else
{
v15 = sub_2E1BC(v25);
v16 = strlen(v15);
}
sub_2E91C(&v30, v15, v16);
}
v17 = &v30 + 1;
if ( v30 & 1 )
v17 = v32;
v18 = strlen(v17);
sub_2EA60(&v34, v17, v18);
v19 = (*(*v7 + 676))();
v20 = v19;
v21 = strlen(v19);
sub_2F518(&v34, v20, v21, 0);
sub_2EB30(&v34, &v33, 20);
v22 = sub_2F7F0(&v29, &v33, 20);
v23 = v28;
(*(*v28 + 680))();
(*(*v23 + 680))(v23, a5, s);
(*(*v23 + 680))(v23, a6, v25);
v12 = (*(*v23 + 668))(v23, v22);
}
else
{
v12 = (*(*v7 + 668))(v7, "Illegal app secret do not found!");
}
if ( v30 << 31 )
operator delete(v32);
LABEL_24:
if ( _stack_chk_guard != v35 )
LABEL_26:
sub_2E8C4(&v30);
return v12;