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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x40aa47
sub esp, 0x50
cmp dword [0xc987a0], 2
je 0x40aa30
mov edx, dword [esp + 0x54]
test edx, edx
je 0x40a9c6
mov ebx, dword [0xc98bac]
test ebx, ebx
je 0x40a37f
mov eax, dword [esp + 0x58]
test eax, eax
je 0x40a378
test edx, 7
jne 0x40a353
mov eax, 8
mov dword [esp], edx
mov dword [esp + 4], eax
lea eax, [0xc9a9a0]
mov dword [esp + 8], eax
call fcn.0040af70
mov eax, dword [esp + 0xc]
mov dword [esp + 0x60], eax
add esp, 0x50
ret
test edx, 3
jne 0x40a362
mov eax, 4
jmp 0x40a331
test edx, 1
jne 0x40a371
mov eax, 2
jmp 0x40a331
mov eax, 1
jmp 0x40a331
mov eax, 0x10
jmp 0x40a331
mov ebx, dword [0xc98794]
test ebx, ebx
je 0x40a9bf
mov ebx, dword fs:[0x14]
mov ebx, dword [ebx]
mov ebp, dword [ebx + 0x18]
mov ebp, dword [ebp + 0x4c]
test ebp, ebp
je 0x40a9b8
mov ebx, dword [ebp + 0xd0]
sub ebx, edx
mov edx, dword [ebp + 0xd4]
mov dword [ebp + 0xd0], ebx
sbb edx, 0
mov dword [ebp + 0xd4], edx
test ebx, ebx
setb bl
test edx, edx
sete dl
xchg esi, ebx
setl bl
xchg esi, ebx
and edx, ebx
or esi, edx
xchg esi, eax
test al, al
xchg esi, eax
jne 0x40a9a3
mov edx, dword fs:[0x14]
mov edx, dword [edx]
mov ebx, dword [edx + 0x18]
nop
inc dword [ebx + 0x78]
mov ebx, dword [edx + 0x18]
test byte [edx], al
mov edx, dword [ebx + 0x68]
test edx, edx
jne 0x40aa1a
mov edx, dword fs:[0x14]
mov edx, dword [edx]
cmp dword [ebx + 0x2c], edx
je 0x40aa04
mov dword [ebx + 0x68], 1
mov edx, dword fs:[0x14]
mov edx, dword [edx]
mov edx, dword [edx + 0x18]
mov esi, dword [esp + 0x54]
nop
mov edx, dword [edx + 0xbc]
mov edi, dword [esp + 0x58]
test edi, edi
je 0x40a997
mov eax, ebp
mov ebp, dword [edi + 4]
test ebp, ebp
xchg ebp, ebx
sete bl
xchg ebp, ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x1c], esi
mov dword [esp + 0x34], edx
xchg ebp, eax
mov byte [esp + 0x17], al
xchg ebp, eax
mov dword [esp + 0x3c], eax
cmp esi, 0x8000
ja 0x40a909
xchg ebp, eax
test al, al
xchg ebp, eax
je 0x40a7fd
cmp esi, 0x10
jae 0x40a7fd
mov ecx, dword [edx + 0xc]
test esi, 7
jne 0x40a7d5
nop
add ecx, 7
and ecx, 0xfffffff8
lea eax, [ecx + esi]
cmp eax, 0x10
ja 0x40a4f6
mov esi, dword [edx + 8]
test esi, esi
je 0x40a4f6
add ecx, esi
mov dword [edx + 0xc], eax
inc dword [edx + 0x10]
mov dword [ebx + 0x68], 0
nop
mov eax, dword fs:[0x14]
mov eax, dword [eax]
mov edx, dword [ebx + 0x78]
lea ebp, [edx - 1]
mov dword [ebx + 0x78], ebp
cmp edx, 1
jne 0x40a4ee
movzx edx, byte [eax + 0x65]
test dl, dl
je 0x40a4ee
mov dword [eax + 8], 0xfffffade
mov dword [esp + 0x60], ecx
add esp, 0x50
ret
mov eax, dword [edx + 0x28]
mov dword [esp], eax
call fcn.00409fc0
mov eax, dword [esp + 4]
test eax, eax
je 0x40a7b6
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 + 0x34]
mov ebx, dword [edx + 0xc]
cmp dword [esp + 0x54], ebx
jae 0x40a7a4
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 + 0x20], ebx
mov byte [esp + 0x16], cl
movzx eax, byte [esp + 0x17]
test al, al
je 0x40a73a
xor eax, eax
mov ebp, dword [esp + 0x1c]
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x18], eax
call fcn.00459330
mov eax, dword [0xc987a0]
test eax, eax
jne 0x40a719
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 0x40a5bb
movzx eax, byte [ecx + 0x65]
test al, al
je 0x40a5bb
mov dword [ecx + 8], 0xfffffade
mov eax, dword [0xc98b80]
test eax, eax
jne 0x40a6f8
mov eax, dword [0xa1d12c]
test eax, eax
jle 0x40a5f2
cmp eax, 1
je 0x40a689
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x34]
mov edx, dword [ecx]
cmp eax, edx
jae 0x40a689
sub edx, eax
mov dword [ecx], edx
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x40a621
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 0x40a636
mov eax, dword [esp + 0x20]
mov dword [esp + 0x60], eax
add esp, 0x50
ret
mov dword [esp], 0
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov dword [esp + 0xc], 0
call fcn.004173d0
movzx eax, byte [esp + 0x10]
test al, al
je 0x40a62a
mov dword [esp], 0
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov dword [esp + 0xc], 0
call fcn.004174f0
jmp 0x40a62a
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 + 0x2c], eax
mov dword [esp], eax
mov ecx, dword [esp + 0x20]
mov dword [esp + 4], ecx
mov edx, dword [esp + 0x54]
mov dword [esp + 8], edx
call fcn.0040ad30
nop
mov eax, dword fs:[0x14]
mov eax, dword [eax]
mov ecx, dword [esp + 0x2c]
mov edx, dword [ecx + 0x78]
lea ebx, [edx - 1]
mov dword [ecx + 0x78], ebx
cmp edx, 1
jne 0x40a5f2
movzx ecx, byte [eax + 0x65]
test cl, cl
je 0x40a5f2
mov dword [eax + 8], 0xfffffade
jmp 0x40a5f2
mov eax, dword [esp + 0x20]
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.00429610
jmp 0x40a5c9
mov eax, dword [esp + 0x20]
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.0041d7d0
jmp 0x40a585
mov eax, dword [esp + 0x58]
cmp dword [0xc85564], eax
jne 0x40a79e
mov ebp, 0x28
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.00412540
mov eax, dword [esp + 0x58]
mov ecx, dword [eax]
mov edx, dword [esp + 0x1c]
cmp edx, ecx
jbe 0x40a797
mov ebx, dword [eax + 4]
test ebx, ebx
je 0x40a791
mov ebp, edx
sub edx, ecx
lea ecx, [edx + ebx]
mov edx, dword [esp + 0x34]
add dword [edx + 4], ecx
mov eax, ecx
jmp 0x40a56a
mov ebp, edx
xor ecx, ecx
jmp 0x40a783
mov ecx, dword [eax + 4]
mov ebp, edx
jmp 0x40a783
mov ebp, dword [esp + 0x1c]
jmp 0x40a74b
mov ebx, dword [edx + 8]
test ebx, ebx
je 0x40a53b
mov ebx, eax
jmp 0x40a547
mov eax, dword [esp + 0x34]
mov dword [esp], eax
mov byte [esp + 4], 5
call fcn.0040a0d0
mov eax, dword [esp + 8]
movzx ecx, byte [esp + 0x10]
jmp 0x40a50f
test esi, 3
jne 0x40a7e8
add ecx, 3
and ecx, 0xfffffffc
jmp 0x40a4a5
test esi, 1
jne 0x40a4a5
inc ecx
and ecx, 0xfffffffe
jmp 0x40a4a5
cmp esi, 0x3f8
ja 0x40a8e3
mov ecx, ebx
lea ebx, [esi + 7]
shr ebx, 3
cmp ebx, 0x81
jae 0x40a9f8
lea esi, [0xa22420]
movzx ebx, byte [ebx + esi]
movzx esi, bl
cmp esi, 0x43
jae 0x40a9e0
lea edi, [0xa22560]
movzx esi, word [edi + esi*2]
mov dword [esp + 0x54], esi
test byte [edx], al
nop
shl ebx, 1
xchg ebp, eax
movzx esi, al
xchg ebp, eax
or ebx, esi
movzx esi, bl
cmp esi, 0x86
jae 0x40a9d4
mov byte [esp + 0x15], bl
mov eax, dword [edx + esi*4 + 0x14]
mov dword [esp + 0x24], eax
mov dword [esp], eax
call fcn.00409fc0
mov eax, dword [esp + 4]
test eax, eax
je 0x40a8bf
mov ecx, dword [esp + 0x24]
xor edx, edx
movzx ebx, byte [esp + 0x5c]
test bl, bl
je 0x40a88f
movzx ecx, byte [ecx + 0x3c]
test cl, cl
jne 0x40a89c
mov ecx, edx
mov ebx, eax
mov edx, dword [esp + 0x34]
jmp 0x40a54f
mov dword [esp + 0x20], eax
mov byte [esp + 0x16], dl
mov dword [esp], eax
mov ecx, dword [esp + 0x54]
mov dword [esp + 4], ecx
call fcn.0045a170
mov eax, dword [esp + 0x20]
movzx edx, byte [esp + 0x16]
jmp 0x40a88f
mov eax, dword [esp + 0x34]
mov dword [esp], eax
movzx ecx, byte [esp + 0x15]
mov byte [esp + 4], cl
call fcn.0040a0d0
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0xc]
movzx edx, byte [esp + 0x10]
jmp 0x40a87e
mov ecx, ebx
lea ebx, [esi - 0x381]
shr ebx, 7
cmp ebx, 0xf9
jae 0x40a9ec
lea esi, [0xa23660]
movzx ebx, byte [ebx + esi]
jmp 0x40a827
mov dword [esp + 0x28], 0
mov dword [esp + 0x40], 0
mov dword [esp + 0x44], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x4c], 0
lea eax, [0x455020]
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 ebp, eax
mov byte [esp + 0x49], al
xchg ebp, eax
lea eax, [esp + 0x28]
mov dword [esp + 0x4c], eax
lea eax, [esp + 0x40]
mov dword [esp], eax
call fcn.00458050
mov eax, dword [esp + 0x28]
mov dword [eax + 0x18], 1
mov eax, dword [esp + 0x28]
mov word [eax + 0x38], 1
mov eax, dword [esp + 0x28]
mov ebx, dword [eax + 0xc]
mov eax, dword [eax + 0x40]
mov dword [esp + 0x54], eax
mov edx, dword [esp + 0x34]
mov ecx, 1
jmp 0x40a54f
mov eax, ebp
mov ebp, 1
jmp 0x40a45a
mov dword [esp + 0x38], ebp
mov dword [esp], ebp
call fcn.0041a9a0
mov ebp, dword [esp + 0x38]
jmp 0x40a3e4
mov ebp, ebx
jmp 0x40a3a8
xor ebp, ebp
jmp 0x40a3e4
lea eax, [0xc98804]
mov dword [esp + 0x60], eax
add esp, 0x50
ret
mov eax, esi
mov ecx, 0x86
call fcn.00459a30
mov eax, esi
mov ecx, 0x43
call fcn.00459a30
mov eax, ebx
mov ecx, 0xf9
call fcn.00459a40
mov eax, ebx
mov ecx, 0x81
call fcn.00459a40
lea eax, [0x780510]
mov dword [esp], eax
mov dword [esp + 4], 0x14
call fcn.00430e00
lea eax, [0x77ddb8]
mov dword [esp], eax
mov dword [esp + 4], 0xf
call fcn.00430e00
lea eax, [0x78d787]
mov dword [esp], eax
mov dword [esp + 4], 0x32
call fcn.00430e00
nop
call fcn.00458170
jmp fcn.0040a2e0