Function at 0x408440
Capabilities:
Read file on windows

Disassembly:
push esi
mov esi, ecx
mov eax, dword [esi + 0x3cc]
test eax, eax
je 0x40873d
push edi
or edi, 0xffffffff
cmp eax, edi
je 0x40873c
mov ecx, dword [esi + 0x424]
test ecx, ecx
jne 0x40846d
mov byte [esi + 0x428], cl
cmp word [esi + 0x40e], 0
jle 0x408485
cmp byte [esp + 0x14], 0
je 0x408485
mov byte [esi + 0x428], 1
cmp dword [esi + 0x410], 0
push ebx
push ebp
jle 0x408567
mov eax, dword [esi + 0x3f4]
cmp eax, edi
je 0x4084ad
cmp eax, 0x1869f
je 0x4084ad
cmp eax, ecx
jne 0x408541
push 0x31
push 0x14
mov ecx, esi
call fcn.00402510
test eax, eax
je 0x408529
add dword [esi + 0x410], edi
mov eax, dword [esi + 0x410]
cmp eax, 0xa
jg 0x40850d
mov ecx, eax
and ecx, 0x80000001
jns 0x4084dc
dec ecx
or ecx, 0xfffffffe
inc ecx
jne 0x40850d
add dword [esi + 0x41c], edi
mov eax, 1
cmp dword [esi + 0x41c], eax
jge 0x4084f7
mov dword [esi + 0x41c], eax
add dword [esi + 0x420], edi
cmp dword [esi + 0x420], eax
jge 0x408529
mov dword [esi + 0x420], eax
jmp 0x408529
test eax, eax
jg 0x408529
fldz
mov dword [esi + 0x410], 0
fst dword [esi + 0x414]
fstp dword [esi + 0x418]
cmp dword [esi + 0x3f4], 0x1869f
jne 0x408541
mov edx, dword [esi + 0x424]
mov dword [esi + 0x3f4], edx
call fcn.0042bcf0
cdq
idiv dword [esi + 0x41c]
mov ebx, dword [esp + 0x14]
add ebx, edx
call fcn.0042bcf0
cdq
idiv dword [esi + 0x420]
mov ebp, dword [esp + 0x18]
add ebp, edx
jmp 0x40856f
mov ebp, dword [esp + 0x18]
mov ebx, dword [esp + 0x14]
cmp byte [esp + 0x1c], 0
jne 0x408681
mov eax, dword [esi + 0x3e0]
dec eax
cmp dword [esi + 0x424], eax
jb 0x4085ad
mov ecx, dword [esi + 0x3cc]
push 0
push 0
push 4
push ecx
mov byte [esi + 0x428], 0
mov dword [esi + 0x424], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esi + 0x3ec]
test eax, eax
je 0x4085ca
push eax
call fcn.00429f4a
add esp, 4
mov dword [esi + 0x3ec], 0
mov ecx, dword [esi + 0x3cc]
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea edx, [esp + 0x1c]
push edx
push 4
lea eax, [esp + 0x28]
push eax
push ecx
call edi
mov edx, dword [esi + 0x3cc]
push 1
push 0
push 0xfffffffffffffffc
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x1c]
test eax, eax
jbe 0x40864e
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00429f70
mov edx, dword [esp + 0x20]
add esp, 4
push 0
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [edx + edx]
mov edx, dword [esi + 0x3cc]
push ecx
push eax
push edx
mov dword [esi + 0x3ec], eax
call edi
mov eax, dword [esi + 0x3ec]
push 0
push 1
push eax
push ebp
push ebx
mov ecx, esi
call fcn.00407c80
mov edx, dword [esi + 0x3e0]
mov ecx, 1
add dword [esi + 0x424], ecx
mov eax, dword [esi + 0x424]
sub edx, ecx
cmp eax, edx
jb 0x40871d
add word [esi + 0x40e], cx
mov byte [esi + 0x428], cl
jmp 0x40871d
mov eax, dword [esi + 0x3ec]
mov ecx, esi
test eax, eax
jne 0x408711
mov eax, dword [esi + 0x424]
push eax
call fcn.00405600
mov eax, dword [esi + 0x3cc]
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea ecx, [esp + 0x1c]
push ecx
push 4
lea edx, [esp + 0x28]
push edx
push eax
call edi
mov ecx, dword [esi + 0x3cc]
push 1
push 0
push 0xfffffffffffffffc
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x1c]
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00429f70
mov edx, dword [esp + 0x20]
add esp, 4
push 0
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [edx + edx]
mov edx, dword [esi + 0x3cc]
push ecx
push eax
push edx
mov dword [esi + 0x3ec], eax
call edi
mov eax, dword [esi + 0x3ec]
mov ecx, esi
push 0
push 1
push eax
push ebp
push ebx
call fcn.00407c80
mov eax, dword [esi + 0x3ec]
pop ebp
pop ebx
test eax, eax
je 0x40873c
push eax
call fcn.00429f4a
add esp, 4
mov dword [esi + 0x3ec], 0
pop edi
pop esi
ret 0xc