Function at 0x401680
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1038
call fcn.00403b90
mov eax, dword [0x4167b0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
cdq
mov dword [ebp - 0x100c], eax
mov dword [ebp - 0x1008], edx
cmp dword [ebp + 0x1c], 0
jl 0x40189f
jg 0x4016c0
cmp dword [ebp + 0x18], 0
jbe 0x40189f
mov ecx, dword [ebp - 0x1008]
push ecx
mov edx, dword [ebp - 0x100c]
push edx
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.004039e0
mov ecx, dword [ebp - 0x1008]
push ecx
mov ecx, dword [ebp - 0x100c]
push ecx
push edx
push eax
call fcn.00403a90
mov dword [ebp - 0x101c], eax
mov dword [ebp - 0x1018], edx
mov edx, dword [ebp - 0x101c]
add edx, dword [ebp - 0x100c]
mov eax, dword [ebp - 0x1018]
adc eax, dword [ebp - 0x1008]
sub edx, dword [ebp + 0xc]
sbb eax, dword [ebp + 0x10]
mov dword [ebp - 0x102c], edx
mov dword [ebp - 0x1028], eax
mov ecx, dword [ebp + 0x1c]
cmp ecx, dword [ebp - 0x1028]
jg 0x401752
jl 0x40173e
mov edx, dword [ebp + 0x18]
cmp edx, dword [ebp - 0x102c]
jae 0x401752
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x1024], eax
mov ecx, dword [ebp + 0x1c]
mov dword [ebp - 0x1020], ecx
jmp 0x40177c
mov edx, dword [ebp - 0x101c]
add edx, dword [ebp - 0x100c]
mov eax, dword [ebp - 0x1018]
adc eax, dword [ebp - 0x1008]
sub edx, dword [ebp + 0xc]
sbb eax, dword [ebp + 0x10]
mov dword [ebp - 0x1024], edx
mov dword [ebp - 0x1020], eax
mov ecx, dword [ebp - 0x1024]
mov dword [ebp - 0x1014], ecx
mov edx, dword [ebp - 0x1020]
mov dword [ebp - 0x1010], edx
mov eax, dword [ebp - 0x1018]
push eax
mov ecx, dword [ebp - 0x101c]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx]
push eax
call fcn.00401170
add esp, 0xc
test eax, eax
jne 0x4017be
mov eax, 0x41628c
jmp 0x4018a1
push 0
lea ecx, [ebp - 0x1038]
push ecx
mov edx, dword [ebp - 0x100c]
push edx
lea eax, [ebp - 0x1004]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4017ef
mov eax, 0x4162a4
jmp 0x4018a1
mov eax, dword [ebp - 0x1038]
xor ecx, ecx
mov dword [ebp - 0x1034], eax
mov dword [ebp - 0x1030], ecx
mov edx, dword [ebp - 0x1030]
cmp edx, dword [ebp - 0x1008]
jg 0x401828
jl 0x401821
mov eax, dword [ebp - 0x1034]
cmp eax, dword [ebp - 0x100c]
jae 0x401828
mov eax, 0x4162b4
jmp 0x4018a1
mov ecx, dword [ebp - 0x1014]
push ecx
mov edx, dword [ebp - 0x1008]
push edx
mov eax, dword [ebp - 0x100c]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call fcn.00403ad0
lea eax, [ebp + eax - 0x1004]
push eax
mov ecx, dword [ebp + 0x14]
push ecx
call fcn.00403280
add esp, 0xc
mov edx, dword [ebp - 0x1014]
add edx, dword [ebp + 0x14]
mov dword [ebp + 0x14], edx
mov eax, dword [ebp + 0xc]
add eax, dword [ebp - 0x1014]
mov ecx, dword [ebp + 0x10]
adc ecx, dword [ebp - 0x1010]
mov dword [ebp + 0xc], eax
mov dword [ebp + 0x10], ecx
mov edx, dword [ebp + 0x18]
sub edx, dword [ebp - 0x1014]
mov eax, dword [ebp + 0x1c]
sbb eax, dword [ebp - 0x1010]
mov dword [ebp + 0x18], edx
mov dword [ebp + 0x1c], eax
jmp 0x4016aa
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004039c9
mov esp, ebp
pop ebp
ret