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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x434968
mov eax, dword fs:[0]
push eax
sub esp, 0x80
mov eax, dword [0x43f4f8]
xor eax, esp
mov dword [esp + 0x78], eax
push ebx
push esi
push edi
mov eax, dword [0x43f4f8]
xor eax, esp
push eax
lea eax, [esp + 0x90]
mov dword fs:[0], eax
mov dl, byte [ebp + 0x1c]
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x18]
mov edi, dword [ebp + 8]
mov esi, dword [ebp + 0x20]
mov ebx, dword [ebp + 0x30]
mov byte [esp + 0x38], dl
mov edx, dword [ebp + 0x28]
mov dword [esp + 0x4c], eax
mov eax, dword [ebp + 0x24]
mov dword [esp + 0x30], edx
mov dword [esp + 0x20], eax
mov eax, dword [ebp + 0x2c]
lea edx, [esp + 0x44]
push edx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x18], eax
call fcn.00407d00
push eax
mov dword [esp + 0x9c], 0
call fcn.0040b050
mov dword [esp + 0x40], eax
mov dword [esp + 0x9c], 0xffffffff
mov eax, dword [esp + 0x48]
add esp, 4
test eax, eax
je 0x40a330
push 0
lea ecx, [esp + 0x20]
mov dword [esp + 0x1c], eax
call fcn.0040be78
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx + 4]
test eax, eax
je 0x40a308
cmp eax, 0xffffffff
jae 0x40a308
dec eax
mov dword [ecx + 4], eax
mov eax, dword [ecx + 4]
neg eax
sbb eax, eax
not eax
and eax, ecx
lea ecx, [esp + 0x1c]
mov dword [esp + 0x18], eax
call fcn.0040bea0
mov ecx, dword [esp + 0x18]
test ecx, ecx
je 0x40a330
mov eax, dword [ecx]
mov edx, dword [eax]
push 1
call edx
mov ecx, dword [esp + 0x3c]
lea eax, [esp + 0x6c]
push eax
call fcn.00406170
mov dword [esp + 0x98], 1
mov ecx, dword [esp + 0x3c]
mov edx, dword [ecx]
mov eax, dword [edx + 8]
call eax
xor ecx, ecx
mov byte [esp + 0x18], al
mov dword [esp + 0x64], 0xf
mov dword [esp + 0x60], ecx
mov byte [esp + 0x50], cl
mov byte [esp + 0x98], 2
mov al, byte [esi]
cmp al, 0x2b
je 0x40a380
mov dword [esp + 0x1c], ecx
cmp al, 0x2d
jne 0x40a388
mov dword [esp + 0x1c], 1
call fcn.0040f60d
mov ecx, dword [eax]
mov dl, byte [ecx]
push ebx
push 0x65
push esi
mov byte [esp + 0x30], dl
mov word [esp + 0x31], 0x65
call fcn.0040f560
add esp, 0xc
mov dword [esp + 0x28], eax
movsx eax, byte [esp + 0x24]
push ebx
push eax
push esi
call fcn.0040f560
add esp, 0xc
mov dword [esp + 0x10], eax
test eax, eax
jne 0x40a3c8
mov dword [esp + 0x14], eax
mov ecx, dword [esp + 0x80]
mov edx, dword [esp + 0x6c]
mov eax, edx
cmp ecx, 0x10
jae 0x40a3de
lea eax, [esp + 0x6c]
cmp byte [eax], 0x7f
je 0x40a529
mov eax, edx
cmp ecx, 0x10
jae 0x40a3f2
lea eax, [esp + 0x6c]
cmp byte [eax], 0
jle 0x40a529
push ebx
push esi
lea ecx, [esp + 0x58]
call fcn.0040ba30
mov ebx, dword [esp + 0x28]
test ebx, ebx
jne 0x40a420
mov ecx, dword [esp + 0x14]
push 0x30
push ecx
lea ecx, [esp + 0x58]
call fcn.00405040
jmp 0x40a452
cmp dword [esp + 0x10], 0
jne 0x40a43f
mov edx, dword [esp + 0x20]
push 0x30
push edx
lea ecx, [esp + 0x58]
call fcn.00405040
mov dword [esp + 0x20], 0
mov eax, dword [esp + 0x14]
push 0x30
push eax
sub ebx, esi
push ebx
lea ecx, [esp + 0x5c]
call fcn.0040b840
mov ebx, dword [esp + 0x10]
push 0x30
test ebx, ebx
jne 0x40a46c
mov ecx, dword [esp + 0x24]
push ecx
lea ecx, [esp + 0x58]
call fcn.00405040
jmp 0x40a499
mov edx, dword [esp + 0x34]
sub ebx, esi
push edx
lea eax, [ebx + 1]
push eax
lea ecx, [esp + 0x5c]
call fcn.0040b840
mov ecx, dword [esp + 0x20]
push 0x30
push ecx
push ebx
lea ecx, [esp + 0x5c]
call fcn.0040b840
mov dword [esp + 0x30], 0
mov ebx, dword [esp + 0x6c]
mov eax, 0x10
mov dword [esp + 0x20], 0
cmp dword [esp + 0x80], eax
jae 0x40a4b7
lea ebx, [esp + 0x6c]
cmp dword [esp + 0x64], eax
mov eax, dword [esp + 0x50]
jae 0x40a4c5
lea eax, [esp + 0x50]
lea edx, [esp + 0x24]
push edx
push eax
call fcn.0040f660
mov esi, eax
mov al, byte [ebx]
add esp, 8
cmp al, 0x7f
je 0x40a50e
jmp 0x40a4e0
test al, al
jle 0x40a50e
mov ecx, esi
sub ecx, dword [esp + 0x1c]
movsx eax, al
cmp eax, ecx
jae 0x40a50e
push 0
sub esi, eax
push 1
push esi
lea ecx, [esp + 0x5c]
call fcn.0040b840
cmp byte [ebx + 1], 0
jle 0x40a508
inc ebx
mov al, byte [ebx]
cmp al, 0x7f
jne 0x40a4e0
cmp dword [esp + 0x64], 0x10
mov esi, dword [esp + 0x50]
jae 0x40a51d
lea esi, [esp + 0x50]
mov ebx, dword [esp + 0x60]
mov dword [esp + 0x14], 0
mov edx, dword [esp + 0x14]
lea eax, [ebx + edx]
add eax, dword [esp + 0x30]
mov edx, dword [esp + 0x34]
add eax, dword [esp + 0x20]
cmp dword [edx + 0x24], 0
mov ecx, dword [edx + 0x20]
jl 0x40a557
jg 0x40a54b
test ecx, ecx
je 0x40a557
cmp ecx, eax
jbe 0x40a557
sub ecx, eax
mov dword [esp + 0x10], ecx
jmp 0x40a55f
mov dword [esp + 0x10], 0
mov eax, dword [edx + 0x14]
and eax, 0x1c0
cmp eax, 0x40
je 0x40a5d3
cmp eax, 0x100
jne 0x40a5a0
cmp dword [esp + 0x1c], 0
jbe 0x40a5a0
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
push 1
push esi
push ecx
push edx
lea eax, [esp + 0x38]
push eax
push edi
call fcn.0040abc0
mov ecx, dword [eax]
mov dword [ebp + 0x10], ecx
mov edx, dword [eax + 4]
add esp, 0x18
inc esi
mov dword [ebp + 0x14], edx
dec ebx
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x38]
mov edx, dword [ebp + 0x14]
push eax
mov eax, dword [ebp + 0x10]
push ecx
push edx
push eax
lea ecx, [esp + 0x38]
push ecx
push edi
call fcn.0040ac30
mov edx, dword [eax]
mov dword [ebp + 0x10], edx
mov eax, dword [eax + 4]
mov dword [esp + 0x28], 0
mov dword [ebp + 0x14], eax
add esp, 0x18
movsx ecx, byte [esp + 0x24]
push ebx
push ecx
push esi
call fcn.0040f560
add esp, 0xc
test eax, eax
je 0x40a6a5
mov edx, dword [esp + 0x18]
mov ecx, dword [ebp + 0x10]
sub eax, esi
push edx
inc eax
mov dword [esp + 0x20], eax
dec eax
push eax
mov eax, dword [ebp + 0x14]
push esi
push eax
push ecx
lea edx, [esp + 0x3c]
push edx
push edi
call fcn.0040adf0
mov ecx, dword [eax]
mov dword [ebp + 0x10], ecx
mov edx, dword [eax + 4]
mov ecx, dword [esp + 0x3c]
add esp, 0x1c
push ecx
mov dword [ebp + 0x14], edx
mov edx, dword [eax + 4]
mov eax, dword [eax]
push 0x30
push edx
push eax
lea ecx, [esp + 0x38]
push ecx
push edi
call fcn.0040ac30
mov edx, dword [eax]
mov ecx, dword [esp + 0x54]
mov dword [ebp + 0x10], edx
mov eax, dword [eax + 4]
mov dword [ebp + 0x14], eax
mov edx, dword [ecx]
mov eax, dword [edx + 4]
add esp, 0x18
call eax
mov edx, dword [ebp + 0x14]
push 1
mov byte [esp + 0x2c], al
mov ecx, dword [esp + 0x2c]
mov eax, dword [ebp + 0x10]
push ecx
push edx
push eax
lea ecx, [esp + 0x4c]
push ecx
push edi
call fcn.0040ac30
mov edx, dword [eax]
mov dword [ebp + 0x10], edx
mov ecx, dword [eax + 4]
mov edx, dword [esp + 0x48]
push edx
mov dword [ebp + 0x14], ecx
mov ecx, dword [eax + 4]
mov edx, dword [eax]
push 0x30
push ecx
push edx
lea eax, [esp + 0x50]
push eax
push edi
call fcn.0040ac30
mov ecx, dword [eax]
mov dword [ebp + 0x10], ecx
mov edx, dword [eax + 4]
mov eax, dword [esp + 0x4c]
add esp, 0x30
add esi, eax
mov dword [ebp + 0x14], edx
sub ebx, eax
push ebx
push 0x65
push esi
call fcn.0040f560
add esp, 0xc
test eax, eax
je 0x40a757
mov ecx, dword [esp + 0x18]
mov edx, dword [ebp + 0x14]
sub eax, esi
push ecx
inc eax
mov dword [esp + 0x2c], eax
dec eax
push eax
mov eax, dword [ebp + 0x10]
push esi
push edx
push eax
lea ecx, [esp + 0x58]
push ecx
push edi
call fcn.0040adf0
mov edx, dword [eax]
add esp, 0x1c
mov dword [ebp + 0x10], edx
mov ecx, dword [eax + 4]
mov edx, dword [esp + 0x14]
push edx
mov dword [ebp + 0x14], ecx
mov ecx, dword [eax + 4]
mov edx, dword [eax]
push 0x30
push ecx
push edx
lea eax, [esp + 0x54]
push eax
push edi
call fcn.0040ac30
mov ecx, dword [eax]
mov dword [ebp + 0x10], ecx
mov ecx, dword [esp + 0x4c]
mov edx, dword [eax + 4]
add esp, 0x18
test byte [ecx + 0x14], 4
mov dword [ebp + 0x14], edx
mov dword [esp + 0x14], 0
mov ecx, 0x439e98
jne 0x40a72c
mov ecx, 0x439e9c
mov edx, dword [eax + 4]
mov eax, dword [eax]
push 1
push ecx
push edx
push eax
lea ecx, [esp + 0x54]
push ecx
push edi
call fcn.0040abc0
mov edx, dword [eax]
mov dword [ebp + 0x10], edx
mov eax, dword [eax + 4]
mov dword [ebp + 0x14], eax
mov eax, dword [esp + 0x40]
add esp, 0x18
add esi, eax
sub ebx, eax
mov ecx, dword [esp + 0x18]
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp + 0x10]
push ecx
push ebx
push esi
push edx
push eax
lea ecx, [esp + 0x3c]
push ecx
push edi
call fcn.0040adf0
mov edx, dword [eax]
add esp, 0x1c
mov dword [ebp + 0x10], edx
mov ecx, dword [eax + 4]
mov edx, dword [esp + 0x14]
push edx
mov dword [ebp + 0x14], ecx
mov ecx, dword [eax + 4]
mov edx, dword [eax]
push 0x30
push ecx
push edx
lea eax, [esp + 0x38]
push eax
push edi
call fcn.0040ac30
mov ecx, dword [eax]
mov edx, dword [esp + 0x4c]
mov esi, dword [esp + 0x64]
mov dword [ebp + 0x10], ecx
mov eax, dword [eax + 4]
xor ebx, ebx
mov dword [edx + 0x20], ebx
mov dword [edx + 0x24], ebx
mov edx, dword [esp + 0x28]
push edx
mov edx, dword [esp + 0x54]
push edx
push eax
push ecx
push esi
push edi
mov dword [ebp + 0x14], eax
call fcn.0040ac30
mov edi, 0x10
add esp, 0x30
cmp dword [esp + 0x64], edi
jb 0x40a7e1
mov eax, dword [esp + 0x50]
push eax
call fcn.0040ead6
add esp, 4
mov dword [esp + 0x64], 0xf
mov dword [esp + 0x60], ebx
mov byte [esp + 0x50], bl
cmp dword [esp + 0x80], edi
jb 0x40a807
mov ecx, dword [esp + 0x6c]
push ecx
call fcn.0040ead6
add esp, 4
mov eax, esi
mov ecx, dword [esp + 0x90]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x78]
xor ecx, esp
call fcn.0040eae1
mov esp, ebp
pop ebp
ret