Function at 0x4014c0
Capabilities:
Get file size
Parse pe header
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
xor esi, esi
push esi
push 0x80
push 3
push esi
push esi
push 0xc0000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 0x20], ebx
cmp ebx, 0xffffffff
je 0x4016f4
lea eax, [ebp - 0x1c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
push dword [ebp - 0x1c]
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
je 0x4016ed
push esi
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], esi
push eax
push dword [ebp - 0x1c]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4016dd
mov eax, 0x5a4d
cmp word [edi], ax
jne 0x4016dd
mov ebx, dword [edi + 0x3c]
add ebx, edi
cmp dword [ebx], 0x4550
jne 0x4016da
movzx eax, word [ebx + 6]
xorps xmm0, xmm0
mov esi, dword [ebp + 8]
xor edx, edx
lea eax, [eax + eax*4]
movups xmmword [ebx + eax*8 + 0xf8], xmm0
movups xmmword [ebx + eax*8 + 0x108], xmm0
movq qword [ebx + eax*8 + 0x118], xmm0
movzx eax, word [ebx + 6]
lea eax, [eax + eax*4]
mov dword [ebx + eax*8 + 0xf8], 0x7961672e
mov dword [ebx + eax*8 + 0xfc], 0x61706f6a
mov eax, esi
mov ecx, dword [ebx + 0x38]
div ecx
test edx, edx
jne 0x4015ae
mov ecx, esi
jmp 0x4015b2
sub ecx, edx
add ecx, esi
movzx eax, word [ebx + 6]
xor edx, edx
lea eax, [eax + eax*4]
mov dword [ebx + eax*8 + 0x100], ecx
movzx eax, word [ebx + 6]
lea eax, [eax + eax*4]
lea eax, [eax + 0x1f]
mov ecx, dword [ebx + eax*8 - 0x1c]
lea eax, [ebx + eax*8]
mov dword [ebp - 0x28], eax
mov eax, dword [eax - 0x20]
mov dword [ebp - 0x24], ecx
mov ecx, dword [ebx + 0x38]
mov dword [ebp - 0x2c], eax
div ecx
mov eax, dword [ebp - 0x2c]
test edx, edx
je 0x4015ef
sub ecx, edx
add eax, ecx
mov ecx, dword [ebp - 0x28]
xor edx, edx
add eax, dword [ebp - 0x24]
mov dword [ecx + 0xc], eax
mov eax, esi
mov ecx, dword [ebx + 0x3c]
div ecx
test edx, edx
je 0x401609
sub ecx, edx
add esi, ecx
movzx eax, word [ebx + 6]
xor edx, edx
lea eax, [eax + eax*4]
mov dword [ebx + eax*8 + 0x108], esi
movzx eax, word [ebx + 6]
lea eax, [eax + eax*4]
lea eax, [eax + 0x1f]
mov ecx, dword [ebx + eax*8 - 0x14]
lea eax, [ebx + eax*8]
mov esi, dword [eax - 0x18]
mov dword [ebp - 0x24], eax
mov eax, esi
mov dword [ebp - 0x28], ecx
mov ecx, dword [ebx + 0x3c]
div ecx
test edx, edx
je 0x401642
sub ecx, edx
add esi, ecx
mov ecx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x28]
add eax, esi
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
mov dword [ecx + 0x14], eax
movzx eax, word [ebx + 6]
push 0
lea eax, [eax + eax*4]
mov dword [ebx + eax*8 + 0x11c], 0xe00000e0
movzx eax, word [ebx + 6]
lea eax, [eax + eax*4]
lea ecx, [ebx + eax*8]
mov eax, dword [ecx + 0x10c]
add eax, dword [ecx + 0x108]
push eax
push dword [ebp - 0x20]
call esi
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
movzx edx, word [ebx + 6]
mov eax, edx
push 0
push 0
push 0
lea eax, [eax + eax*4]
mov ecx, dword [ebx + eax*8 + 0x104]
add ecx, dword [ebx + eax*8 + 0x100]
lea eax, [edx + 1]
mov dword [ebx + 0x50], ecx
mov word [ebx + 6], ax
mov ebx, dword [ebp - 0x20]
push ebx
mov dword [ebp - 0x10], 0
call esi
push 0
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0x1c]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, 1
jmp 0x4016dd
mov ebx, dword [ebp - 0x20]
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 8]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00401810
mov esp, ebp
pop ebp
ret