Function at 0x40ac80
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
mov ebx, dword [ebp + 0x10]
cmp word [ebx + 8], 1
push esi
push edi
jne 0x40aca1
mov edi, dword [ebx + 0xc]
add edi, edi
add edi, edi
call fcn.00409ea0
jmp 0x40aca4
mov eax, dword [ebp + 0xc]
mov edi, dword [ebx]
movsx ecx, word [ebx + 0xa]
mov esi, dword [ebx + 0xc]
mov ebx, dword [ebx + 0x10]
push edi
push 1
lea edx, [ebp - 5]
push 1
push edx
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x18], esi
call dword [sym.imp.MSVCR100.dll_fread]
add esp, 0x10
cmp byte [ebp - 5], 0x81
jne 0x40ad87
mov eax, dword [ebp + 0x10]
movsx ecx, word [eax + 8]
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
push ecx
push edx
mov edx, dword [ebp - 0x10]
push eax
push ebx
push esi
mov ecx, edi
call fcn.0040aea0
add esp, 0x14
mov dword [ebp - 0xc], eax
test eax, eax
jne 0x40ae72
push edi
push 1
lea eax, [ebp - 5]
push 1
push eax
call dword [sym.imp.MSVCR100.dll_fread]
add esp, 0x10
test ebx, ebx
je 0x40ae72
test esi, esi
je 0x40ae72
mov edi, dword [ebp - 0x1c]
dec edi
js 0x40ae72
mov ecx, dword [ebp - 0x18]
imul ebx, ebx, 0xd
mov edx, dword [ebp + 0xc]
mov esi, edi
lea eax, [edx + ecx*8]
imul esi, esi, 0xd
add ebx, dword [ebp + 8]
mov dword [ebp - 0x18], eax
lea esp, [esp]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx + 0x20]
add edx, esi
push 0x24
push edx
call dword [sym.imp.MSVCR100.dll_strchr]
add esp, 8
test eax, eax
je 0x40ae56
mov eax, dword [ebp + 8]
push 0xd
sub ebx, 0xd
lea ecx, [esi + eax]
push ebx
push ecx
call dword [sym.imp.MSVCR100.dll_memmove]
add esp, 0xc
jmp 0x40ae68
test esi, esi
je 0x40adfd
mov ecx, dword [ebp + 0x10]
cmp word [ecx + 8], 2
push edi
push 1
je 0x40ae33
mov eax, dword [ebp - 0x10]
lea edx, [esi*4]
push edx
push eax
call dword [sym.imp.MSVCR100.dll_fread]
add esp, 0x10
cmp eax, 1
je 0x40adc2
mov dword [ebp - 0xc], 1
jmp 0x40ae72
xor ecx, ecx
test esi, esi
jle 0x40adfd
fld dword [0x4802b8]
fld qword [0x4a5b10]
mov edx, dword [ebp - 0x10]
fld dword [edx + ecx*4]
fcomp st(2)
fnstsw ax
test ah, 0x41
jne 0x40adee
fld dword [edx + ecx*4]
mov edx, dword [ebp + 0xc]
fstp qword [edx + ecx*8]
jmp 0x40adf4
mov eax, dword [ebp + 0xc]
fst qword [eax + ecx*8]
inc ecx
cmp ecx, esi
jl 0x40add4
fstp st(1)
fstp st(0)
test ebx, ebx
jle 0x40ad06
mov esi, dword [ebp + 8]
mov dword [ebp - 0x14], ebx
jmp 0x40ae10
push edi
push 1
push 0xc
push esi
call dword [sym.imp.MSVCR100.dll_fread]
mov byte [esi + 0xc], 0
add esp, 0x10
add esi, 0xd
dec dword [ebp - 0x14]
jne 0x40ae10
mov esi, dword [ebp - 0x18]
jmp 0x40ad06
mov edx, dword [ebp + 0xc]
lea ecx, [esi*8]
push ecx
push edx
call dword [sym.imp.MSVCR100.dll_fread]
add esp, 0x10
cmp eax, 1
je 0x40adfd
mov dword [ebp - 0xc], 1
jmp 0x40ae72
mov eax, dword [ebp - 0x18]
fld qword [eax - 8]
mov edx, dword [ebp + 0xc]
sub eax, 8
fstp qword [edx + edi*8]
mov dword [ebp - 0x18], eax
sub esi, 0xd
dec edi
jns 0x40ad50
mov eax, dword [ebp + 0x10]
cmp word [eax + 8], 1
jne 0x40ae8d
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x40ae8d
push eax
call dword [sym.imp.MSVCR100.dll_free]
add esp, 4
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret