Function at 0x40b980
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, ecx
mov ecx, dword [ebx + 0xc]
mov eax, dword [ecx]
cmp eax, 1
jg 0x4754b1
mov eax, dword [ebx]
mov dword [ebx + 4], 0
mov byte [eax], 0
xor al, al
mov byte [ebp - 1], al
lea ecx, [ecx]
cmp dword [edi + 8], 0
je 0x4754d3
xor esi, esi
lea esp, [esp]
mov eax, dword [edi + 0xc]
cmp eax, dword [edi + 8]
je 0x40bae5
mov ecx, dword [edi + 0xc]
mov eax, dword [edi + 4]
inc esi
mov al, byte [ecx + eax]
mov byte [ebp + esi + 0xa], al
lea eax, [ecx + 1]
mov dword [edi + 0xc], eax
cmp esi, 1
jb 0x40b9c0
add dword [edi + 0x10], esi
adc dword [edi + 0x14], 0
test esi, esi
je 0x40bb13
mov al, byte [ebp + 0xb]
mov byte [ebp - 1], 1
cmp al, 0xd
je 0x40ba8c
cmp al, 0xa
je 0x40bada
mov ecx, dword [ebx + 0xc]
mov eax, dword [ecx]
cmp eax, 1
jg 0x4754fc
mov eax, dword [ebx + 4]
add eax, 2
cmp dword [ebx + 8], eax
jb 0x40ba40
mov ecx, dword [ebx + 4]
mov eax, dword [ebx]
mov dl, byte [ebp + 0xb]
mov byte [ecx + eax], dl
inc dword [ebx + 4]
mov ecx, dword [ebx + 4]
mov eax, dword [ebx]
mov byte [ecx + eax], 0
jmp 0x40b9b0
cmp eax, 0x41c2
jae 0x47552f
add eax, eax
mov dword [ebx + 8], eax
test eax, eax
je 0x40bb23
add eax, 0xf
and eax, 0xfffffff0
push eax
mov dword [ebx + 8], eax
call fcn.00420bea
mov esi, eax
mov eax, dword [ebx]
add esp, 4
test eax, eax
je 0x40ba88
mov ecx, dword [ebx + 4]
inc ecx
push ecx
push eax
push esi
call fcn.00420580
push dword [ebx]
call fcn.00420c5e
add esp, 0x10
mov dword [ebx], esi
jmp 0x40ba24
cmp dword [edi + 8], 0
je 0x4755f9
xor esi, esi
jmp 0x40baa0
mov eax, dword [edi + 0xc]
cmp eax, dword [edi + 8]
je 0x475613
mov ecx, dword [edi + 0xc]
mov eax, dword [edi + 4]
inc esi
mov al, byte [ecx + eax]
mov byte [ebp + esi + 0xa], al
lea eax, [ecx + 1]
mov dword [edi + 0xc], eax
cmp esi, 1
jb 0x40baa0
add dword [edi + 0x10], esi
adc dword [edi + 0x14], 0
test esi, esi
je 0x40bada
cmp byte [ebp + 0xb], 0xa
jne 0x47564b
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret 4
push 0
lea eax, [ebp - 8]
push eax
push 0x10000
push dword [edi + 4]
push dword [edi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40b9e5
mov eax, dword [ebp - 8]
test eax, eax
je 0x40b9e5
jmp 0x4754ed
mov al, byte [ebp - 1]
test al, al
jne 0x40bada
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, 0x10
jmp 0x40ba5e
dec eax
mov dword [ecx], eax
mov ecx, ebx
call fcn.00409d92
push 0x10
mov dword [ebx + 8], 0x10
call fcn.00420bea
add esp, 4
mov dword [ebx], eax
jmp 0x40b99c
mov ecx, edi
mov dword [edi + 8], 0
mov dword [edi + 0xc], 0
call fcn.00401c81
jmp 0x40b9ba
mov dword [edi + 8], eax
mov dword [edi + 0xc], 0
jmp 0x40b9cc
dec eax
mov dword [ecx], eax
mov ecx, ebx
call fcn.00409d92
mov eax, dword [ebx + 4]
add eax, 2
push eax
call fcn.004020f8
push eax
mov dword [ebx + 8], eax
call fcn.00420bea
mov ecx, dword [ebx + 4]
inc ecx
push ecx
push dword [ebx]
mov esi, eax
push esi
call fcn.00420580
jmp 0x40ba85
movd xmm0, eax
cvtdq2pd xmm0, xmm0
cmp eax, 0x2000000
jae 0x47557a
shr eax, 0x1f
fnstcw word [ebp - 4]
addsd xmm0, qword [eax*8 + 0x4b7590]
movzx eax, word [ebp - 4]
or eax, 0xc00
mulsd xmm0, qword [0x4b3758]
mov dword [ebp - 0xc], eax
movsd qword [ebp - 0x18], xmm0
fld qword [ebp - 0x18]
fldcw word [ebp - 0xc]
fistp qword [ebp - 0x10]
mov eax, dword [ebp - 0x10]
fldcw word [ebp - 4]
jmp 0x40ba4d
cmp eax, 0x8000000
jae 0x4755bd
shr eax, 0x1f
fnstcw word [ebp - 4]
addsd xmm0, qword [eax*8 + 0x4b7590]
movzx eax, word [ebp - 4]
or eax, 0xc00
mulsd xmm0, qword [0x4b3750]
mov dword [ebp - 0xc], eax
movsd qword [ebp - 0x20], xmm0
fld qword [ebp - 0x20]
fldcw word [ebp - 0xc]
fistp qword [ebp - 0x10]
mov eax, dword [ebp - 0x10]
fldcw word [ebp - 4]
jmp 0x40ba4d
shr eax, 0x1f
fnstcw word [ebp - 4]
addsd xmm0, qword [eax*8 + 0x4b7590]
movzx eax, word [ebp - 4]
or eax, 0xc00
mulsd xmm0, qword [0x4b3748]
mov dword [ebp - 0xc], eax
movsd qword [ebp - 0x28], xmm0
fld qword [ebp - 0x28]
fldcw word [ebp - 0xc]
fistp qword [ebp - 0x10]
mov eax, dword [ebp - 0x10]
fldcw word [ebp - 4]
jmp 0x40ba4d
mov ecx, edi
mov dword [edi + 8], 0
mov dword [edi + 0xc], 0
call fcn.00401c81
jmp 0x40ba96
push 0
lea eax, [ebp - 0xc]
push eax
push 0x10000
push dword [edi + 4]
push dword [edi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40bac5
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x40bac5
mov dword [edi + 8], eax
mov dword [edi + 0xc], 0
jmp 0x40baac
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
mov ecx, edi
call fcn.00401db0
jmp 0x40bada