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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov edx, dword [ebp + 0xc]
sub esp, 0x6c
push ebx
push esi
push edi
mov esi, ecx
mov ecx, dword [ebp + 8]
sub esp, 0x10
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [ebp + 0x10]
mov dword [eax + 4], edx
mov edx, dword [ebp + 0x14]
mov dword [eax + 8], ecx
mov ecx, esi
mov dword [eax + 0xc], edx
call fcn.0040f150
mov edi, dword [esi + 0x154]
mov ecx, dword [esi + 0x158]
add edi, dword [esi + 0x1074]
add ecx, dword [esi + 0x1078]
mov edx, dword [esi + 0x15c]
mov eax, dword [esi + 0x160]
sub edx, dword [esi + 0x107c]
sub eax, dword [esi + 0x1080]
mov dword [ebp + 8], edi
mov dword [ebp + 0xc], ecx
mov ecx, dword [esi + 0x1090]
xor edi, edi
mov dword [ebp + 0x10], edx
mov dword [ebp + 0x14], eax
cmp ecx, edi
je 0x40a987
mov eax, dword [ecx]
mov edx, dword [eax + 0xc8]
call edx
test al, al
je 0x40a987
mov ecx, dword [esi + 0x1090]
mov eax, dword [ecx]
mov edx, dword [eax + 0x58]
call edx
sub dword [ebp + 0x10], eax
mov ecx, dword [esi + 0x1094]
cmp ecx, edi
je 0x40a9af
mov eax, dword [ecx]
mov edx, dword [eax + 0xc8]
call edx
test al, al
je 0x40a9af
mov ecx, dword [esi + 0x1094]
mov eax, dword [ecx]
mov edx, dword [eax + 0x60]
call edx
sub dword [ebp + 0x14], eax
mov ebx, dword [ebp + 0x10]
mov eax, dword [ebp + 0x14]
sub ebx, dword [ebp + 8]
sub eax, dword [ebp + 0xc]
mov ecx, dword [esi + 0x1094]
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], eax
cmp ecx, edi
je 0x40a9eb
mov eax, dword [ecx]
mov edx, dword [eax + 0xc8]
call edx
test al, al
je 0x40a9eb
mov eax, dword [esi + 0x1094]
add ebx, dword [eax + 0x1068]
mov dword [esp + 0x40], ebx
cmp dword [esi + 0x106c], edi
mov dword [esp + 0x10], edi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x14], edi
mov dword [esp + 0x20], edi
mov dword [esp + 0x18], edi
jle 0x40ab56
jmp 0x40aa10
mov ecx, dword [esi + 0x1068]
mov edx, dword [esp + 0x18]
mov edi, dword [ecx + edx*4]
mov eax, dword [edi]
mov edx, dword [eax + 0xc8]
mov ecx, edi
call edx
test al, al
je 0x40ab41
mov eax, dword [edi]
mov edx, dword [eax + 0xf4]
mov ecx, edi
call edx
test al, al
jne 0x40ab41
mov ecx, dword [esp + 0x44]
mov eax, dword [edi]
mov eax, dword [eax + 0x114]
push ecx
push ebx
lea edx, [esp + 0x40]
push edx
mov ecx, edi
call eax
cmp dword [esp + 0x3c], 0
jne 0x40aa69
inc dword [esp + 0x1c]
jmp 0x40aaa7
mov edx, dword [edi]
mov eax, dword [edx + 0x78]
mov ecx, edi
call eax
cmp dword [esp + 0x3c], eax
jge 0x40aa85
mov edx, dword [edi]
mov eax, dword [edx + 0x78]
mov ecx, edi
call eax
mov dword [esp + 0x3c], eax
mov edx, dword [edi]
mov eax, dword [edx + 0x80]
mov ecx, edi
call eax
cmp dword [esp + 0x3c], eax
jle 0x40aaa7
mov edx, dword [edi]
mov eax, dword [edx + 0x80]
mov ecx, edi
call eax
mov dword [esp + 0x3c], eax
mov edx, dword [edi]
mov edx, dword [edx + 0x48]
lea eax, [esp + 0x68]
push eax
mov ecx, edi
call edx
lea ebx, [eax + 0xc]
mov eax, dword [edi]
mov edx, dword [eax + 0x48]
lea ecx, [esp + 0x58]
push ecx
mov ecx, edi
call edx
mov eax, dword [eax + 4]
add eax, dword [ebx]
mov edx, dword [edi]
add eax, dword [esp + 0x3c]
mov edx, dword [edx + 0x48]
add dword [esp + 0x14], eax
lea eax, [esp + 0x48]
push eax
mov ecx, edi
call edx
mov eax, dword [esp + 0x38]
xor ecx, ecx
test eax, eax
setle cl
dec ecx
and ecx, eax
mov dword [esp + 0x38], ecx
mov edx, dword [edi]
mov eax, dword [edx + 0x68]
mov ecx, edi
call eax
cmp dword [esp + 0x38], eax
jge 0x40ab0f
mov edx, dword [edi]
mov eax, dword [edx + 0x68]
mov ecx, edi
call eax
mov dword [esp + 0x38], eax
mov edx, dword [edi]
mov eax, dword [edx + 0x70]
mov ecx, edi
call eax
mov ecx, dword [esp + 0x38]
cmp ecx, eax
jle 0x40ab2f
mov edx, dword [edi]
mov eax, dword [edx + 0x70]
mov ecx, edi
call eax
mov ecx, eax
mov dword [esp + 0x38], ecx
cmp dword [esp + 0x10], ecx
jg 0x40ab39
mov dword [esp + 0x10], ecx
inc dword [esp + 0x20]
mov ebx, dword [esp + 0x40]
mov eax, dword [esp + 0x18]
inc eax
cmp eax, dword [esi + 0x106c]
mov dword [esp + 0x18], eax
jl 0x40aa10
mov eax, dword [esp + 0x20]
mov ecx, dword [esi + 0x1084]
dec eax
imul ecx, eax
add dword [esp + 0x14], ecx
mov dword [esp + 0x34], eax
mov eax, dword [esi + 0x10bc]
test eax, eax
je 0x40ac6b
mov edx, dword [eax + 0x10bc]
lea ecx, [eax + 0x10bc]
mov eax, dword [edx + 0x10]
call eax
mov edi, eax
test edi, edi
je 0x40ac6b
mov edx, dword [edi + 0x1064]
mov eax, dword [edx + 0xc]
lea ecx, [edi + 0x1064]
call eax
test eax, eax
jle 0x40ac6b
mov ecx, dword [ebp + 0x14]
sub ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
sub eax, dword [ebp + 8]
mov edx, dword [edi]
mov edx, dword [edx + 0x114]
push ecx
push eax
lea eax, [esp + 0x50]
push eax
mov ecx, edi
call edx
cmp dword [eax], 0
jge 0x40abdc
mov dword [esp + 0x10], 0
jmp 0x40ac01
mov ecx, dword [ebp + 0x14]
sub ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
sub eax, dword [ebp + 8]
mov edx, dword [edi]
mov edx, dword [edx + 0x114]
push ecx
push eax
lea eax, [esp + 0x40]
push eax
mov ecx, edi
call edx
mov eax, dword [eax]
mov dword [esp + 0x10], eax
mov ecx, dword [esi + 0x1094]
test ecx, ecx
je 0x40ac6b
mov edx, dword [ecx]
mov eax, dword [edx + 0xc8]
call eax
test al, al
je 0x40ac6b
mov ecx, dword [esi + 0x1094]
mov edx, dword [edi]
mov ebx, dword [ecx + 0x106c]
mov eax, dword [edx + 0x30]
mov ecx, edi
call eax
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [esp + 0x58], ecx
mov ecx, dword [eax + 8]
mov eax, dword [eax + 0xc]
mov dword [esp + 0x5c], edx
mov edx, dword [ebp + 8]
mov dword [esp + 0x60], ecx
sub edx, ebx
mov ebx, dword [edi]
sub esp, 0x10
mov ecx, esp
mov dword [ecx], edx
mov edx, dword [esp + 0x6c]
mov dword [ecx + 4], edx
mov edx, dword [esp + 0x70]
mov dword [ecx + 8], edx
mov dword [ecx + 0xc], eax
mov eax, dword [ebx + 0x34]
mov ecx, edi
call eax
mov ecx, dword [esp + 0x1c]
xor edi, edi
cmp ecx, edi
mov dword [esp + 0x18], edi
mov dword [esp + 0x30], edi
jle 0x40ac96
mov eax, dword [esp + 0x44]
sub eax, dword [esp + 0x14]
cdq
idiv ecx
xor ecx, ecx
cmp eax, edi
setl cl
dec ecx
and ecx, eax
mov dword [esp + 0x30], ecx
mov ecx, dword [esi + 0x1090]
mov edx, dword [esp + 0x44]
mov ebx, dword [ebp + 0xc]
mov dword [esp + 0x4c], edx
mov dword [esp + 0x28], ebx
test ecx, ecx
je 0x40accd
mov eax, dword [ecx]
mov edx, dword [eax + 0xc8]
call edx
test al, al
je 0x40accd
mov eax, dword [esi + 0x1090]
sub ebx, dword [eax + 0x106c]
mov dword [esp + 0x28], ebx
mov ecx, dword [esi + 0x1094]
mov edi, dword [ebp + 8]
mov dword [esp + 0x24], edi
test ecx, ecx
je 0x40acfc
mov edx, dword [ecx]
mov eax, dword [edx + 0xc8]
call eax
test al, al
je 0x40acfc
mov ecx, dword [esi + 0x1094]
sub edi, dword [ecx + 0x106c]
mov dword [esp + 0x24], edi
mov edx, dword [esp + 0x14]
xor eax, eax
cmp dword [esi + 0x106c], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x20], edx
mov dword [esp + 0x14], eax
jle 0x40af52
lea ebx, [ebx]
mov eax, dword [esi + 0x1068]
mov ecx, dword [esp + 0x14]
mov edi, dword [eax + ecx*4]
mov edx, dword [edi]
mov eax, dword [edx + 0xc8]
mov ecx, edi
call eax
test al, al
je 0x40af3d
mov edx, dword [edi]
mov eax, dword [edx + 0xf4]
mov ecx, edi
call eax
test al, al
je 0x40ad67
mov edx, dword [esi]
mov eax, dword [esp + 0x14]
mov edx, dword [edx + 0x1b0]
push eax
mov ecx, esi
call edx
jmp 0x40af3d
mov eax, dword [edi]
mov edx, dword [eax + 0x48]
lea ecx, [esp + 0x58]
push ecx
mov ecx, edi
call edx
mov eax, dword [esp + 0x4c]
sub eax, dword [esp + 0x5c]
mov edx, dword [edi]
mov edx, dword [edx + 0x114]
push eax
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x44]
push eax
lea eax, [esp + 0x40]
push eax
mov ecx, edi
call edx
cmp dword [esp + 0x3c], 0
jne 0x40ae11
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x30]
inc eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x3c], ecx
cmp eax, dword [esp + 0x1c]
jne 0x40add1
mov eax, dword [esp + 0x4c]
sub eax, dword [esp + 0x64]
mov edx, 0
sub eax, dword [esp + 0x20]
sets dl
dec edx
and edx, eax
mov dword [esp + 0x3c], edx
mov eax, dword [edi]
mov edx, dword [eax + 0x78]
mov ecx, edi
call edx
cmp dword [esp + 0x3c], eax
jge 0x40aded
mov eax, dword [edi]
mov edx, dword [eax + 0x78]
mov ecx, edi
call edx
mov dword [esp + 0x3c], eax
mov eax, dword [edi]
mov edx, dword [eax + 0x80]
mov ecx, edi
call edx
cmp dword [esp + 0x3c], eax
jle 0x40ae57
mov eax, dword [edi]
mov edx, dword [eax + 0x80]
mov ecx, edi
call edx
mov dword [esp + 0x3c], eax
jmp 0x40ae57
mov eax, dword [edi]
mov edx, dword [eax + 0x78]
mov ecx, edi
call edx
cmp dword [esp + 0x3c], eax
jge 0x40ae2d
mov eax, dword [edi]
mov edx, dword [eax + 0x78]
mov ecx, edi
call edx
mov dword [esp + 0x3c], eax
mov eax, dword [edi]
mov edx, dword [eax + 0x80]
mov ecx, edi
call edx
mov ecx, dword [esp + 0x3c]
cmp ecx, eax
jle 0x40ae53
mov eax, dword [edi]
mov edx, dword [eax + 0x80]
mov ecx, edi
call edx
mov ecx, eax
mov dword [esp + 0x3c], ecx
sub dword [esp + 0x20], ecx
mov eax, dword [esp + 0x40]
sub eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x10]
sub eax, dword [esp + 0x58]
mov dword [esp + 0x38], ecx
cmp ecx, eax
jg 0x40ae73
mov dword [esp + 0x38], eax
mov eax, dword [edi]
mov edx, dword [eax + 0x68]
mov ecx, edi
call edx
cmp dword [esp + 0x38], eax
jge 0x40ae8f
mov eax, dword [edi]
mov edx, dword [eax + 0x68]
mov ecx, edi
call edx
mov dword [esp + 0x38], eax
mov eax, dword [edi]
mov edx, dword [eax + 0x70]
mov ecx, edi
call edx
cmp dword [esp + 0x38], eax
jle 0x40aeab
mov eax, dword [edi]
mov edx, dword [eax + 0x70]
mov ecx, edi
call edx
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x24]
lea edx, [eax + ecx]
mov ecx, dword [esp + 0x5c]
add ecx, ebx
mov dword [esp + 0x6c], ecx
mov ecx, dword [esp + 0x38]
add eax, ecx
add eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x64]
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0x3c]
add eax, ecx
add eax, dword [esp + 0x5c]
sub esp, 0x10
mov ecx, esp
mov dword [ecx], edx
mov edx, dword [esp + 0x7c]
mov dword [ecx + 4], edx
mov edx, dword [esp + 0x80]
add eax, ebx
mov ebx, dword [edi]
mov dword [ecx + 8], edx
mov dword [ecx + 0xc], eax
mov eax, dword [ebx + 0x34]
mov ecx, edi
call eax
mov ecx, dword [esp + 0x64]
mov edx, dword [esp + 0x3c]
mov eax, dword [esi + 0x1084]
mov ebx, dword [esp + 0x28]
lea edi, [ecx + edx]
mov edx, dword [esp + 0x5c]
add edi, edx
add edi, eax
add ebx, edi
mov edi, dword [esp + 0x3c]
add edi, ecx
add edi, edx
mov edx, dword [esp + 0x3c]
add dword [esp + 0x18], edi
add ecx, edx
add ecx, eax
sub dword [esp + 0x4c], ecx
mov dword [esp + 0x28], ebx
mov eax, dword [esp + 0x14]
inc eax
cmp eax, dword [esi + 0x106c]
mov dword [esp + 0x14], eax
jl 0x40ad20
mov eax, dword [esi + 0x1084]
imul eax, dword [esp + 0x34]
mov ecx, dword [esi + 0x1094]
add dword [esp + 0x18], eax
xor edi, edi
cmp ecx, edi
je 0x40b1af
mov eax, dword [ebp + 0x10]
sub eax, dword [ebp + 8]
mov ebx, dword [esp + 0x10]
mov edx, dword [ecx]
cmp ebx, eax
mov eax, dword [edx + 0xc8]
jle 0x40b0e0
call eax
mov ecx, dword [esi + 0x1094]
test al, al
je 0x40b003
mov eax, ebx
sub eax, dword [ebp + 0x10]
add eax, dword [ebp + 8]
cmp dword [ecx + 0x1068], eax
je 0x40b1af
cmp eax, edi
mov dword [ecx + 0x1068], eax
jge 0x40afbb
mov dword [ecx + 0x1068], edi
mov eax, dword [ecx + 0x1068]
cmp dword [ecx + 0x106c], eax
jle 0x40afcf
mov dword [ecx + 0x106c], eax
mov edi, dword [ecx + 0x154]
mov edx, dword [ecx]
sub esp, 0x10
mov eax, esp
mov dword [eax], edi
mov edi, dword [ecx + 0x158]
mov dword [eax + 4], edi
mov edi, dword [ecx + 0x15c]
mov dword [eax + 8], edi
mov edi, dword [ecx + 0x160]
mov dword [eax + 0xc], edi
mov eax, dword [edx + 0x34]
call eax
jmp 0x40b1af
mov edx, dword [ecx]
mov eax, dword [edx + 0xcc]
push 1
call eax
mov ecx, dword [esi + 0x1094]
mov eax, ebx
sub eax, dword [ebp + 0x10]
add eax, dword [ebp + 8]
cmp dword [ecx + 0x1068], eax
je 0x40b078
cmp eax, edi
mov dword [ecx + 0x1068], eax
jge 0x40b035
mov dword [ecx + 0x1068], edi
mov eax, dword [ecx + 0x1068]
cmp dword [ecx + 0x106c], eax
jle 0x40b049
mov dword [ecx + 0x106c], eax
mov ebx, dword [ecx + 0x154]
mov edx, dword [ecx]
sub esp, 0x10
mov eax, esp
mov dword [eax], ebx
mov ebx, dword [ecx + 0x158]
mov dword [eax + 4], ebx
mov ebx, dword [ecx + 0x15c]
mov dword [eax + 8], ebx
mov ebx, dword [ecx + 0x160]
mov dword [eax + 0xc], ebx
mov eax, dword [edx + 0x34]
call eax
mov ecx, dword [esi + 0x1094]
cmp dword [ecx + 0x106c], edi
je 0x40b0cb
mov eax, dword [ecx + 0x1068]
cmp eax, edi
mov dword [ecx + 0x106c], edi
jge 0x40b09c
mov dword [ecx + 0x106c], eax
mov edi, dword [ecx + 0x154]
mov edx, dword [ecx]
sub esp, 0x10
mov eax, esp
mov dword [eax], edi
mov edi, dword [ecx + 0x158]
mov dword [eax + 4], edi
mov edi, dword [ecx + 0x15c]
mov dword [eax + 8], edi
mov edi, dword [ecx + 0x160]
mov dword [eax + 0xc], edi
mov eax, dword [edx + 0x34]
call eax
mov ecx, dword [esi + 0x1094]
mov edx, dword [ecx]
mov eax, dword [edx + 0x60]
call eax
sub dword [ebp + 0x14], eax
jmp 0x40b1af
call eax
test al, al
je 0x40b1af
mov ecx, dword [esi + 0x1094]
mov edx, dword [ecx]
mov eax, dword [edx + 0xcc]
push edi
call eax
mov ecx, dword [esi + 0x1094]
cmp dword [ecx + 0x1068], edi
je 0x40b14c
cmp dword [ecx + 0x106c], edi
mov dword [ecx + 0x1068], edi
jle 0x40b11d
mov dword [ecx + 0x106c], edi
mov ebx, dword [ecx + 0x154]
mov edx, dword [ecx]
sub esp, 0x10
mov eax, esp
mov dword [eax], ebx
mov ebx, dword [ecx + 0x158]
mov dword [eax + 4], ebx
mov ebx, dword [ecx + 0x15c]
mov dword [eax + 8], ebx
mov ebx, dword [ecx + 0x160]
mov dword [eax + 0xc], ebx
mov eax, dword [edx + 0x34]
call eax
mov ecx, dword [esi + 0x1094]
cmp dword [ecx + 0x106c], edi
je 0x40b19f
mov eax, dword [ecx + 0x1068]
cmp eax, edi
mov dword [ecx + 0x106c], edi
jge 0x40b170
mov dword [ecx + 0x106c], eax
mov edi, dword [ecx + 0x154]
mov edx, dword [ecx]
sub esp, 0x10
mov eax, esp
mov dword [eax], edi
mov edi, dword [ecx + 0x158]
mov dword [eax + 4], edi
mov edi, dword [ecx + 0x15c]
mov dword [eax + 8], edi
mov edi, dword [ecx + 0x160]
mov dword [eax + 0xc], edi
mov eax, dword [edx + 0x34]
call eax
mov ecx, dword [esi + 0x1094]
mov edx, dword [ecx]
mov eax, dword [edx + 0x60]
call eax
add dword [ebp + 0x14], eax
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
mov edx, dword [esi]
mov edx, dword [edx + 0x1b4]
push eax
push ecx
mov ecx, dword [ebp + 8]
sub esp, 0x10
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [ebp + 0xc]
mov dword [eax + 4], ecx
mov ecx, dword [ebp + 0x10]
mov dword [eax + 8], ecx
mov ecx, dword [ebp + 0x14]
mov dword [eax + 0xc], ecx
mov ecx, esi
call edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10