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

Disassembly:
sub esp, 0x14
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x2c]
xor eax, eax
xor ebx, ebx
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ebx
test edi, edi
je 0x50940d
mov byte [edi], al
test ecx, ecx
je 0x5096bd
mov esi, dword [ecx + 0x7c]
test esi, esi
je 0x5096bd
cmp dword [esi], eax
jne 0x509431
mov eax, 0xffffff9c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
mov eax, dword [esp + 0x28]
test eax, eax
jne 0x509441
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
mov ecx, dword [esi + 0x5c]
mov dword [esi + 0x10], edx
mov dword [esi + 0x14], eax
cmp eax, ecx
jbe 0x509453
mov dword [esi + 0x14], ecx
mov eax, ecx
test eax, eax
je 0x5096b3
nop dword [eax + eax]
mov ebx, dword [esi + 8]
test ebx, ebx
jne 0x50955d
mov eax, dword [esi + 0x58]
test eax, eax
je 0x50955d
mov ecx, dword [esi + 0x60]
mov ebp, 0x4000
mov edx, dword [esi + 0x68]
cmp eax, ebp
cmovb ebp, eax
add edx, dword [esi + 0x3c]
cmp byte [ecx], bl
je 0x5094a9
cmp byte [ecx + 1], bl
je 0x509690
mov eax, dword [ecx + 0xc]
push ebx
push ebx
add eax, edx
push eax
push dword [ecx + 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x5094ac
mov dword [ecx + 0x1c], edx
push dword [esi + 0x60]
mov ecx, dword [esi]
mov edx, ebp
push 1
call fcn.004a0e40
add esp, 8
cmp eax, 1
jne 0x509690
add dword [esi + 0x3c], ebp
mov ebx, ebp
sub dword [esi + 0x58], ebp
cmp byte [esi + 0x6c], 0
mov eax, dword [esi]
mov dword [esi + 4], eax
mov dword [esi + 8], ebp
je 0x50955d
xor ecx, ecx
mov dword [esp + 0x1c], ecx
test ebp, ebp
je 0x50955d
mov ebx, eax
nop dword [eax]
mov edi, dword [esi + 0x78]
mov eax, edi
and eax, 0xfffd
or eax, 2
mov edx, eax
xor edx, 1
imul edx, eax
shr edx, 8
xor dl, byte [ecx + ebx]
mov ecx, dword [esi + 0x70]
movsx eax, dl
xor eax, ecx
shr ecx, 8
movzx eax, al
mov eax, dword [eax*4 + 0x521200]
xor eax, ecx
mov ecx, dword [esp + 0x1c]
mov dword [esi + 0x70], eax
movzx eax, al
add eax, dword [esi + 0x74]
imul eax, eax, 0x8088405
inc eax
mov dword [esi + 0x74], eax
shr eax, 0x18
xor eax, edi
shr edi, 8
movzx eax, al
xor edi, dword [eax*4 + 0x521200]
mov dword [esi + 0x78], edi
mov byte [ecx + ebx], dl
inc ecx
mov dword [esp + 0x1c], ecx
cmp ecx, ebp
jb 0x5094f0
mov ebx, dword [esi + 8]
mov edx, dword [esi + 0x7c]
mov ecx, ebx
cmp edx, ebx
cmovbe ecx, edx
mov dword [esp + 0x20], ecx
test ecx, ecx
je 0x5095a1
mov eax, dword [esi + 4]
add eax, ecx
mov cl, byte [eax - 1]
mov byte [esp + 0x13], cl
mov ecx, dword [esp + 0x20]
sub ebx, ecx
sub dword [esi + 0x5c], ecx
sub edx, ecx
mov dword [esi + 8], ebx
mov dword [esi + 4], eax
mov dword [esi + 0x7c], edx
jne 0x5095a1
mov al, byte [esp + 0x13]
cmp al, byte [esi + 0x80]
jne 0x50969b
cmp dword [esi + 0x64], 0
jne 0x50962d
mov eax, dword [esi + 0x14]
cmp eax, ebx
mov ebp, eax
mov dword [esp + 0x1c], eax
cmovae ebp, ebx
xor edx, edx
test ebp, ebp
je 0x5095db
nop
mov eax, dword [esi + 4]
mov ecx, dword [esi + 0x10]
mov al, byte [edx + eax]
mov byte [edx + ecx], al
inc edx
cmp edx, ebp
jb 0x5095c0
mov eax, dword [esi + 0x14]
mov ebx, dword [esi + 8]
mov dword [esp + 0x1c], eax
mov edi, dword [esi + 0x10]
mov edx, edi
mov ecx, dword [esi + 0x50]
push ebp
call fcn.004b2f60
sub dword [esi + 0x5c], ebp
sub ebx, ebp
add dword [esi + 4], ebp
add esp, 4
add dword [esi + 0x18], ebp
mov dword [esi + 0x50], eax
mov eax, dword [esp + 0x1c]
sub eax, ebp
mov dword [esi + 8], ebx
mov ebx, dword [esp + 0x18]
add ebx, ebp
mov dword [esi + 0x14], eax
cmp dword [esi + 0x5c], 0
lea eax, [edi + ebp]
mov ebp, dword [esp + 0x14]
mov dword [esi + 0x10], eax
mov dword [esp + 0x18], ebx
jne 0x509678
mov edi, dword [esp + 0x2c]
test edi, edi
je 0x509678
mov byte [edi], 1
jmp 0x509678
mov edi, dword [esi + 0x18]
lea ecx, [esi + 4]
mov ebx, dword [esi + 0x10]
call fcn.0044fc20
mov ebp, dword [esi + 0x18]
mov edx, ebx
mov ecx, dword [esi + 0x50]
sub ebp, edi
push ebp
mov dword [esp + 0x18], eax
call fcn.004b2f60
mov ebx, dword [esp + 0x1c]
add esp, 4
mov dword [esi + 0x50], eax
add ebx, ebp
mov eax, dword [esi + 0x5c]
sub eax, ebp
mov dword [esp + 0x18], ebx
mov ebp, dword [esp + 0x14]
mov dword [esi + 0x5c], eax
cmp ebp, 1
je 0x5096a8
test eax, eax
je 0x5096a8
test ebp, ebp
jne 0x509686
cmp dword [esi + 0x14], 0
ja 0x509460
test ebp, ebp
je 0x5096b3
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
mov eax, 0xffffff96
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
mov ecx, dword [esp + 0x2c]
test ecx, ecx
je 0x5096b3
mov byte [ecx], 1
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
pop edi
pop esi
pop ebp
mov eax, 0xffffff9a
pop ebx
add esp, 0x14
ret