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

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x74954c
push eax
mov eax, 0x3884
mov dword fs:[0], esp
call fcn.0071f5d0
push ebp
mov ebp, dword [esp + 0x389c]
push esi
push edi
xor edi, edi
cmp ebp, edi
je 0x5b78c5
mov eax, dword [ebp + 0x24]
lea esi, [ebp + 0x24]
mov ecx, esi
call dword [eax + 0x2c]
test eax, eax
je 0x5b78c5
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x40]
mov ax, word [eax]
cmp ax, word [0x9116bc]
je 0x5b8337
mov cx, word [ebp + 0x20]
mov eax, dword [0x912e94]
push ebx
mov ebx, dword [esp + 0x38a4]
mov dx, word [ebx + 0x20]
push ecx
mov ecx, dword [eax + 0x1a4]
push edx
call fcn.00658990
cmp eax, edi
mov dword [esp + 0x40], eax
je 0x5b8336
mov eax, dword [ebx + 0x19c]
cmp eax, edi
je 0x5b7915
mov ecx, dword [0x912eec]
mov ecx, dword [ecx + 0x28]
lea esi, [esp + 0x58]
push esi
mov dword [esp + 0x5c], edi
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [0x912e94]
mov eax, dword [ecx]
push 0x20f
push str.BSSKoHGame_family.cpp
push 0x27
push 0xa
call dword [eax + 0x40]
mov esi, dword [esp + 0x38a8]
mov ecx, eax
mov eax, 0x66666667
imul ecx
sar edx, 2
mov ebp, edx
shr ebp, 0x1f
add esi, 0x24
add ebp, edx
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x48]
cmp ebp, eax
jle 0x5b795f
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x48]
mov ebp, eax
cmp ebp, edi
je 0x5b8336
mov ecx, dword [esp + 0x38a8]
mov dx, word [ecx + 0x20]
mov eax, dword [0x912e94]
cmp dx, word [eax + 0x1ac]
jne 0x5b798e
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x48]
cmp ebp, eax
jne 0x5b798e
sub ebp, 1
mov ax, word [0x9116bc]
cmp ax, di
je 0x5b79a8
mov edx, dword [esi]
push eax
mov ecx, esi
call dword [edx + 0x50]
test eax, eax
je 0x5b79a8
sub ebp, 1
cmp ebp, edi
je 0x5b8336
mov eax, vtable.CBSList_class_CRealm__.0
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], eax
mov dword [esp + 0x1c], edi
mov dword [esp + 0x18], edi
mov dword [esp + 0x20], edi
mov dword [esp + 0x389c], edi
mov dword [esp + 0x48], edi
mov dword [esp + 0x44], eax
mov dword [esp + 0x50], edi
mov dword [esp + 0x4c], edi
mov dword [esp + 0x54], edi
mov eax, dword [esi]
mov ecx, esi
mov byte [esp + 0x389c], 1
call dword [eax + 0x2c]
cmp eax, edi
mov dword [esp + 0x60], eax
je 0x5b7a54
jmp 0x5b7a00
mov edx, dword [esi]
lea eax, [esp + 0x60]
push eax
mov ecx, esi
call dword [edx + 0x34]
mov cx, word [eax]
push edi
push ecx
call fcn.00659110
mov edx, dword [esp + 0x4c]
add esp, 8
lea ecx, [esp + 0x44]
mov edi, eax
call dword [edx + 0x60]
mov dword [eax], edi
mov dword [eax + 4], 0
cmp dword [esp + 0x4c], 0
jne 0x5b7a3c
mov dword [esp + 0x4c], eax
jmp 0x5b7a43
mov ecx, dword [esp + 0x50]
mov dword [ecx + 4], eax
add dword [esp + 0x48], 1
xor edi, edi
cmp dword [esp + 0x60], edi
mov dword [esp + 0x50], eax
jne 0x5b7a00
mov esi, dword [esp + 0x54]
push ebx
push 0x5b43a0
lea ecx, [esp + 0x4c]
mov dword [esp + 0x5c], edi
call fcn.005ef170
mov dword [esp + 0x54], esi
mov esi, dword [esp + 0x4c]
cmp esi, edi
je 0x5b7acc
mov eax, esi
mov edi, dword [eax]
mov dx, word [edi + 0x20]
cmp dx, word [0x9116bc]
mov esi, dword [esi + 4]
je 0x5b7ac6
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x10]
call dword [eax + 0x60]
mov dword [eax], edi
mov dword [eax + 4], 0
cmp dword [esp + 0x18], 0
jne 0x5b7aac
mov dword [esp + 0x18], eax
jmp 0x5b7ab3
mov ecx, dword [esp + 0x1c]
mov dword [ecx + 4], eax
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x14]
add eax, 1
cmp eax, ebp
mov dword [esp + 0x14], eax
jge 0x5b7aca
test esi, esi
jne 0x5b7a77
xor edi, edi
cmp dword [esp + 0x14], edi
je 0x5b8311
lea ecx, [esp + 0x24]
call fcn.004179a0
movzx edx, word [ebx + 0x20]
push edi
push 1
push edx
push fcn.005e0570
push str.CLAIMKINGDOM
lea ecx, [esp + 0x38]
mov byte [esp + 0x38b0], 2
call fcn.00415b10
movzx eax, word [ebx + 0x20]
push edi
push 1
push eax
push 0x5e0900
push str.CLAIMKINGTITLE
lea ecx, [esp + 0x38]
call fcn.00415b10
movzx ecx, word [ebx + 0x20]
push edi
push 1
push ecx
push 0x5e0500
push str.CLAIMKINGNAME
lea ecx, [esp + 0x38]
call fcn.00415b10
mov esi, dword [esp + 0x38a8]
movzx edx, word [esi + 0x20]
push edi
push 1
push edx
push fcn.005e0570
push str.SPLITTEDKINGDOM
lea ecx, [esp + 0x38]
call fcn.00415b10
movzx eax, word [esi + 0x20]
push edi
push 1
push eax
push 0x5e0900
push str.SPLITTEDKINGTITLE
lea ecx, [esp + 0x38]
call fcn.00415b10
mov eax, dword [esp + 0x38ac]
cmp eax, edi
je 0x5b7b97
push edi
push 1
push eax
push 0x5e0740
push str.SPLITTEDKINGNAME
lea ecx, [esp + 0x38]
call fcn.00415b10
mov ecx, dword [esp + 0x18]
mov edx, dword [ecx]
movzx eax, word [edx + 0x20]
push edi
push 1
push eax
push fcn.005e0630
push str.REALM1
lea ecx, [esp + 0x38]
call fcn.00415b10
cmp dword [esp + 0x14], 1
jbe 0x5b7be3
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx + 4]
mov edx, dword [eax]
movzx eax, word [edx + 0x20]
push edi
push 1
push eax
push fcn.005e0630
push str.REALM2
lea ecx, [esp + 0x38]
call fcn.00415b10
mov esi, 2
cmp dword [esp + 0x14], esi
jbe 0x5b7c15
mov ecx, dword [esp + 0x18]
mov edx, dword [ecx + 4]
mov eax, dword [edx + 4]
mov eax, dword [eax]
movzx ecx, word [eax + 0x20]
push edi
push 1
push ecx
push fcn.005e0630
push 0x7cf5fc
lea ecx, [esp + 0x38]
call fcn.00415b10
lea ecx, [esp + 0x38]
call fcn.00412d40
mov ebp, dword [esp + 0x40]
mov eax, dword [ebp + 0x10]
cmp eax, 1
mov byte [esp + 0x389c], 3
jne 0x5b7c39
push 0x7cbc60
jmp 0x5b7c4a
cmp eax, 4
jne 0x5b7c45
push str.alliance
jmp 0x5b7c4a
push str.peace
lea ecx, [esp + 0x3c]
call fcn.00413310
lea ecx, [esp + 0x20cc]
call fcn.006c40d0
lea ecx, [esp + 0x904]
call fcn.006c40d0
mov ecx, dword [0x894420]
push edi
lea edx, [esp + 0x28]
push edx
push edi
push edi
push str.claim_ai_yes
mov dword [esp + 0x918], esi
mov dword [esp + 0x20e0], esi
call fcn.00414e70
push eax
lea eax, [esp + 0x2108]
push eax
call fcn.00415f60
lea ecx, [esp + 0x28dc]
push str.claim_ai_yes
push ecx
call fcn.0071e658
lea edx, [esp + 0x50]
push edx
lea eax, [esp + 0x74]
push str.claim_ai_yes_d_
push eax
call fcn.00413c20
mov eax, dword [eax]
push eax
lea ecx, [esp + 0x30c4]
push ecx
call fcn.0071e658
add esp, 0x2c
lea ecx, [esp + 0x58]
call fcn.00412de0
mov ecx, dword [0x894420]
push edi
lea edx, [esp + 0x28]
push edx
push edi
push edi
push str.claim_ai_no
call fcn.00414e70
push eax
lea eax, [esp + 0x21d0]
push eax
call fcn.00415f60
lea ecx, [esp + 0x29a4]
push str.claim_ai_no
push ecx
call fcn.0071e658
lea edx, [esp + 0x50]
push edx
lea eax, [esp + 0x74]
push str.claim_ai_no_d_
push eax
call fcn.00413c20
mov eax, dword [eax]
push eax
lea ecx, [esp + 0x318c]
push ecx
call fcn.0071e658
add esp, 0x2c
lea ecx, [esp + 0x58]
call fcn.00412de0
mov ecx, dword [0x894420]
push edi
lea edx, [esp + 0x28]
push edx
push edi
push edi
push str.claim_user_yes
call fcn.00414e70
push eax
lea eax, [esp + 0x940]
push eax
call fcn.00415f60
push str.claim_user_yes
lea ecx, [esp + 0x1118]
push ecx
call fcn.0071e658
lea edx, [esp + 0x50]
push edx
lea eax, [esp + 0x74]
push str.claim_user_yes_d_
push eax
call fcn.00413c20
mov eax, dword [eax]
push eax
lea ecx, [esp + 0x18fc]
push ecx
call fcn.0071e658
add esp, 0x2c
lea ecx, [esp + 0x58]
call fcn.00412de0
mov ecx, dword [0x894420]
push edi
lea edx, [esp + 0x28]
push edx
push edi
push edi
push str.claim_user_no
call fcn.00414e70
push eax
lea eax, [esp + 0xa08]
push eax
call fcn.00415f60
lea ecx, [esp + 0x11dc]
push str.claim_user_no
push ecx
call fcn.0071e658
lea edx, [esp + 0x50]
push edx
lea eax, [esp + 0x80]
push str.claim_user_no_d_
push eax
call fcn.00413c20
mov eax, dword [eax]
push eax
lea ecx, [esp + 0x19c4]
push ecx
call fcn.0071e658
add esp, 0x2c
lea ecx, [esp + 0x64]
call fcn.00412de0
mov dx, word [ebx + 0x20]
mov ecx, dword [0x912e94]
cmp dx, word [ecx + 0x1ac]
jne 0x5b7fa2
mov ecx, dword [0x894420]
push edi
lea eax, [esp + 0x28]
push eax
push edi
push edi
push str.claim_title
call fcn.00414e70
push eax
lea ecx, [esp + 0x78]
push ecx
call fcn.00415f60
mov ecx, dword [0x894420]
add esp, 0x10
push edi
lea edx, [esp + 0x28]
push edx
push edi
push edi
push str.claim_user
call fcn.00414e70
push eax
lea eax, [esp + 0x140]
push eax
call fcn.00415f60
lea ecx, [esp + 0x144]
push 0x78363c
push ecx
call fcn.0071e62e
mov eax, dword [esp + 0x2c]
add esp, 0x18
cmp eax, 1
lea edx, [esp + 0x134]
push edx
jne 0x5b7ebe
call fcn.0071e696
add esp, 4
push edi
mov esi, eax
lea eax, [esp + 0x28]
push eax
push edi
push edi
push str.claim_user_1
jmp 0x5b7ef2
cmp eax, esi
jne 0x5b7edb
call fcn.0071e696
add esp, 4
push edi
mov esi, eax
lea eax, [esp + 0x28]
push eax
push edi
push edi
push str.claim_user_2
jmp 0x5b7ef2
call fcn.0071e696
add esp, 4
push edi
mov esi, eax
lea eax, [esp + 0x28]
push eax
push edi
push edi
push str.claim_user_3
mov ecx, dword [0x894420]
call fcn.00414e70
lea ecx, [esp + esi*2 + 0x13c]
push eax
push ecx
call fcn.00415f60
add esp, 0x10
push edi
push str.images_screens_playwnd_messages_illustrations_grown_prince.bmp
lea edx, [esp + 0x90c]
push edx
lea eax, [esp + 0x140]
push eax
lea ecx, [esp + 0x7c]
push ecx
mov edx, ecx
push edx
push edi
push 0xf
call fcn.006cbee0
add esp, 0x20
mov esi, eax
call fcn.004d9610
mov ecx, dword [esp + 0x38a8]
mov dword [esi + 0x14], 1
mov ax, word [ebx + 0x20]
mov word [esi + 0x196], ax
mov dx, word [ecx + 0x20]
push str.Defs_Screens_PlayWnd_message_claim.in2
lea ecx, [esi + 0xc]
mov word [esi + 0x194], dx
call fcn.00413310
mov ecx, dword [0x9a3304]
push 6
push esi
call fcn.006c5910
xor ecx, ecx
cmp eax, edi
mov eax, dword [ebp + 0x10]
sete cl
mov esi, ecx
cmp esi, edi
lea ecx, [eax + eax*8]
je 0x5b7f99
lea ecx, [ecx*4 + 0x862c30]
jmp 0x5b7fe4
lea ecx, [ecx*4 + 0x862c38]
jmp 0x5b7fe4
mov eax, dword [ebp + 0x10]
push 0x270
push str.BSSKoHGame_family.cpp
lea edx, [eax + eax*8]
mov eax, dword [ecx]
mov esi, dword [edx*4 + 0x862b98]
push 0x63
push edi
call dword [eax + 0x40]
xor ecx, ecx
cmp eax, esi
mov eax, dword [ebp + 0x10]
setg cl
mov esi, ecx
cmp esi, edi
lea ecx, [eax + eax*8]
je 0x5b7fdd
lea ecx, [ecx*4 + 0x862b88]
jmp 0x5b7fe4
lea ecx, [ecx*4 + 0x862b90]
mov edx, dword [esp + 0x38a8]
mov ax, word [edx + 0x20]
mov dx, word [ebx + 0x20]
mov edi, dword [ecx]
mov ebp, dword [ecx + 4]
push eax
push edx
call fcn.005b4050
test esi, esi
jne 0x5b8022
mov ecx, dword [esp + 0x38a8]
push esi
push esi
push ebp
push edi
lea eax, [esp + 0x34]
push eax
push ecx
push ebx
call fcn.005b41b0
add esp, 0x1c
jmp 0x5b82ef
mov edi, dword [esp + 0x38a8]
mov dx, word [edi + 0x20]
mov ecx, dword [0x912e94]
cmp dx, word [ecx + 0x1ac]
jne 0x5b81c9
mov ecx, dword [0x894420]
push 0
lea eax, [esp + 0x28]
push eax
push 0
push 0
push str.claim_title
call fcn.00414e70
push eax
lea ecx, [esp + 0x78]
push ecx
call fcn.00415f60
mov ecx, dword [0x894420]
add esp, 0x10
push 0
lea edx, [esp + 0x28]
push edx
push 0
push 0
push str.claim_ai
call fcn.00414e70
push eax
lea eax, [esp + 0x140]
push eax
call fcn.00415f60
lea ecx, [esp + 0x144]
push 0x78363c
push ecx
call fcn.0071e62e
mov eax, dword [esp + 0x2c]
add esp, 0x18
cmp eax, 1
lea edx, [esp + 0x134]
push edx
jne 0x5b80d4
call fcn.0071e696
add esp, 4
push 0
mov esi, eax
lea eax, [esp + 0x28]
push eax
push 0
push 0
push str.claim_ai_1
jmp 0x5b810f
cmp eax, 2
jne 0x5b80f5
call fcn.0071e696
add esp, 4
push 0
mov esi, eax
lea eax, [esp + 0x28]
push eax
push 0
push 0
push str.claim_ai_2
jmp 0x5b810f
call fcn.0071e696
add esp, 4
push 0
mov esi, eax
lea eax, [esp + 0x28]
push eax
push 0
push 0
push str.claim_ai_3
mov ecx, dword [0x894420]
call fcn.00414e70
lea ecx, [esp + esi*2 + 0x13c]
push eax
push ecx
call fcn.00415f60
add esp, 0x10
push 0
push str.images_screens_playwnd_messages_illustrations_grown_prince.bmp
lea edx, [esp + 0x20d4]
push edx
lea eax, [esp + 0x140]
push eax
lea ecx, [esp + 0x7c]
push ecx
mov edx, ecx
push edx
push 0
push 0xf
call fcn.006cbee0
add esp, 0x20
mov esi, eax
call fcn.004d9610
mov dword [esi + 0x14], 1
mov ax, word [ebx + 0x20]
mov word [esi + 0x196], ax
mov cx, word [edi + 0x20]
mov word [esi + 0x194], cx
push str.Defs_Screens_PlayWnd_message_claim.in2
lea ecx, [esi + 0xc]
call fcn.00413310
mov ecx, dword [0x9a3304]
push 6
push esi
call fcn.006c5910
xor edx, edx
cmp eax, 1
sete dl
mov esi, edx
test esi, esi
je 0x5b81b6
mov eax, dword [esp + 0x40]
mov eax, dword [eax + 0x10]
lea ecx, [eax + eax*8]
lea ecx, [ecx*4 + 0x862b80]
jmp 0x5b8210
mov ecx, dword [esp + 0x40]
mov eax, dword [ecx + 0x10]
lea ecx, [eax + eax*8]
lea ecx, [ecx*4 + 0x862b78]
jmp 0x5b8210
mov edi, dword [esp + 0x40]
mov eax, dword [edi + 0x10]
push 0x29f
push str.BSSKoHGame_family.cpp
lea edx, [eax + eax*8]
mov eax, dword [ecx]
mov esi, dword [edx*4 + 0x862c50]
push 0x63
push 0
call dword [eax + 0x40]
mov edi, dword [edi + 0x10]
xor ecx, ecx
cmp eax, esi
setg cl
mov esi, ecx
test esi, esi
lea ecx, [edi + edi*8]
je 0x5b8209
lea ecx, [ecx*4 + 0x862c48]
jmp 0x5b8210
lea ecx, [ecx*4 + 0x862c40]
mov edx, dword [esp + 0x38a8]
mov ax, word [edx + 0x20]
mov dx, word [ebx + 0x20]
mov edi, dword [ecx]
mov ebp, dword [ecx + 4]
push eax
push edx
call fcn.005b4050
xor eax, eax
test esi, esi
sete al
lea ecx, [esp + 0x24]
push eax
push 1
push ebp
push edi
mov edi, dword [esp + 0x38b8]
push ecx
push edi
push ebx
call fcn.005b41b0
xor ebp, ebp
add esp, 0x1c
cmp esi, ebp
jne 0x5b82ef
cmp dword [esp + 0x18], ebp
je 0x5b82ef
push ebp
push edi
push ebp
push ebp
push ebx
push ebp
push str.k1_inheritlandfrom_k2
call fcn.005b3d00
mov eax, dword [esp + 0x34]
add esp, 0x1c
cmp eax, ebp
je 0x5b82ef
lea esp, [esp]
mov edx, dword [eax]
mov eax, dword [edx + 0x64]
mov ecx, dword [0x912e94]
push eax
call fcn.004668b0
cmp eax, ebp
je 0x5b82a5
lea ecx, [eax - 0x18]
cmp ecx, ebp
je 0x5b82a5
mov edx, dword [ecx]
call dword [edx + 0x50]
mov esi, eax
jmp 0x5b82a7
xor esi, esi
mov eax, dword [esp + 0x18]
cmp eax, ebp
je 0x5b82d1
mov ecx, eax
mov eax, dword [eax + 4]
cmp eax, ebp
mov dword [esp + 0x18], eax
jne 0x5b82c0
mov dword [esp + 0x1c], ebp
mov eax, dword [esp + 0x10]
push ecx
lea ecx, [esp + 0x14]
call dword [eax + 0x64]
sub dword [esp + 0x14], 1
mov ecx, esi
call fcn.00586850
mov ax, word [ebx + 0x20]
mov edx, dword [esi]
mov ecx, esi
push eax
call dword [edx + 0xe4]
mov eax, dword [esp + 0x18]
cmp eax, ebp
jne 0x5b8280
lea ecx, [esp + 0x38]
mov byte [esp + 0x389c], 2
call fcn.00412de0
lea ecx, [esp + 0x24]
mov byte [esp + 0x389c], 1
call fcn.004179c0
lea ecx, [esp + 0x44]
mov byte [esp + 0x389c], 0
call fcn.005b5bd0
lea ecx, [esp + 0x10]
mov dword [esp + 0x389c], 0xffffffff
call fcn.005b5bd0
pop ebx
mov ecx, dword [esp + 0x3890]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x3890
ret