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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x40aaed
sub esp, 0x7c
cmp word [0x9d1c64], 0x10
jne 0x40aad6
call fcn.00431b10
xor eax, eax
jmp 0x40a697
lea edx, [eax + eax*4]
lea ebx, [0x9d1c60]
movzx ebp, word [ebx + eax*2]
lea esi, [0xa96714]
mov dword [esi + edx*4], ebp
inc eax
cmp eax, 0x43
jge 0x40a6a3
jb 0x40a680
jmp 0x40aacc
mov edx, dword [0xa93324]
test edx, edx
je 0x40aab6
cmp edx, 0x80000
ja 0x40aa19
cmp edx, 0x1000
jb 0x40a97c
lea ebx, [edx - 1]
test edx, ebx
jne 0x40a901
mov edx, dword [0xa93320]
lea ebx, [edx - 1]
test edx, ebx
jne 0x40a886
cmp edx, 0x400000
jbe 0x40a6f7
mov dword [0xa93320], 0
mov eax, dword [0xa93320]
test eax, eax
jne 0x40a70c
jmp 0x40a728
lea eax, [ecx + 1]
mov dword [0xa9331c], eax
mov ecx, dword [0xa9331c]
cmp ecx, 0x20
sbb eax, eax
mov edx, 1
shl edx, cl
and edx, eax
cmp dword [0xa93320], edx
jne 0x40a703
lea eax, [0xa848a0]
mov dword [esp], eax
call fcn.00423980
call fcn.00414120
mov eax, dword [esp]
mov dword [0xa7be30], eax
mov dword [esp], 0
mov dword [esp + 4], 0x10231000
call fcn.00415220
mov eax, dword [esp + 8]
test eax, eax
je 0x40a788
nop
lea ecx, [eax + 0x10231000]
cmp eax, ecx
jbe 0x40a87c
mov ecx, 0x10230fff
mov dword [0xa84be8], eax
mov dword [0xa84bec], eax
add eax, ecx
mov dword [0xa84bf0], eax
mov eax, dword [0x9d2db8]
test eax, eax
jae 0x40a794
xor eax, eax
cmp dword [0xa84be8], eax
ja 0x40a875
mov ecx, dword [0xa84bf0]
cmp eax, ecx
jae 0x40a875
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x30], 0x20000000
mov dword [esp + 0x34], 0x10000000
mov dword [esp + 0x38], 0x8000000
lea eax, [ecx + 0x43ffff]
and eax, 0xffc00000
mov dword [esp + 0x14], eax
xor ecx, ecx
jmp 0x40a7fc
mov edx, dword [esp + 0x1c]
lea ecx, [edx + 1]
mov eax, dword [esp + 0x14]
cmp ecx, 3
jge 0x40a846
mov dword [esp + 0x1c], ecx
mov edx, dword [esp + ecx*4 + 0x30]
mov dword [esp], eax
mov dword [esp + 4], edx
mov dword [esp + 8], 0x400000
call fcn.0040b160
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
test eax, eax
je 0x40a7f1
nop
lea edx, [ecx + eax]
cmp eax, edx
jbe 0x40a832
dec ecx
mov dword [0xa84bf8], eax
mov dword [0xa84bfc], eax
add eax, ecx
mov dword [0xa84c00], eax
mov dword [esp + 0x18], eax
lea ecx, [0xa8b144]
mov dword [esp], ecx
call fcn.00416040
mov eax, dword [esp + 4]
mov ecx, dword [esp + 0x18]
mov dword [eax], ecx
mov ecx, dword [0xa84bf4]
mov dword [eax + 8], ecx
mov dword [0xa84bf4], eax
add esp, 0x7c
ret
mov ecx, eax
jmp 0x40a7ae
mov ecx, 0x10231000
jmp 0x40a774
lea edi, [esp + 0x3c]
xor eax, eax
call fcn.0045ff8a
lea ecx, [0x7739a0]
mov dword [esp + 0x3c], ecx
lea edx, [0x8359a8]
mov dword [esp + 0x40], edx
mov edx, dword [0xa93320]
mov dword [esp + 0x20], edx
lea edx, [0x773be0]
mov dword [esp + 0x44], edx
lea edx, [esp + 0x20]
mov dword [esp + 0x48], edx
mov dword [esp + 0x4c], ecx
lea ecx, [0x8359e8]
mov dword [esp + 0x50], ecx
lea ecx, [esp + 0x3c]
mov dword [esp], ecx
mov dword [esp + 4], 3
mov dword [esp + 8], 3
call fcn.00408350
lea ecx, [0x7cf72b]
mov dword [esp], ecx
mov dword [esp + 4], 0x19
call fcn.004333f0
lea edi, [esp + 0x3c]
xor eax, eax
call fcn.0045ff8a
lea ecx, [0x7739a0]
mov dword [esp + 0x3c], ecx
lea edx, [0x8358f8]
mov dword [esp + 0x40], edx
mov edx, dword [0xa93324]
mov dword [esp + 0x24], edx
lea edx, [0x773be0]
mov dword [esp + 0x44], edx
lea edx, [esp + 0x24]
mov dword [esp + 0x48], edx
mov dword [esp + 0x4c], ecx
lea ecx, [0x835950]
mov dword [esp + 0x50], ecx
lea ecx, [esp + 0x3c]
mov dword [esp], ecx
mov dword [esp + 4], 3
mov dword [esp + 8], 3
call fcn.00408350
lea ecx, [0x7cce43]
mov dword [esp], ecx
mov dword [esp + 4], 0x14
call fcn.004333f0
lea edi, [esp + 0x54]
xor eax, eax
call fcn.0045ff86
lea ecx, [0x7739a0]
mov dword [esp + 0x54], ecx
lea edx, [0x835798]
mov dword [esp + 0x58], edx
mov edx, dword [0xa93324]
mov dword [esp + 0x28], edx
lea edx, [0x773be0]
mov dword [esp + 0x5c], edx
lea edx, [esp + 0x28]
mov dword [esp + 0x60], edx
mov dword [esp + 0x64], ecx
lea edx, [0x8357f0]
mov dword [esp + 0x68], edx
lea edx, [0x772fa0]
mov dword [esp + 0x6c], edx
lea edx, [0x83288c]
mov dword [esp + 0x70], edx
mov dword [esp + 0x74], ecx
lea ecx, [0x835898]
mov dword [esp + 0x78], ecx
lea ecx, [esp + 0x54]
mov dword [esp], ecx
mov dword [esp + 4], 5
mov dword [esp + 8], 5
call fcn.00408350
lea ecx, [0x7cce43]
mov dword [esp], ecx
mov dword [esp + 4], 0x14
call fcn.004333f0
lea edi, [esp + 0x54]
xor eax, eax
call fcn.0045ff86
lea ecx, [0x7739a0]
mov dword [esp + 0x54], ecx
lea edx, [0x835678]
mov dword [esp + 0x58], edx
mov edx, dword [0xa93324]
mov dword [esp + 0x2c], edx
lea edx, [0x773be0]
mov dword [esp + 0x5c], edx
lea edx, [esp + 0x2c]
mov dword [esp + 0x60], edx
mov dword [esp + 0x64], ecx
lea edx, [0x8356c0]
mov dword [esp + 0x68], edx
lea edx, [0x772fa0]
mov dword [esp + 0x6c], edx
lea edx, [0x832888]
mov dword [esp + 0x70], edx
mov dword [esp + 0x74], ecx
lea ecx, [0x835740]
mov dword [esp + 0x78], ecx
lea ecx, [esp + 0x54]
mov dword [esp], ecx
mov dword [esp + 4], 5
mov dword [esp + 8], 5
call fcn.00408350
lea ecx, [0x7cce43]
mov dword [esp], ecx
mov dword [esp + 4], 0x14
call fcn.004333f0
lea eax, [0x7d1f9a]
mov dword [esp], eax
mov dword [esp + 4], 0x1e
call fcn.004333f0
mov ecx, 0x43
call fcn.0045fd60
lea eax, [0x7cb62f]
mov dword [esp], eax
mov dword [esp + 4], 0x11
call fcn.004333f0
nop
call fcn.0045e790
jmp fcn.0040a650