Function at 0x40d4a0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4fed69
push eax
mov dword fs:[0], esp
sub esp, 0x284
push ebx
push esi
mov esi, ecx
mov eax, dword [esi + 0x290]
sub eax, dword [esi + 0x28c]
push edi
sar eax, 2
test eax, eax
je 0x40d4ed
mov eax, dword [esi + 0x290]
cmp dword [esi + 0x28c], eax
je 0x40d4ed
add eax, 0xfffffffc
mov dword [esi + 0x290], eax
xor ebx, ebx
cmp dword [ebp + 8], 1
jne 0x40d6c2
push str.To_Server
sub esp, 0x1c
mov ecx, esp
mov dword [ebp + 8], esp
push 0xe
mov edi, 0xf
mov dword [ecx + 0x14], edi
mov dword [ecx + 0x10], ebx
push str.SwitchLocation
mov byte [ecx], bl
call fcn.00404e20
push 3
push 0x57d720
call fcn.0041cec0
add esp, 0x28
test byte [0x57d6a0], 1
jne 0x40d55f
or dword [0x57d6a0], 1
mov ecx, 0x564458
mov dword [ebp - 4], ebx
call fcn.00423310
push 0x502550
call fcn.004e0e4d
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov ecx, 0x564458
call fcn.00423510
test al, al
jne 0x40d673
push str.Please_login_to_get_more_tools_
sub esp, 0x1c
mov ecx, esp
mov dword [ebp + 8], esp
push 0xe
mov dword [ecx + 0x14], edi
mov dword [ecx + 0x10], ebx
push str.SwitchLocation
mov byte [ecx], bl
call fcn.00404e20
push 3
push 0x57d720
call fcn.0041cec0
add esp, 0x28
push ebx
push 4
sub esp, 0x1c
mov ecx, esp
mov dword [ebp + 8], esp
push 0x1f
mov dword [ecx + 0x14], edi
mov dword [ecx + 0x10], ebx
push str.Please_login_to_get_more_tools_
mov byte [ecx], bl
call fcn.00404e20
lea ecx, [ebp - 0x290]
call fcn.00410c40
push ebx
push closesocket
push closesocket
push closesocket
push closesocket
push 0x100
push 0x96c80000
push str.MessageWnd
mov ecx, esi
mov dword [ebp - 4], 1
mov byte [ebp - 0x10], bl
call dword [sym.imp.DuiLib.dll_public:_struct_HWND______thiscall_DuiLib::CWindowWnd::GetHWND_void_const]
push eax
lea ecx, [ebp - 0x290]
call dword [sym.imp.DuiLib.dll_public:_struct_HWND______thiscall_DuiLib::CWindowWnd::Create_struct_HWND_____char_const___unsigned_long_int__unsigned_long_int__int__int__int__int__struct_HMENU____]
lea ecx, [ebp - 0x290]
call dword [sym.imp.DuiLib.dll_public:_void___thiscall_DuiLib::CWindowWnd::CenterWindow_void_]
lea ecx, [ebp - 0x290]
call dword [sym.imp.DuiLib.dll_public:_unsigned_int___thiscall_DuiLib::CWindowWnd::ShowModal_void_]
mov ecx, dword [esi + 0x270]
cmp ecx, ebx
je 0x40d64e
call dword [sym.imp.DuiLib.dll_public:_bool___thiscall_DuiLib::COptionUI::IsSelected_void_const]
test al, al
jne 0x40d64e
mov esi, dword [esi + 0x270]
mov edx, dword [esi]
mov eax, dword [edx + 0x134]
push 1
mov ecx, esi
call eax
lea ecx, [ebp - 0x290]
mov dword [ebp - 4], 0xffffffff
call fcn.004045e0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push str.To_ReLoginThread_
sub esp, 0x1c
mov ecx, esp
mov dword [ebp + 8], esp
push 0xe
mov dword [ecx + 0x14], edi
mov dword [ecx + 0x10], ebx
push str.SwitchLocation
mov byte [ecx], bl
call fcn.00404e20
push 3
push 0x57d720
call fcn.0041cec0
push esi
push ebx
push 0x40c410
call fcn.004e2e92
add esp, 0x34
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push ebx
call fcn.00401f10
push ebx
sub esp, 0x1c
mov ecx, esp
mov dword [ebp + 8], esp
push ebx
mov dword [ecx + 0x14], 0xf
mov dword [ecx + 0x10], ebx
push 0x503a80
mov byte [ecx], bl
call fcn.00404e20
mov ecx, esi
call fcn.00407e90
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4