有能拆深海垂钓里data0000.pak的工具吗?
找了许多pak解包工具都不行附:之前找到的一段有关代码
struct __attribute__((aligned(4))) CPak
{
_DWORD vtable;
_BYTE xor_byte; ///< This maybe 4 bytes
_BYTE unk2;
_BYTE filename;
char unk3;
_DWORD pak_fhandle;
};
int __fastcall pak_do_decrypt(CPak *pak, const char *filename, char *buf, int pos, unsigned int size)
{
bool filename_invalid; // zf
FILE *handle; // r7
unsigned int count; // r0
int result = 0;
filename_invalid = buf == 0;
if ( buf )
filename_invalid = filename == 0;
if ( !filename_invalid )
{
if ( size )
{
if ( !strcmp(filename, "data0000.pak") )
{
if ( !pak->pak_fhandle )
{
strcpy(pak->filename, filename);
pak->pak_fhandle = fopen(filename, "rb");
}
fseek(pak->pak_fhandle, pos, 0); // Seek set
fread(buf, size, 1, pak->pak_fhandle);
int counter = 0; // Counter, xor those bytes :DDDDDDDD
if ( size )
{
do
{
buf ^= pak->xor_byte;
}
while ( counter < size );
}
}
else
{
strcpy(pak->filename, filename);
handle = fopen(filename, "rb");
fseek(handle, pos, 0);
fread(buf, size, 1, handle);
count = 0;
if ( size )
{
do
{
buf ^= pak->xor_byte;
}
while ( count < size );
}
result = fclose(handle);
}
}
}
return result;
}
页:
[1]