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

Disassembly:
push 0xffffffffffffffff
push 0x45d466
mov eax, dword fs:[0]
push eax
sub esp, 0x4f0
mov eax, dword [0x478354]
xor eax, esp
mov dword [esp + 0x4e8], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x478354]
xor eax, esp
push eax
lea eax, [esp + 0x504]
mov dword fs:[0], eax
mov eax, dword [esp + 0x514]
push edx
xor ebx, ebx
push eax
mov dword [esp + 0x24], ecx
mov byte [esp + 0x1f], bl
call fcn.0042ecd0
mov ebp, eax
add esp, 8
cmp ebp, ebx
je 0x40efa8
push 0x22c
lea eax, [esp + 0xa4]
push ebx
push eax
call fcn.0043e300
xor eax, eax
add esp, 0xc
cmp dword [ebp], 1
mov dword [esp + 0x9c], eax
mov word [esp + 0xa0], bx
mov dword [esp + 0x2c8], ebx
je 0x40ecce
push ebp
mov dword [0x47de8c], 0x80000
call fcn.0042ee20
add esp, 4
mov al, bl
jmp 0x40efaa
mov esi, dword [ebp + 4]
mov edi, dword [esi]
or ecx, 0xffffffff
cmp dword [edi + 4], ecx
jg 0x40ece2
mov ecx, 0x10000
jmp 0x40ed47
cmp dword [esi + 4], ecx
je 0x40ecef
call fcn.0042e510
or ecx, 0xffffffff
mov dword [esi + 4], ecx
mov ecx, dword [esi]
mov eax, dword [ecx + 4]
mov dword [esp + 0x9c], eax
mov word [esp + 0xa0], bx
mov dword [esp + 0x2a8], ebx
mov dword [esp + 0x2ac], ebx
mov dword [esp + 0x2b0], ebx
mov dword [esp + 0x2b4], ebx
mov dword [esp + 0x2b8], ebx
mov dword [esp + 0x2bc], ebx
mov dword [esp + 0x2c0], ebx
mov dword [esp + 0x2c4], ebx
mov dword [esp + 0x2c8], ebx
xor ecx, ecx
cmp ecx, ebx
mov dword [0x47de8c], ecx
jne 0x40ef74
cmp eax, ebx
mov byte [esp + 0x17], 1
mov dword [esp + 0x20], eax
mov dword [esp + 0x18], ebx
jle 0x40ef74
lea ebx, [ebx]
push 0x22c
lea edx, [esp + 0x2d4]
push ebx
push edx
call fcn.0043e300
add esp, 0xc
cmp dword [ebp], 1
mov dword [esp + 0x2cc], ebx
mov word [esp + 0x2d0], bx
mov dword [esp + 0x4f8], ebx
jne 0x40ef66
mov edx, dword [esp + 0x18]
mov eax, dword [ebp + 4]
lea ecx, [esp + 0x2cc]
push ecx
push edx
push eax
call fcn.0042e640
cmp eax, ebx
mov dword [0x47de8c], eax
jne 0x40ef70
mov al, byte [esp + 0x4d8]
test al, 0x10
je 0x40ee5b
mov dword [esp + 0x78], 7
mov dword [esp + 0x74], ebx
mov word [esp + 0x64], bx
mov dword [esp + 0x98], 0xf
mov dword [esp + 0x94], ebx
mov byte [esp + 0x84], bl
mov dword [esp + 0x50c], ebx
mov eax, dword [esp + 0x4d8]
mov dword [esp + 0x7c], eax
lea eax, [esp + 0x2d0]
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40ee20
sub eax, edx
sar eax, 1
push eax
lea ecx, [esp + 0x2d4]
push ecx
lea esi, [esp + 0x68]
call fcn.0040c4f0
mov edi, esi
call fcn.0040ebb0
mov edx, esi
mov esi, dword [esp + 0x1c]
push edx
call fcn.0040f630
mov esi, edi
jmp 0x40ef32
test al, 0x20
je 0x40ef70
mov dword [esp + 0x3c], 7
mov dword [esp + 0x38], ebx
mov word [esp + 0x28], bx
mov dword [esp + 0x5c], 0xf
mov dword [esp + 0x58], ebx
mov byte [esp + 0x48], bl
mov dword [esp + 0x50c], 1
mov eax, dword [esp + 0x4d8]
mov dword [esp + 0x40], eax
lea eax, [esp + 0x2d0]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40eea4
sub eax, edx
sar eax, 1
push eax
lea ecx, [esp + 0x2d4]
push ecx
lea esi, [esp + 0x2c]
call fcn.0040c4f0
mov edi, esi
call fcn.0040ebb0
mov eax, dword [esp + 0x4f8]
cmp eax, ebx
jle 0x40ef20
mov ecx, dword [esp + 0x58]
cmp eax, ecx
ja 0x40eeed
push 0xffffffffffffffff
push eax
lea ecx, [esp + 0x4c]
call fcn.00406600
jmp 0x40eef9
push ebx
sub eax, ecx
lea edi, [esp + 0x48]
call fcn.00405f30
cmp dword [esp + 0x5c], 0x10
mov eax, dword [esp + 0x48]
jae 0x40ef08
lea eax, [esp + 0x48]
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x58]
push eax
push edx
mov eax, ebp
call fcn.0042ede0
add esp, 8
cmp eax, ebx
jne 0x40ef83
mov esi, dword [esp + 0x1c]
lea eax, [esp + 0x24]
push eax
call fcn.0040f630
lea esi, [esp + 0x24]
mov dword [esp + 0x50c], 0xffffffff
call fcn.00408450
mov eax, dword [esp + 0x18]
add eax, 1
cmp eax, dword [esp + 0x20]
mov dword [esp + 0x18], eax
jl 0x40ed70
push ebp
call fcn.0042ee20
mov al, byte [esp + 0x1b]
add esp, 4
jmp 0x40efaa
mov dword [0x47de8c], 0x80000
mov byte [esp + 0x17], bl
push ebp
call fcn.0042ee20
mov al, byte [esp + 0x1b]
add esp, 4
jmp 0x40efaa
lea esi, [esp + 0x24]
mov byte [esp + 0x17], bl
mov dword [esp + 0x50c], 0xffffffff
call fcn.00408450
push ebp
call fcn.0042ee20
add esp, 4
mov al, bl
jmp 0x40efaa
mov al, bl
mov ecx, dword [esp + 0x504]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x4e8]
xor ecx, esp
call fcn.0043b82a
add esp, 0x4fc
ret