_android_log_print(6, "nd_unity", "mono_image_open_from_data_with_name(%s)", src);
memset(&v39, 0, 0x400u);
strcpy((char *)&v39, src);
memset(&v36, 0, 0x400u);
if ( !strstr((const char *)&v39, "Assembly-CSharp.dll") )
{
_android_log_print(6, "nd_unity", "CalcuFile(%s) no dll", src);
v14 = v35;
goto LABEL_18;
}
v6 = strstr((const char *)&v39, "/obb/");
v7 = (char)v6;
if ( v6 )
{
v8 = (int)(v6 + 5);
v9 = strchr(v6 + 5, 47);
if ( !v9 )
goto LABEL_36;
v10 = 0;
*v9 = 0;
}
else
{
v29 = strchr((const char *)&v39, 45);
if ( !v29 )
goto LABEL_36;
*v29 = v7;
v30 = strrchr((const char *)&v39, 47);
if ( !v30 )
goto LABEL_36;
v8 = (int)(v30 + 1);
}
if ( !v8 )
{
LABEL_36:
_android_log_print(6, "nd_unity", "CalcuPack(%s) failed", src);
v14 = v35;
goto LABEL_18;
}
sprintf(&v36, (const char *)&unk_2136EC, v8, v10);
_android_log_print(6, "nd_unity", "CalcuFile(%s) ok", &v36);
v11 = fopen(&v36, "rb");
v12 = v11;
if ( v11 )
{
fseek(v11, 0, 2);
v13 = ftell(v12);
fseek(v12, 0, 0);
ptr = malloc((size_t)&v38);
memset(ptr, 0, (size_t)&v38);
fread(ptr, 1u, v13, v12);
fclose(v12);
_android_log_print(6, "nd_unity", "CalcuFile(%s) fopen ok", &v36);
memset(&v38, 0, 0x40u);
mono_md5_get_digest(ptr, v13, &v38);
v14 = ptr;
v15 = &v37;
do
{
v16 = (unsigned __int8)(v15++)[1];
v45 = &v38;
sprintf((char *)&v45, "%02x", v16);
strcat((char *)&g_szDLL, (const char *)&v45);
}
while ( v15 != &v40 );
v17 = v13 + 15;
if ( v13 >= 0 )
v17 = v13;
v41 = -207342219;
v42 = 1012320837;
v43 = -1539472223;
v44 = 900089969;
if ( v17 >> 4 > 0 )
{
v18 = ptr;
do
{
v19 = -957401312;
v20 = *(_DWORD *)v18;
v21 = *((_DWORD *)v18 + 1);
do
{
v21 = v21 - (v19 ^ v20) - (16 * v20 ^ (v20 >> 5)) - *(&v41 + ((v19 >> 11) & 3));
v19 += 1640531527;
v20 = v20 - (v21 ^ v19) - (16 * v21 ^ (v21 >> 5)) - *(&v41 + (v19 & 3));
}
while ( v19 );
*(_DWORD *)v18 = v20;
*((_DWORD *)v18 + 1) = v21;
v18 = (char *)v18 + 16;
}
while ( v18 != &v38 );
}
n = v13;
v35 = ptr;
}
else
{
_android_log_print(6, "nd_unity", "CalcuFile(%s) fopen failed", &v36);
DecFile(v35, n, &v35, &n);
v14 = v35;
}
LABEL_18:
if ( !v14 || !n )
{
if ( v32 )
{
result = 0;
*(_DWORD *)v32 = 3;
return result;
}
return 0;
}
if ( !v33 )
{
LABEL_23:
v23 = g_malloc0(872);
*(_DWORD *)(v23 + 8) = v14;
v24 = v23;
v25 = *(_BYTE *)(v23 + 16);
*(_DWORD *)(v23 + 12) = n;
*(_BYTE *)(v23 + 16) = v25 & 0xFD | 2 * (v33 & 1);
if ( src )
v26 = g_strdup(src);
else
v26 = g_strdup_printf("data-%p", v14);
*(_DWORD *)(v24 + 20) = v26;
v27 = g_malloc0(396);
v28 = (unsigned __int8)(*(_BYTE *)(v24 + 16) & 0xF7) | 8 * (a5 & 1);
*(_DWORD *)v24 = 1;
*(_BYTE *)(v24 + 16) = v28;
*(_DWORD *)(v24 + 44) = v27;
if ( do_mono_image_load(v24, v32, 1, 1) )
return register_image();
return 0;
}
result = g_malloc();
v14 = (void *)result;
if ( result )
{
memcpy((void *)result, v35, n);
goto LABEL_23;
}
if ( v32 )
*(_DWORD *)v32 = 1;
else
result = 0;
return result;
}