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

Disassembly:
push 0xffffffffffffffff
push 0x4c5d46
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x68
push ebx
push ebp
push esi
xor ebx, ebx
push edi
mov dword [esp + 0x20], ecx
mov dword [esp + 0x10], ebx
mov dword [esp + 0x28], 1
jmp 0x40ad54
mov ebx, dword [esp + 0x10]
mov ecx, dword [esp + 0x28]
push 0xa
lea eax, [esp + 0x6c]
push eax
push ecx
call fcn.004904a4
add esp, 0xc
push str.WayPoints
lea ecx, [esp + 0x44]
call fcn.0042aa80
lea edx, [esp + 0x68]
push edx
lea ecx, [esp + 0x44]
mov dword [esp + 0x84], 0
call fcn.0042abd0
mov ebp, dword [esp + 0x20]
mov eax, dword [ebp + 0x264]
lea ecx, [eax + 0x10]
cmp dword [ecx], 0
je 0x40adba
lea eax, [esp + 0x40]
push eax
call fcn.004045d0
test eax, eax
je 0x40adba
mov eax, dword [eax]
test eax, eax
je 0x40adba
add eax, 0xfffffffc
jmp 0x40adbf
mov eax, 0x4eada4
push eax
lea ecx, [esp + 0x3c]
call fcn.0042a910
mov ecx, dword [esp + 0x3c]
cmp word [ecx - 4], 0
mov byte [esp + 0x80], 1
jne 0x40ade0
xor esi, esi
jmp 0x40ae39
push 0x4ccb72
lea ecx, [esp + 0x54]
call fcn.0042aa80
or ebx, 1
push 0x4ccb72
lea ecx, [esp + 0x4c]
mov byte [esp + 0x84], 2
mov dword [esp + 0x14], ebx
call fcn.0042aa80
mov ecx, dword [ebp + 0x2e8]
lea edx, [esp + 0x50]
push edx
lea eax, [esp + 0x4c]
push eax
lea edx, [esp + 0x40]
or ebx, 2
push edx
mov dword [esp + 0x8c], 3
mov dword [esp + 0x1c], ebx
call fcn.0043d1e0
mov esi, eax
test bl, 2
mov dword [esp + 0x24], esi
mov dword [esp + 0x80], 2
je 0x40ae5d
and ebx, 0xfffffffd
lea ecx, [esp + 0x48]
mov dword [esp + 0x10], ebx
call fcn.0042a980
test bl, 1
mov dword [esp + 0x80], 1
je 0x40ae7d
and ebx, 0xfffffffe
lea ecx, [esp + 0x50]
mov dword [esp + 0x10], ebx
call fcn.0042a980
push str.ShadowWayPoints
lea ecx, [esp + 0x44]
call fcn.0042ab70
lea eax, [esp + 0x68]
push eax
lea ecx, [esp + 0x44]
call fcn.0042abd0
mov eax, dword [ebp + 0x264]
lea ecx, [eax + 0x10]
cmp dword [ecx], 0
je 0x40aec0
lea edx, [esp + 0x40]
push edx
call fcn.004045d0
test eax, eax
je 0x40aec0
mov eax, dword [eax]
test eax, eax
je 0x40aec0
add eax, 0xfffffffc
jmp 0x40aec5
mov eax, 0x4eada4
push eax
lea ecx, [esp + 0x3c]
call fcn.0042a9d0
mov eax, dword [esp + 0x3c]
cmp word [eax - 4], 0
jne 0x40aede
xor edi, edi
jmp 0x40af37
push 0x4ccb72
lea ecx, [esp + 0x64]
call fcn.0042aa80
or ebx, 4
push 0x4ccb72
lea ecx, [esp + 0x5c]
mov byte [esp + 0x84], 4
mov dword [esp + 0x14], ebx
call fcn.0042aa80
mov ecx, dword [ebp + 0x2e8]
lea edx, [esp + 0x60]
push edx
lea eax, [esp + 0x5c]
push eax
lea edx, [esp + 0x40]
or ebx, 8
push edx
mov dword [esp + 0x8c], 5
mov dword [esp + 0x1c], ebx
call fcn.0043d1e0
mov edi, eax
test bl, 8
mov dword [esp + 0x2c], edi
mov dword [esp + 0x80], 4
je 0x40af5b
and ebx, 0xfffffff7
lea ecx, [esp + 0x58]
mov dword [esp + 0x10], ebx
call fcn.0042a980
test bl, 4
mov dword [esp + 0x80], 1
je 0x40af7b
and ebx, 0xfffffffb
lea ecx, [esp + 0x60]
mov dword [esp + 0x10], ebx
call fcn.0042a980
test esi, esi
je 0x40b49a
test edi, edi
je 0x40b49a
mov ebx, dword [ebp + 0x408]
add ebp, 0x400
inc ebx
mov dword [esp + 0x1c], ebp
jne 0x40afa6
xor eax, eax
mov dword [esp + 0x14], eax
jmp 0x40affb
mov ecx, dword [ebp + 0xc]
cmp ecx, ebx
jge 0x40afe4
mov eax, dword [ebp + 8]
lea edx, [eax + 1]
cmp ebx, edx
jne 0x40afd3
test ecx, ecx
jne 0x40afc4
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x14], eax
jmp 0x40affb
cmp eax, ecx
jne 0x40aff7
mov eax, dword [ebp + 0x14]
add eax, ecx
mov dword [esp + 0x14], eax
jmp 0x40affb
mov eax, dword [ebp + 0x14]
add eax, ecx
cmp ebx, eax
jle 0x40aff1
mov eax, ebx
mov dword [esp + 0x14], eax
jmp 0x40affb
mov edx, dword [ebp + 8]
cmp ebx, edx
mov eax, ebx
jge 0x40b151
mov dword [esp + 0x14], eax
jmp 0x40affb
mov eax, dword [esp + 0x14]
cmp eax, dword [ebp + 0xc]
mov dword [esp + 0x1c], 0
jle 0x40b047
lea ecx, [eax + eax*8]
shl ecx, 2
push ecx
call fcn.0042e150
add esp, 4
test ebx, ebx
mov dword [esp + 0x1c], eax
jle 0x40b047
mov eax, dword [ebp + 8]
test eax, eax
jle 0x40b047
cmp ebx, eax
jge 0x40b02c
mov eax, ebx
mov esi, dword [ebp + 4]
mov edi, dword [esp + 0x1c]
lea ecx, [eax + eax*8]
shl ecx, 2
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edx, dword [ebp + 8]
cmp ebx, edx
jle 0x40b0ef
mov esi, dword [esp + 0x1c]
mov eax, ebx
sub eax, edx
lea ecx, [eax + eax*8]
shl ecx, 2
lea edx, [edx + edx*8]
lea edi, [esi + edx*4]
mov edx, ecx
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov edi, dword [ebp + 8]
cmp edi, ebx
mov dword [esp + 0x30], edi
jge 0x40b0ef
mov ecx, dword [esp + 0x1c]
lea eax, [edi + edi*8]
lea esi, [ecx + eax*4]
mov dword [esp + 0x34], esi
test esi, esi
mov byte [esp + 0x80], 7
je 0x40b0de
xor eax, eax
push 0xc000
mov dword [esi], 0x4cc308
mov dword [esi + 4], eax
mov dword [esi + 8], eax
call fcn.0047fffa
push 0x4000
mov dword [esi + 0xc], eax
call fcn.0047fffa
push 0x4000
mov dword [esi + 0x10], eax
call fcn.0047fffa
add esp, 0xc
mov dword [esi + 0x14], eax
xor eax, eax
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], eax
mov dword [esi + 0x20], eax
inc edi
cmp edi, ebx
mov byte [esp + 0x80], 1
mov dword [esp + 0x30], edi
jl 0x40b081
cmp ebx, dword [ebp + 8]
jge 0x40b118
lea esi, [ebx + ebx*8]
mov edi, ebx
shl esi, 2
lea esp, [esp]
mov edx, dword [ebp + 4]
mov eax, dword [edx + esi]
lea ecx, [edx + esi]
push 0
call dword [eax]
mov eax, dword [ebp + 8]
inc edi
add esi, 0x24
cmp edi, eax
jl 0x40b100
mov eax, dword [ebp + 4]
test eax, eax
je 0x40b141
mov esi, dword [esp + 0x14]
cmp esi, dword [ebp + 0xc]
jle 0x40b1af
push eax
call fcn.0042df40
mov ecx, dword [esp + 0x20]
add esp, 4
mov dword [ebp + 4], ecx
mov dword [ebp + 0xc], esi
jmp 0x40b1af
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
mov dword [ebp + 4], edx
mov dword [ebp + 0xc], eax
jmp 0x40b1af
mov esi, dword [ebp + 4]
sub eax, edx
lea ecx, [eax + eax*8]
shl ecx, 2
lea edx, [edx + edx*8]
lea edi, [esi + edx*4]
mov edx, ecx
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov edi, dword [ebp + 8]
cmp edi, ebx
mov dword [esp + 0x30], edi
jge 0x40b1af
lea ecx, [ecx]
mov ecx, dword [ebp + 4]
lea eax, [edi + edi*8]
lea ecx, [ecx + eax*4]
mov dword [esp + 0x34], ecx
test ecx, ecx
mov byte [esp + 0x80], 6
je 0x40b19e
call fcn.004021d0
inc edi
cmp edi, ebx
mov byte [esp + 0x80], 1
mov dword [esp + 0x30], edi
jl 0x40b180
mov edx, dword [esp + 0x88]
mov eax, dword [esp + 0x24]
push edx
mov edx, dword [ebp + 4]
lea ecx, [ebx + ebx*8]
push eax
lea ecx, [edx + ecx*4 - 0x24]
mov dword [ebp + 8], ebx
call fcn.00404a70
mov ebp, dword [esp + 0x20]
mov ebx, dword [ebp + 0x420]
add ebp, 0x418
inc ebx
mov dword [esp + 0x34], ebp
jne 0x40b1ed
xor eax, eax
mov dword [esp + 0x18], eax
jmp 0x40b242
mov ecx, dword [ebp + 0xc]
cmp ecx, ebx
jge 0x40b22b
mov eax, dword [ebp + 8]
lea edx, [eax + 1]
cmp ebx, edx
jne 0x40b21a
test ecx, ecx
jne 0x40b20b
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x18], eax
jmp 0x40b242
cmp eax, ecx
jne 0x40b23e
mov eax, dword [ebp + 0x14]
add eax, ecx
mov dword [esp + 0x18], eax
jmp 0x40b242
mov eax, dword [ebp + 0x14]
add eax, ecx
cmp ebx, eax
jle 0x40b238
mov eax, ebx
mov dword [esp + 0x18], eax
jmp 0x40b242
mov edx, dword [ebp + 8]
cmp ebx, edx
mov eax, ebx
jge 0x40b3a1
mov dword [esp + 0x18], eax
jmp 0x40b242
mov eax, dword [esp + 0x18]
cmp eax, dword [ebp + 0xc]
mov dword [esp + 0x1c], 0
jle 0x40b28e
lea ecx, [eax + eax*8]
shl ecx, 2
push ecx
call fcn.0042e150
add esp, 4
test ebx, ebx
mov dword [esp + 0x1c], eax
jle 0x40b28e
mov eax, dword [ebp + 8]
test eax, eax
jle 0x40b28e
cmp ebx, eax
jge 0x40b273
mov eax, ebx
mov esi, dword [ebp + 4]
mov edi, dword [esp + 0x1c]
lea ecx, [eax + eax*8]
shl ecx, 2
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edx, dword [ebp + 8]
cmp ebx, edx
jle 0x40b33e
mov esi, dword [esp + 0x1c]
mov eax, ebx
sub eax, edx
lea ecx, [eax + eax*8]
shl ecx, 2
lea edx, [edx + edx*8]
lea edi, [esi + edx*4]
mov edx, ecx
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov edi, dword [ebp + 8]
cmp edi, ebx
mov dword [esp + 0x30], edi
jge 0x40b33e
jmp 0x40b2d0
mov ecx, dword [esp + 0x1c]
lea eax, [edi + edi*8]
lea esi, [ecx + eax*4]
mov dword [esp + 0x34], esi
test esi, esi
mov byte [esp + 0x80], 9
je 0x40b32d
xor eax, eax
push 0xc000
mov dword [esi], 0x4cc308
mov dword [esi + 4], eax
mov dword [esi + 8], eax
call fcn.0047fffa
push 0x4000
mov dword [esi + 0xc], eax
call fcn.0047fffa
push 0x4000
mov dword [esi + 0x10], eax
call fcn.0047fffa
add esp, 0xc
mov dword [esi + 0x14], eax
xor eax, eax
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], eax
mov dword [esi + 0x20], eax
inc edi
cmp edi, ebx
mov byte [esp + 0x80], 1
mov dword [esp + 0x30], edi
jl 0x40b2d0
cmp ebx, dword [ebp + 8]
jge 0x40b368
lea esi, [ebx + ebx*8]
mov edi, ebx
shl esi, 2
jmp 0x40b350
mov edx, dword [ebp + 4]
mov eax, dword [edx + esi]
lea ecx, [edx + esi]
push 0
call dword [eax]
mov eax, dword [ebp + 8]
inc edi
add esi, 0x24
cmp edi, eax
jl 0x40b350
mov eax, dword [ebp + 4]
test eax, eax
je 0x40b391
mov esi, dword [esp + 0x18]
cmp esi, dword [ebp + 0xc]
jle 0x40b3ff
push eax
call fcn.0042df40
mov ecx, dword [esp + 0x20]
add esp, 4
mov dword [ebp + 4], ecx
mov dword [ebp + 0xc], esi
jmp 0x40b3ff
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
mov dword [ebp + 4], edx
mov dword [ebp + 0xc], eax
jmp 0x40b3ff
mov esi, dword [ebp + 4]
sub eax, edx
lea ecx, [eax + eax*8]
shl ecx, 2
lea edx, [edx + edx*8]
lea edi, [esi + edx*4]
mov edx, ecx
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov esi, dword [ebp + 8]
cmp esi, ebx
mov dword [esp + 0x30], esi
jge 0x40b3ff
lea ecx, [ecx]
mov ecx, dword [ebp + 4]
lea eax, [esi + esi*8]
lea ecx, [ecx + eax*4]
mov dword [esp + 0x1c], ecx
test ecx, ecx
mov byte [esp + 0x80], 8
je 0x40b3ee
call fcn.004021d0
inc esi
cmp esi, ebx
mov byte [esp + 0x80], 1
mov dword [esp + 0x30], esi
jl 0x40b3d0
mov edx, dword [esp + 0x88]
mov ecx, dword [ebp + 4]
mov esi, dword [esp + 0x2c]
push edx
lea eax, [ebx + ebx*8]
push esi
lea ecx, [ecx + eax*4 - 0x24]
mov dword [ebp + 8], ebx
call fcn.00404a70
mov edx, dword [esp + 0x24]
mov edi, dword [esp + 0x20]
mov ecx, dword [edi + 0x9c]
push edx
call fcn.0044f5c0
mov ecx, eax
call fcn.0043bdf0
mov ecx, dword [edi + 0x9c]
push esi
call fcn.0044f5c0
mov ecx, eax
call fcn.0043bdf0
lea ecx, [esp + 0x38]
mov byte [esp + 0x80], 0
call fcn.0042a980
lea ecx, [esp + 0x40]
mov dword [esp + 0x80], 0xffffffff
call fcn.0042a980
mov eax, dword [esp + 0x28]
inc eax
cmp eax, 4
mov dword [esp + 0x28], eax
jl 0x40ad50
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
mov ecx, dword [esp + 0x68]
mov dword fs:[0], ecx
add esp, 0x74
ret 4
lea ecx, [esp + 0x38]
mov byte [esp + 0x80], 0
call fcn.0042a980
lea ecx, [esp + 0x40]
mov dword [esp + 0x80], 0xffffffff
call fcn.0042a980
mov ecx, dword [esp + 0x78]
pop edi
pop esi
pop ebp
xor al, al
pop ebx
mov dword fs:[0], ecx
add esp, 0x74
ret 4