Function at 0x40e6c0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x50
mov edx, dword [esp + 0x60]
and eax, 0xffff
push ebx
push ebp
push esi
mov esi, dword [esp + 0x64]
push edi
sub eax, 0
mov edi, esi
je 0x40ea1a
dec eax
je 0x40e9c5
dec eax
jne 0x40eab2
mov eax, dword [esp + 0x74]
mov ebx, edx
mov dword [eax], esi
mov al, byte [esi + ebx]
cmp al, 4
jne 0x40e940
mov eax, 0xfe
mov edi, 0xfb
mov word [esp + 0x12], ax
mov word [esp + 0x18], ax
mov eax, 0x80
mov word [esp + 0x16], di
mov word [esp + 0x1a], ax
mov word [esp + 0x26], di
mov word [esp + 0x38], ax
mov word [esp + 0x5e], ax
mov eax, dword [esp + 0x6c]
lea edi, [esi + 1]
mov edx, 0xfd
mov ecx, 0xfa
cmp edi, eax
mov word [esp + 0x10], 0xdc
mov word [esp + 0x14], 0xe2
mov word [esp + 0x1c], 0xdb
mov word [esp + 0x1e], dx
mov word [esp + 0x20], 0xe1
mov word [esp + 0x22], cx
mov word [esp + 0x24], cx
mov word [esp + 0x28], dx
mov word [esp + 0x2a], 0xfc
mov word [esp + 0x2c], 0xf3
mov word [esp + 0x2e], 0xe9
mov word [esp + 0x30], 0xea
mov word [esp + 0x32], 0xda
mov word [esp + 0x34], 0xee
mov word [esp + 0x36], 0xed
mov word [esp + 0x3c], 0xdd
mov word [esp + 0x3e], 0xde
mov word [esp + 0x40], 0xdf
mov word [esp + 0x42], 0xe0
mov word [esp + 0x44], 0xe3
mov word [esp + 0x46], 0xe4
mov word [esp + 0x48], 0xe8
mov word [esp + 0x4a], 0xeb
mov word [esp + 0x4c], 0xec
mov word [esp + 0x4e], 0xef
mov word [esp + 0x50], 0xf0
mov word [esp + 0x52], 0xf1
mov word [esp + 0x54], 0xf2
mov word [esp + 0x56], 0xf5
mov word [esp + 0x58], 0xf6
mov word [esp + 0x5a], pe_nt_image_headers32
mov word [esp + 0x5c], 0xf9
jge 0x40e84e
cmp byte [edi + ebx - 1], 4
jne 0x40e84e
mov dl, byte [esi + ebx + 1]
lea ecx, [esp + 0x10]
push ecx
push edx
call fcn.0040eb70
add esp, 8
test eax, eax
je 0x40e84e
mov eax, dword [esp + 0x6c]
add edi, 2
add esi, 2
cmp edi, eax
jl 0x40e823
mov edx, dword [esp + 0x74]
mov ecx, dword [esp + 0x6c]
lea eax, [esi + 1]
cmp eax, ecx
mov dword [edx], esi
jge 0x40e877
cmp byte [eax + ebx - 1], 4
jne 0x40e877
cmp byte [esi + ebx + 1], 0x20
je 0x40e877
add eax, 2
add esi, 2
cmp eax, ecx
jl 0x40e85f
mov edi, dword [esp + 0x7c]
mov dword [edi], esi
mov eax, dword [edx]
cmp esi, eax
jle 0x40e8b5
mov eax, dword [edi]
add eax, ebx
cmp byte [eax - 2], 4
jne 0x40e8b5
mov dl, byte [eax - 1]
lea ecx, [esp + 0x1c]
push ecx
push edx
call fcn.0040eb70
add esp, 8
test eax, eax
je 0x40e8b5
mov ebp, dword [edi]
mov ecx, dword [esp + 0x74]
add ebp, 0xfffffffe
mov dword [edi], ebp
mov edx, dword [ecx]
mov eax, ebp
cmp eax, edx
jg 0x40e883
mov edx, dword [esp + 0x74]
mov bp, word [edx]
mov edx, dword [edi]
mov eax, ebp
and eax, 0xffff
lea ecx, [eax + 1]
cmp ecx, edx
jge 0x40e8f5
mov al, byte [eax + ebx + 1]
lea edx, [esp + 0x3c]
push edx
push eax
call fcn.0040eb70
add esp, 8
test eax, eax
je 0x40e8f5
mov edx, dword [edi]
add ebp, 2
mov eax, ebp
and eax, 0xffff
lea ecx, [eax + 1]
cmp ecx, edx
jl 0x40e8cc
mov eax, dword [edi]
and ebp, 0xffff
inc ebp
cmp ebp, eax
jl 0x40e90a
mov edx, dword [esp + 0x74]
mov eax, dword [edx]
mov dword [edi], eax
mov ecx, dword [esp + 0x6c]
lea eax, [esi + 1]
cmp eax, ecx
jge 0x40e92d
cmp byte [eax + ebx - 1], 4
jne 0x40e92d
cmp byte [esi + ebx + 1], 0x20
jne 0x40e92d
add eax, 2
add esi, 2
cmp eax, ecx
jl 0x40e915
mov ecx, dword [esp + 0x78]
pop edi
mov eax, 0x7f85
mov dword [ecx], esi
pop esi
pop ebp
pop ebx
add esp, 0x50
ret
cmp al, 0x20
jge 0x40e95e
mov edx, dword [esp + 0x78]
mov eax, dword [esp + 0x7c]
inc esi
pop edi
mov dword [edx], esi
mov dword [eax], esi
pop esi
pop ebp
mov eax, 0x7f02
pop ebx
add esp, 0x50
ret
cmp al, 0x80
jae 0x40eab2
mov edi, dword [esp + 0x6c]
push edi
push esi
push ebx
call fcn.0040e690
add esp, 0xc
test eax, eax
jne 0x40e98d
cmp esi, edi
jge 0x40e98d
mov al, byte [esi + ebx]
cmp al, 0x20
jle 0x40e98d
cmp al, 0x80
jae 0x40e98d
inc esi
cmp esi, edi
jl 0x40e97d
mov ecx, dword [esp + 0x7c]
push edi
push esi
push ebx
mov dword [ecx], esi
call fcn.0040e690
add esp, 0xc
test eax, eax
je 0x40e9b2
inc esi
push edi
push esi
push ebx
call fcn.0040e690
add esp, 0xc
test eax, eax
jne 0x40e9a2
mov edx, dword [esp + 0x78]
pop edi
mov eax, 0x7f80
mov dword [edx], esi
pop esi
pop ebp
pop ebx
add esp, 0x50
ret
test esi, esi
je 0x40ea14
mov cl, 8
cmp esi, 2
jle 0x40e9e2
cmp byte [esi + edx - 3], cl
jne 0x40e9e2
cmp byte [esi + edx - 1], 0x20
je 0x40ea14
sub esi, 2
jmp 0x40ea10
cmp esi, 1
jle 0x40ea03
mov al, byte [esi + edx - 2]
cmp al, 4
je 0x40e9f7
cmp al, 5
je 0x40e9f7
cmp al, 7
jne 0x40ea03
cmp byte [esi + edx - 1], 0x20
je 0x40ea14
sub esi, 2
jmp 0x40ea10
mov al, byte [esi + edx - 1]
cmp al, 0x20
jbe 0x40ea14
cmp al, 0xa0
je 0x40ea14
dec esi
test esi, esi
jne 0x40e9cb
mov eax, dword [esp + 0x74]
mov dword [eax], esi
mov ebp, dword [esp + 0x6c]
cmp esi, ebp
jge 0x40ea69
mov al, byte [esi + edx]
movsx ecx, al
add ecx, 0xfffffffc
cmp ecx, 4
ja case.0x40ea30.6
jmp dword [ecx*4 + 0x40eac0]
lea ecx, [ebp - 3]
cmp esi, ecx
jg 0x40ea69
add esi, 3
jmp 0x40ea5e
cmp esi, ebp
je 0x40ea69
cmp byte [esi + edx + 1], 0x20
je 0x40ea69
add esi, 2
jmp 0x40ea5e
cmp al, 0x20
jb 0x40ea64
je 0x40ea69
cmp al, 0xa0
je 0x40ea69
inc esi
cmp esi, ebp
jl 0x40ea22
jmp 0x40ea69
cmp edi, esi
jne 0x40ea69
inc esi
mov eax, dword [esp + 0x7c]
cmp esi, ebp
mov dword [eax], esi
jge case.0x40ea8c.94
lea edi, [esi + 1]
movsx eax, byte [esi + edx]
add eax, 0x60
cmp eax, 0x80
ja case.0x40ea8c.94
xor ecx, ecx
mov cl, byte [eax + 0x40eae0]
jmp dword [ecx*4 + 0x40ead4]
inc esi
inc edi
jmp 0x40eaa8
cmp edi, ebp
jge case.0x40ea8c.94
cmp byte [esi + edx + 1], 0x20
jne case.0x40ea8c.94
add esi, 2
add edi, 2
cmp esi, ebp
jl 0x40ea76
mov edx, dword [esp + 0x78]
mov dword [edx], esi
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x50
ret