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

Disassembly:
mov eax, 0x419195
call fcn.0040f528
sub esp, 0x48
push ebx
push esi
push edi
xor edi, edi
cmp dword [ebp + 8], edi
mov esi, ecx
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x24], esi
jne 0x4016d4
xor eax, eax
jmp 0x4018c4
mov ecx, esi
call fcn.004015d8
mov ecx, esi
call fcn.00401643
push dword [ebp + 8]
mov dword [ebp - 0x30], 1
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x2c], edi
mov dword [ebp - 4], edi
call fcn.0040efd0
mov edi, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
pop ecx
mov dword [ebp - 0x54], eax
inc eax
push eax
push 0x40
mov dword [ebp - 0x28], eax
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalLock]
push eax
call ebx
test eax, eax
mov dword [ebp - 0x1c], eax
jne 0x401730
and dword [ebp - 0x34], eax
push 0x41ca24
lea eax, [ebp - 0x34]
jmp 0x401807
push dword [ebp + 8]
push dword [ebp - 0x28]
push eax
call fcn.0040120a
test eax, eax
je 0x401751
and dword [ebp - 0x38], 0
push 0x41ca24
lea eax, [ebp - 0x38]
jmp 0x401807
push 0
push pe_nt_image_headers32
push 3
push 0
push 1
push 0x80000000
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x14], eax
jne 0x401785
and dword [ebp - 0x3c], 0
push 0x41ca24
lea eax, [ebp - 0x3c]
jmp 0x401807
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [ebp + 8], eax
jne 0x4017a4
and dword [ebp - 0x40], 0
push 0x41ca24
lea eax, [ebp - 0x40]
jmp 0x401807
add eax, 2
push eax
push 0x40
mov dword [ebp - 0x2c], eax
call edi
push eax
call ebx
mov edi, eax
xor ebx, ebx
cmp edi, ebx
mov dword [ebp - 0x18], edi
jne 0x4017ca
mov dword [ebp - 0x44], ebx
push 0x41ca24
lea eax, [ebp - 0x44]
jmp 0x401807
push ebx
lea eax, [ebp - 0x20]
push eax
push dword [ebp + 8]
mov dword [ebp - 0x20], ebx
push edi
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4017f0
mov dword [ebp - 0x48], ebx
push 0x41ca24
lea eax, [ebp - 0x48]
jmp 0x401807
mov eax, dword [ebp + 8]
cmp dword [ebp - 0x20], eax
je 0x401885
mov dword [ebp - 0x4c], ebx
push 0x41ca24
lea eax, [ebp - 0x4c]
push eax
call fcn.0040f547
mov eax, dword [ebp - 0x50]
xor edi, edi
cmp dword [ebp - 0x14], edi
mov dword [ebp - 0x30], eax
je 0x401829
cmp dword [ebp - 0x14], 0xffffffff
je 0x401829
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x1c], edi
mov esi, dword [sym.imp.KERNEL32.dll_GlobalHandle]
je 0x40184c
push dword [ebp - 0x1c]
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push dword [ebp - 0x1c]
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
cmp dword [ebp - 0x18], edi
je 0x401869
push dword [ebp - 0x18]
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push dword [ebp - 0x18]
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov ecx, dword [ebp - 0x24]
call fcn.004015f6
mov eax, 0x401877
ret
mov eax, dword [ebp - 0x14]
mov ecx, esi
mov dword [esi], eax
call fcn.004015d8
mov eax, dword [ebp - 0x1c]
mov dword [esi + 0xc], eax
mov eax, dword [ebp - 0x54]
mov dword [esi + 4], eax
mov eax, dword [ebp - 0x28]
mov dword [esi + 8], eax
mov eax, dword [ebp - 0x2c]
mov dword [esi + 0x14], eax
mov eax, dword [ebp + 0xc]
cmp eax, ebx
mov dword [esi + 0x10], edi
je 0x4018b5
mov dword [eax], edi
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x4018c1
mov ecx, dword [esi + 0x14]
mov dword [eax], ecx
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 0xc