Function at 0x40ea0b
Capabilities:
Parse pe header
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
and dword [ebp - 0x28], 0
push ebx
push esi
mov esi, ecx
push edi
test esi, esi
je 0x40ec04
cmp esi, dword [0x44f75c]
je 0x40ec04
mov eax, 0x5a4d
cmp word [esi], ax
jne 0x40ec04
mov ebx, dword [esi + 0x3c]
add ebx, esi
cmp dword [ebx], 0x4550
jne 0x40ec04
mov edi, dword [ebx + 0x78]
mov eax, dword [ebx + 0x7c]
lea ecx, [eax + edi]
mov dword [ebp - 0x34], ecx
test edi, edi
je 0x40ec04
test eax, eax
je 0x40ec04
mov eax, dword [edi + esi + 0x1c]
mov ecx, dword [edi + esi + 0x20]
add eax, esi
add ecx, esi
mov dword [ebp - 0x30], eax
mov eax, dword [edi + esi + 0x24]
mov dword [ebp - 0x2c], ecx
add eax, esi
xor ecx, ecx
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x10], ecx
cmp dword [edi + esi + 0x18], ecx
jbe 0x40ebff
add edx, 8
mov dword [ebp - 0x38], 1
mov dword [ebp - 0x24], edx
mov edx, dword [edx]
mov dword [ebp - 0x20], edx
test edx, edx
je 0x40ebae
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0xc], eax
mov ecx, dword [eax - 8]
mov edx, dword [eax + 4]
mov dword [ebp - 0x1c], edx
test ecx, ecx
je 0x40eafe
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx + eax*4]
add eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40eaee
test dl, dl
je 0x40eaea
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40eaee
add eax, 2
add ecx, 2
test dl, dl
jne 0x40eace
xor eax, eax
jmp 0x40eaf3
sbb eax, eax
or eax, 1
test eax, eax
mov eax, dword [ebp - 0xc]
jne 0x40eb95
xor edx, edx
mov dword [ebp - 4], edx
cmp dword [edi + esi + 0x14], edx
jbe 0x40eb95
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 8], ecx
mov eax, dword [ebp - 0x14]
movzx eax, word [eax]
cmp eax, edx
jne 0x40eb64
cmp dword [ecx], 0
je 0x40eb92
cmp dword [ecx], edi
jb 0x40eb2d
mov eax, dword [ebp - 0x34]
cmp dword [ecx], eax
jb 0x40eb92
push dword [ebp - 0x1c]
mov edx, esi
push dword [ebp - 0x20]
call fcn.0040e72c
pop ecx
pop ecx
test eax, eax
je 0x40eb5e
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x38]
or dword [eax + 0x68], edx
mov dword [eax + 0x64], ecx
lea ecx, [ebp - 0x3c]
push ecx
push 0x20
push 0x6c
push eax
mov dword [ebp - 0x28], edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov edx, dword [ebp - 4]
mov ecx, dword [ebp - 8]
cmp dword [ebp - 0x18], 0
jne 0x40eb82
lea ecx, [ebx + 8]
mov edx, dword [ecx]
inc edx
call fcn.0040e656
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 4]
mov dword [ebp - 0x18], 1
inc edx
add ecx, 4
mov dword [ebp - 4], edx
mov dword [ebp - 8], ecx
cmp edx, dword [edi + esi + 0x14]
jb 0x40eb13
mov eax, dword [ebp - 0xc]
add eax, 0x10
mov dword [ebp - 0xc], eax
mov ecx, dword [eax]
mov dword [ebp - 0x20], ecx
test ecx, ecx
jne 0x40eab6
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x24]
inc ecx
add eax, 2
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x14], eax
cmp ecx, dword [edi + esi + 0x18]
jb 0x40eaa3
cmp dword [ebp - 0x18], 0
je 0x40ebff
mov ecx, dword [0x451784]
test ecx, ecx
je 0x40ebff
mov ecx, dword [ecx + 0xc]
add ecx, 0xc
mov eax, dword [ecx]
jmp 0x40ebee
lea edx, [eax]
mov eax, dword [eax]
cmp dword [edx + 8], 0
je 0x40ebee
cmp esi, dword [edx + 0x18]
je 0x40ebf4
cmp eax, ecx
jne 0x40ebdf
jmp 0x40ebff
lea ecx, [edx + 0x44]
mov edx, dword [ecx]
inc edx
call fcn.0040e656
mov eax, dword [ebp - 0x28]
jmp 0x40ec06
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret