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

Disassembly:
push ebp
mov ecx, 0x5b9d8c
push edi
push esi
push ebx
sub esp, 0x2fc
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0x251
mov dword [esp + 8], 0x239
mov dword [esp + 4], 0x12a
mov dword [esp], 6
call fcn.0055cc10
movsx eax, word [0x5bf904]
sub esp, 0x18
call fcn.004c3310
mov dword [esp + 0x34], eax
test eax, eax
jle 0x4c4370
cmp eax, dword [0x5b508c]
jg 0x4c4370
sub eax, 1
imul eax, dword [0x5b5090]
mov edx, dword [0x5b5099]
mov ebx, dword [edx + eax]
movsx eax, word [0x5b4674]
test eax, eax
jle 0x4c4360
cmp eax, dword [0x5b508c]
jg 0x4c4360
sub eax, 1
imul eax, dword [0x5b5090]
mov edx, dword [0x5b5099]
mov esi, dword [edx + eax]
lea ecx, [esp + 0x95]
lea edi, [esp + 0x164]
call fcn.004e3f60
xor eax, eax
mov ecx, 0x30
mov dword [esp + 0x15e], 0
mov dword [esp + 0x162], 0
mov dword [esp + 0x223], 0
rep stosd dword es:[edi], eax
movsx eax, word [0x5b4674]
cmp eax, dword [esp + 0x34]
je 0x4c4260
mov eax, dword [esp + 0x34]
mov dword [esp], str.Your_Yearly_Import_from__ss_Kingdom
mov ebp, 0x16d
lea ecx, [esp + 0x95]
lea eax, [eax + eax*8]
shl eax, 4
lea edi, [esi + eax + 0x106]
call fcn.004e41e0
mov ecx, ebx
sub esp, 4
mov dword [esp], 1
call fcn.004a5200
sub esp, 4
lea esi, [esp + 0x15e]
mov dword [esp + 0xc], eax
lea eax, [esp + 0x95]
mov dword [esp + 8], eax
mov dword [esp + 4], 0xc9
mov dword [esp], esi
call fcn.00584de0
fld dword [edi + 0x25]
mov eax, ebp
mov ecx, 0x5b7ec0
sub eax, dword [0x5b4660]
mov dword [esp + 0x38], eax
fstp dword [esp + 0x50]
fild dword [esp + 0x38]
fstp dword [esp + 0x54]
fld dword [esp + 0x50]
fmul dword [esp + 0x54]
fstp dword [esp + 0x58]
fld dword [0x5a5700]
fdivr dword [esp + 0x58]
fstp dword [esp + 0x5c]
fld dword [edi + 0x19]
fnstcw word [esp + 0x3e]
mov dword [esp + 0x20], str.IMPORT
mov dword [esp + 0x1c], 0xa
fstp dword [esp + 0x60]
fld dword [esp + 0x5c]
fadd dword [esp + 0x60]
movzx eax, word [esp + 0x3e]
mov dword [esp + 0x18], 0x22f
mov dword [esp + 0x14], 2
or ah, 0xc
mov dword [esp + 0xc], 0x15a
mov word [esp + 0x3c], ax
fstp dword [esp + 0x64]
fld dword [esp + 0x64]
mov dword [esp + 8], esi
fldcw word [esp + 0x3c]
fistp dword [esp + 0x10]
fldcw word [esp + 0x3e]
mov dword [esp + 4], 0x130
mov dword [esp], 0xc
call fcn.0043a5e0
sub esp, 0x24
mov dword [esp], str.Your_Yearly_Export_to__ss_Kingdom
lea ecx, [esp + 0x95]
call fcn.004e41e0
mov ecx, ebx
sub esp, 4
mov dword [esp], 1
call fcn.004a5200
sub esp, 4
mov dword [esp + 0xc], eax
lea eax, [esp + 0x95]
mov dword [esp + 8], eax
mov dword [esp + 4], 0xc9
mov dword [esp], esi
call fcn.00584de0
movsx eax, word [0x5b4674]
mov ecx, 0x5b7ec0
sub ebp, dword [0x5b4660]
mov dword [esp + 0x38], ebp
lea eax, [eax + eax*8]
shl eax, 4
lea eax, [ebx + eax + 0x106]
fld dword [eax + 0x25]
fstp dword [esp + 0x68]
fild dword [esp + 0x38]
fstp dword [esp + 0x6c]
fld dword [esp + 0x68]
fmul dword [esp + 0x6c]
fstp dword [esp + 0x70]
fld dword [0x5a5700]
fdivr dword [esp + 0x70]
fstp dword [esp + 0x74]
fld dword [eax + 0x19]
fnstcw word [esp + 0x3e]
mov dword [esp + 0x20], str.EXPORT
mov dword [esp + 0x1c], 0xa
fstp dword [esp + 0x78]
fld dword [esp + 0x74]
fadd dword [esp + 0x78]
movzx eax, word [esp + 0x3e]
mov dword [esp + 0x18], 0x22f
mov dword [esp + 0x14], 2
or ah, 0xc
mov dword [esp + 0xc], 0x15a
mov word [esp + 0x3c], ax
fstp dword [esp + 0x7c]
fld dword [esp + 0x7c]
mov dword [esp + 8], esi
fldcw word [esp + 0x3c]
fistp dword [esp + 0x10]
fldcw word [esp + 0x3e]
mov dword [esp + 4], 0x140
mov dword [esp], 0xc
call fcn.0043a5e0
sub esp, 0x24
mov dword [esp], str.Continuous_Peace_Time_of__ss_Kingdom
lea ecx, [esp + 0x95]
call fcn.004e41e0
mov ecx, ebx
sub esp, 4
mov dword [esp], 1
call fcn.004a5200
sub esp, 4
mov dword [esp + 0xc], eax
lea eax, [esp + 0x95]
mov dword [esp + 8], eax
mov dword [esp + 4], 0xc9
mov dword [esp], esi
call fcn.00584de0
mov ecx, ebx
call fcn.004a83e0
mov dword [esp + 0x1c], str.PEACE
mov ecx, 0x5b7ec0
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], 0xa
mov dword [esp + 0x14], 0x22f
mov dword [esp + 0xc], 0x15a
mov dword [esp + 8], esi
mov dword [esp + 4], 0x150
mov dword [esp], 0xc
call fcn.0043ab40
mov ecx, edi
sub esp, 0x20
call fcn.004a8e20
mov ecx, edi
mov ebp, eax
call fcn.004a8fc0
mov dword [esp + 0x10], ebp
mov ecx, 0x5b7ec0
mov ebp, 0x170
mov dword [esp + 8], eax
mov dword [esp + 0x1c], str.STATTIME
mov dword [esp + 0x18], 0xa
mov dword [esp + 0x14], 0x22f
mov dword [esp + 0xc], 0x15a
mov dword [esp + 4], 0x160
mov dword [esp], 0xc
call fcn.0043ab40
sub esp, 0x20
mov dword [esp], str.Allow_Your_Units_to_Attack__ss_Kingdom
lea ecx, [esp + 0x95]
call fcn.004e41e0
mov ecx, ebx
sub esp, 4
mov dword [esp], 1
call fcn.004a5200
sub esp, 4
mov dword [esp + 0xc], eax
lea eax, [esp + 0x95]
mov dword [esp + 8], eax
mov dword [esp + 4], 0xc9
mov dword [esp], esi
call fcn.00584de0
mov dword [esp + 0x1c], str.ALLOWATK
mov ecx, 0x5b7ec0
mov dword [esp + 0x18], 0xa
mov dword [esp + 0x14], 0x22f
mov dword [esp + 0x10], 0x5a533d
mov dword [esp + 0xc], 0x15a
mov dword [esp + 8], esi
mov dword [esp + 4], 0x170
mov dword [esp], 0xc
call fcn.0043ab40
mov ecx, 0x5bf884
sub esp, 0x20
mov dword [esp], 1
call fcn.0041dfe0
sub esp, 4
mov ecx, eax
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 1
mov dword [esp + 0x14], 0x5a5224
mov dword [esp + 0x10], 0x17f
mov dword [esp + 0xc], 0x18c
mov dword [esp + 8], 0x170
mov dword [esp + 4], 0x160
mov dword [esp], 1
call fcn.0041d990
mov ecx, 0x5bf884
sub esp, 0x20
mov dword [esp], 0
call fcn.0041dfe0
sub esp, 4
mov ecx, eax
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 1
mov dword [esp + 0x14], 0x5a5228
mov dword [esp + 0x10], 0x17f
mov dword [esp + 0xc], 0x1be
mov dword [esp + 8], 0x170
mov dword [esp + 4], 0x190
mov dword [esp], 1
call fcn.0041d990
movsx eax, byte [edi + 1]
mov ecx, 0x5bf884
sub esp, 0x20
mov dword [esp], eax
call fcn.0041de30
mov edx, 0x18a
sub esp, 4
cmp byte [edi + 3], 4
je 0x4c4390
mov dword [esp + 0x38], edx
movsx eax, word [0x5b4674]
cmp eax, dword [esp + 0x34]
jne 0x4c3f40
add esp, 0x2fc
pop ebx
pop esi
pop edi
pop ebp
ret
lea esi, [esp + 0x227]
lea edi, [ebx + 0x196]
mov ecx, esi
call fcn.004e3f60
mov dword [esp], str._ss_Kingdoms_Diplomatic_Status_with_Other_Kingdoms:
mov ecx, esi
call fcn.004e41e0
mov ecx, ebx
sub esp, 4
mov dword [esp], 1
call fcn.004a5200
sub esp, 4
mov dword [esp + 8], esi
lea esi, [esp + 0x15e]
mov dword [esp], esi
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0xc9
call fcn.00584de0
lea eax, [ebp + 0x1b]
mov dword [esp], 0xc
mov ecx, ebx
mov dword [esp + 4], eax
call fcn.004a6fb0
mov ecx, 0x5b7ec0
sub esp, 8
mov edx, dword [esp + 0x38]
mov dword [esp + 8], esi
mov esi, 1
mov dword [esp + 0x10], 0xffffffff
mov dword [esp + 4], edx
mov dword [esp + 0xc], 0
mov dword [esp], 0x20
call fcn.00439fc0
mov edx, dword [0x5b508c]
lea eax, [ebp + 0x2e]
sub esp, 0x14
test edx, edx
jle 0x4c3f2c
mov dword [esp + 0x38], ebx
mov ebp, dword [esp + 0x34]
mov ebx, eax
jmp 0x4c4025
cmp byte [0x5b4517], 0
jne 0x4c41a6
add ebx, 0x10
add esi, 1
add edi, 0x90
cmp esi, dword [0x5b508c]
jg 0x4c3f2c
lea eax, [esi - 1]
mov ecx, dword [0x5b5099]
mov edx, eax
imul edx, dword [0x5b5090]
mov dword [esp + 0x34], eax
mov ecx, dword [ecx + edx]
cmp ebp, esi
je 0x4c4010
test ecx, ecx
je 0x4c4010
movsx edx, word [0x5b4674]
cmp edx, esi
je 0x4c4010
lea edx, [ebx + 1]
mov dword [esp], 0xc
mov dword [esp + 4], edx
call fcn.004a6fb0
sub esp, 8
cmp dword [0x5b508c], esi
jl 0x4c4380
mov eax, dword [esp + 0x34]
imul eax, dword [0x5b5090]
mov edx, dword [0x5b5099]
mov ecx, dword [edx + eax]
call fcn.004a5180
mov dword [esp + 4], ebx
mov ecx, 0x5b7ec0
mov dword [esp + 0x10], 0xffffffff
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov dword [esp], 0x20
call fcn.00439fc0
mov ecx, edi
sub esp, 0x14
call fcn.004a8e10
mov dword [esp + 4], ebx
mov ecx, 0x5b7ec0
mov dword [esp + 0x10], 0xffffffff
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov dword [esp], 0xfc
call fcn.00439fc0
sub esp, 0x14
cmp byte [edi + 2], 0
je 0x4c4000
mov dword [esp + 0x10], 0xffffffff
mov ecx, 0x5b7ec0
mov dword [esp + 0xc], 0
mov dword [esp + 8], str.Trade_Treaty
mov dword [esp + 4], ebx
mov dword [esp], 0x156
call fcn.00439fc0
sub esp, 0x14
mov dword [esp], esi
mov ecx, dword [esp + 0x38]
call fcn.004a7dd0
mov ecx, 0x5ba360
sub esp, 4
fnstcw word [esp + 0x3e]
fstp dword [esp + 0x4c]
fld dword [esp + 0x4c]
mov dword [esp + 4], 2
movzx eax, word [esp + 0x3e]
or ah, 0xc
mov word [esp + 0x3c], ax
fldcw word [esp + 0x3c]
fistp dword [esp]
fldcw word [esp + 0x3e]
call fcn.00499860
mov ecx, 0x5b7ec0
sub esp, 8
mov dword [esp + 0x10], 0xffffffff
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov dword [esp + 4], ebx
mov dword [esp], 0x1ce
call fcn.00439fc0
sub esp, 0x14
cmp byte [0x5b4517], 0
je 0x4c400d
mov dword [esp + 4], 1
movsx eax, byte [edi + 8]
mov ecx, 0x5ba360
mov dword [esp], eax
call fcn.00499860
mov ecx, 0x5b7ec0
sub esp, 8
mov dword [esp + 0x10], 0xffffffff
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov dword [esp + 4], ebx
mov dword [esp], 0x200
call fcn.00439fc0
fld dword [edi + 0xb]
mov ecx, 0x5ba360
sub esp, 0x14
fnstcw word [esp + 0x3e]
mov dword [esp + 4], 1
fstp dword [esp + 0x48]
fld dword [esp + 0x48]
movzx eax, word [esp + 0x3e]
or ah, 0xc
mov word [esp + 0x3c], ax
fldcw word [esp + 0x3c]
fistp dword [esp]
fldcw word [esp + 0x3e]
call fcn.00499860
mov ecx, 0x5b7ec0
sub esp, 8
mov dword [esp + 0x10], 0xffffffff
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov dword [esp + 4], ebx
mov dword [esp], 0x21e
call fcn.00439fc0
sub esp, 0x14
jmp 0x4c400d
mov ecx, ebx
mov ebp, 0x150
call fcn.004a5570
mov dword [esp + 0xc], 0x15a
mov ecx, 0x5b7ec0
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.Your_Food
mov dword [esp + 4], 0x130
mov dword [esp], 0xc
call fcn.0043aa10
sub esp, 0x14
mov dword [esp], 0x5a5251
lea ecx, [esp + 0x95]
call fcn.004e41e0
mov ecx, ebx
sub esp, 4
call fcn.004a5290
lea ecx, [esp + 0x95]
mov dword [esp], eax
call fcn.004e42a0
mov ecx, 0x5b7ec0
sub esp, 4
lea eax, [esp + 0x95]
mov dword [esp + 0xc], 0x15a
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.Your_Treasure
mov dword [esp + 4], 0x140
mov dword [esp], 0xc
call fcn.0043aa10
mov ecx, ebx
sub esp, 0x14
call fcn.004a83e0
mov dword [esp + 0x1c], str.PEACE
mov ecx, 0x5b7ec0
mov dword [esp + 0x18], 0xa
mov dword [esp + 0x14], 0x22f
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x15a
mov dword [esp + 8], str.Your_Continuous_Peace_Time
mov dword [esp + 4], 0x150
mov dword [esp], 0xc
call fcn.0043ab40
mov edx, 0x16a
sub esp, 0x20
jmp 0x4c3f1b
xor esi, esi
jmp 0x4c3a5b
xor ebx, ebx
jmp 0x4c3a2d
xor ecx, ecx
jmp 0x4c4087
mov dword [esp], str._ss_Kingdoms_Treasure
lea ecx, [esp + 0x95]
mov ebp, 0x190
call fcn.004e41e0
mov ecx, ebx
sub esp, 4
mov dword [esp], 1
call fcn.004a5200
sub esp, 4
mov dword [esp + 0xc], eax
lea eax, [esp + 0x95]
mov dword [esp + 8], eax
mov dword [esp + 4], 0xc9
mov dword [esp], esi
call fcn.00584de0
fld dword [ebx + 0x72]
mov dword [esp + 0x24], 0
mov ecx, 0x5b7ec0
mov dword [esp + 0x20], 0xa
mov dword [esp + 0x1c], 0x22f
fstp dword [esp + 0x40]
fld dword [esp + 0x40]
mov dword [esp + 0x18], 2
mov dword [esp + 0xc], 0x15a
fstp qword [esp + 0x80]
fld qword [esp + 0x80]
mov dword [esp + 8], esi
mov dword [esp + 4], 0x180
mov dword [esp], 0xc
fstp qword [esp + 0x10]
call fcn.0043a8a0
sub esp, 0x28
mov dword [esp], str._ss_Kingdoms_Food
lea ecx, [esp + 0x95]
call fcn.004e41e0
mov ecx, ebx
sub esp, 4
mov dword [esp], 1
call fcn.004a5200
sub esp, 4
mov dword [esp + 0xc], eax
lea eax, [esp + 0x95]
mov dword [esp + 8], eax
mov dword [esp + 4], 0xc9
mov dword [esp], esi
call fcn.00584de0
fld dword [ebx + 0x76]
mov dword [esp + 0x24], 0
mov ecx, 0x5b7ec0
mov dword [esp + 0x20], 0xa
mov dword [esp + 0x1c], 0x22f
fstp dword [esp + 0x44]
fld dword [esp + 0x44]
mov dword [esp + 0x18], 1
mov dword [esp + 0xc], 0x15a
fstp qword [esp + 0x88]
fld qword [esp + 0x88]
mov dword [esp + 8], esi
mov dword [esp + 4], 0x190
mov dword [esp], 0xc
fstp qword [esp + 0x10]
call fcn.0043a8a0
mov edx, 0x1aa
sub esp, 0x28
jmp 0x4c3f1b