Function at 0x4035b0
Capabilities:
Encode data using xor
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
push ecx
push ebp
push esi
push edi
mov esi, ecx
push 0x40
mov edi, eax
lea eax, [esi + 0x64]
push 0
push eax
call fcn.0051ab50
mov ebp, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
add esp, 0xc
push 0x4000
push 0
call ebp
mov dword [esi + 0x64], eax
test eax, eax
je 0x403668
cmp word [esi + 0x3e], 0
je 0x403695
push 0x4c
push 0
call ebp
mov dword [esi + 0x80], eax
test eax, eax
je 0x403668
push 0x4c
push 0
push eax
call fcn.0051ab50
mov eax, dword [esi + 0x80]
mov dword [eax + 8], 0xf
mov ecx, dword [esi + 0x80]
add esp, 0xc
mov byte [ecx + 0x48], 7
mov edx, dword [esi + 0x80]
push 0x2d00
push 0
mov byte [edx + 0x44], 0
call ebp
mov ecx, dword [esi + 0x80]
mov dword [ecx + 0x2c], eax
mov edx, dword [esi + 0x80]
cmp dword [edx + 0x2c], 0
je 0x403668
push 0x8000
push 0
call ebp
mov ecx, dword [esi + 0x80]
mov dword [ecx + 0x30], eax
mov eax, dword [esi + 0x80]
mov ecx, dword [eax + 0x30]
test ecx, ecx
jne 0x403674
mov dword [esi + 8], 2
jmp 0x4037ab
add ecx, 0x8000
mov dword [eax + 0x34], ecx
mov eax, dword [esi + 0x80]
mov edx, dword [eax + 0x30]
mov dword [eax + 0x3c], edx
mov eax, dword [esi + 0x80]
mov ecx, dword [eax + 0x3c]
mov dword [eax + 0x38], ecx
mov ecx, dword [esi]
test cl, 8
je 0x4036a8
mov edx, dword [edi + 0x20]
mov dword [esi + 0x48], edx
mov eax, dword [edi + 0x24]
mov dword [esi + 0x4c], eax
mov eax, dword [esi + 0x4c]
mov edx, dword [esi + 0x48]
mov dword [esi + 0x8c], eax
movzx eax, word [esi + 0x3c]
mov dword [esi + 0x88], edx
test al, 8
je 0x4036c7
mov dl, byte [esi + 0x41]
jmp 0x4036ca
mov dl, byte [esi + 0x47]
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov byte [esi + 0xa0], dl
test cl, 4
je 0x4036e3
mov eax, dword [esi + 0x5e]
jmp 0x40380d
test al, 1
je 0x403780
mov edx, dword [esi + 0x30]
mov dword [esi + 0x9c], 0xc
mov dword [esi + 0x90], 0x12345678
mov dword [esi + 0x94], 0x23456789
mov dword [esi + 0x98], 0x34567890
test edx, edx
je 0x403780
mov cl, byte [edx]
test cl, cl
je 0x403780
mov eax, dword [esi + 0x90]
movsx ecx, cl
xor ecx, eax
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x547068]
shr eax, 8
xor ecx, eax
movzx eax, cl
add eax, dword [esi + 0x94]
mov dword [esi + 0x90], ecx
mov ecx, dword [esi + 0x98]
imul eax, eax, 0x8088405
inc eax
mov dword [esi + 0x94], eax
shr eax, 0x18
xor eax, ecx
shr ecx, 8
and eax, 0xff
xor ecx, dword [eax*4 + 0x547068]
inc edx
mov dword [esi + 0x98], ecx
mov cl, byte [edx]
test cl, cl
jne 0x403720
test byte [esi], 1
mov edx, dword [esi + 0x20]
mov eax, dword [esi + 0x5e]
lea eax, [edx + eax + 0x1c]
jne 0x4037e6
mov ecx, dword [esi + 0xc]
mov edx, dword [esi + 4]
push 0
push 0
add ecx, eax
push ecx
push edx
call edi
cmp eax, 0xffffffff
jne 0x4037e9
mov dword [esi + 8], 7
mov eax, dword [esi + 0x64]
test eax, eax
je 0x4037b9
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
cmp dword [esi + 0x80], 0
lea edi, [esi + 0x64]
mov dword [edi], 0
je 0x4037d0
call fcn.00403510
pop edi
mov dword [esi + 0x80], 0
mov dword [esi + 0x24], 0xffffffff
pop esi
pop ebp
pop ecx
ret
mov dword [esi + 0x14], eax
mov eax, 2
lea edx, [esp + 0xc]
call fcn.00402fb0
test eax, eax
je 0x4037a4
movzx eax, word [esi + 0x50]
movzx ecx, word [esp + 0xc]
mov edx, dword [esi + 0x5e]
add eax, ecx
lea eax, [eax + edx + 0x1e]
test byte [esi], 1
jne 0x403830
mov ecx, dword [esi + 0xc]
mov edx, dword [esi + 4]
push 0
push 0
add ecx, eax
push ecx
push edx
call edi
cmp eax, 0xffffffff
je 0x4037a4
pop edi
pop esi
pop ebp
pop ecx
ret
pop edi
mov dword [esi + 0x14], eax
pop esi
pop ebp
pop ecx
ret