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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x138
push ebx
mov eax, ecx
mov dword [ebp - 0xc], edx
push esi
xor ebx, ebx
mov dword [ebp - 0x14], eax
push 0x103
mov dword [eax], ebx
lea eax, [ebp - 0x137]
push ebx
push eax
mov dword [edx], ebx
mov byte [ebp - 0x138], bl
call fcn.00443b90
add esp, 0xc
lea eax, [ebp - 0x138]
push 0x104
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push ebx
push ebx
push 3
push ebx
push 5
push SysReAllocString
lea eax, [ebp - 0x138]
mov dword [ebp - 4], ebx
push eax
mov dword [ebp - 0x10], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40e8d8
xor eax, eax
jmp 0x40ea45
push edi
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
push ebx
push 0x3c
push esi
call edi
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 4]
push eax
push 4
lea eax, [ebp - 0x10]
push eax
push esi
call ebx
push 0
push 0
push dword [ebp - 0x10]
push esi
call edi
push 0
lea eax, [ebp - 4]
push eax
push 4
lea eax, [ebp - 0x20]
push eax
push esi
call ebx
cmp dword [ebp - 0x20], 0x4550
jne 0x40ea33
mov edi, dword [ebp - 0x10]
xor eax, eax
push eax
push eax
add edi, 0x18
mov dword [ebp - 8], eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 4]
push eax
push 2
lea eax, [ebp - 8]
push eax
push esi
call ebx
mov eax, 0x10b
cmp word [ebp - 8], ax
jne 0x40e954
sub edi, 0xffffff80
jmp 0x40e969
mov eax, 0x20b
cmp word [ebp - 8], ax
jne 0x40e967
add edi, 0x90
jmp 0x40e969
xor edi, edi
test edi, edi
je 0x40ea33
push 0
push 0
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
xor edi, edi
lea eax, [ebp - 4]
push edi
push eax
push 4
lea eax, [ebp - 0x24]
push eax
push esi
call ebx
push edi
lea eax, [ebp - 4]
push eax
push 4
lea eax, [ebp - 0x1c]
push eax
push esi
call ebx
mov ecx, dword [ebp - 0x24]
xor eax, eax
mov ebx, dword [ebp - 0x1c]
mov dword [ebp - 0x34], edi
add ebx, ecx
lea edi, [ebp - 0x30]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor edi, edi
mov dword [ebp - 0x18], edi
test ecx, ecx
jne 0x40e9c1
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
push edi
push edi
lea ecx, [ebx - 0x10]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 0x18]
push eax
push 0x10
lea eax, [ebp - 0x34]
push eax
push esi
call edi
cmp dword [ebp - 0x34], 0
jne 0x40ea33
cmp dword [ebp - 0x30], 0
jne 0x40ea33
cmp dword [ebp - 0x2c], 0
jne 0x40ea33
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x40ea33
mov ecx, dword [ebp - 0xc]
push eax
mov dword [ecx], eax
call fcn.0041ed01
pop ecx
mov ecx, dword [ebp - 0x14]
push 0
push 0
mov dword [ecx], eax
mov eax, dword [ebp - 0xc]
sub ebx, dword [eax]
sub ebx, 0x10
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0xc]
push dword [eax]
mov eax, dword [ebp - 0x14]
push dword [eax]
push esi
call edi
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x14]
xor eax, eax
pop edi
cmp dword [ecx], eax
setne al
pop esi
pop ebx
mov esp, ebp
pop ebp
ret