002A19CE . E8 AD040000 call 解密工具.002A1E80 解密call
int __fastcall sub_401E80(int a1, const char *a2)
{
int v2; // esi
const char *v3; // edi
FILE *v4; // eax
FILE *v5; // edi
int v6; // eax
size_t v7; // ebx
int v8; // esi
size_t v9; // edi
void *v10; // ebp
size_t Size; // ST5C_4
void *Dst; // ST60_4
int v14; // [esp+20h] [ebp-464h]
char v15; // [esp+24h] [ebp-460h]
char v16; // [esp+40h] [ebp-444h]
int v17; // [esp+54h] [ebp-430h]
void *v18; // [esp+5Ch] [ebp-428h]
char v19; // [esp+64h] [ebp-420h]
int v20; // [esp+464h] [ebp-20h]
char Dest[4]; // [esp+468h] [ebp-1Ch]
int v22; // [esp+46Ch] [ebp-18h]
char v23; // [esp+470h] [ebp-14h]
int v24; // [esp+480h] [ebp-4h]
v2 = a1;
v14 = a1;
v3 = a2;
std::basic_string,std::allocator>::basic_string,std::allocator>(
&v15,
&unk_4766E8);
v24 = 1;
if ( v3 )
{
v4 = fopen(v3, "rb");
v5 = v4;
if ( v4 )
{
fseek(v4, 0, 2);
v6 = ftell(v5);
v7 = v6;
if ( v6 )
{
v8 = sub_45620E(v6);
fseek(v5, 0, 0);
fread((void *)v8, 1u, v7, v5);
fclose(v5);
*(_DWORD *)Dest = 0;
v22 = 0;
v23 = 0;
strncpy(Dest, (const char *)v8, 8u);
v9 = atoi64(Dest);
v10 = (void *)sub_45620E(v9 + 1);
memset(v10, 0, v9 + 1);
memcpy(v10, (const void *)(v8 + 8), v9);
*(_DWORD *)Dest = 0;
v22 = 0;
v23 = 0;
strncpy(Dest, (const char *)(v9 + v8 + 8), 8u);
Size = atoi64(Dest);
Dst = (void *)sub_45620E(Size + 1);
memset(Dst, 0, Size + 1);
memcpy(Dst, (const void *)(v9 + v8 + 16), Size);
sub_401C20(v10, v8 + Size + v9 + 16, v7 - (Size + v9 + 16));
LOBYTE(v24) = 2;
sub_401100(v17);
LOBYTE(v24) = 3;
if ( v20 )
std::basic_string,std::allocator>::operator=(&v15, &unk_4766E8);
else
std::basic_string,std::allocator>::operator=(&v15, v18);
v2 = v14;
std::basic_string,std::allocator>::basic_string,std::allocator>(
v14,
&v15);
if ( v18 && v18 != &v19 )
operator delete[](v18);
LOBYTE(v24) = 1;
std::basic_string,std::allocator>::~basic_string,std::allocator>(&v16);
}
else
{
fclose(v5);
std::basic_string,std::allocator>::basic_string,std::allocator>(
v2,
v7);
}
}
else
{
std::basic_string,std::allocator>::basic_string,std::allocator>(
v2,
0);
}
}
else
{
std::basic_string,std::allocator>::basic_string,std::allocator>(
v2,
0);
}
LOBYTE(v24) = 0;
std::basic_string,std::allocator>::~basic_string,std::allocator>(&v15);
return v2;
}