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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x40ae4c
sub esp, 0x50
cmp dword [0xcf49a8], 2
je 0x40ae34
mov eax, dword [esp + 0x54]
test eax, eax
je 0x40adda
mov ecx, dword [0xcf4d6c]
test ecx, ecx
je 0x40a791
mov ecx, dword [esp + 0x58]
test ecx, ecx
je 0x40a78a
movzx ecx, byte [ecx + 0xd]
mov dword [esp], eax
mov dword [esp + 4], ecx
lea eax, [0xcf6ae0]
mov dword [esp + 8], eax
call fcn.0040b330
mov eax, dword [esp + 0xc]
mov dword [esp + 0x60], eax
add esp, 0x50
ret
mov ecx, 0x10
jmp 0x40a768
mov ecx, dword [0xcf499c]
test ecx, ecx
je 0x40add3
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
mov edx, dword [ecx + 0x18]
mov edx, dword [edx + 0x4c]
test edx, edx
je 0x40adcc
mov ecx, dword [edx + 0xd0]
sub ecx, eax
mov eax, dword [edx + 0xd4]
mov dword [edx + 0xd0], ecx
sbb eax, 0
mov dword [edx + 0xd4], eax
test ecx, ecx
setb cl
test eax, eax
setl al
sete bl
and ebx, ecx
or eax, ebx
test al, al
jne 0x40adb7
mov eax, dword fs:[0x14]
mov eax, dword [eax]
mov ecx, dword [eax + 0x18]
nop
inc dword [ecx + 0x78]
mov ecx, dword [eax + 0x18]
test byte [eax], al
mov eax, dword [ecx + 0x68]
test eax, eax
jne 0x40ae1c
mov eax, dword fs:[0x14]
mov eax, dword [eax]
cmp dword [ecx + 0x2c], eax
je 0x40ae04
mov dword [ecx + 0x68], 1
mov eax, dword fs:[0x14]
mov eax, dword [eax]
mov eax, dword [eax + 0x18]
mov ebx, dword [esp + 0x54]
nop
mov eax, dword [eax + 0xbc]
mov ebp, dword [esp + 0x58]
test ebp, ebp
je 0x40adad
movzx esi, byte [ebp + 0xf]
xchg esi, eax
test al, 0x80
xchg esi, eax
xchg esi, ebx
setne bl
xchg esi, ebx
mov dword [esp + 0x30], ecx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x38], eax
xchg esi, eax
mov byte [esp + 0x17], al
xchg esi, eax
mov dword [esp + 0x3c], edx
cmp ebx, 0x8000
ja 0x40ad1e
xchg esi, eax
test al, al
xchg esi, eax
je 0x40ac0d
cmp ebx, 0x10
jae 0x40ac0d
mov edi, dword [eax + 0xc]
test ebx, 7
jne 0x40abe3
nop
add edi, 7
and edi, 0xfffffff8
lea edx, [edi + ebx]
cmp edx, 0x10
ja 0x40a904
mov ebx, dword [eax + 8]
test ebx, ebx
je 0x40a904
add ebx, edi
mov dword [eax + 0xc], edx
inc dword [eax + 0x10]
mov dword [ecx + 0x68], 0
nop
mov eax, dword fs:[0x14]
mov eax, dword [eax]
mov edx, dword [ecx + 0x78]
lea ebp, [edx - 1]
mov dword [ecx + 0x78], ebp
cmp edx, 1
jne 0x40a8fc
movzx ecx, byte [eax + 0x65]
test cl, cl
je 0x40a8fc
mov dword [eax + 8], 0xfffffade
mov dword [esp + 0x60], ebx
add esp, 0x50
ret
mov ecx, dword [eax + 0x28]
mov dword [esp], ecx
call fcn.0040a3f0
mov eax, dword [esp + 4]
test eax, eax
je 0x40abc4
xor ecx, ecx
mov dword [eax], 0
mov dword [eax + 4], 0
mov dword [eax + 8], 0
mov dword [eax + 0xc], 0
mov edx, dword [esp + 0x38]
mov ebx, dword [edx + 0xc]
cmp dword [esp + 0x54], ebx
jae 0x40abb2
mov ebx, eax
mov dword [edx + 8], eax
mov eax, dword [esp + 0x54]
mov dword [edx + 0xc], eax
mov dword [esp + 0x54], 0x10
mov dword [esp + 0x24], ebx
mov byte [esp + 0x16], cl
movzx eax, byte [esp + 0x17]
test al, al
je 0x40ab48
xor eax, eax
mov ebp, dword [esp + 0x1c]
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x18], eax
call fcn.0044fdc0
mov eax, dword [0xcf49a8]
test eax, eax
jne 0x40ab27
mov eax, dword [esp + 0x30]
mov dword [eax + 0x68], 0
nop
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
mov edx, dword [eax + 0x78]
lea ebx, [edx - 1]
mov dword [eax + 0x78], ebx
cmp edx, 1
jne 0x40a9c9
movzx eax, byte [ecx + 0x65]
test al, al
je 0x40a9c9
mov dword [ecx + 8], 0xfffffade
mov eax, dword [0xcf4d40]
test eax, eax
jne 0x40ab06
mov eax, dword [0x857138]
test eax, eax
jle 0x40aa00
cmp eax, 1
je 0x40aa97
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x38]
mov edx, dword [ecx]
cmp eax, edx
jge 0x40aa97
sub edx, eax
mov dword [ecx], edx
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x40aa2f
mov ecx, dword [eax + 0xd0]
mov edx, dword [esp + 0x54]
mov ebx, dword [esp + 0x1c]
sub edx, ebx
sub ecx, edx
mov edx, dword [eax + 0xd4]
mov dword [eax + 0xd0], ecx
sbb edx, 0
mov dword [eax + 0xd4], edx
movzx eax, byte [esp + 0x16]
test al, al
jne 0x40aa44
mov eax, dword [esp + 0x24]
mov dword [esp + 0x60], eax
add esp, 0x50
ret
mov dword [esp], 1
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov dword [esp + 0xc], 0
call fcn.00417de0
movzx eax, byte [esp + 0x10]
test al, al
je 0x40aa38
mov dword [esp], 1
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov dword [esp + 0xc], 0
call fcn.00417f20
jmp 0x40aa38
mov eax, dword fs:[0x14]
mov eax, dword [eax]
mov ecx, dword [eax + 0x18]
nop
inc dword [ecx + 0x78]
mov eax, dword [eax + 0x18]
mov dword [esp + 0x34], eax
mov dword [esp], eax
mov ecx, dword [esp + 0x24]
mov dword [esp + 4], ecx
mov edx, dword [esp + 0x54]
mov dword [esp + 8], edx
call fcn.0040b100
nop
mov eax, dword fs:[0x14]
mov eax, dword [eax]
mov ecx, dword [esp + 0x34]
mov edx, dword [ecx + 0x78]
lea ebx, [edx - 1]
mov dword [ecx + 0x78], ebx
cmp edx, 1
jne 0x40aa00
movzx ecx, byte [eax + 0x65]
test cl, cl
je 0x40aa00
mov dword [eax + 8], 0xfffffade
jmp 0x40aa00
mov eax, dword [esp + 0x24]
mov dword [esp], eax
mov ecx, dword [esp + 0x54]
mov dword [esp + 4], ecx
mov ecx, dword [esp + 0x58]
mov dword [esp + 8], ecx
call fcn.00424fa0
jmp 0x40a9d7
mov eax, dword [esp + 0x24]
mov dword [esp], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 8], eax
call fcn.0041e670
jmp 0x40a993
mov eax, dword [esp + 0x58]
cmp dword [0xce09d4], eax
jne 0x40abac
mov ebp, 0x1c
mov dword [esp + 0x1c], ebp
mov dword [esp], ebx
mov edx, dword [esp + 0x54]
mov dword [esp + 4], edx
mov dword [esp + 8], ebp
mov dword [esp + 0xc], eax
call fcn.00412da0
mov eax, dword [esp + 0x58]
mov ecx, dword [eax]
mov edx, dword [esp + 0x1c]
cmp edx, ecx
jbe 0x40aba5
mov ebx, dword [eax + 4]
test ebx, ebx
je 0x40ab9f
mov ebp, edx
sub edx, ecx
lea ecx, [edx + ebx]
mov edx, dword [esp + 0x38]
add dword [edx + 4], ecx
mov eax, ecx
jmp 0x40a978
mov ebp, edx
xor ecx, ecx
jmp 0x40ab91
mov ecx, dword [eax + 4]
mov ebp, edx
jmp 0x40ab91
mov ebp, dword [esp + 0x1c]
jmp 0x40ab59
mov ebx, dword [edx + 8]
test ebx, ebx
je 0x40a949
mov ebx, eax
jmp 0x40a955
mov eax, dword [esp + 0x38]
mov dword [esp], eax
mov byte [esp + 4], 5
call fcn.0040a500
mov eax, dword [esp + 8]
movzx ecx, byte [esp + 0x10]
jmp 0x40a91d
test ebx, 3
jne 0x40abf7
nop
add edi, 3
and edi, 0xfffffffc
jmp 0x40a8b3
test ebx, 1
jne 0x40a8b3
nop
inc edi
and edi, 0xfffffffe
jmp 0x40a8b3
cmp ebx, 0x3f8
ja 0x40acf2
lea edi, [ebx + 7]
shr edi, 3
cmp edi, 0x81
jae 0x40adfd
lea edx, [0x85afe0]
movzx edx, byte [edi + edx]
movzx edi, dl
cmp edi, 0x43
jae 0x40adef
lea ecx, [0x85b1c0]
movzx ecx, word [ecx + edi*2]
mov dword [esp + 0x54], ecx
test byte [eax], al
nop
shl edx, 1
xchg esi, eax
movzx ecx, al
xchg esi, eax
or edx, ecx
movzx ecx, dl
nop
cmp ecx, 0x86
jae 0x40ade8
mov byte [esp + 0x15], dl
mov ecx, dword [eax + ecx*4 + 0x14]
mov dword [esp + 0x28], ecx
mov dword [esp], ecx
call fcn.0040a3f0
mov eax, dword [esp + 4]
test eax, eax
je 0x40acce
mov ecx, dword [esp + 0x28]
xor edx, edx
movzx ebx, byte [esp + 0x5c]
test bl, bl
je 0x40ac9e
movzx ecx, byte [ecx + 0x3c]
test cl, cl
jne 0x40acab
mov ecx, edx
mov ebx, eax
mov edx, dword [esp + 0x38]
jmp 0x40a95d
mov dword [esp + 0x24], eax
mov byte [esp + 0x16], dl
mov dword [esp], eax
mov ecx, dword [esp + 0x54]
mov dword [esp + 4], ecx
call fcn.00450ab0
mov eax, dword [esp + 0x24]
movzx edx, byte [esp + 0x16]
jmp 0x40ac9e
mov eax, dword [esp + 0x38]
mov dword [esp], eax
movzx ecx, byte [esp + 0x15]
mov byte [esp + 4], cl
call fcn.0040a500
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0xc]
movzx edx, byte [esp + 0x10]
jmp 0x40ac8d
lea edi, [ebx - 0x381]
shr edi, 7
cmp edi, 0xf9
jae 0x40adf6
mov dword [esp + 0x20], edi
lea edi, [0x85c200]
mov edx, dword [esp + 0x20]
movzx edx, byte [edx + edi]
jmp 0x40ac35
mov dword [esp + 0x2c], 0
mov dword [esp + 0x40], 0
mov dword [esp + 0x44], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x4c], 0
lea eax, [0x44bef0]
mov dword [esp + 0x40], eax
lea eax, [esp + 0x54]
mov dword [esp + 0x44], eax
movzx eax, byte [esp + 0x5c]
mov byte [esp + 0x48], al
xchg esi, eax
mov byte [esp + 0x49], al
xchg esi, eax
lea eax, [esp + 0x2c]
mov dword [esp + 0x4c], eax
lea eax, [esp + 0x40]
mov dword [esp], eax
call fcn.0044ead0
mov eax, dword [esp + 0x2c]
mov dword [eax + 0x18], 1
mov eax, dword [esp + 0x2c]
mov word [eax + 0x38], 1
mov eax, dword [esp + 0x2c]
mov ebx, dword [eax + 0xc]
nop
mov eax, dword [eax + 0x40]
mov dword [esp + 0x54], eax
mov edx, dword [esp + 0x38]
mov ecx, 1
jmp 0x40a95d
mov esi, 1
jmp 0x40a868
mov dword [esp + 0x3c], edx
mov dword [esp], edx
call fcn.0041bbf0
mov edx, dword [esp + 0x3c]
jmp 0x40a7f0
mov edx, ecx
jmp 0x40a7ba
xor edx, edx
jmp 0x40a7f0
lea eax, [0xcf4a04]
mov dword [esp + 0x60], eax
add esp, 0x50
ret
call fcn.00429960
ud2
call fcn.00429960
ud2
call fcn.00429960
ud2
call fcn.00429960
ud2
lea eax, [0x95a031]
mov dword [esp], eax
mov dword [esp + 4], 0x14
call fcn.0042ac60
ud2
lea eax, [0x957229]
mov dword [esp], eax
mov dword [esp + 4], 0xf
call fcn.0042ac60
ud2
lea eax, [0x96bfcc]
mov dword [esp], eax
mov dword [esp + 4], 0x32
call fcn.0042ac60
ud2
call fcn.0044ebf0
jmp fcn.0040a720