Function at 0x408420
Capabilities:
Read file on windows

Disassembly:
push esi
mov esi, ecx
mov eax, dword [esi + 0x3cc]
test eax, eax
je 0x40871d
push edi
or edi, 0xffffffff
cmp eax, edi
je 0x40871c
mov ecx, dword [esi + 0x424]
test ecx, ecx
jne 0x40844d
mov byte [esi + 0x428], cl
cmp word [esi + 0x40e], 0
jle 0x408465
cmp byte [esp + 0x14], 0
je 0x408465
mov byte [esi + 0x428], 1
cmp dword [esi + 0x410], 0
push ebx
push ebp
jle 0x408547
mov eax, dword [esi + 0x3f4]
cmp eax, edi
je 0x40848d
cmp eax, 0x1869f
je 0x40848d
cmp eax, ecx
jne 0x408521
push 0x31
push 0x14
mov ecx, esi
call fcn.00402510
test eax, eax
je 0x408509
add dword [esi + 0x410], edi
mov eax, dword [esi + 0x410]
cmp eax, 0xa
jg 0x4084ed
mov ecx, eax
and ecx, 0x80000001
jns 0x4084bc
dec ecx
or ecx, 0xfffffffe
inc ecx
jne 0x4084ed
add dword [esi + 0x41c], edi
mov eax, 1
cmp dword [esi + 0x41c], eax
jge 0x4084d7
mov dword [esi + 0x41c], eax
add dword [esi + 0x420], edi
cmp dword [esi + 0x420], eax
jge 0x408509
mov dword [esi + 0x420], eax
jmp 0x408509
test eax, eax
jg 0x408509
fldz
mov dword [esi + 0x410], 0
fst dword [esi + 0x414]
fstp dword [esi + 0x418]
cmp dword [esi + 0x3f4], 0x1869f
jne 0x408521
mov edx, dword [esi + 0x424]
mov dword [esi + 0x3f4], edx
call fcn.0042ad50
cdq
idiv dword [esi + 0x41c]
mov ebx, dword [esp + 0x14]
add ebx, edx
call fcn.0042ad50
cdq
idiv dword [esi + 0x420]
mov ebp, dword [esp + 0x18]
add ebp, edx
jmp 0x40854f
mov ebp, dword [esp + 0x18]
mov ebx, dword [esp + 0x14]
cmp byte [esp + 0x1c], 0
jne 0x408661
mov eax, dword [esi + 0x3e0]
dec eax
cmp dword [esi + 0x424], eax
jb 0x40858d
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 0x4085aa
push eax
call fcn.00428faa
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 0x40862e
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00428fd0
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.00407c60
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 0x4086fd
add word [esi + 0x40e], cx
mov byte [esi + 0x428], cl
jmp 0x4086fd
mov eax, dword [esi + 0x3ec]
mov ecx, esi
test eax, eax
jne 0x4086f1
mov eax, dword [esi + 0x424]
push eax
call fcn.004055e0
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.00428fd0
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.00407c60
mov eax, dword [esi + 0x3ec]
pop ebp
pop ebx
test eax, eax
je 0x40871c
push eax
call fcn.00428faa
add esp, 4
mov dword [esi + 0x3ec], 0
pop edi
pop esi
ret 0xc