Function at 0x4394e0
Capabilities:
Encode data using xor
Generate random numbers using the delphi lcg
Hash data with crc32
Resolve function by parsing pe exports

Disassembly:
push ecx
mov eax, dword [esp + 0xc]
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x18]
mov ecx, dword [edi + 0x8c]
mov dword [edi + 0x74], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x10], 0
cmp eax, ecx
jbe 0x439508
mov eax, ecx
mov dword [edi + 0x78], eax
test eax, eax
je 0x4396f5
cmp dword [edi + 0x6c], 0
jne 0x4395f7
mov eax, dword [edi + 0x88]
test eax, eax
je 0x4395f7
mov ebp, 0x4000
cmp eax, ebp
jae 0x439536
mov ebp, eax
mov edx, dword [edi + 0x64]
mov eax, ebp
mov esi, edi
call fcn.00436db0
test eax, eax
je 0x4396ff
sub dword [edi + 0x88], ebp
test byte [edi + 0x3c], 1
mov ecx, dword [edi + 0x64]
mov dword [edi + 0x68], ecx
mov dword [edi + 0x6c], ebp
je 0x4395f7
xor edx, edx
test ebp, ebp
jbe 0x4395f7
lea ecx, [ecx]
mov eax, dword [edi + 0x98]
mov ecx, dword [edi + 0x64]
lea esi, [edx + ecx]
and eax, 0xfffd
or eax, 2
mov ecx, eax
xor ecx, 1
imul ecx, eax
shr ecx, 8
xor byte [esi], cl
mov ecx, dword [edi + 0x64]
movsx ecx, byte [edx + ecx]
mov eax, dword [edi + 0x90]
xor ecx, eax
shr eax, 8
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x506d40]
xor ecx, eax
movzx eax, cl
add eax, dword [edi + 0x94]
mov dword [edi + 0x90], ecx
mov ecx, dword [edi + 0x98]
imul eax, eax, 0x8088405
inc eax
mov dword [edi + 0x94], eax
shr eax, 0x18
xor eax, ecx
and eax, 0xff
shr ecx, 8
xor ecx, dword [eax*4 + 0x506d40]
inc edx
mov dword [edi + 0x98], ecx
cmp edx, ebp
jb 0x439570
mov eax, dword [edi + 0x9c]
mov ecx, dword [edi + 0x6c]
cmp eax, ecx
jbe 0x439606
mov eax, ecx
test eax, eax
je 0x439635
mov edx, dword [edi + 0x68]
lea esi, [edx + eax]
mov dl, byte [esi - 1]
sub dword [edi + 0x8c], eax
sub ecx, eax
sub dword [edi + 0x9c], eax
mov dword [edi + 0x6c], ecx
mov dword [edi + 0x68], esi
jne 0x439635
cmp dl, byte [edi + 0xa0]
jne 0x43970e
cmp word [edi + 0x3e], 0
jne 0x439694
mov eax, dword [edi + 0x78]
mov esi, dword [edi + 0x6c]
cmp eax, esi
jae 0x439648
mov esi, eax
mov eax, dword [edi + 0x68]
mov ecx, dword [edi + 0x74]
push esi
push eax
push ecx
call sub.MSVCR90.dll_memcpy
mov ebp, dword [edi + 0x74]
mov eax, dword [edi + 0x84]
add esp, 0xc
mov edx, esi
mov ecx, ebp
call fcn.00436cb0
sub dword [edi + 0x8c], esi
sub dword [edi + 0x6c], esi
sub dword [edi + 0x78], esi
add dword [edi + 0x68], esi
add dword [edi + 0x7c], esi
add ebp, esi
add dword [esp + 0x10], esi
mov dword [edi + 0x84], eax
mov eax, dword [edi + 0x8c]
mov dword [edi + 0x74], ebp
jmp 0x4396e7
mov edx, dword [edi + 0x74]
mov ebx, dword [edi + 0x7c]
push 2
lea esi, [edi + 0x68]
mov dword [esp + 0x1c], edx
call fcn.004391a0
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x4396b6
cmp ebp, 1
jne 0x43971d
mov esi, dword [edi + 0x7c]
mov ecx, dword [esp + 0x18]
mov eax, dword [edi + 0x84]
sub esi, ebx
mov edx, esi
call fcn.00436cb0
sub dword [edi + 0x8c], esi
add dword [esp + 0x10], esi
mov dword [edi + 0x84], eax
mov eax, dword [edi + 0x8c]
cmp ebp, 1
je 0x4396f5
test eax, eax
je 0x4396f5
cmp dword [edi + 0x78], 0
jne 0x439513
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
mov dword [edi + 8], 7
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
mov dword [edi + 8], 0x13
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
mov dword [edi + 8], 0x12
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret