Function at 0x4021d5
Capabilities:
Print debug messages

Disassembly:
jmp 0x4e0450
sub esp, 0x120
push ebx
push ebp
push esi
push edi
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x31]
mov esi, dword [esp + 0x138]
mov byte [esp + 0x30], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, esi
shl eax, 5
add eax, esi
lea ecx, [esi + eax*2]
mov edx, dword [ecx*4 + 0x552dc4]
push edx
call fcn.00403210
mov ebx, dword [esp + 0x138]
mov ebp, eax
mov eax, ebx
mov dword [esp + 0x30], ebp
shl eax, 5
add eax, ebx
lea ecx, [ebx + eax*2]
mov edx, dword [ecx*4 + 0x552dc4]
push edx
call fcn.00403210
add esp, 8
mov dword [esp + 0x24], eax
call fcn.00401974
call fcn.00402671
mov ecx, dword [0x5552b0]
lea eax, [esi + esi*2]
mov dword [esp + 0x18], 0
lea eax, [eax + eax*4]
shl eax, 5
add eax, esi
lea edi, [ecx + eax*4 + 0x698]
lea eax, [ebx + ebx*2]
lea edx, [eax + eax*4]
mov dword [edi + 0x348], ebx
shl edx, 5
add edx, ebx
lea eax, [ecx + edx*4 + 0x698]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x13c]
test eax, eax
jle 0x4e09a1
mov ecx, dword [esp + 0x140]
test ecx, ecx
jle 0x4e072a
cmp eax, ecx
jl 0x4e0633
mov eax, dword [edi + ebx*4 + 0x368]
cmp eax, 0x28
mov dword [esp + 0x10], eax
jle 0x4e09a1
mov ecx, dword [edi + 0x64]
mov dword [esp + 0x28], ecx
call fcn.0050f2e2
cdq
idiv dword [esp + 0x28]
cmp edx, dword [esp + 0x10]
jge 0x4e09a1
push ebx
push esi
call fcn.00403850
add esp, 8
cmp eax, 1
jne 0x4e09a1
mov eax, dword [0x546aa4]
test eax, eax
je 0x4e097e
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
push edx
push eax
push ebp
push edi
lea ecx, [esp + 0x40]
push str._s__s__is_considering_a_level_1_alliance_with__s__s_
push ecx
call fcn.0050fb85
mov eax, dword [0x563acc]
add esp, 0x18
cmp eax, 9
jl 0x4e0945
xor edx, edx
mov dword [0x563ad0], edx
mov edi, dword [edx*4 + 0x563aac]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [edx*4 + 0x563aa8]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edx, dword [0x563ad0]
inc edx
cmp edx, 8
mov dword [0x563ad0], edx
jl 0x4e05a6
mov edi, 0x549b78
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [edx*4 + 0x563aa8]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x30]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov eax, dword [0x563ad0]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, dword [eax*4 + 0x563aa8]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
jmp 0x4e096e
mov esi, dword [edi + ebx*4 + 0x368]
cmp esi, 0x3c
jle 0x4e09a1
mov ecx, dword [edi + 0x64]
mov dword [esp + 0x10], ecx
call fcn.0050f2e2
cdq
idiv dword [esp + 0x10]
cmp edx, esi
jge 0x4e09a1
mov eax, dword [0x546aa4]
test eax, eax
je 0x4e097e
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
push edx
push eax
push ebp
push edi
lea ecx, [esp + 0x40]
push str._s__s__is_considering_a_level_1_alliance_with__s__s_
push ecx
call fcn.0050fb85
mov eax, dword [0x563acc]
add esp, 0x18
cmp eax, 9
jl 0x4e0945
xor edx, edx
mov dword [0x563ad0], edx
mov edi, dword [edx*4 + 0x563aac]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [edx*4 + 0x563aa8]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edx, dword [0x563ad0]
inc edx
cmp edx, 8
mov dword [0x563ad0], edx
jl 0x4e069d
mov edi, 0x549b78
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [edx*4 + 0x563aa8]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x30]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov eax, dword [0x563ad0]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, dword [eax*4 + 0x563aa8]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
jmp 0x4e096e
mov ecx, dword [0x5552b0]
mov dword [ecx + 0x5524], ebx
call fcn.004012b7
push 0xffffffffffffffff
call fcn.00402649
mov edx, dword [0x5552b0]
add esp, 4
mov ebp, eax
mov dword [edx + 0x5524], esi
call fcn.004012b7
cmp ebp, 0xffffffff
je 0x4e09a1
mov edx, dword [0x5552b0]
lea eax, [ebp + ebp*8]
push ebp
lea ecx, [ebp + eax*4]
mov eax, dword [edx + 0x5d4]
lea eax, [eax + ecx*4]
mov dword [eax + 0x84], ebx
mov ecx, dword [eax + ebx*4 + 0x2c]
mov dword [eax + 0x84], esi
mov esi, dword [eax + esi*4 + 0x2c]
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x18], esi
call fcn.00401c62
mov dword [esp + 0x14], eax
add esp, 4
fild dword [esp + 0x10]
fstp dword [esp + 0x1c]
fild dword [esp + 0x28]
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
fmul dword [0x5296b8]
fcomp dword [esp + 0x1c]
fnstsw ax
test ah, 0x41
jne 0x4e09a1
cmp esi, 8
jge 0x4e09a1
fild dword [esp + 0x14]
fstp dword [esp + 0x1c]
fild dword [edi + 0x7c]
fstp dword [esp + 0x14]
fld dword [esp + 0x14]
fmul dword [0x5296fc]
fcomp dword [esp + 0x1c]
fnstsw ax
test ah, 0x41
jne 0x4e09a1
mov edx, dword [edi + 0x348]
mov esi, dword [edi + edx*4 + 0x368]
cmp esi, 0x1e
jle 0x4e09a1
mov ebp, dword [edi + 0x64]
call fcn.0050f2e2
cdq
idiv ebp
cmp edx, esi
jge 0x4e09a1
mov ecx, dword [0x5552b0]
push 0x63
call fcn.004025ae
mov ecx, dword [0x5552b0]
push 0x63
mov esi, eax
call fcn.00403297
mov ecx, dword [0x5552b0]
push ebx
mov dword [esp + 0x18], eax
call fcn.004025ae
mov ecx, dword [0x5552b0]
push ebx
mov ebp, eax
call fcn.00403297
cmp ebp, esi
jne 0x4e0868
cmp dword [esp + 0x14], eax
je 0x4e0876
cmp ebp, 0xa
jg 0x4e0876
cmp eax, 4
jle 0x4e09a1
mov eax, dword [0x546aa4]
test eax, eax
je 0x4e097e
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x2c]
push eax
push ecx
push edx
push edi
lea eax, [esp + 0x40]
push str._s__s__is_considering_a_level_1_alliance_with__s__s_
push eax
call fcn.0050fb85
mov eax, dword [0x563acc]
add esp, 0x18
cmp eax, 9
jl 0x4e0945
xor edx, edx
mov dword [0x563ad0], edx
mov edi, dword [edx*4 + 0x563aac]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [edx*4 + 0x563aa8]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edx, dword [0x563ad0]
inc edx
cmp edx, 8
mov dword [0x563ad0], edx
jl 0x4e08bb
mov edi, 0x549b78
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [edx*4 + 0x563aa8]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x30]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov eax, dword [0x563ad0]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, dword [eax*4 + 0x563aa8]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
jmp 0x4e096e
mov edx, dword [eax*4 + 0x563aa8]
inc eax
mov dword [0x563acc], eax
lea edi, [esp + 0x30]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x30]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov edx, dword [0x5552b0]
mov dword [esp + 0x18], 1
mov dword [edx + 0x5a24], 2
mov eax, dword [0x5552b0]
mov dword [eax + 0x5a3c], ebx
call fcn.00402897
call fcn.004036e8
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x120
ret