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

Disassembly:
jmp 0x4f7570
sub esp, 0x40
mov ecx, dword [0x5552b0]
push ebx
push ebp
push esi
xor esi, esi
push edi
mov dword [esp + 0x18], esi
mov dword [esp + 0x30], esi
mov dword [esp + 0x24], esi
mov dword [esp + 0x40], esi
mov eax, dword [ecx + 0x5524]
push 1
push str.Entering_DoWeNeedToDefendAnOwnedContinent
mov dword [esp + 0x44], esi
lea edx, [eax + eax*2]
mov dword [esp + 0x34], esi
lea edx, [edx + edx*4]
shl edx, 5
add edx, eax
lea ebx, [ecx + edx*4 + 0x698]
mov dword [esp + 0x24], ebx
call fcn.00401f91
mov ecx, dword [0x5552b0]
mov dword [esp + 0x20], esi
mov dword [esp + 0x28], esi
mov esi, dword [ecx + 0x5d4]
mov edx, dword [esp + 0x28]
mov ebp, dword [esp + 0x5c]
add esi, edx
mov dword [esp + 0x4c], esi
mov edi, dword [esi + 0xc]
cmp edi, 6
jg 0x4f75ed
mov ebp, dword [esp + 0x58]
mov eax, dword [ecx + 0x5524]
mov dword [esi + 0x84], eax
mov eax, dword [esi + 0x50]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 2
cdq
idiv edi
lea edx, [esp + 0x24]
mov dword [esp + 0x38], eax
fild dword [esp + 0x38]
fstp dword [esp + 0x10]
mov ecx, dword [esp + 0x10]
push ecx
push edx
call fcn.00401889
mov eax, dword [esi + 0x84]
mov ecx, dword [esi + 0x60]
mov edx, dword [esi + 0x74]
mov edi, dword [esp + 0x5c]
mov eax, dword [esi + eax*4 + 0x2c]
sub eax, ecx
add eax, edx
add eax, edi
mov edi, dword [esi + 0x4c]
sub edi, ecx
mov ecx, dword [esp + 0x5c]
lea eax, [eax + eax*4]
add edi, edx
add edi, ecx
lea eax, [eax + eax*4]
shl eax, 2
cdq
idiv edi
lea edx, [esp + 0x48]
mov dword [esp + 0x40], eax
fild dword [esp + 0x40]
fstp dword [esp + 0x18]
mov ecx, dword [esp + 0x18]
push ecx
push edx
call fcn.00401889
mov eax, dword [esp + 0x34]
add esp, 0x10
cmp eax, ebp
jl 0x4f7e7f
mov eax, dword [esi + 0x28]
mov ecx, dword [esi + 0x24]
inc eax
mov dword [esp + 0x34], ecx
cmp ecx, eax
jge 0x4f7e7f
lea eax, [ecx + ecx*2]
shl eax, 3
sub eax, ecx
mov ecx, dword [0x5552b0]
lea edx, [eax + eax*2]
shl edx, 2
mov dword [esp + 0x38], edx
xor ebp, ebp
jmp 0x4f76b5
mov ebx, dword [esp + 0x1c]
xor ebp, ebp
mov dword [ecx + 0x5544], ebp
mov ecx, dword [0x5552b0]
mov eax, 1
mov esi, dword [ecx + 0x5d0]
add esi, edx
cmp dword [esi + 0x44], eax
jne 0x4f7aa2
mov edx, dword [esi + 0x48]
mov edi, dword [ecx + 0x5524]
cmp edx, edi
jne 0x4f7aa2
cmp dword [esi + 8], eax
jne 0x4f7e18
lea edi, [esi + 0x88]
push 0x549b78
push edi
call fcn.00402fea
add esp, 8
test eax, eax
jne 0x4f788e
lea eax, [esi + 0x9c]
push 0x549b78
push eax
mov dword [esp + 0x18], eax
call fcn.00402fea
mov ecx, dword [0x5552b0]
add esp, 8
test eax, eax
push edi
jne 0x4f7830
call fcn.0040209f
lea ecx, [eax + eax*2]
shl ecx, 3
sub ecx, eax
lea eax, [ecx + ecx*2]
mov ecx, dword [0x5552b0]
mov edx, dword [ecx + 0x5d0]
lea ebx, [edx + eax*4]
mov eax, dword [esp + 0x10]
push eax
call fcn.0040209f
lea ecx, [eax + eax*2]
shl ecx, 3
sub ecx, eax
lea edx, [ecx + ecx*2]
mov ecx, dword [0x5552b0]
mov eax, dword [ecx + 0x5d0]
lea ebp, [eax + edx*4]
mov eax, dword [0x5537f0]
cmp eax, 1
jne 0x4f77ae
cmp dword [ecx], 7
je 0x4f77ae
mov edx, dword [ebx + 0x64]
mov eax, dword [ebx + 0x50]
inc edx
cmp eax, edx
jge 0x4f779b
mov edx, dword [ebx + 0x7c]
mov eax, dword [ebx + 0x54]
add edx, eax
jmp 0x4f779e
or edx, 0xffffffff
mov eax, dword [ebp + 0x64]
mov ebx, dword [ebp + 0x50]
inc eax
cmp ebx, eax
jl 0x4f77b6
or eax, 0xffffffff
jmp 0x4f77be
mov edx, dword [ebx + 0x7c]
mov eax, dword [ebx + 0x54]
add edx, eax
mov eax, dword [ebp + 0x7c]
mov ebx, dword [ebp + 0x54]
add eax, ebx
test edx, edx
jle 0x4f77f1
cmp edx, eax
jl 0x4f77f1
push edi
call fcn.0040209f
lea ecx, [eax + eax*2]
mov ebx, dword [esp + 0x1c]
shl ecx, 3
sub ecx, eax
xor ebp, ebp
lea edx, [ecx + ecx*2]
mov ecx, dword [0x5552b0]
mov eax, dword [ecx + 0x5d0]
lea esi, [eax + edx*4]
jmp 0x4f78b0
test eax, eax
jle 0x4f7aa2
cmp eax, edx
jl 0x4f7aa2
mov edx, dword [esp + 0x10]
push edx
call fcn.0040209f
lea ecx, [eax + eax*2]
mov ebx, dword [esp + 0x1c]
shl ecx, 3
sub ecx, eax
xor ebp, ebp
lea eax, [ecx + ecx*2]
mov ecx, dword [0x5552b0]
mov edx, dword [ecx + 0x5d0]
lea esi, [edx + eax*4]
jmp 0x4f78b0
call fcn.0040209f
lea ecx, [eax + eax*2]
shl ecx, 3
sub ecx, eax
lea eax, [ecx + ecx*2]
mov ecx, dword [0x5552b0]
mov edx, dword [ecx + 0x5d0]
lea eax, [edx + eax*4]
mov edx, dword [0x5537f0]
cmp edx, 1
jne 0x4f786c
cmp dword [ecx], 7
je 0x4f786c
mov edx, dword [eax + 0x64]
inc edx
cmp dword [eax + 0x50], edx
jge 0x4f7aa2
push edi
call fcn.0040209f
lea ecx, [eax + eax*2]
shl ecx, 3
sub ecx, eax
lea eax, [ecx + ecx*2]
mov ecx, dword [0x5552b0]
mov edx, dword [ecx + 0x5d0]
lea esi, [edx + eax*4]
jmp 0x4f78b0
mov ecx, dword [0x5552b0]
cmp dword [ecx], 7
je 0x4f78b0
cmp dword [0x5537f0], ebp
je 0x4f78b0
mov eax, dword [esi + 0x64]
mov edx, dword [esi + 0x50]
inc eax
cmp edx, eax
jge 0x4f7aa2
cmp dword [esi + 0x54], ebp
je 0x4f7afa
mov edx, dword [ebx + 0x28]
mov ecx, 0x64
sub ecx, edx
lea eax, [esp + 0x18]
mov dword [esp + 0x10], ecx
fild dword [esp + 0x10]
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
fdiv dword [0x529028]
fadd dword [0x52902c]
fstp dword [esp + 0x10]
mov edx, dword [esp + 0x10]
push edx
push eax
call fcn.00401889
mov eax, dword [esp + 0x20]
push eax
push 6
push eax
call fcn.00403a30
mov dword [esp + 0x2c], eax
mov eax, dword [esi + 0x4c]
mov ebx, dword [esi + 0x7c]
lea ecx, [eax + eax*4]
lea ecx, [ecx + ecx*4]
shl ecx, 2
mov dword [esp + 0x24], ecx
mov ecx, dword [esi + 0x54]
fild dword [esp + 0x24]
add eax, ecx
add eax, ebx
fstp dword [esp + 0x58]
mov dword [esp + 0x24], eax
lea eax, [esp + 0x44]
fild dword [esp + 0x24]
fstp dword [esp + 0x24]
fld dword [esp + 0x24]
fdivr dword [esp + 0x58]
fstp dword [esp + 0x24]
mov edx, dword [esp + 0x24]
push edx
push eax
call fcn.00401889
mov eax, dword [esi + 0x4c]
mov ecx, 0x4e
push 0x5a
sub ecx, eax
push 0x14
push ecx
call fcn.00403a30
mov edx, dword [esi + 0x4c]
mov edi, dword [esi + 0x7c]
mov ecx, dword [esp + 0x40]
sub edx, edi
add esp, 0x28
cmp edx, ecx
mov dword [esp + 0x44], eax
jl 0x4f7981
cmp dword [esp + 0x30], eax
jge 0x4f7a9c
mov eax, dword [0x5552b0]
mov dword [eax + 0x5544], ebp
mov eax, dword [esi + 0xd0]
push eax
call fcn.00401e24
add esp, 4
cmp eax, 0xf
jle 0x4f79d3
lea ecx, [eax - 0xf]
mov eax, 0x66666667
imul ecx
sar edx, 2
mov ecx, edx
shr ecx, 0x1f
lea eax, [edx + ecx + 0xf]
cmp eax, 0x14
jle 0x4f79e3
lea ecx, [eax - 0x14]
mov eax, 0x66666667
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
lea eax, [edx + eax + 0x14]
jmp 0x4f79e3
cmp eax, ebp
jle 0x4f79e3
push eax
push 8
push eax
call fcn.00403a30
add esp, 0xc
push eax
push 3
push eax
call fcn.00403a30
add esp, 0xc
mov ebx, eax
mov eax, dword [esi + 0x4c]
mov ebp, dword [esi + 0x54]
mov ecx, dword [0x5552b0]
mov edx, eax
sub edx, ebp
mov ebp, dword [esi + 0x7c]
mov edi, dword [ecx + 0x5544]
sub edx, ebp
mov ebp, dword [esp + 0x18]
add edx, edi
cmp edx, ebp
jl 0x4f7a2d
add eax, edi
lea ebp, [eax + ebx]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 2
cdq
idiv ebp
cmp eax, dword [esp + 0x44]
jge 0x4f7a36
inc edi
mov dword [ecx + 0x5544], edi
jmp 0x4f79f1
mov edx, dword [esi + 0x4c]
cmp edx, 5
jge 0x4f7aa2
cmp ebx, 5
jle 0x4f7aa2
mov eax, dword [esp + 0x1c]
add ecx, 0x5544
fild dword [eax + 0x28]
mov eax, 4
sub eax, edx
fstp dword [esp + 0x44]
fld dword [0x5296cc]
fsub dword [esp + 0x44]
lea edx, [eax + eax*4]
shl edx, 1
fdiv dword [0x5296b4]
mov dword [esp + 0x44], edx
fild dword [esp + 0x44]
fstp dword [esp + 0x44]
fadd dword [esp + 0x44]
fild dword [ecx]
fstp dword [esp + 0x44]
fadd dword [esp + 0x44]
fstp dword [esp + 0x10]
mov eax, dword [esp + 0x10]
push eax
push ecx
call fcn.00401889
add esp, 8
mov ecx, dword [0x5552b0]
mov eax, dword [ecx + 0x5544]
mov edx, dword [esp + 0x2c]
cmp eax, edx
jle 0x4f7ace
mov edx, dword [esi + 0xd0]
mov dword [esp + 0x2c], eax
mov dword [ecx + 0x55e8], edx
mov ecx, dword [0x5552b0]
mov dword [esp + 0x3c], 1
mov esi, dword [esp + 0x4c]
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
inc eax
mov esi, dword [esi + 0x28]
add edx, 0x114
inc esi
mov dword [esp + 0x34], eax
cmp eax, esi
mov dword [esp + 0x38], edx
jl 0x4f76af
jmp 0x4f7e87
cmp dword [esp + 0x24], 0x64
jne 0x4f7aa2
mov eax, dword [esi + 0xb0]
mov edi, dword [ebx + 0x54]
cmp eax, ebp
jne 0x4f7bc0
cmp edi, 0x27
jg 0x4f7b75
call fcn.0050f2e2
cdq
mov ecx, 0x64
idiv ecx
cmp edx, edi
jl 0x4f7b75
mov eax, dword [ebx + 0x28]
mov edi, dword [esi + 0xd0]
sub ecx, eax
mov eax, 0x66666667
imul ecx
sar edx, 3
mov eax, edx
mov ecx, 0xfffffffd
shr eax, 0x1f
add edx, eax
sub ecx, edx
push ecx
push 1
push ebp
push 1
push ebp
push edi
call fcn.00402608
mov ecx, dword [esp + 0x78]
add esp, 0x18
cmp ecx, ebp
jne 0x4f7c7b
cmp eax, 0xffffffff
jg 0x4f7c84
jmp 0x4f7a9c
mov edx, dword [esp + 0x20]
mov eax, dword [esi + 0xd0]
push ebp
push edx
push eax
call fcn.00402acc
add esp, 0xc
cmp eax, 0xffffffff
je 0x4f7a9c
lea ecx, [eax + eax*2]
shl ecx, 3
sub ecx, eax
mov eax, dword [0x5552b0]
mov edx, dword [eax + 0x5d0]
lea ecx, [ecx + ecx*2]
mov ebp, dword [edx + ecx*4 + 0x54]
lea esi, [edx + ecx*4]
mov ecx, dword [edx + ecx*4 + 0x4c]
mov edx, dword [esi + 0x7c]
sub ecx, edx
sub ecx, ebp
jmp 0x4f7c4c
cmp edi, 0x27
jg 0x4f7c06
call fcn.0050f2e2
cdq
mov ecx, 0x64
idiv ecx
cmp edx, edi
jl 0x4f7c06
mov eax, dword [ebx + 0x28]
mov edi, dword [esi + 0xd0]
sub ecx, eax
mov eax, 0x66666667
imul ecx
sar edx, 3
mov eax, edx
mov ecx, 0xfffffffd
shr eax, 0x1f
add edx, eax
sub ecx, edx
push ecx
push 1
push ebp
push 1
push 1
jmp 0x4f7b52
mov edx, dword [esp + 0x20]
mov eax, dword [esi + 0xd0]
push ebp
push edx
push eax
call fcn.00402acc
add esp, 0xc
cmp eax, 0xffffffff
je 0x4f7a9c
lea ecx, [eax + eax*2]
shl ecx, 3
sub ecx, eax
mov eax, dword [0x5552b0]
mov edx, dword [eax + 0x5d0]
lea ecx, [ecx + ecx*2]
mov ebp, dword [edx + ecx*4 + 0x54]
lea esi, [edx + ecx*4]
mov ecx, dword [edx + ecx*4 + 0x7c]
mov edx, dword [esi + 0x4c]
sub ecx, edx
add ecx, ebp
mov dword [eax + 0x5544], ecx
mov edx, dword [0x5552b0]
mov eax, dword [edx + 0x5544]
push eax
push 1
push eax
call fcn.00403a30
mov ecx, dword [0x5552b0]
add esp, 0xc
mov dword [ecx + 0x5544], eax
jmp 0x4f7a9c
cmp ecx, 1
jne 0x4f7a9c
mov ecx, dword [0x5552b0]
mov edx, dword [ecx + 0x5a44]
cmp edx, 0xffffffff
je 0x4f7aa2
lea eax, [edx + edx*2]
shl eax, 3
sub eax, edx
lea edx, [eax + eax*2]
mov eax, dword [ecx + 0x5d0]
lea edi, [eax + edx*4]
mov eax, dword [eax + edx*4 + 0x54]
cmp eax, ebp
jle 0x4f7aa2
fild dword [edi + 0x7c]
fstp qword [esp + 0x44]
fld qword [esp + 0x44]
fmul qword [str.333333]
fild dword [edi + 0x4c]
fstp qword [esp + 0x44]
fcomp qword [esp + 0x44]
fnstsw ax
test ah, 0x41
jne 0x4f7d86
mov dword [ecx + 0x5544], ebp
mov ecx, dword [0x5552b0]
mov eax, dword [edi + 0x4c]
mov edx, dword [ecx + 0x5544]
add eax, edx
mov dword [esp + 0x44], eax
fild dword [esp + 0x44]
fstp qword [esp + 0x10]
fild dword [edi + 0x7c]
fstp qword [esp + 0x44]
fld qword [esp + 0x44]
fmul qword [str.333333]
fcomp qword [esp + 0x10]
fnstsw ax
test ah, 0x41
jne 0x4f7d5f
inc edx
mov dword [ecx + 0x5544], edx
mov ecx, dword [0x5552b0]
mov eax, dword [edi + 0x4c]
mov edx, dword [ecx + 0x5544]
add eax, edx
mov dword [esp + 0x44], eax
fild dword [esp + 0x44]
fstp qword [esp + 0x10]
fild dword [edi + 0x7c]
fstp qword [esp + 0x44]
fld qword [esp + 0x44]
fmul qword [str.333333]
fcomp qword [esp + 0x10]
fnstsw ax
test ah, 0x41
je 0x4f7d1f
mov edi, dword [edi]
push edi
call fcn.0040209f
lea ecx, [eax + eax*2]
shl ecx, 3
sub ecx, eax
lea edx, [ecx + ecx*2]
mov ecx, dword [0x5552b0]
mov eax, dword [ecx + 0x5d0]
lea esi, [eax + edx*4]
jmp 0x4f7aa2
mov eax, dword [edi + 0xd0]
push eax
call fcn.0040324c
fild dword [edi + 0x7c]
mov dword [esp + 0x48], eax
add esp, 4
fstp qword [esp + 0x10]
fld qword [esp + 0x10]
fmul qword [str.333333]
fild dword [esp + 0x44]
fstp qword [esp + 0x44]
fadd qword [esp + 0x44]
fild dword [edi + 0x4c]
fstp qword [esp + 0x44]
fcomp qword [esp + 0x44]
fnstsw ax
test ah, 0x41
jne 0x4f7a9c
mov ecx, dword [0x5552b0]
mov dword [ecx + 0x5544], ebp
mov ecx, dword [0x5552b0]
mov ebx, dword [esi + 0x4c]
mov eax, dword [ecx + 0x5544]
mov edx, eax
add edx, ebx
cmp edx, 3
jge 0x4f7aa2
inc eax
mov dword [ecx + 0x5544], eax
mov ecx, dword [0x5552b0]
mov ebx, dword [esi + 0x4c]
mov eax, dword [ecx + 0x5544]
mov edx, eax
add edx, ebx
cmp edx, 3
jl 0x4f7df4
jmp 0x4f7aa2
cmp dword [esi + 0x60], ebp
je 0x4f7aa2
cmp dword [ecx], 7
je 0x4f7e3d
cmp dword [0x5537f0], ebp
je 0x4f7e3d
mov eax, dword [esi + 0x64]
mov edx, dword [esi + 0x50]
inc eax
cmp edx, eax
jge 0x4f7aa2
mov dword [ecx + 0x5544], ebp
mov ecx, dword [0x5552b0]
mov ebx, dword [esi + 0x4c]
mov edi, dword [ecx + 0x5544]
lea eax, [ebx + edi]
cmp eax, 4
jl 0x4f7e76
lea eax, [eax + eax*4]
mov ebp, dword [esi + 0x7c]
lea eax, [eax + eax*4]
shl eax, 2
cdq
idiv ebx
add eax, ebp
add eax, edi
cmp eax, 0x2d
jge 0x4f7aa2
inc edi
mov dword [ecx + 0x5544], edi
jmp 0x4f7e43
mov ecx, dword [0x5552b0]
jmp 0x4f7e8b
mov ebx, dword [esp + 0x1c]
mov eax, dword [esp + 0x28]
mov edi, dword [esp + 0x20]
add eax, 0x94
inc edi
cmp eax, 0x378
mov dword [esp + 0x20], edi
mov dword [esp + 0x28], eax
jl 0x4f75cd
mov eax, dword [esp + 0x2c]
pop edi
pop esi
pop ebp
test eax, eax
pop ebx
je 0x4f7ec4
mov dword [ecx + 0x5544], eax
mov ecx, dword [0x5552b0]
push 1
push str.DoWeNeedToDefendAnOwnedContinent___DONE
call fcn.00401f91
mov eax, dword [esp + 0x2c]
add esp, 0x40
ret