Function at 0x420140
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44aba9
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
push ebx
push esi
mov eax, dword [0x45e274]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edx, dword [ebp + 8]
xor eax, eax
mov dword [ebp - 0x18], eax
cmp dword [edx + 0xc], eax
jbe 0x42040a
mov dword [ebp - 0x34], eax
xor esi, esi
mov dword [ebp - 0x38], esi
mov dword [ebp - 4], esi
cmp eax, dword [edx + 0xc]
jae 0x42041d
push esi
push 0x80
push 3
lea ecx, [eax*4]
mov eax, dword [edx + 8]
mov eax, dword [eax + ecx]
push esi
push 7
push SysReAllocString
push eax
mov dword [ebp - 0x14], ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x4202bc
call fcn.00407ac0
cmp eax, esi
jne 0x4203de
lea eax, [ebp - 0x40]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
mov dword [ebp - 0x44], ebx
cmp ebx, 0xffffffff
jne 0x4201ee
call fcn.00407ac0
test eax, eax
js 0x4203de
mov ebx, dword [ebp - 0x44]
mov edx, dword [0x45e020]
mov eax, dword [edx + 0xc]
mov ecx, 0x45e020
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x1c], esi
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x40]
shrd ebx, ecx, 1
shr ecx, 1
inc ebx
mov dword [ebp - 0x20], 0
js 0x42041d
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, ebx
or eax, ecx
jge 0x42023c
push ebx
lea ecx, [ebp - 0x1c]
call fcn.004035c0
mov esi, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x38]
push 0
lea edx, [ebp - 0x20]
push edx
push eax
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4202c6
call fcn.00407ac0
test eax, eax
je 0x4202c6
mov eax, dword [esi - 8]
push eax
push esi
call fcn.0042f896
add esp, 8
test eax, eax
js 0x42041d
cmp eax, dword [esi - 8]
jg 0x42041d
mov dword [esi - 0xc], eax
xor edx, edx
mov word [esi + eax*2], dx
add esi, 0xfffffff0
mov byte [ebp - 4], dl
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4202a4
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x4203f7
push eax
jmp 0x4203ea
mov dword [ebp - 0x38], eax
mov esi, eax
jmp 0x4201c9
mov eax, ebx
cmp ebx, 0xffffffff
jne 0x4202da
mov eax, dword [esi - 8]
push eax
push esi
call fcn.0042f896
add esp, 8
test eax, eax
js 0x42041d
cmp eax, dword [esi - 8]
jg 0x42041d
mov edx, dword [ebp - 0x18]
mov dword [esi - 0xc], eax
xor ecx, ecx
mov word [esi + eax*2], cx
mov eax, dword [ebp + 8]
cmp edx, dword [eax + 0xc]
jae 0x42041d
mov eax, dword [eax + 8]
add eax, dword [ebp - 0x14]
mov eax, dword [eax]
sub eax, 0x10
push eax
call fcn.00403470
add eax, 0x10
add esp, 4
mov dword [ebp - 0x14], eax
push 2
push 0x45450c
lea ebx, [ebp - 0x14]
mov byte [ebp - 4], 2
call fcn.00402e80
mov eax, dword [esi - 0xc]
push eax
push esi
call fcn.00402e80
mov eax, dword [edi + 4]
mov ecx, edi
mov dword [ebp - 0x28], eax
call fcn.004209e0
mov ebx, dword [edi + 0x10]
mov ecx, dword [ebx]
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x30], ebx
mov byte [ebp - 4], 3
test ebx, ebx
je 0x420369
mov edx, dword [ebp - 0x14]
push edx
lea ecx, [ebx + 8]
call fcn.00402c30
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x28]
mov dword [edi + 0x10], eax
mov dword [ebx + 4], ecx
mov dword [ebx], 0
mov eax, dword [edi + 4]
mov ecx, 1
add dword [edi + 8], ecx
test eax, eax
je 0x42038e
mov dword [eax], ebx
jmp 0x420390
mov dword [edi], ebx
mov byte [ebp - 4], cl
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
mov dword [edi + 4], ebx
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4203b5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add esi, 0xfffffff0
mov byte [ebp - 4], 0
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4202a4
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
jmp 0x4202a4
mov dword [ebp - 4], 0xffffffff
test esi, esi
je 0x4203f7
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x38], 0
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp + 8]
inc eax
mov dword [ebp - 0x18], eax
cmp eax, dword [edx + 0xc]
jb 0x42017b
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push 0x80070057
call fcn.00403700
int3