Function at 0x40ec30
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x458b63
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x84
push ebx
push esi
mov eax, ecx
push edi
mov dword [ebp - 0x70], eax
mov dword [ebp - 4], 1
cmp dword [eax + 0x60], 0
je 0x40f02c
xorps xmm0, xmm0
mov dword [ebp - 0x90], 0x461694
mov dword [ebp - 0x88], 0
movlpd qword [ebp - 0x80], xmm0
movlpd qword [ebp - 0x78], xmm0
mov byte [ebp - 4], 2
mov dword [ebp - 0x6c], 0x461694
mov dword [ebp - 0x64], 0
movlpd qword [ebp - 0x5c], xmm0
movlpd qword [ebp - 0x54], xmm0
mov byte [ebp - 4], 3
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov byte [ebp - 4], 4
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x20], 0
mov byte [ebp - 4], 5
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0
mov byte [ebp - 4], 6
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x3c], 0
mov byte [ebp - 4], 7
lea eax, [ebp + 0xc]
push 0x80
push 7
push SysReAllocString
push 0
push ecx
mov ecx, esp
mov dword [ebp - 0x48], esp
push eax
mov edi, 0x400000
call fcn.00405440
mov byte [ebp - 4], 8
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x44]
call fcn.00423f30
test eax, eax
je 0x40ed57
mov ebx, 0x17
jmp 0x40ed90
push 0x80
push 7
push SysReAllocString
push 0
push ecx
lea eax, [ebp + 8]
mov dword [ebp - 0x48], esp
mov ecx, esp
push eax
call fcn.00405440
mov byte [ebp - 4], 9
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x28]
call fcn.00423f30
mov ebx, eax
mov eax, 0x17
test ebx, ebx
cmovne ebx, eax
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x40edb2
cmp eax, 0xffffffff
je 0x40edb2
lea ecx, [ebp - 0x4c]
xorps xmm0, xmm0
push ecx
push eax
movlpd qword [ebp - 0x4c], xmm0
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov eax, dword [ebp - 0x28]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
test ebx, ebx
jne 0x40ef12
test eax, eax
je 0x40ef12
cmp eax, 0xffffffff
je 0x40ef12
mov eax, dword [ebp - 0x6c]
lea ecx, [ebp - 0x6c]
push ebx
push ebx
push 0x400000
call dword [eax + 4]
test eax, eax
je 0x40ef12
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 0x1c]
push eax
push 0x400000
push dword [ebp - 0x64]
push dword [ebp - 0x28]
call ebx
test eax, eax
jne 0x40ee11
call esi
test eax, eax
jne 0x40ef12
jmp 0x40ee24
cmp dword [ebp - 0x64], 0
mov edi, dword [ebp - 0x1c]
jbe 0x40ee24
mov dword [ebp - 0x5c], edi
mov dword [ebp - 0x58], 0
mov eax, dword [ebp - 0x44]
test eax, eax
je 0x40ef12
cmp eax, 0xffffffff
je 0x40ef12
mov eax, dword [ebp - 0x90]
lea ecx, [ebp - 0x90]
push 0
push 0
push edi
call dword [eax + 4]
test eax, eax
je 0x40ef12
push 0
lea eax, [ebp - 0x38]
push eax
push edi
push dword [ebp - 0x88]
push dword [ebp - 0x44]
call ebx
test eax, eax
jne 0x40ee7e
call esi
mov ebx, eax
test ebx, ebx
jne 0x40ef12
mov ecx, dword [ebp - 0x88]
jmp 0x40ee97
mov ecx, dword [ebp - 0x88]
mov edi, dword [ebp - 0x38]
test ecx, ecx
je 0x40ee95
mov dword [ebp - 0x80], edi
mov dword [ebp - 0x7c], 0
xor ebx, ebx
mov edx, dword [ebp - 0x64]
cmp edx, ecx
je 0x40ef06
test edi, edi
je 0x40ef0e
test edx, edx
je 0x40ef01
test ecx, ecx
je 0x40ef01
mov esi, edi
sub esi, 4
jb 0x40eec2
mov eax, dword [edx]
cmp eax, dword [ecx]
jne 0x40eec7
add edx, 4
add ecx, 4
sub esi, 4
jae 0x40eeb1
cmp esi, 0xfffffffc
je 0x40eefb
mov al, byte [edx]
cmp al, byte [ecx]
jne 0x40eef4
cmp esi, 0xfffffffd
je 0x40eefb
mov al, byte [edx + 1]
cmp al, byte [ecx + 1]
jne 0x40eef4
cmp esi, 0xfffffffe
je 0x40eefb
mov al, byte [edx + 2]
cmp al, byte [ecx + 2]
jne 0x40eef4
cmp esi, 0xffffffff
je 0x40eefb
mov al, byte [edx + 3]
cmp al, byte [ecx + 3]
je 0x40eefb
sbb eax, eax
or eax, 1
jmp 0x40eefd
xor eax, eax
test eax, eax
je 0x40ef06
mov ebx, 0x17
test edi, edi
jne 0x40edaf
test ebx, ebx
je 0x40ef2b
mov esi, dword [ebp - 0x70]
lea eax, [ebp + 0xc]
push eax
lea ecx, [esi + 0x64]
call fcn.0040a0b0
push 0x17
lea ecx, [esi + 0x78]
call fcn.0040a150
mov byte [ebp - 4], 0xa
mov eax, dword [ebp - 0x44]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x40ef4a
cmp eax, 0xffffffff
je 0x40ef4a
cmp dword [ebp - 0x40], 0
jne 0x40ef4a
push eax
call esi
mov dword [ebp - 0x44], 0
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x44]
test eax, eax
je 0x40ef6a
cmp eax, 0xffffffff
je 0x40ef6a
cmp dword [ebp - 0x40], 0
jne 0x40ef6a
push eax
call esi
mov dword [ebp - 0x44], 0
mov byte [ebp - 4], 0xb
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x40ef8a
cmp eax, 0xffffffff
je 0x40ef8a
cmp dword [ebp - 0x24], 0
jne 0x40ef8a
push eax
call esi
mov dword [ebp - 0x28], 0
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x40efaa
cmp eax, 0xffffffff
je 0x40efaa
cmp dword [ebp - 0x24], 0
jne 0x40efaa
push eax
call esi
mov dword [ebp - 0x28], 0
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x64]
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
mov edi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov dword [ebp - 0x6c], 0x461694
test eax, eax
je 0x40efdc
cmp eax, 0xffffffff
je 0x40efdc
push eax
push 0
call edi
push eax
call esi
xorps xmm0, xmm0
mov dword [ebp - 0x64], 0
movlpd qword [ebp - 0x5c], xmm0
movlpd qword [ebp - 0x54], xmm0
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x88]
mov dword [ebp - 0x90], 0x461694
test eax, eax
je 0x40f015
cmp eax, 0xffffffff
je 0x40f015
push eax
push 0
call edi
push eax
call esi
xorps xmm0, xmm0
mov dword [ebp - 0x88], 0
movlpd qword [ebp - 0x80], xmm0
movlpd qword [ebp - 0x78], xmm0
mov byte [ebp - 4], 0
or esi, 0xffffffff
mov eax, dword [ebp + 8]
lea ecx, [eax - 0x20]
cmp ecx, dword [0x476474]
je 0x40f05e
lea ecx, [eax - 0x20]
mov eax, esi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x40f05e
mov eax, dword [ebp + 8]
add eax, 0xffffffe0
push eax
call fcn.004471aa
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0xc]
lea ecx, [eax - 0x20]
cmp ecx, dword [0x476474]
je 0x40f08e
add eax, 0xffffffe0
lock xadd dword [eax], esi
dec esi
test esi, esi
jg 0x40f08e
mov eax, dword [ebp + 0xc]
add eax, 0xffffffe0
push eax
call fcn.004471aa
add esp, 4
mov ecx, dword [ebp - 0xc]
xor eax, eax
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 8