Function at 0x415054
Capabilities:
Parse pe header
Read file via mapping
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd4
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x28], ecx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x415302
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 5], 0
push ebp
push 0x4152e5
push dword fs:[0]
mov dword fs:[0], esp
xor eax, eax
mov dword [ebp - 0x14], eax
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push edx
call sub.kernel32.dll_CreateFileA
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
je 0x4152bc
push 0
push 0
push 0
push 2
push 0
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_CreateFileMappingA
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x4152bc
push 0
push 0
push 0
push 4
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_MapViewOfFile
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x4152bc
mov eax, dword [ebp - 0x14]
cmp word [eax], 0x5a4d
jne 0x4152bc
mov esi, dword [eax + 0x3c]
add esi, dword [ebp - 0x14]
push 0xf8
push esi
call sub.kernel32.dll_IsBadReadPtr
test eax, eax
jne 0x4152bc
cmp dword [esi], 0x4550
jne 0x4152bc
mov ebx, dword [esi + 0x78]
test ebx, ebx
je 0x4152bc
mov ecx, esi
add ecx, 0xf8
movzx eax, word [esi + 6]
dec eax
test eax, eax
jl 0x41518c
inc eax
mov dword [ebp - 0x2c], eax
mov eax, ebx
xor edx, edx
push edx
push eax
mov esi, dword [ecx + 0xc]
mov eax, esi
cdq
cmp edx, dword [esp + 4]
jne 0x415161
cmp eax, dword [esp]
pop edx
pop eax
ja 0x415184
jmp 0x415165
pop edx
pop eax
jg 0x415184
mov eax, esi
add eax, dword [ecx + 8]
cdq
push edx
push eax
mov eax, ebx
xor edx, edx
cmp edx, dword [esp + 4]
jne 0x415180
cmp eax, dword [esp]
pop edx
pop eax
jae 0x415184
jmp 0x41518c
pop edx
pop eax
jl 0x41518c
add ecx, 0x28
dec dword [ebp - 0x2c]
jne 0x415146
mov eax, dword [ecx + 0xc]
sub eax, dword [ecx + 0x14]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x14]
cdq
push edx
push eax
mov eax, ebx
xor edx, edx
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
push edx
push eax
mov eax, dword [ebp - 0x20]
xor edx, edx
sub dword [esp], eax
sbb dword [esp + 4], edx
pop eax
pop edx
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x14]
cdq
push edx
push eax
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x1c]
xor edx, edx
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
push edx
push eax
mov eax, dword [ebp - 0x20]
xor edx, edx
sub dword [esp], eax
sbb dword [esp + 4], edx
pop eax
pop edx
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x14]
cdq
push edx
push eax
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0xc]
xor edx, edx
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
push edx
push eax
mov eax, dword [ebp - 0x20]
xor edx, edx
sub dword [esp], eax
sbb dword [esp + 4], edx
pop eax
pop edx
mov ebx, eax
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x14]
dec eax
test eax, eax
jl 0x4152bc
inc eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x24], 0
mov eax, dword [ebp - 0x1c]
cmp dword [eax], 0
je 0x4152b0
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x24]
add eax, dword [ebp - 0x14]
cdq
push edx
push eax
mov eax, dword [ebp - 0x20]
xor edx, edx
sub dword [esp], eax
sbb dword [esp + 4], edx
pop eax
pop edx
mov edi, eax
mov eax, dword [ebp - 0x18]
mov esi, dword [eax + 0x18]
dec esi
test esi, esi
jl 0x415290
inc esi
movzx eax, word [edi]
cmp eax, dword [ebp - 0x24]
jne 0x41528a
lea eax, [ebp - 0x28]
call fcn.00403c68
cmp byte [ebx], 0
je 0x415273
inc ebx
jmp 0x41526b
mov eax, ebx
dec eax
cmp byte [eax], 0
jne 0x415287
lea eax, [ebp - 0x28]
mov edx, ebx
call fcn.00403e60
jmp 0x41528a
inc ebx
jmp 0x415273
add edi, 2
dec esi
jne 0x41525b
mov eax, dword [ebp - 0x28]
call fcn.00404104
mov edx, dword [ebp - 4]
call fcn.004078f0
test eax, eax
sete byte [ebp - 5]
cmp byte [ebp - 5], 0
jne 0x4152bc
add dword [ebp - 0x1c], 4
inc dword [ebp - 0x24]
dec dword [ebp - 0x2c]
jne 0x41522b
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4152ec
mov eax, dword [ebp - 0x14]
push eax
call sub.kernel32.dll_UnmapViewOfFile
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_CloseHandle
ret