Looks like the scripts are xor'd with the key: 'snailgame'
Usage 1:
Code:
void *__cdecl sub_10005E10(int a1, int a2, size_t Size, int a4)
{
size_t v4; // esi
void *v5; // ebp
_BYTE *v6; // ecx
int v7; // edi
v4 = 0;
if ( dword_10091020 >= Size )
{
v5 = Block;
}
else
{
if ( Block )
free(Block);
v5 = malloc(Size);
Block = v5;
dword_10091020 = Size;
}
if ( Size )
{
v6 = v5;
v7 = a2 - (_DWORD)v5;
do
{
if ( a4 )
*v6 = v6[v7] ^ byte_10075AD4[v4 % 9];
else
*v6 = v6[v7];
++v4;
++v6;
}
while ( v4 < Size );
}
return v5;
}
Usage 2:
Code:
char __cdecl sub_10005EA0(int a1, int a2, unsigned int a3, int a4)
{
unsigned int v4; // ecx
char result; // al
v4 = 0;
if ( a4 && a3 )
{
do
{
result = byte_10075AD4[v4 % 9];
*(_BYTE *)(v4 + a2) ^= result;
++v4;
}
while ( v4 < a3 );
}
return result;
}
byte_10075AD4 points to a small byte array holding the word: snailgame
This is how the game is writing and reading the blocks.