Function at 0x410014
Capabilities:
Get file size
Parse pe header
Read file via mapping

Disassembly:
mov eax, 0x4203ba
call fcn.0041ef20
sub esp, 0x60
push ebx
xor ebx, ebx
cmp dword [ebp + 8], 0xffffffff
push esi
push edi
mov esi, ecx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x30], ebx
jne 0x41003b
push 6
jmp 0x410503
push ebx
push dword [ebp + 8]
call dword [sym.imp.kernel32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [esi + 0x39c], eax
je 0x410509
push ebx
push ebx
push ebx
push 2
push ebx
push dword [ebp + 8]
call dword [sym.imp.kernel32.dll_CreateFileMappingA]
cmp eax, ebx
mov dword [esi + 8], eax
je 0x410509
push ebx
push ebx
push ebx
push 4
push eax
call dword [sym.imp.kernel32.dll_MapViewOfFile]
cmp eax, ebx
mov dword [esi + 0xc], eax
je 0x410509
cmp word [eax], 0x5a4d
je 0x410096
push 0xc1
jmp 0x410503
mov ecx, dword [eax + 0x3c]
mov dword [esi + 0x390], ecx
push 0xf8
add ecx, eax
push ecx
lea edi, [esi + 0x18]
push edi
call sub.msvcrt.dll_memcpy
add esp, 0xc
cmp dword [edi], 0x4550
je 0x4100c5
push 0xbf
jmp 0x410503
mov ax, word [esi + 0x2c]
cmp ax, bx
je 0x4104fe
mov ecx, dword [esi + 0x390]
movzx eax, ax
lea ecx, [eax + ecx + 0x18]
mov ax, word [esi + 0x1e]
cmp ax, 0x10
mov dword [esi + 0x394], ecx
ja 0x4104fe
movzx eax, ax
lea eax, [eax + eax*4]
shl eax, 3
push eax
mov eax, dword [esi + 0xc]
add eax, ecx
push eax
lea eax, [esi + 0x110]
push eax
call sub.msvcrt.dll_memcpy
xor ebx, ebx
add esp, 0xc
cmp word [esi + 0x1e], bx
mov dword [ebp + 8], ebx
jbe 0x41015d
lea edi, [esi + 0x124]
lea eax, [edi - 0x14]
push str..detour
push eax
call sub.msvcrt.dll_strcmp
test eax, eax
pop ecx
pop ecx
jne 0x41014e
mov eax, dword [edi]
add eax, dword [esi + 0xc]
push 0x30
push eax
lea eax, [ebp - 0x6c]
push eax
call sub.msvcrt.dll_memcpy
mov ebx, dword [ebp - 0x5c]
add esp, 0xc
movzx eax, word [esi + 0x1e]
inc dword [ebp + 8]
add edi, 0x28
cmp dword [ebp + 8], eax
jb 0x410123
push dword [esi + 0x98]
mov ecx, esi
call fcn.0040fe84
mov edi, eax
push ebx
mov dword [ebp - 0x18], edi
call fcn.0040fe84
test eax, eax
mov dword [ebp + 8], eax
jne 0x410181
mov eax, edi
mov dword [ebp + 8], eax
xor edx, edx
cmp edi, edx
je 0x4104fe
cmp eax, edx
je 0x4104fe
mov ecx, dword [esi + 0xf0]
mov eax, dword [esi + 0xf4]
add eax, ecx
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x1c], edx
jmp 0x4101b2
inc dword [ebp - 0x1c]
add edi, 0x14
cmp dword [edi], edx
jne 0x4101ac
cmp dword [ebp - 0x1c], edx
lea eax, [esi + 0x3b4]
mov dword [ebp - 0x28], eax
mov dword [eax], edx
mov dword [ebp - 0x24], edx
jbe 0x4103df
mov ebx, dword [ebp - 0x18]
push dword [ebx + 0xc]
mov ecx, esi
call fcn.0040fe84
test eax, eax
mov dword [ebp - 0x20], eax
je 0x4104fe
push 0x24
call sub.mfc42.dll_operatornew
test eax, eax
pop ecx
je 0x4101fc
mov ecx, eax
call fcn.0040fb2a
mov edi, eax
jmp 0x4101fe
xor edi, edi
test edi, edi
je 0x4104e4
mov eax, dword [ebp - 0x28]
push dword [ebp - 0x20]
mov dword [eax], edi
inc dword [esi + 0x3b8]
mov dword [ebp - 0x28], edi
call fcn.0041051c
pop ecx
xor ecx, ecx
cmp eax, ecx
mov dword [edi + 0x20], eax
je 0x410509
mov eax, dword [ebx]
mov dword [edi + 0x10], eax
mov eax, dword [ebx + 0x10]
mov dword [edi + 0x14], eax
mov eax, dword [ebx + 8]
mov dword [edi + 0x18], eax
mov dword [edi + 8], ecx
mov dword [edi + 0xc], ecx
mov dword [edi + 4], ecx
mov ebx, dword [ebx + 0x10]
cmp ebx, dword [ebp - 0x34]
jb 0x4103c0
cmp ebx, dword [ebp - 0x38]
jae 0x4103c0
mov eax, dword [ebp + 8]
push dword [eax + 0xc]
mov ecx, esi
call fcn.0040fe84
test eax, eax
je 0x4104fe
push eax
call fcn.0041051c
test eax, eax
pop ecx
mov dword [edi + 0x1c], eax
je 0x410509
mov eax, dword [ebp - 0x18]
push dword [eax]
mov ecx, esi
call fcn.0040fe84
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 8]
push dword [eax]
call fcn.0040fe84
xor ebx, ebx
cmp dword [ebp - 0x10], ebx
mov dword [ebp - 0x14], eax
je 0x4103ba
mov eax, dword [ebp - 0x10]
cmp dword [eax], ebx
je 0x4103ba
mov eax, dword [ebp - 0x10]
inc ebx
cmp dword [eax + ebx*4], 0
jne 0x4102b2
test ebx, ebx
je 0x4103ba
mov eax, ebx
shl eax, 4
add eax, 4
push eax
mov dword [edi + 0xc], ebx
call sub.mfc42.dll_operatornew
pop ecx
mov dword [ebp - 0x3c], eax
and dword [ebp - 4], 0
test eax, eax
je 0x410301
push fcn.0040fbfd
push 0x40fbec
push ebx
mov dword [eax], ebx
add eax, 4
push 0x10
push eax
mov dword [ebp - 0x20], eax
call fcn.0041f334
mov eax, dword [ebp - 0x20]
jmp 0x410303
xor eax, eax
or dword [ebp - 4], 0xffffffff
test eax, eax
mov dword [edi + 8], eax
je 0x4104e4
and dword [ebp - 0x20], 0
test ebx, ebx
jbe 0x4103ba
mov ecx, dword [ebp - 0x14]
lea edi, [eax + 4]
mov eax, dword [ebp - 0x10]
sub eax, ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x10], eax
jmp 0x410334
mov eax, dword [ebp - 0x10]
xor ecx, ecx
mov dword [edi], ecx
mov word [edi - 4], cx
mov dword [edi + 8], ecx
mov dword [edi + 4], ecx
mov ecx, dword [ebp - 0x14]
mov eax, dword [eax + ecx]
test eax, eax
jns 0x410355
and eax, 0xffff
mov dword [edi], eax
jmp 0x4103a7
push eax
mov ecx, esi
call fcn.0040fe84
test eax, eax
je 0x41037d
mov cx, word [eax]
add eax, 2
push eax
mov word [edi - 4], cx
call fcn.0041051c
test eax, eax
pop ecx
mov dword [edi + 8], eax
je 0x410509
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
test eax, eax
js 0x41034c
push eax
mov ecx, esi
call fcn.0040fe84
test eax, eax
je 0x4103a7
add eax, 2
push eax
call fcn.0041051c
test eax, eax
pop ecx
mov dword [edi + 4], eax
je 0x410509
inc dword [ebp - 0x20]
add dword [ebp - 0x14], 4
add edi, 0x10
cmp dword [ebp - 0x20], ebx
jb 0x410331
add dword [ebp + 8], 0x14
jmp 0x4103ca
mov dword [edi + 0x1c], ecx
mov dword [edi + 4], 1
inc dword [ebp - 0x24]
mov eax, dword [ebp - 0x24]
add dword [ebp - 0x18], 0x14
cmp eax, dword [ebp - 0x1c]
jb 0x4101cd
xor edx, edx
cmp word [esi + 0x1e], dx
mov ebx, dword [ebp - 0x2c]
mov dword [esi + 0x398], edx
mov dword [ebp + 8], edx
jbe 0x4104cb
lea edi, [esi + 0x124]
mov eax, dword [edi - 4]
add eax, dword [edi]
mov ecx, dword [esi + 0x398]
cmp eax, ecx
ja 0x41040c
mov eax, ecx
mov dword [esi + 0x398], eax
lea eax, [edi - 0x14]
push str..detour
push eax
call sub.msvcrt.dll_strcmp
test eax, eax
pop ecx
pop ecx
jne 0x4104b8
mov eax, dword [edi]
add eax, dword [esi + 0xc]
push 0x30
push eax
lea eax, [ebp - 0x6c]
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
cmp dword [ebp - 0x64], 0
jne 0x41044a
mov eax, dword [ebp - 0x6c]
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 0x60]
sub eax, dword [ebp - 0x64]
mov ecx, dword [edi]
mov ebx, dword [esi + 0xc]
mov edx, dword [esi + 0x398]
mov dword [ebp - 0x30], eax
mov eax, dword [edi - 4]
add ebx, ecx
add ebx, dword [ebp - 0x64]
add eax, ecx
cmp eax, edx
ja 0x41046e
mov eax, edx
dec word [esi + 0x1e]
and dword [esi + 0x70], 0
mov dword [esi + 0x398], eax
mov eax, dword [ebp - 0x5c]
mov dword [esi + 0x98], eax
mov eax, dword [ebp - 0x58]
mov dword [esi + 0x9c], eax
mov eax, dword [ebp - 0x54]
mov dword [esi + 0xe8], eax
mov eax, dword [ebp - 0x50]
mov dword [esi + 0xec], eax
mov eax, dword [ebp - 0x4c]
mov dword [esi + 0xf0], eax
mov eax, dword [ebp - 0x48]
mov dword [esi + 0xf4], eax
mov eax, dword [ebp - 0x44]
mov dword [esi + 0x68], eax
movzx eax, word [esi + 0x1e]
inc dword [ebp + 8]
add edi, 0x28
cmp dword [ebp + 8], eax
jb 0x4103fb
push 0xc
call sub.mfc42.dll_operatornew
test eax, eax
pop ecx
je 0x4104e8
push dword [ebp - 0x30]
mov ecx, eax
push ebx
call fcn.0040fc26
jmp 0x4104ea
push 0xe
jmp 0x410503
xor eax, eax
test eax, eax
mov dword [esi + 4], eax
jne 0x4104f9
push 0xe
call dword [sym.imp.kernel32.dll_SetLastError]
xor eax, eax
inc eax
jmp 0x41050b
push 0xc0
call dword [sym.imp.kernel32.dll_SetLastError]
xor eax, eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 4