Function at 0x40d7ec
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
push ebx
push esi
push edi
mov esi, ecx
xor edi, edi
mov dword [ebp - 0x2c], esi
cmp dword [esi + 0x118], edi
jne 0x40dafa
mov eax, dword [esi + 0x11c]
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push edi
push edi
push dword [ebp + 0xc]
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x34], eax
push dword [ebp + 8]
call ebx
push 4
lea eax, [ebp - 0x14]
push edi
push eax
call fcn.0042bd20
add esp, 0xc
lea eax, [ebp - 0x20]
push edi
push eax
lea eax, [ebp - 0x14]
push 4
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x14]
push 4
push eax
mov ecx, esi
call fcn.0040d11a
cmp dword [ebp - 0x1c], edi
je 0x40dafa
cmp dword [ebp - 0x20], 4
jne 0x40dafa
inc dword [ebp - 0x18]
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x34]
jg 0x40dafa
push 1
push edi
push 0xfffffffffffffffd
push dword [ebp + 8]
call ebx
lea eax, [ebp - 0x14]
mov ecx, esi
push eax
call fcn.0040bfc1
test eax, eax
je 0x40d833
push 1
pop esi
push esi
push edi
push 0xffffffffffffffff
push dword [ebp + 8]
call ebx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x30], eax
mov eax, ecx
push 3
shr eax, 0x13
pop edx
and eax, edx
sub eax, edi
je 0x40d8ce
dec eax
je 0x40d8c9
dec eax
je 0x40d8c0
dec eax
jne 0x40d8d1
mov dword [ebp - 8], edx
jmp 0x40d8d1
mov dword [ebp - 8], 2
jmp 0x40d8d1
mov dword [ebp - 8], edi
jmp 0x40d8d1
mov dword [ebp - 8], esi
mov eax, ecx
shr eax, 0x11
and eax, edx
sub eax, edi
je 0x40d8f8
dec eax
je 0x40d8f3
dec eax
je 0x40d8ea
dec eax
jne 0x40d8fb
mov dword [ebp - 0xc], esi
jmp 0x40d904
mov dword [ebp - 0xc], 2
jmp 0x40d904
mov dword [ebp - 0xc], edx
jmp 0x40d904
mov dword [ebp - 0xc], edi
cmp dword [ebp - 0xc], edi
jle 0x40d988
cmp dword [ebp - 8], edx
mov eax, dword [ebp - 0xc]
jne 0x40d94b
dec eax
je 0x40d937
dec eax
je 0x40d926
dec eax
jne 0x40d98d
mov eax, ecx
shr eax, 0xc
and eax, 0xf
mov eax, dword [eax*4 + 0x466cdc]
jmp 0x40d946
mov eax, ecx
shr eax, 0xc
and eax, 0xf
mov eax, dword [eax*4 + 0x466c9c]
jmp 0x40d946
mov eax, ecx
shr eax, 0xc
and eax, 0xf
mov eax, dword [eax*4 + 0x466c5c]
mov dword [ebp - 0x10], eax
jmp 0x40d98d
dec eax
je 0x40d976
dec eax
je 0x40d965
dec eax
jne 0x40d988
mov eax, ecx
shr eax, 0xc
and eax, 0xf
mov eax, dword [eax*4 + 0x466d9c]
jmp 0x40d985
mov eax, ecx
shr eax, 0xc
and eax, 0xf
mov eax, dword [eax*4 + 0x466d5c]
jmp 0x40d985
mov eax, ecx
shr eax, 0xc
and eax, 0xf
mov eax, dword [eax*4 + 0x466d1c]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 8], edx
jne 0x40d9b9
mov eax, ecx
shr eax, 0xa
and eax, edx
sub eax, edi
je 0x40d9b0
dec eax
je 0x40d9a7
dec eax
jne 0x40da1a
mov dword [ebp - 4], 0x7d00
jmp 0x40da1f
mov dword [ebp - 4], 0xbb80
jmp 0x40da1f
mov dword [ebp - 4], 0xac44
jmp 0x40da1a
cmp dword [ebp - 8], 2
jne 0x40d9eb
mov eax, ecx
shr eax, 0xa
and eax, edx
sub eax, edi
je 0x40d9e2
dec eax
je 0x40d9d9
dec eax
jne 0x40da1a
mov dword [ebp - 4], 0x3e80
jmp 0x40da1f
mov dword [ebp - 4], 0x5dc0
jmp 0x40da1f
mov dword [ebp - 4], 0x5622
jmp 0x40da1a
cmp dword [ebp - 8], esi
jne 0x40da1a
mov eax, ecx
shr eax, 0xa
and eax, edx
sub eax, edi
je 0x40da13
dec eax
je 0x40da0a
dec eax
jne 0x40da1a
mov dword [ebp - 4], 0x1f40
jmp 0x40da1f
mov dword [ebp - 4], 0x2ee0
jmp 0x40da1f
mov dword [ebp - 4], 0x2b11
cmp dword [ebp - 4], edi
je 0x40da6c
fild dword [ebp - 0x10]
cmp dword [ebp - 0xc], esi
fmul qword [0x4546f0]
fidiv dword [ebp - 4]
jne 0x40da4e
fmul qword [0x454700]
shr ecx, 9
and ecx, esi
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x3c], ecx
fild qword [ebp - 0x3c]
faddp st(1)
fmul qword [0x4546e8]
jmp 0x40da64
fmul qword [0x4546f8]
shr ecx, 9
and ecx, esi
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x44], ecx
fild qword [ebp - 0x44]
faddp st(1)
call fcn.0042c124
mov dword [ebp - 0x28], eax
push esi
push edi
push dword [ebp - 0x28]
push dword [ebp + 8]
call ebx
xor esi, esi
push 4
lea eax, [ebp - 0x24]
push edi
push eax
call fcn.0042bd20
add esp, 0xc
lea eax, [ebp - 0x20]
push edi
push eax
lea eax, [ebp - 0x24]
push 4
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x24]
push 4
push eax
call fcn.0040d11a
cmp dword [ebp - 0x1c], edi
je 0x40dafa
cmp dword [ebp - 0x20], 4
jne 0x40dafa
mov ecx, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
push eax
call fcn.0040bfc1
test eax, eax
jne 0x40daf5
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x30]
add eax, esi
push edi
push edi
lea eax, [eax + ecx + 1]
push eax
push dword [ebp + 8]
call ebx
inc esi
cmp esi, 1
jl 0x40da78
mov eax, dword [ebp - 0x30]
push edi
inc eax
push edi
push eax
push dword [ebp + 8]
call ebx
mov esi, dword [ebp - 0x2c]
jmp 0x40d824
mov eax, dword [ebp - 0x30]
jmp 0x40dafd
mov eax, dword [ebp + 0xc]
pop edi
pop esi
pop ebx
leave
ret 8