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

Disassembly:
sub esp, 0x90
push ebx
push ebp
push esi
push edi
xor ebx, ebx
mov esi, ecx
push ebx
push str.BoundaryTerrain
mov edx, str.FogOfWar
lea ecx, [esp + 0x8c]
mov dword [esp + 0x60], esi
mov dword [esp + 0x90], 0x6080ff80
mov dword [esp + 0x20], ebx
call fcn.004bf5f0
lea ecx, [ebx + 1]
call fcn.004bb690
mov edi, eax
mov eax, dword [esp + 0xac]
mov ecx, eax
shr ecx, 9
and ecx, 1
mov dword [esp + 0x6c], ecx
mov ecx, dword [0x83b0f8]
mov dword [esp + 0x40], edi
mov dword [esp + 0x54], ecx
je 0x643e9f
mov edx, dword [0x861718]
mov dword [esp + 0x54], edx
mov ebp, dword [esp + 0xa4]
mov ecx, dword [ebp + 0xc]
sub ecx, dword [ebp + 4]
xor edx, edx
test eax, 0x100
mov dword [esp + 0x34], ecx
mov dword [esp + 0x3c], edx
je 0x643ede
mov ecx, esi
call fcn.00528090
mov dword [esp + 0x2c], eax
mov eax, dword [esi + 0x970]
mov ecx, eax
mov edx, 1
shr ecx, 4
mov dword [esp + 0x3c], edx
jmp 0x643eeb
mov ecx, eax
and ecx, 1
mov dword [esp + 0x2c], ecx
mov ecx, eax
shr ecx, 1
and ecx, 1
mov dword [esp + 0x7c], ecx
mov ecx, eax
shr ecx, 2
shr eax, 0xa
and ecx, 1
and eax, 1
cmp edx, ebx
mov dword [esp + 0x78], eax
mov dword [esp + 0x28], ecx
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x60], ebx
mov dword [esp + 0x64], ebx
mov dword [esp + 0x68], ebx
je 0x643f46
lea eax, [esp + 0x90]
push eax
mov ecx, esi
call fcn.00553050
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [esp + 0x5c], ecx
mov ecx, dword [eax + 8]
mov dword [esp + 0x60], edx
mov edx, dword [eax + 0xc]
mov dword [esp + 0x64], ecx
mov dword [esp + 0x68], edx
test edi, edi
mov eax, dword [ebp]
mov edx, dword [ebp + 4]
mov ecx, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], edx
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x50], ebx
je 0x643fa4
mov edx, dword [ebp]
lea eax, [esp + 0x44]
push eax
mov eax, dword [ebp + 4]
lea ecx, [esp + 0x4c]
push ecx
push edx
push eax
mov ecx, esi
call fcn.005dc870
mov eax, dword [ebp + 8]
lea ecx, [esp + 0x4c]
push ecx
mov ecx, dword [ebp + 0xc]
lea edx, [esp + 0x54]
push edx
push eax
push ecx
mov ecx, esi
call fcn.005dc870
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x48]
mov eax, dword [esp + 0x44]
cmp eax, ecx
mov edi, dword [esp + 0xa8]
mov dword [esp + 0x1c], eax
jg 0x6443cb
lea eax, [eax*4 - 1]
mov dword [esp + 0x20], eax
cmp edx, dword [esp + 0x50]
mov dword [esp + 0x14], edx
jg 0x6443af
mov eax, dword [esi + 0xb4]
mov ebx, dword [esp + 0x1c]
mov edx, dword [esi + 0xe4]
add eax, 1
imul eax, ebx
add eax, dword [esp + 0x14]
lea ecx, [eax*8]
sub ecx, eax
cmp dword [esp + 0x2c], 0
lea eax, [edx + ecx*4]
mov dword [esp + 0x38], eax
je 0x644066
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x70]
push ecx
lea edx, [esp + 0x78]
push edx
push ebx
push eax
mov ecx, esi
call fcn.00577d90
test eax, eax
je 0x644066
mov ecx, dword [esp + 0x70]
mov edx, dword [esp + 0x74]
push ecx
push edx
mov ecx, esi
call fcn.005817a0
test eax, eax
jne 0x644066
mov ecx, dword [esp + 0x70]
mov edx, dword [esp + 0x74]
push eax
lea eax, [esp + 0x84]
push eax
push ecx
push edx
mov ecx, esi
call fcn.00577f90
mov eax, dword [esp + 0x80]
push eax
lea ecx, [esp + 0x90]
push ecx
mov ecx, esi
call fcn.00643d90
mov ebx, dword [eax]
jmp 0x6440b3
cmp dword [esp + 0x78], 0
je 0x644086
mov edx, dword [esp + 0x14]
push ebx
push edx
mov ecx, esi
call fcn.005e2f60
test eax, eax
je 0x644086
mov ebx, dword [esi + 0x200]
jmp 0x6440b3
mov eax, dword [esp + 0x38]
movzx eax, byte [eax + 8]
and eax, 0xf
cmp eax, dword [esi + 0xf0]
jae 0x6440af
cmp dword [esp + 0x2c], 0
je 0x6440af
mov ecx, dword [esi + 0xf4]
shl eax, 4
mov ebx, dword [eax + ecx + 8]
jmp 0x6440b3
mov ebx, dword [esp + 0x54]
cmp dword [esp + 0x7c], 0
mov dword [esp + 0x10], ebx
je 0x644103
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
push edx
push eax
mov ecx, esi
call fcn.005e53b0
test eax, eax
jle 0x644103
mov dword [esp + 0x24], eax
jmp 0x6440e0
lea ecx, [esp + 0x18]
push ecx
lea edx, [esi + 0x320]
lea ecx, [esp + 0x14]
call fcn.004bc860
sub dword [esp + 0x24], 1
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x10], ebx
jne 0x6440e0
mov edx, dword [esp + 0x38]
test byte [edx + 0xc], 0xc0
je 0x64412a
lea eax, [esp + 0x18]
push eax
lea edx, [esp + 0x88]
lea ecx, [esp + 0x14]
call fcn.004bc860
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x10], ebx
cmp dword [esp + 0x3c], 0
je 0x64416e
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x60]
jl 0x64416e
cmp eax, dword [esp + 0x68]
jge 0x64416e
mov eax, dword [esp + 0x1c]
cmp eax, dword [esp + 0x5c]
jl 0x64416e
cmp eax, dword [esp + 0x64]
jge 0x64416e
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x8c]
lea ecx, [esp + 0x14]
call fcn.004bc860
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x10], ebx
cmp dword [esp + 0x40], 0
je 0x6442cd
mov esi, dword [esp + 0x14]
mov ecx, dword [esp + 0x20]
lea esi, [esi*4 - 2]
mov dword [esp + 0x38], 4
cmp esi, dword [ebp + 4]
jl 0x6442b6
cmp esi, dword [ebp + 0xc]
jge 0x6442b6
mov edx, dword [ebp]
lea eax, [ecx - 1]
cmp eax, edx
jl 0x6441eb
cmp eax, dword [ebp + 8]
jge 0x6441eb
mov eax, ecx
movzx ecx, byte [esp + 0x12]
sub eax, edx
mov edx, dword [edi + 8]
sub eax, 1
imul eax, dword [esp + 0x34]
sub eax, dword [ebp + 4]
add eax, esi
mov byte [edx + eax*4 + 2], cl
mov edx, dword [edi + 8]
mov byte [edx + eax*4 + 1], bh
mov ecx, dword [edi + 8]
mov byte [ecx + eax*4], bl
movzx ecx, byte [esp + 0x13]
mov edx, dword [edi + 8]
mov byte [edx + eax*4 + 3], cl
mov ecx, dword [esp + 0x20]
mov edx, dword [ebp]
cmp ecx, edx
jl 0x64422e
cmp ecx, dword [ebp + 8]
jge 0x64422e
mov eax, ecx
movzx ecx, byte [esp + 0x12]
sub eax, edx
imul eax, dword [esp + 0x34]
sub eax, dword [ebp + 4]
mov edx, dword [edi + 8]
add eax, esi
mov byte [edx + eax*4 + 2], cl
mov edx, dword [edi + 8]
mov byte [edx + eax*4 + 1], bh
mov ecx, dword [edi + 8]
mov byte [ecx + eax*4], bl
movzx ecx, byte [esp + 0x13]
mov edx, dword [edi + 8]
mov byte [edx + eax*4 + 3], cl
mov ecx, dword [esp + 0x20]
mov edx, dword [ebp]
lea eax, [ecx + 1]
cmp eax, edx
jl 0x644272
cmp eax, dword [ebp + 8]
jge 0x644272
movzx ecx, byte [esp + 0x12]
sub eax, edx
imul eax, dword [esp + 0x34]
sub eax, dword [ebp + 4]
mov edx, dword [edi + 8]
add eax, esi
mov byte [edx + eax*4 + 2], cl
mov edx, dword [edi + 8]
mov byte [edx + eax*4 + 1], bh
mov ecx, dword [edi + 8]
mov byte [ecx + eax*4], bl
movzx ecx, byte [esp + 0x13]
mov edx, dword [edi + 8]
mov byte [edx + eax*4 + 3], cl
mov ecx, dword [esp + 0x20]
mov edx, dword [ebp]
lea eax, [ecx + 2]
cmp eax, edx
jl 0x6442b6
cmp eax, dword [ebp + 8]
jge 0x6442b6
movzx ecx, byte [esp + 0x12]
sub eax, edx
imul eax, dword [esp + 0x34]
sub eax, dword [ebp + 4]
mov edx, dword [edi + 8]
add eax, esi
mov byte [edx + eax*4 + 2], cl
mov edx, dword [edi + 8]
mov byte [edx + eax*4 + 1], bh
mov ecx, dword [edi + 8]
mov byte [ecx + eax*4], bl
movzx ecx, byte [esp + 0x13]
mov edx, dword [edi + 8]
mov byte [edx + eax*4 + 3], cl
mov ecx, dword [esp + 0x20]
add esi, 1
sub dword [esp + 0x38], 1
jne 0x644190
mov esi, dword [esp + 0x58]
jmp 0x644392
mov eax, dword [esp + 0x14]
cmp eax, dword [ebp + 4]
jl 0x644392
cmp eax, dword [ebp + 0xc]
jge 0x644392
mov eax, dword [esp + 0x1c]
cmp eax, dword [ebp]
jl 0x644392
cmp eax, dword [ebp + 8]
jge 0x644392
cmp dword [esp + 0x28], 0
mov dword [esp + 0x24], ebx
je 0x644357
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x14]
push 0xfffffffffffffff7
add edx, 1
push edx
lea ecx, [eax*4]
push ecx
lea edx, [esp + 0x3c]
push edx
mov ecx, esi
call fcn.005ddb40
cmp byte [esp + 0x33], 0
je 0x644357
cmp dword [esp + 0x6c], 0
je 0x644341
cmp byte [esp + 0x13], 0
jne 0x644341
mov ebx, dword [esp + 0x30]
jmp 0x644357
lea eax, [esp + 0x18]
push eax
lea edx, [esp + 0x34]
lea ecx, [esp + 0x28]
call fcn.004bc860
mov ebx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
sub eax, dword [ebp]
mov edx, dword [edi + 8]
imul eax, dword [esp + 0x34]
sub eax, dword [ebp + 4]
mov ecx, ebx
add eax, dword [esp + 0x14]
shr ecx, 0x10
mov byte [edx + eax*4 + 2], cl
mov edx, dword [edi + 8]
mov ecx, ebx
shr ecx, 8
mov byte [edx + eax*4 + 1], cl
mov ecx, dword [edi + 8]
mov byte [ecx + eax*4], bl
mov edx, dword [edi + 8]
shr ebx, 0x18
mov byte [edx + eax*4 + 3], bl
mov eax, dword [esp + 0x14]
add eax, 1
cmp eax, dword [esp + 0x50]
mov dword [esp + 0x14], eax
jle 0x643fd0
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x48]
mov eax, dword [esp + 0x1c]
add dword [esp + 0x20], 4
add eax, 1
cmp eax, ecx
mov dword [esp + 0x1c], eax
jle 0x643fc2
mov eax, dword [esp + 0x44]
cmp dword [esp + 0x28], 0
je 0x64453d
cmp dword [esp + 0x40], 0
je 0x64453d
cmp eax, ecx
mov esi, eax
mov dword [esp + 0x1c], eax
jg 0x64453d
mov eax, dword [esp + 0x50]
cmp edx, eax
mov ebx, edx
mov dword [esp + 0x14], ebx
jg 0x64452e
lea eax, [ebx*4]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x3c], 4
cmp eax, dword [ebp + 4]
jl 0x6444fd
cmp eax, dword [ebp + 0xc]
jge 0x6444fd
lea ecx, [esi*4]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x40], 4
lea esp, [esp]
mov eax, dword [ebp]
cmp ecx, eax
jl 0x6444e3
cmp ecx, dword [ebp + 8]
jge 0x6444e3
mov ecx, dword [esp + 0x30]
mov edx, dword [edi + 8]
mov esi, ecx
sub esi, eax
imul esi, dword [esp + 0x34]
sub esi, dword [ebp + 4]
mov eax, dword [esp + 0x2c]
push 0xfffffffffffffff7
push ecx
mov ecx, dword [esp + 0x60]
add esi, eax
mov ebx, dword [edx + esi*4]
push eax
lea eax, [esp + 0x34]
push eax
mov dword [esp + 0x34], ebx
call fcn.005ddb40
cmp byte [esp + 0x2b], 0
je 0x6444b7
cmp dword [esp + 0x6c], 0
je 0x6444a1
cmp byte [esp + 0x27], 0
jne 0x6444a1
mov ebx, dword [esp + 0x28]
jmp 0x6444b7
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x2c]
lea ecx, [esp + 0x28]
call fcn.004bc860
mov ebx, dword [esp + 0x18]
mov eax, dword [edi + 8]
mov edx, ebx
shr edx, 0x10
mov byte [eax + esi*4 + 2], dl
mov edx, dword [edi + 8]
mov ecx, ebx
shr ecx, 8
mov byte [edx + esi*4 + 1], cl
mov eax, dword [edi + 8]
mov byte [eax + esi*4], bl
mov ecx, dword [edi + 8]
shr ebx, 0x18
mov byte [ecx + esi*4 + 3], bl
mov ecx, dword [esp + 0x30]
add ecx, 1
sub dword [esp + 0x40], 1
mov dword [esp + 0x30], ecx
jne 0x644440
mov eax, dword [esp + 0x2c]
mov esi, dword [esp + 0x1c]
add eax, 1
sub dword [esp + 0x3c], 1
mov dword [esp + 0x2c], eax
jne 0x644414
mov ebx, dword [esp + 0x14]
mov eax, dword [esp + 0x50]
add ebx, 1
cmp ebx, eax
mov dword [esp + 0x14], ebx
jle 0x644401
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x48]
add esi, 1
cmp esi, ecx
mov dword [esp + 0x1c], esi
jle 0x6443f3
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x90
ret 0xc