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

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x6f77f0
push eax
mov dword fs:[0], esp
sub esp, 0x58
push ebx
push ebp
mov ebp, dword [esp + 0x70]
mov eax, dword [ebp]
push esi
push edi
mov esi, ecx
push 0x10
lea ecx, [esp + 0x5c]
push ecx
mov ecx, ebp
call dword [eax + 0x10]
test al, al
je 0x5dcefa
cmp dword [esp + 0x58], 0x50414d58
jne 0x5dcefa
mov eax, dword [esp + 0x5c]
cmp eax, 7
je 0x5dc818
cmp eax, 3
je 0x5dc818
cmp eax, 5
je 0x5dc818
cmp eax, 6
je 0x5dc818
cmp eax, 0xa
jne 0x5dcefa
mov edx, dword [esp + 0x64]
mov eax, dword [esp + 0x60]
push edx
push eax
mov ecx, esi
call fcn.005c7ab0
mov edx, dword [ebp]
push 8
lea eax, [esp + 0x2c]
push eax
mov ecx, ebp
call dword [edx + 0x10]
test al, al
je 0x5dcefa
mov eax, dword [esp + 0x28]
cmp eax, 0x49444441
ja 0x5dcba1
je 0x5dcb2f
cmp eax, 0x444e4520
je 0x5dce2d
cmp eax, 0x4548544f
je 0x5dca10
cmp eax, 0x454c4954
jne 0x5dcbb3
push 0x71f7e4
call fcn.0040f1b0
mov ebx, dword [esi + 0x44]
mov eax, dword [esp + 0x60]
imul ebx, dword [esi + 0x40]
add esp, 4
cmp eax, 3
jne 0x5dc909
cmp dword [esp + 0x2c], ebx
jne 0x5dcefa
test ebx, ebx
jbe 0x5dce11
xor edi, edi
mov edx, dword [ebp]
push 8
lea eax, [esp + 0x34]
push eax
mov ecx, ebp
call dword [edx + 0x10]
mov ecx, dword [esi + 0x50]
mov dl, byte [esp + 0x34]
mov byte [edi + ecx + 3], dl
mov eax, dword [esi + 0x50]
mov cl, byte [esp + 0x35]
mov byte [edi + eax + 4], cl
mov edx, dword [esi + 0x50]
mov ax, word [esp + 0x30]
mov word [edi + edx], ax
mov ecx, dword [esi + 0x50]
mov dl, byte [esp + 0x32]
mov byte [edi + ecx + 2], dl
mov eax, dword [esi + 0x50]
mov byte [edi + eax + 6], 0
mov ecx, dword [esi + 0x50]
mov dword [edi + ecx + 7], 0
mov edx, dword [esi + 0x50]
mov byte [edi + edx + 5], 0xff
add edi, 0xf
dec ebx
jne 0x5dc8a7
jmp 0x5dce11
cmp eax, 5
mov ecx, dword [esp + 0x2c]
jne 0x5dc971
lea eax, [ebx + ebx*4]
cmp ecx, eax
jne 0x5dcefa
test ebx, ebx
jbe 0x5dce11
xor edi, edi
mov edx, dword [ebp]
push 5
lea eax, [esp + 0x1c]
push eax
mov ecx, ebp
call dword [edx + 0x10]
mov edx, dword [esi + 0x50]
push 5
lea ecx, [esp + 0x1c]
push ecx
add edx, edi
push edx
call fcn.0065c820
mov eax, dword [esi + 0x50]
mov dword [edi + eax + 7], 0
mov ecx, dword [esi + 0x50]
mov byte [edi + ecx + 6], 0
mov edx, dword [esi + 0x50]
mov byte [edi + edx + 5], 0xff
add esp, 0xc
add edi, 0xf
dec ebx
jne 0x5dc927
jmp 0x5dce11
cmp eax, 0xa
lea eax, [ebx + ebx*2]
jne 0x5dc9ce
shl eax, 1
cmp ecx, eax
jne 0x5dcefa
push 0x71f7d4
call fcn.0040f1b0
add esp, 4
test ebx, ebx
jbe 0x5dce11
xor edi, edi
lea ebx, [ebx]
mov eax, dword [esi + 0x50]
mov edx, dword [ebp]
push 6
add eax, edi
push eax
mov ecx, ebp
call dword [edx + 0x10]
mov ecx, dword [esi + 0x50]
mov byte [edi + ecx + 6], 0
mov edx, dword [esi + 0x50]
mov dword [edi + edx + 0xb], 0
add edi, 0xf
dec ebx
jne 0x5dc9a0
jmp 0x5dce11
shl eax, 1
cmp ecx, eax
jne 0x5dcefa
test ebx, ebx
jbe 0x5dce11
xor edi, edi
mov eax, dword [esi + 0x50]
mov edx, dword [ebp]
push 6
add eax, edi
push eax
mov ecx, ebp
call dword [edx + 0x10]
mov ecx, dword [esi + 0x50]
mov byte [edi + ecx + 6], 0
mov edx, dword [esi + 0x50]
mov dword [edi + edx + 7], 0
add edi, 0xf
dec ebx
jne 0x5dc9e2
jmp 0x5dce11
push 0x71f7bc
call fcn.0040f1b0
mov eax, dword [esp + 0x60]
add esp, 4
cmp eax, 0xa
jne 0x5dcb00
mov eax, dword [esp + 0x2c]
lea edx, [eax + 0xe]
mov eax, 0x88888889
mul edx
shr edx, 3
lea ecx, [esi + 0x10]
push edx
call fcn.005c7760
xor ebx, ebx
xor edi, edi
jmp 0x5dca50
mov eax, dword [esi + 0x14]
test eax, eax
je 0x5dce11
mov ecx, dword [esi + 0x18]
sub ecx, eax
mov eax, 0xb21642c9
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebx, eax
jae 0x5dce11
mov eax, dword [ebp]
push 0xf
lea ecx, [esp + 0x3c]
push ecx
mov ecx, ebp
call dword [eax + 0x10]
mov eax, dword [esi + 0x14]
mov dx, word [esp + 0x45]
mov word [eax + edi + 0xd], dx
mov ecx, dword [esp + 0x3f]
add eax, edi
mov eax, dword [esi + 0x14]
mov dword [eax + edi + 7], ecx
mov dx, word [esp + 0x43]
add eax, edi
mov eax, dword [esi + 0x14]
mov word [eax + edi + 0xb], dx
mov ecx, dword [esp + 0x38]
add eax, edi
mov eax, dword [esi + 0x14]
mov dword [eax + edi], ecx
mov dx, word [esp + 0x3d]
add eax, edi
mov eax, dword [esi + 0x14]
mov word [eax + edi + 5], dx
mov cl, byte [esp + 0x3c]
add eax, edi
mov eax, dword [esi + 0x14]
add eax, edi
mov byte [eax + 4], cl
mov eax, dword [esi + 0x14]
mov dx, word [esp + 0x38]
add eax, edi
mov word [eax], dx
mov eax, dword [esi + 0x14]
mov cx, word [esp + 0x3a]
add eax, edi
inc ebx
mov word [eax + 2], cx
add edi, 0x17
jmp 0x5dca50
mov edx, dword [esp + 0x2c]
add edx, 0xc
mov eax, 0x4ec4ec4f
mul edx
shr edx, 2
push edx
mov ecx, esi
call fcn.005c7730
mov ecx, dword [esp + 0x2c]
mov eax, dword [esi + 4]
mov edx, dword [ebp]
push ecx
push eax
mov ecx, ebp
call dword [edx + 0x10]
jmp 0x5dce11
xor eax, eax
sub esp, 0xc
mov ecx, eax
mov edx, esp
mov dword [edx], eax
mov dword [edx + 4], ecx
mov byte [edx + 8], al
mov eax, dword [esp + 0x38]
lea ecx, [eax + 8]
mov eax, 0x38e38e39
mul ecx
shr edx, 1
lea edi, [esi + 0x30]
push edx
mov ecx, edi
call fcn.005c6420
mov ecx, dword [esp + 0x2c]
mov eax, dword [esi + 0x34]
mov edx, dword [ebp]
push ecx
push eax
mov ecx, ebp
call dword [edx + 0x10]
mov eax, dword [edi + 4]
test eax, eax
je 0x5dcb88
mov edi, dword [edi + 8]
sub edi, eax
mov eax, 0x38e38e39
imul edi
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
mov ecx, dword [esi + 0x34]
push 0x5dc2d0
push 9
push eax
push ecx
call fcn.0065ed00
add esp, 0x10
jmp 0x5dce11
cmp eax, 0x52455453
je 0x5dcd04
cmp eax, 0x52524554
je 0x5dcbd7
push 0x71f7a8
call fcn.0040f1b0
mov edi, dword [ebp]
add esp, 4
mov ecx, ebp
call dword [edi + 4]
add eax, dword [esp + 0x2c]
push eax
mov ecx, ebp
call dword [edi + 8]
jmp 0x5dce11
push 0x71f78c
call fcn.0040f1b0
mov eax, dword [esp + 0x60]
add esp, 4
cmp eax, 3
jne 0x5dcc49
mov eax, dword [esi + 0x44]
add eax, 3
cdq
and edx, 3
add eax, edx
mov ebx, eax
mov eax, dword [esi + 0x40]
sar ebx, 2
inc eax
cdq
sub eax, edx
sar eax, 1
imul ebx, eax
mov eax, dword [esp + 0x2c]
lea edx, [ebx + ebx*2]
shl edx, 1
cmp eax, edx
jne 0x5dcefa
xor edi, edi
test ebx, ebx
jbe 0x5dce11
mov eax, dword [ebp]
push 6
lea ecx, [esp + 0x24]
push ecx
mov ecx, ebp
call dword [eax + 0x10]
movzx edx, word [esp + 0x20]
mov eax, dword [esi + 0x48]
mov dword [eax + edi*4], edx
inc edi
cmp edi, ebx
jb 0x5dcc25
jmp 0x5dce11
cmp eax, 0xa
jne 0x5dcc80
mov ecx, dword [esi + 0x44]
mov edx, dword [esi + 0x40]
push ecx
push edx
mov ecx, esi
call fcn.005c2ff0
mov ecx, eax
mov eax, dword [esp + 0x2c]
shl ecx, 2
cmp eax, ecx
jne 0x5dcefa
mov edx, dword [ebp]
push eax
mov eax, dword [esi + 0x48]
push eax
mov ecx, ebp
call dword [edx + 0x10]
jmp 0x5dce11
mov ecx, dword [esp + 0x2c]
push ecx
push 0x71f774
call fcn.0040f1b0
mov edx, dword [esi + 0x44]
mov eax, dword [esi + 0x40]
add esp, 8
push edx
push eax
mov ecx, esi
call fcn.005c2ff0
shl eax, 1
push eax
push str.CalculateTerrainCount_m_width_m_height_:_d_n
call fcn.0040f1b0
mov ecx, dword [esi + 0x44]
mov edx, dword [esi + 0x40]
add esp, 8
push ecx
push edx
mov ecx, esi
call fcn.005c2ff0
mov ecx, dword [esp + 0x2c]
mov ebx, eax
lea eax, [ebx + ebx]
cmp ecx, eax
jne 0x5dcefa
xor edi, edi
test ebx, ebx
jbe 0x5dce11
jmp 0x5dcce0
mov edx, dword [ebp]
push 2
lea eax, [esp + 0x7c]
push eax
mov ecx, ebp
call dword [edx + 0x10]
movzx ecx, word [esp + 0x78]
mov edx, dword [esi + 0x48]
mov dword [edx + edi*4], ecx
inc edi
cmp edi, ebx
jb 0x5dcce0
jmp 0x5dce11
push 0x71f728
call fcn.0040f1b0
mov eax, dword [esp + 0x60]
add esp, 4
cmp eax, 7
jne 0x5dcd4a
mov eax, dword [esi + 0x44]
inc eax
cdq
sub eax, edx
mov ecx, eax
mov eax, dword [esp + 0x2c]
sar ecx, 1
imul ecx, dword [esi + 0x40]
shl ecx, 2
cmp eax, ecx
jne 0x5dcefa
mov edx, dword [ebp]
push eax
mov eax, dword [esi + 0x4c]
push eax
mov ecx, ebp
call dword [edx + 0x10]
jmp 0x5dce11
cmp eax, 0xa
je 0x5dcd1a
mov ecx, dword [0x780688]
mov dword [esp + 0x10], ecx
xor ebx, ebx
mov dword [esp + 0x70], ebx
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], ebx
mov eax, dword [esi + 0x44]
inc eax
cdq
sub eax, edx
sar eax, 1
imul eax, dword [esi + 0x40]
mov word [esp + 0x14], bx
mov edx, dword [esp + 0x14]
push edx
push eax
lea ecx, [esp + 0x50]
mov byte [esp + 0x78], 1
call fcn.005dc740
mov edi, dword [esp + 0x4c]
cmp edi, ebx
jne 0x5dcd9d
xor eax, eax
jmp 0x5dcda5
mov eax, dword [esp + 0x50]
sub eax, edi
sar eax, 1
lea ecx, [eax + eax]
mov eax, dword [esp + 0x2c]
cmp eax, ecx
jne 0x5dcef1
mov edx, dword [ebp]
push eax
push edi
mov ecx, ebp
call dword [edx + 0x10]
xor ecx, ecx
cmp edi, ebx
je 0x5dcdf3
mov eax, dword [esp + 0x50]
sub eax, edi
sar eax, 1
cmp ecx, eax
jae 0x5dcdf3
mov ax, word [edi + ecx*2]
cmp ax, 0xffff
jne 0x5dcde7
mov eax, dword [esi + 0x4c]
mov dword [eax + ecx*4], 0xffffffff
inc ecx
jmp 0x5dcdc0
movzx edx, ax
mov eax, dword [esi + 0x4c]
mov dword [eax + ecx*4], edx
inc ecx
jmp 0x5dcdc0
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], ebx
mov dword [esp + 0x70], 0xffffffff
mov dword [0x780688], ecx
mov edx, dword [ebp]
push 8
lea eax, [esp + 0x2c]
push eax
mov ecx, ebp
call dword [edx + 0x10]
test al, al
jne 0x5dc840
jmp 0x5dcefa
push 0x71f710
call fcn.0040f1b0
add esp, 4
xor ebx, ebx
xor ebp, ebp
mov edi, edi
mov edi, dword [esi + 4]
test edi, edi
je 0x5dce86
mov ecx, dword [esi + 8]
sub ecx, edi
mov eax, 0x4ec4ec4f
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebx, eax
jae 0x5dce86
movzx eax, word [edi + ebp + 2]
imul eax, dword [esi + 0x40]
movzx edx, word [edi + ebp]
lea ecx, [edi + ebp]
add eax, edx
mov edx, dword [esi + 0x50]
imul eax, eax, 0xf
add eax, edx
je 0x5dce80
mov dword [eax + 7], ecx
inc ebx
add ebp, 0xd
jmp 0x5dce40
xor edi, edi
xor ebx, ebx
lea ebx, [ebx]
mov eax, dword [esi + 0x14]
test eax, eax
je 0x5dceda
mov ecx, dword [esi + 0x18]
sub ecx, eax
mov eax, 0xb21642c9
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp edi, eax
jae 0x5dceda
mov eax, dword [esi + 0x14]
movzx edx, word [eax + ebx]
lea ecx, [eax + ebx]
movzx eax, word [ecx + 2]
imul eax, dword [esi + 0x40]
add eax, edx
mov edx, dword [esi + 0x50]
imul eax, eax, 0xf
add eax, edx
je 0x5dced4
mov dword [eax + 0xb], ecx
inc edi
add ebx, 0x17
jmp 0x5dce90
mov al, 1
mov ecx, dword [esp + 0x68]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret 4
mov eax, dword [esp + 0x10]
mov dword [0x780688], eax
mov ecx, dword [esp + 0x68]
pop edi
pop esi
pop ebp
xor al, al
mov dword fs:[0], ecx
pop ebx
add esp, 0x64
ret 4