Function at 0x4052e0
Capabilities:
Read file on windows

Disassembly:
push ecx
push ebx
push edi
mov edi, ecx
mov ebx, eax
mov eax, dword [edi + 0x3cc]
test eax, eax
je 0x4055c9
push ebp
or ebp, 0xffffffff
cmp eax, ebp
je 0x4055c8
mov ecx, dword [edi + 0x424]
test ecx, ecx
jne 0x405311
mov byte [edi + 0x428], cl
cmp word [edi + 0x40e], 0
jle 0x405329
cmp byte [esp + 0x18], 0
je 0x405329
mov byte [edi + 0x428], 1
cmp dword [edi + 0x410], 0
push esi
jle 0x405403
mov eax, dword [edi + 0x3f4]
cmp eax, ebp
je 0x405350
cmp eax, 0x1869f
je 0x405350
cmp eax, ecx
jne 0x4053e5
push 0x14
mov esi, 0x31
call fcn.00401cb0
test eax, eax
je 0x4053cd
add dword [edi + 0x410], ebp
mov eax, dword [edi + 0x410]
cmp eax, 0xa
jg 0x4053b1
mov ecx, eax
and ecx, 0x80000001
jns 0x405380
dec ecx
or ecx, 0xfffffffe
inc ecx
jne 0x4053b1
add dword [edi + 0x41c], ebp
mov eax, 1
cmp dword [edi + 0x41c], eax
jge 0x40539b
mov dword [edi + 0x41c], eax
add dword [edi + 0x420], ebp
cmp dword [edi + 0x420], eax
jge 0x4053cd
mov dword [edi + 0x420], eax
jmp 0x4053cd
test eax, eax
jg 0x4053cd
fldz
mov dword [edi + 0x410], 0
fst dword [edi + 0x414]
fstp dword [edi + 0x418]
cmp dword [edi + 0x3f4], 0x1869f
jne 0x4053e5
mov edx, dword [edi + 0x424]
mov dword [edi + 0x3f4], edx
call fcn.0043bc60
cdq
idiv dword [edi + 0x41c]
add ebx, edx
call fcn.0043bc60
cdq
idiv dword [edi + 0x420]
add dword [esp + 0x18], edx
cmp byte [esp + 0x1c], 0
jne 0x405513
mov eax, dword [edi + 0x3e0]
mov ebp, dword [sym.imp.KERNEL32.dll_SetFilePointer]
dec eax
cmp dword [edi + 0x424], eax
jb 0x405443
mov ecx, dword [edi + 0x3cc]
push 0
push 0
push 4
push ecx
mov byte [edi + 0x428], 0
mov dword [edi + 0x424], 0
call ebp
mov eax, dword [edi + 0x3ec]
test eax, eax
je 0x405460
push eax
call fcn.0043a661
add esp, 4
mov dword [edi + 0x3ec], 0
mov ecx, dword [edi + 0x3cc]
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea edx, [esp + 0x14]
push edx
push 4
lea eax, [esp + 0x28]
push eax
push ecx
call esi
mov edx, dword [edi + 0x3cc]
push 1
push 0
push 0xfffffffffffffffc
push edx
call ebp
mov eax, dword [esp + 0x1c]
test eax, eax
jbe 0x4054e0
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0043aeee
mov edx, dword [esp + 0x20]
add esp, 4
push 0
lea ecx, [esp + 0x14]
push ecx
lea ecx, [edx + edx]
mov edx, dword [edi + 0x3cc]
push ecx
push eax
push edx
mov dword [edi + 0x3ec], eax
call esi
mov ecx, dword [edi + 0x3ec]
mov eax, dword [esp + 0x18]
push 1
push edi
mov edx, ebx
call fcn.00406100
mov edx, dword [edi + 0x3e0]
mov ecx, 1
add dword [edi + 0x424], ecx
mov eax, dword [edi + 0x424]
sub edx, ecx
cmp eax, edx
jb 0x4055aa
add word [edi + 0x40e], cx
mov byte [edi + 0x428], cl
jmp 0x4055aa
mov ecx, dword [edi + 0x3ec]
test ecx, ecx
jne 0x40559c
mov eax, dword [edi + 0x424]
mov esi, edi
call fcn.004050b0
mov edx, dword [edi + 0x3cc]
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea eax, [esp + 0x14]
push eax
push 4
lea ecx, [esp + 0x28]
push ecx
push edx
call esi
mov eax, dword [edi + 0x3cc]
push 1
push 0
push 0xfffffffffffffffc
push eax
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.0043aeee
mov edx, dword [esp + 0x20]
add esp, 4
push 0
lea ecx, [esp + 0x14]
push ecx
lea ecx, [edx + edx]
mov edx, dword [edi + 0x3cc]
push ecx
push eax
push edx
mov dword [edi + 0x3ec], eax
call esi
mov ecx, dword [edi + 0x3ec]
mov eax, dword [esp + 0x18]
push 1
push edi
mov edx, ebx
call fcn.00406100
mov eax, dword [edi + 0x3ec]
pop esi
test eax, eax
je 0x4055c8
push eax
call fcn.0043a661
add esp, 4
mov dword [edi + 0x3ec], 0
pop ebp
pop edi
pop ebx
pop ecx
ret 8