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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
xor eax, eax
xor ebx, ebx
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], ebx
test edi, edi
je 0x43609c
mov byte [edi], al
test ecx, ecx
je 0x436396
mov esi, dword [ecx + 0x7c]
test esi, esi
je 0x436396
cmp dword [esi], eax
jne 0x4360bf
mov eax, 0xffffff9c
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 8]
test eax, eax
jne 0x4360cd
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi + 0x5c]
mov dword [esi + 0x10], edx
mov dword [esi + 0x14], eax
cmp eax, ecx
jbe 0x4360df
mov dword [esi + 0x14], ecx
mov eax, ecx
test eax, eax
je 0x43638d
nop word [eax + eax]
mov ebx, dword [esi + 8]
test ebx, ebx
jne 0x43623f
mov eax, dword [esi + 0x58]
test eax, eax
je 0x43623f
mov ecx, dword [esi + 0x60]
mov ebx, 0x4000
mov edx, dword [esi + 0x68]
cmp eax, ebx
cmovb ebx, eax
add edx, dword [esi + 0x3c]
cmp byte [ecx], 0
je 0x43613d
cmp byte [ecx + 1], 0
je 0x43636d
mov eax, dword [ecx + 0xc]
push 0
push 0
add eax, edx
push eax
push dword [ecx + 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x436140
mov dword [ecx + 0x1c], edx
mov edi, dword [esi + 0x60]
mov dword [ebp - 0x10], edi
cmp byte [edi], 0
je 0x43616a
push 0
lea eax, [ebp - 0x1c]
push eax
push ebx
push dword [esi]
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x436165
mov byte [edi + 8], 1
mov eax, dword [ebp - 0x1c]
jmp 0x436198
mov edx, dword [edi + 0x1c]
mov ecx, dword [edi + 0x18]
mov edi, ecx
sub edi, edx
lea eax, [edx + ebx]
cmp eax, ecx
mov eax, dword [ebp - 0x10]
cmovbe edi, ebx
push edi
mov eax, dword [eax + 0x14]
add eax, edx
push eax
push dword [esi]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp - 0x10]
add esp, 0xc
add dword [eax + 0x1c], edi
mov eax, edi
xor edx, edx
div ebx
cmp eax, 1
jne 0x43636d
add dword [esi + 0x3c], ebx
sub dword [esi + 0x58], ebx
cmp byte [esi + 0x6c], 0
mov eax, dword [esi]
mov dword [ebp - 0x10], eax
mov dword [esi + 4], eax
mov dword [esi + 8], ebx
je 0x43623f
xor ecx, ecx
mov eax, ebx
mov dword [ebp - 0x18], ecx
test eax, eax
je 0x43623f
nop dword [eax + eax]
mov edi, dword [esi + 0x78]
mov eax, edi
and eax, 0xfffd
or eax, 2
mov edx, eax
xor edx, 1
imul edx, eax
mov eax, dword [ebp - 0x10]
shr edx, 8
xor dl, byte [ecx + eax]
mov ecx, dword [esi + 0x70]
movsx eax, dl
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x444090]
movzx eax, cl
add eax, dword [esi + 0x74]
imul eax, eax, 0x8088405
mov dword [esi + 0x70], ecx
mov ecx, dword [ebp - 0x18]
inc eax
mov dword [esi + 0x74], eax
shr eax, 0x18
xor eax, edi
shr edi, 8
movzx eax, al
xor edi, dword [eax*4 + 0x444090]
mov eax, dword [ebp - 0x10]
mov dword [esi + 0x78], edi
mov byte [ecx + eax], dl
inc ecx
mov dword [ebp - 0x18], ecx
cmp ecx, ebx
jb 0x4361d0
mov ebx, dword [esi + 8]
mov edx, dword [esi + 0x7c]
mov ecx, ebx
cmp edx, ebx
cmovbe ecx, edx
mov dword [ebp - 0x18], ecx
test ecx, ecx
je 0x43627a
mov eax, dword [esi + 4]
sub ebx, dword [ebp - 0x18]
add eax, ecx
sub edx, dword [ebp - 0x18]
mov cl, byte [eax - 1]
mov byte [ebp - 1], cl
mov dword [esi + 8], ebx
mov dword [esi + 4], eax
mov dword [esi + 0x7c], edx
jne 0x43627a
mov al, cl
cmp al, byte [esi + 0x80]
jne 0x436377
cmp dword [esi + 0x64], 0
jne 0x43630c
mov eax, dword [esi + 0x14]
cmp eax, ebx
mov edi, eax
mov dword [ebp - 0x14], eax
cmovae edi, ebx
xor edx, edx
mov dword [ebp - 0x18], edi
test edi, edi
je 0x4362ba
nop word [eax + eax]
mov eax, dword [esi + 4]
mov ecx, dword [esi + 0x10]
mov al, byte [edx + eax]
mov byte [edx + ecx], al
inc edx
cmp edx, edi
jb 0x4362a0
mov eax, dword [esi + 0x14]
mov ebx, dword [esi + 8]
mov dword [ebp - 0x14], eax
mov edi, dword [esi + 0x10]
mov edx, edi
push dword [ebp - 0x18]
mov ecx, dword [esi + 0x50]
call fcn.00434950
mov ecx, dword [ebp - 0x18]
add esp, 4
sub dword [esi + 0x5c], ecx
sub ebx, ecx
add dword [esi + 4], ecx
add dword [esi + 0x18], ecx
mov dword [esi + 0x50], eax
mov eax, dword [ebp - 0x14]
sub eax, ecx
mov dword [esi + 8], ebx
mov ebx, dword [ebp - 0xc]
mov dword [esi + 0x14], eax
add ebx, ecx
cmp dword [esi + 0x5c], 0
lea eax, [edi + ecx]
mov dword [esi + 0x10], eax
mov eax, dword [ebp - 8]
mov dword [ebp - 0xc], ebx
jne 0x436358
mov edi, dword [ebp + 0xc]
test edi, edi
je 0x436358
mov byte [edi], 1
jmp 0x436358
mov edi, dword [esi + 0x18]
lea ecx, [esi + 4]
mov ebx, dword [esi + 0x10]
call fcn.00434ed0
mov ecx, dword [esi + 0x50]
mov edx, ebx
mov dword [ebp - 8], eax
mov eax, dword [esi + 0x18]
sub eax, edi
push eax
mov dword [ebp - 0x18], eax
call fcn.00434950
mov ecx, dword [esi + 0x5c]
add esp, 4
mov ebx, dword [ebp - 0xc]
sub ecx, dword [ebp - 0x18]
add ebx, dword [ebp - 0x18]
mov dword [esi + 0x50], eax
mov eax, dword [ebp - 8]
mov dword [esi + 0x5c], ecx
mov dword [ebp - 0xc], ebx
cmp eax, 1
je 0x436383
test ecx, ecx
je 0x436383
test eax, eax
jne 0x43639b
cmp dword [esi + 0x14], 0
ja 0x4360f0
test eax, eax
je 0x43638d
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 0xffffff96
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0xc]
test ecx, ecx
je 0x43638d
mov byte [ecx], 1
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 0xffffff9a
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret