Function at 0x5156e0
Capabilities:
Link many functions at runtime

Disassembly:
push 0xffffffffffffffff
push 0x58f33b
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [0x5cca0c]
xor eax, esp
mov dword [esp + 0x3c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5cca0c]
xor eax, esp
push eax
lea eax, [esp + 0x54]
mov dword fs:[0], eax
mov eax, dword [0x5ce6d8]
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebp, ecx
mov esi, dword [ebp + 0x38]
push str.xunyou_get_game_area_count
push eax
mov dword [esp + 0x20], ebp
call ebx
test eax, eax
je 0x515739
push esi
call eax
mov esi, eax
jmp 0x51573b
xor esi, esi
test esi, esi
mov dword [esp + 0x14], esi
jbe 0x51585f
xor ecx, ecx
mov eax, esi
mov edx, 0x88
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00551843
mov edi, eax
add esp, 4
mov dword [esp + 0x2c], edi
test edi, edi
mov dword [esp + 0x5c], 0
je 0x515787
push 0x50cba0
push esi
push 0x88
push edi
call fcn.00402420
jmp 0x515789
xor edi, edi
test edi, edi
mov dword [esp + 0x5c], 0xffffffff
je 0x51585f
mov eax, dword [0x5ce6d8]
mov esi, dword [ebp + 0x38]
push str.xunyou_get_game_areas
push eax
call ebx
test eax, eax
je 0x51585f
push esi
lea ecx, [esp + 0x18]
push ecx
push edi
call eax
test eax, eax
jne 0x51585f
mov eax, dword [esp + 0x14]
test eax, eax
jbe 0x51585f
xor ebp, ebp
test eax, eax
jbe 0x51585b
mov ebx, dword [esp + 0x18]
lea esi, [edi + 8]
add ebx, 0xe8
mov edi, 0xf
lea ebx, [ebx]
mov eax, esi
mov dword [esp + 0x4c], edi
mov dword [esp + 0x48], 0
mov byte [esp + 0x38], 0
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x515806
sub eax, edx
push eax
push esi
lea ecx, [esp + 0x3c]
call fcn.0040c1c0
lea edx, [esp + 0x34]
push edx
mov ecx, ebx
mov dword [esp + 0x60], 1
call fcn.0046ec40
cmp dword [esp + 0x4c], 0x10
mov dword [esp + 0x5c], 0xffffffff
jb 0x51584c
mov eax, dword [esp + 0x38]
push eax
call fcn.0055215c
add esp, 4
add ebp, 1
add esi, 0x88
cmp ebp, dword [esp + 0x14]
jb 0x5157f0
mov ebp, dword [esp + 0x18]
mov ecx, dword [0x5ce6d8]
push str.xunyou_get_state_line_area_info_count
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x515879
call eax
jmp 0x51587b
xor eax, eax
xor ecx, ecx
mov dword [esp + 0x14], eax
mov edx, 0x68
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00551843
mov ebx, eax
xor edi, edi
add esp, 4
cmp ebx, edi
je 0x5158f4
mov eax, dword [0x5ce6d8]
push str.xunyou_get_state_line_area_info
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, edi
je 0x5158eb
lea ecx, [esp + 0x14]
push ecx
push ebx
call eax
cmp eax, edi
jne 0x5158eb
mov eax, dword [esp + 0x14]
cmp eax, edi
jbe 0x5158eb
add ebp, 0xb8
mov esi, ebx
push esi
mov ecx, ebp
call fcn.005132b0
add edi, 1
add esi, 0x68
cmp edi, dword [esp + 0x14]
jb 0x5158d1
mov ebp, dword [esp + 0x18]
xor edi, edi
push ebx
call fcn.0055221b
add esp, 4
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], edi
mov edx, dword [ebp + 0x38]
push edx
lea eax, [esp + 0x20]
push eax
mov dword [esp + 0x64], 2
call fcn.00550010
mov ecx, eax
call fcn.0054eba0
xor ebp, ebp
xor ebx, ebx
mov edx, dword [esp + 0x20]
test edx, edx
je 0x515986
mov ecx, dword [esp + 0x24]
mov eax, ecx
sub eax, edx
sar eax, 7
cmp eax, ebp
jbe 0x515986
cmp edx, ecx
mov esi, edx
jbe 0x51594b
call fcn.005532de
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
mov dword [esp + 0x30], esi
add esi, ebx
cmp esi, ecx
lea eax, [esp + 0x1c]
mov edi, eax
ja 0x51595f
cmp esi, edx
jae 0x515964
call fcn.005532de
cmp esi, dword [edi + 8]
jb 0x51596e
call fcn.005532de
mov ecx, dword [esp + 0x18]
add esi, 8
push esi
call fcn.005138c0
add ebp, 1
add ebx, 0x80
jmp 0x515921
mov esi, dword [esp + 0x18]
mov ecx, dword [esi + 0xd8]
push 1
push 0
push 2
push ecx
call dword [sym.imp.USER32.dll_SetScrollPos]
cmp dword [esi + 0xd0], 5
jbe 0x5159af
push 0
mov ecx, esi
call fcn.0050ed40
mov edx, dword [esi + 4]
push 0x51f
push edx
call dword [sym.imp.USER32.dll_GetDlgItem]
push 0
push 0x10
push 0xc5
push eax
mov dword [esi + 0x40], eax
call dword [sym.imp.USER32.dll_SendMessageW]
mov edi, dword [esi + 4]
call fcn.004a1350
test eax, eax
je 0x5159f7
push str.uiview_set_check
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x5159f7
push 1
push 0x520
push edi
call eax
mov ecx, esi
call fcn.0050f960
mov ecx, esi
mov dword [esi + 0x3c], 1
call fcn.0050f070
mov esi, dword [esp + 0x20]
test esi, esi
je 0x515a3e
mov edi, dword [esp + 0x24]
cmp esi, edi
je 0x515a35
lea esp, [esp]
mov ecx, esi
call fcn.0050eee0
add esi, 0x80
cmp esi, edi
jne 0x515a20
mov esi, dword [esp + 0x20]
push esi
call fcn.0055215c
add esp, 4
mov ecx, dword [esp + 0x54]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x3c]
xor ecx, esp
call fcn.00552d63
add esp, 0x4c
ret