Function at 0x40ba80
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
mov esi, eax
mov eax, dword [edi + 0xc]
cmp dword [eax], 1
jg 0x42b708
mov eax, dword [edi]
mov dword [edi + 4], 0
mov byte [eax], 0
mov byte [ebp - 2], 0
cmp dword [esi + 8], 0
je 0x42b728
xor ebx, ebx
mov ecx, dword [esi + 0xc]
cmp ecx, dword [esi + 8]
je 0x40bb9f
mov eax, dword [esi + 0xc]
mov edx, dword [esi + 4]
mov cl, byte [eax + edx]
mov byte [ebp + ebx - 1], cl
inc ebx
inc eax
mov dword [esi + 0xc], eax
cmp ebx, 1
jb 0x40bab2
xor ecx, ecx
add dword [esi + 0x10], ebx
adc dword [esi + 0x14], ecx
cmp ebx, ecx
je 0x40bbd1
mov bl, byte [ebp - 1]
cmp bl, 0xd
je 0x40bb23
cmp bl, 0xa
je 0x40bb3f
mov eax, dword [edi + 0xc]
cmp dword [eax], 1
mov byte [ebp - 2], 1
jg 0x42b74c
mov eax, dword [edi + 4]
add eax, 2
cmp dword [edi + 8], eax
jb 0x40bb47
mov ecx, dword [edi + 4]
mov edx, dword [edi]
mov byte [ecx + edx], bl
inc dword [edi + 4]
mov eax, dword [edi + 4]
mov ecx, dword [edi]
mov byte [eax + ecx], 0
jmp 0x40baa6
lea edx, [ebp - 1]
push edx
mov ebx, 1
call fcn.0040b9f0
test eax, eax
je 0x40bb3f
cmp byte [ebp - 1], 0xa
jne 0x42b845
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 0x41c2
jae 0x42b782
lea edx, [eax + eax]
mov dword [edi + 8], edx
mov eax, dword [edi + 8]
cmp eax, ecx
je 0x42b83b
add eax, 0xf
and eax, 0xfffffff0
push eax
mov dword [edi + 8], eax
call fcn.00413649
mov ecx, dword [edi]
add esp, 4
test ecx, ecx
je 0x40bb98
mov edx, dword [edi + 4]
inc edx
push edx
push ecx
push eax
mov dword [ebp - 0x10], eax
call fcn.004131a0
mov eax, dword [edi]
push eax
call fcn.00411c3e
mov eax, dword [ebp - 0x10]
add esp, 0x10
mov dword [edi], eax
jmp 0x40bb0d
mov eax, dword [esi + 4]
mov ecx, dword [esi]
push 0
lea edx, [ebp - 0xc]
push edx
push 0x10000
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40bad5
mov eax, dword [ebp - 0xc]
xor ecx, ecx
cmp eax, ecx
je 0x40bad7
jmp 0x42b741
cmp byte [ebp - 2], 0
jne 0x40bb3f
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
dec dword [eax]
push edi
call fcn.0043a371
push 0x10
mov dword [edi + 8], 0x10
call fcn.00413649
add esp, 4
mov dword [edi], eax
jmp 0x40ba96
push esi
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
call fcn.00449b44
jmp 0x40bab0
mov dword [esi + 8], eax
mov dword [esi + 0xc], ecx
jmp 0x40babe
dec dword [eax]
push edi
call fcn.0043a371
mov edx, dword [edi + 4]
add edx, 2
push edx
call fcn.0044aaec
push eax
mov dword [edi + 8], eax
call fcn.00413649
mov ecx, dword [edi + 4]
mov edx, dword [edi]
inc ecx
push ecx
push edx
push eax
mov dword [ebp - 8], eax
call fcn.004131a0
mov eax, dword [ebp - 8]
jmp 0x40bb95
cmp eax, 0x2000000
jae 0x42b7c2
mov dword [ebp - 0x10], eax
fild dword [ebp - 0x10]
test eax, eax
jns 0x42b799
fadd qword [0x4a0998]
fmul qword [0x4a09d0]
fnstcw word [ebp - 6]
movzx eax, word [ebp - 6]
or eax, 0xc00
mov dword [ebp - 0x10], eax
fldcw word [ebp - 0x10]
fistp qword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
mov dword [edi + 8], eax
fldcw word [ebp - 6]
jmp 0x40bb58
cmp eax, 0x8000000
jae 0x42b802
mov dword [ebp - 0x10], eax
fild dword [ebp - 0x10]
test eax, eax
jns 0x42b7d9
fadd qword [0x4a0998]
fmul qword [0x4a09e0]
fnstcw word [ebp - 6]
movzx eax, word [ebp - 6]
or eax, 0xc00
mov dword [ebp - 0x10], eax
fldcw word [ebp - 0x10]
fistp qword [ebp - 0x14]
mov edx, dword [ebp - 0x14]
mov dword [edi + 8], edx
fldcw word [ebp - 6]
jmp 0x40bb58
mov dword [ebp - 0x10], eax
fild dword [ebp - 0x10]
test eax, eax
jns 0x42b812
fadd qword [0x4a0998]
fmul qword [0x4a09d8]
fnstcw word [ebp - 6]
movzx eax, word [ebp - 6]
or eax, 0xc00
mov dword [ebp - 0x10], eax
fldcw word [ebp - 0x10]
fistp qword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
mov dword [edi + 8], eax
fldcw word [ebp - 6]
jmp 0x40bb58
mov eax, 0x10
jmp 0x40bb69
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
call fcn.0040f0b0
jmp 0x40bb3f