Function at 0x405760
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 8], 0
mov eax, dword [ebp + 0x14]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x18], edx
mov edi, 0x80
mov dword [ebp - 0x1c], 0
jle 0x40583d
cmp dword [ebp + 0x18], 2
push esi
push 1
je 0x4057d1
mov ecx, dword [ebp - 0x18]
push 4
push ecx
call dword [sym.imp.MSVCR100.dll_fread]
add dword [ebp - 0x18], 4
add esp, 0x10
test eax, eax
jne 0x4057ca
mov eax, 1
sub edi, 4
jmp 0x4057f0
xor eax, eax
sub edi, 4
jmp 0x4057f0
push 8
push ebx
call dword [sym.imp.MSVCR100.dll_fread]
add esp, 0x10
add ebx, 8
test eax, eax
jne 0x4057eb
mov eax, 1
jmp 0x4057ed
xor eax, eax
sub edi, 8
test edi, edi
jne 0x405825
mov edx, dword [ebp + 8]
dec edx
cmp dword [ebp - 0x1c], edx
je 0x405825
push esi
push 1
lea eax, [ebp - 0x14]
push 2
push eax
call dword [sym.imp.MSVCR100.dll_fread]
mov cx, word [ebp - 0x14]
add esp, 0x10
neg eax
sbb eax, eax
inc eax
movzx edi, ch
cmp ch, 0x80
jb 0x405825
mov edi, 0x80
mov ecx, dword [ebp - 0x1c]
inc ecx
mov dword [ebp - 0x1c], ecx
cmp ecx, dword [ebp + 8]
jl 0x4057a0
mov edx, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x28]
jmp 0x405840
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x40585a
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042e325
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 0xc], 0
mov dword [ebp - 0x1c], 0
jle 0x40591f
mov ebx, dword [ebp - 0x2c]
mov dword [ebp - 0x18], ebx
jmp 0x405876
mov esi, dword [ebp - 0x24]
push esi
push 1
cmp edi, 0xc
jge 0x4058e1
mov ebx, dword [sym.imp.MSVCR100.dll_fread]
lea ecx, [ebp - 0x10]
push edi
push ecx
call ebx
push esi
push 1
lea edx, [ebp - 0x14]
push 2
push edx
call ebx
push esi
mov ebx, 0xc
push 1
sub ebx, edi
lea eax, [ebp + edi - 0x10]
push ebx
push eax
call dword [sym.imp.MSVCR100.dll_fread]
add esp, 0x30
mov esi, eax
mov ax, word [ebp - 0x14]
neg esi
sbb esi, esi
inc esi
movzx edi, ah
cmp ah, 0x80
jb 0x4058c7
mov edi, 0x80
mov edx, dword [ebp - 0x18]
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push edx
sub edi, ebx
call dword [sym.imp.MSVCR100.dll_strncpy]
mov ebx, dword [ebp - 0x18]
add esp, 0xc
jmp 0x4058f7
push 0xc
push ebx
call dword [sym.imp.MSVCR100.dll_fread]
add esp, 0x10
mov esi, eax
neg esi
sbb esi, esi
inc esi
sub edi, 0xc
mov byte [ebx + 0xc], 0
test esi, esi
jne 0x405844
mov eax, dword [ebp - 0x1c]
inc eax
add ebx, 0xd
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], ebx
cmp eax, dword [ebp + 0xc]
jl 0x405873
mov edx, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x28]
cmp dword [ebp + 0x18], 1
jne 0x405962
mov esi, dword [ebp + 8]
xor ecx, ecx
test esi, esi
jle 0x405962
fld qword [0x4394f0]
fld dword [0x438ee0]
jmp 0x40593e
fxch st(1)
fxch st(1)
fcom qword [ebx + ecx*8]
fnstsw ax
test ah, 5
jp 0x405952
fld qword [ebx + ecx*8]
fstp dword [edx + ecx*4]
jmp 0x405959
fxch st(1)
fst dword [edx + ecx*4]
fxch st(1)
inc ecx
cmp ecx, esi
jl 0x40593c
fstp st(0)
fstp st(0)
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.0042e325
mov esp, ebp
pop ebp
ret