Function at 0x426140
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, 0x24
mov eax, dword [0x4c4024]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
xor edi, edi
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x18], edi
test eax, eax
je 0x42616c
mov byte [eax], 0
test ecx, ecx
je 0x426498
mov esi, dword [ecx + 0x7c]
test esi, esi
je 0x426498
cmp dword [esi], edi
jne 0x426199
mov eax, 0xffffff9c
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042ca6a
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 8]
test eax, eax
jne 0x4261b1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042ca6a
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 0x4261c3
mov dword [esi + 0x14], ecx
mov eax, ecx
test eax, eax
je 0x426485
lea edx, [esi + 4]
mov ecx, edx
cmp dword [esi + 8], 0
mov dword [ebp - 0xc], ecx
jne 0x426332
mov eax, dword [esi + 0x58]
mov ecx, edx
mov dword [ebp - 0xc], ecx
test eax, eax
je 0x426332
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 0x426224
cmp byte [ecx + 1], 0
je 0x42643a
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 0x426227
mov dword [ecx + 0x1c], edx
mov edi, dword [esi + 0x60]
mov ecx, ebx
mov dword [ebp - 0x14], ebx
cmp byte [edi], 0
je 0x426253
push 0
lea eax, [ebp - 8]
push eax
push ebx
push dword [esi]
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x42624e
mov byte [edi + 8], 1
mov eax, dword [ebp - 8]
jmp 0x42627d
mov edx, dword [edi + 0x1c]
lea eax, [edx + ebx]
cmp eax, dword [edi + 0x18]
jbe 0x426266
mov ecx, dword [edi + 0x18]
sub ecx, edx
mov dword [ebp - 0x14], ecx
mov eax, dword [edi + 0x14]
push ecx
add eax, edx
push eax
push dword [esi]
call fcn.0047c1a0
mov eax, dword [ebp - 0x14]
add esp, 0xc
add dword [edi + 0x1c], eax
xor edx, edx
div ebx
cmp eax, 1
jne 0x42643a
mov ecx, dword [esi]
add dword [esi + 0x3c], ebx
sub dword [esi + 0x58], ebx
cmp byte [esi + 0x6c], 0
mov dword [ebp - 0x1c], ecx
mov dword [esi + 4], ecx
lea ecx, [esi + 4]
mov dword [esi + 8], ebx
mov dword [ebp - 0xc], ecx
je 0x426332
mov dword [ebp - 0x14], 0
lea ecx, [esi + 4]
mov dword [ebp - 0xc], ecx
test ebx, ebx
je 0x426332
mov ecx, dword [ebp - 0x1c]
nop
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 - 0x14]
shr edx, 8
xor dl, byte [eax + ecx]
mov ecx, dword [esi + 0x70]
movsx eax, dl
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4bac78]
movzx eax, cl
add eax, dword [esi + 0x74]
imul eax, eax, 0x8088405
mov dword [esi + 0x70], ecx
mov ecx, dword [ebp - 0x1c]
inc eax
mov dword [esi + 0x74], eax
shr eax, 0x18
xor eax, edi
shr edi, 8
movzx eax, al
xor edi, dword [eax*4 + 0x4bac78]
mov eax, dword [ebp - 0x14]
mov dword [esi + 0x78], edi
mov byte [eax + ecx], dl
inc eax
mov dword [ebp - 0x14], eax
cmp eax, ebx
jb 0x4262c0
lea ecx, [esi + 4]
mov dword [ebp - 0xc], ecx
mov ebx, dword [esi + 0x7c]
mov edx, dword [esi + 8]
cmp ebx, edx
mov edi, edx
cmovbe edi, ebx
test edi, edi
je 0x426371
mov eax, dword [ecx]
sub edx, edi
mov cl, byte [eax + edi - 1]
add eax, edi
sub dword [esi + 0x5c], edi
sub ebx, edi
mov byte [ebp - 0xd], cl
mov ecx, dword [ebp - 0xc]
mov dword [esi + 8], edx
mov dword [esi + 0x7c], ebx
mov dword [ecx], eax
jne 0x426371
mov al, byte [ebp - 0xd]
cmp al, byte [esi + 0x80]
jne 0x42644e
cmp dword [esi + 0x64], 0
jne 0x4263e0
mov ebx, dword [esi + 0x14]
cmp ebx, edx
cmovae ebx, edx
xor edx, edx
test ebx, ebx
je 0x426398
mov eax, dword [ecx]
mov ecx, dword [esi + 0x10]
mov al, byte [edx + eax]
mov byte [edx + ecx], al
inc edx
mov ecx, dword [ebp - 0xc]
cmp edx, ebx
jb 0x426385
mov edi, dword [esi + 0x10]
mov edx, edi
mov ecx, dword [esi + 0x50]
push ebx
call fcn.004248e0
mov ecx, dword [ebp - 0xc]
add esp, 4
sub dword [esi + 0x5c], ebx
sub dword [esi + 8], ebx
sub dword [esi + 0x14], ebx
add dword [ecx], ebx
add dword [esi + 0x18], ebx
mov dword [esi + 0x50], eax
lea eax, [edi + ebx]
mov edi, dword [ebp - 0x18]
add edi, ebx
mov dword [esi + 0x10], eax
cmp dword [esi + 0x5c], 0
mov dword [ebp - 0x18], edi
jne 0x4263db
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x4263db
mov byte [eax], 1
mov ebx, dword [ebp - 0x20]
jmp 0x42642c
mov edi, dword [esi + 0x18]
mov ebx, dword [esi + 0x10]
call fcn.00424e10
mov ecx, dword [esi + 0x50]
mov edx, ebx
mov dword [ebp - 0x20], eax
mov eax, dword [esi + 0x18]
sub eax, edi
push eax
mov dword [ebp - 0x1c], eax
call fcn.004248e0
mov ecx, dword [esi + 0x5c]
add esp, 4
mov edi, dword [ebp - 0x18]
sub ecx, dword [ebp - 0x1c]
add edi, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x20]
mov dword [esi + 0x50], eax
mov dword [esi + 0x5c], ecx
mov dword [ebp - 0x18], edi
cmp ebx, 1
je 0x42647b
test ecx, ecx
je 0x42647b
mov ecx, dword [ebp - 0xc]
test ebx, ebx
jne 0x426468
cmp dword [esi + 0x14], 0
jbe 0x426464
lea edx, [esi + 4]
jmp 0x4261d0
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042ca6a
mov esp, ebp
pop ebp
ret
mov eax, 0xffffff96
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042ca6a
mov esp, ebp
pop ebp
ret
test ebx, ebx
je 0x426485
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042ca6a
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x426485
mov byte [eax], 1
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042ca6a
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov eax, 0xffffff9a
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0042ca6a
mov esp, ebp
pop ebp
ret