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

Disassembly:
sub esp, 0x294
mov eax, dword [0xde8598]
xor eax, esp
mov dword [esp + 0x290], eax
mov eax, dword [esp + 0x298]
mov ecx, dword [esp + 0x29c]
push ebx
push ebp
push esi
push edi
push eax
lea edx, [esp + 0x28]
push 0x4eeb68
mov ebp, 1
mov ebx, 0x4eeb40
push edx
mov dword [esp + 0x24], eax
mov dword [esp + 0x40], ecx
mov dword [esp + 0x2c], 0
mov dword [esp + 0x1c], 2
mov dword [esp + 0x30], ebp
mov dword [esp + 0x34], 0x4eeb34
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], 0x34
call fcn.0040c600
mov esi, dword [0x4eb37c]
mov edi, dword [0x4eb370]
add esp, 0xc
mov dword [esp + 0x14], 0xffffffff
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x18]
push eax
push ecx
lea edx, [esp + 0x28]
push edx
call dword [0x4eb378]
push 0x34
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x7c]
push 0
push eax
mov dword [esp + 0x80], 0
call fcn.004cab9e
mov edx, dword [esp + 0x30]
lea ecx, [esp + 0x80]
push ecx
push edx
call dword [0x4eb374]
add esp, 0x20
test eax, eax
jne 0x40836f
push 0x1ff
push eax
mov byte [esp + 0xa8], al
lea eax, [esp + 0xa9]
push eax
call fcn.004cab9e
lea ecx, [esp + 0xa4]
push ecx
call edi
mov edx, dword [eax]
mov ecx, dword [eax + 4]
push edx
mov edx, dword [eax + 8]
push ecx
mov ecx, dword [eax + 0xc]
push edx
mov edx, dword [eax + 0x10]
mov eax, dword [eax + 0x14]
push ecx
add edx, ebp
push edx
add eax, 0x76c
push eax
lea ecx, [esp + 0xc8]
push 0x4eeb14
push ecx
call esi
lea edx, [esp + 0xd0]
push edx
lea eax, [esp + 0x58]
push 0x4eeb04
push eax
mov dword [esp + 0x60], ebp
mov dword [esp + 0x64], 0x4eeb34
mov dword [esp + 0x68], ebx
mov dword [esp + 0x6c], 0x45
call fcn.0040c600
lea ecx, [esp + 0xcc]
push ecx
call edi
mov edx, dword [eax]
mov ecx, dword [eax + 4]
add esp, 0x40
push edx
mov edx, dword [eax + 8]
push ecx
mov ecx, dword [eax + 0xc]
push edx
mov edx, dword [eax + 0x10]
mov eax, dword [eax + 0x14]
push ecx
add edx, ebp
push edx
add eax, 0x76c
push eax
lea ecx, [esp + 0xb8]
push 0x4eeb14
push ecx
call esi
lea edx, [esp + 0xc0]
push edx
lea eax, [esp + 0x6c]
push 0x4eeaf4
push eax
mov dword [esp + 0x74], ebp
mov dword [esp + 0x78], 0x4eeb34
mov dword [esp + 0x7c], ebx
mov dword [esp + 0x80], 0x4d
call fcn.0040c600
lea ecx, [esp + 0xb4]
push ecx
call edi
mov edx, dword [eax]
mov ecx, dword [eax + 4]
push edx
mov edx, dword [eax + 8]
push ecx
mov ecx, dword [eax + 0xc]
push edx
mov edx, dword [eax + 0x10]
push ecx
mov eax, dword [eax + 0x14]
add edx, ebp
push edx
add eax, 0x76c
push eax
lea ecx, [esp + 0xe8]
push 0x4eeb14
push ecx
call esi
add esp, 0x50
lea edx, [esp + 0xa0]
push edx
lea eax, [esp + 0x5c]
push 0x4eeae4
push eax
mov dword [esp + 0x64], ebp
mov dword [esp + 0x68], 0x4eeb34
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x70], 0x55
call fcn.0040c600
add esp, 0xc
cmp dword [esp + 0x1c], 0
jne 0x40837e
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x4083db
cmp dword [esp + 0x10], ebp
jle 0x40838f
push 0x9c40
call dword [0x4eb22c]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x14]
push ecx
push edx
lea eax, [esp + 0x40]
push 0x4eeabc
push eax
mov dword [esp + 0x48], ebp
mov dword [esp + 0x4c], 0x4eeb34
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], 0x5f
call fcn.0040c600
mov eax, dword [esp + 0x24]
sub dword [esp + 0x20], ebp
add eax, ebp
add esp, 0x10
cmp eax, ebp
mov dword [esp + 0x14], eax
jl 0x4081c7
xor eax, eax
mov ecx, dword [esp + 0x2a0]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004cab76
add esp, 0x294
ret