Function at 0x40e98b
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 0x40eb84
cmp esi, dword [0x44f754]
je 0x40eb84
mov eax, 0x5a4d
cmp word [esi], ax
jne 0x40eb84
mov ebx, dword [esi + 0x3c]
add ebx, esi
cmp dword [ebx], 0x4550
jne 0x40eb84
mov edi, dword [ebx + 0x78]
mov eax, dword [ebx + 0x7c]
lea ecx, [eax + edi]
mov dword [ebp - 0x34], ecx
test edi, edi
je 0x40eb84
test eax, eax
je 0x40eb84
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 0x40eb7f
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 0x40eb2e
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 0x40ea7e
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 0x40ea6e
test dl, dl
je 0x40ea6a
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40ea6e
add eax, 2
add ecx, 2
test dl, dl
jne 0x40ea4e
xor eax, eax
jmp 0x40ea73
sbb eax, eax
or eax, 1
test eax, eax
mov eax, dword [ebp - 0xc]
jne 0x40eb15
xor edx, edx
mov dword [ebp - 4], edx
cmp dword [edi + esi + 0x14], edx
jbe 0x40eb15
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 8], ecx
mov eax, dword [ebp - 0x14]
movzx eax, word [eax]
cmp eax, edx
jne 0x40eae4
cmp dword [ecx], 0
je 0x40eb12
cmp dword [ecx], edi
jb 0x40eaad
mov eax, dword [ebp - 0x34]
cmp dword [ecx], eax
jb 0x40eb12
push dword [ebp - 0x1c]
mov edx, esi
push dword [ebp - 0x20]
call fcn.0040e6ac
pop ecx
pop ecx
test eax, eax
je 0x40eade
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 0x40eb02
lea ecx, [ebx + 8]
mov edx, dword [ecx]
inc edx
call fcn.0040e5d6
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 0x40ea93
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 0x40ea36
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 0x40ea23
cmp dword [ebp - 0x18], 0
je 0x40eb7f
mov ecx, dword [0x451774]
test ecx, ecx
je 0x40eb7f
mov ecx, dword [ecx + 0xc]
add ecx, 0xc
mov eax, dword [ecx]
jmp 0x40eb6e
lea edx, [eax]
mov eax, dword [eax]
cmp dword [edx + 8], 0
je 0x40eb6e
cmp esi, dword [edx + 0x18]
je 0x40eb74
cmp eax, ecx
jne 0x40eb5f
jmp 0x40eb7f
lea ecx, [edx + 0x44]
mov edx, dword [ecx]
inc edx
call fcn.0040e5d6
mov eax, dword [ebp - 0x28]
jmp 0x40eb86
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret