Function at 0x405010
Capabilities:
Initialize winsock library
Read .ini file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x32c
mov eax, dword [0x42a5f0]
xor eax, esp
mov dword [esp + 0x328], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
jmp 0x405042
push 1
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
push 0x407bf0
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov esi, dword [sym.imp.USER32.dll_LoadStringA]
push 0x64
push 0x431b20
push 0x65
push ebx
mov dword [0x431ba8], eax
call esi
push 0x64
push 0x431ab8
push 0x69
push ebx
call esi
mov eax, ebx
call fcn.004054c0
mov eax, dword [ebp + 0x14]
push eax
mov ecx, ebx
call fcn.00405540
add esp, 4
test eax, eax
jne 0x4050a8
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x328]
xor ecx, esp
call fcn.0040cf87
mov esp, ebp
pop ebp
ret 0x10
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
push str..JoinServer.ini
push 0
push str.CustomerLicenseId
push str.JoinServerInfo
call esi
push 0x2b
mov ecx, 0x431bf8
mov word [0x431ab0], ax
call fcn.00408180
push str.STANDBY
push str.Pre_Season_0.99B_CHS
lea ecx, [esp + 0x238]
push str._JoinServer__SSeMU___s___Ver:_2.1.2_
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
mov eax, dword [0x431ab4]
add esp, 0x10
lea edx, [esp + 0x230]
push edx
push eax
call dword [sym.imp.USER32.dll_SetWindowTextA]
mov ecx, dword [0x431ab4]
push ecx
mov ecx, 0x42d160
call fcn.00409610
lea edx, [esp + 0x30]
push edx
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x4053e4
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push str..JoinServer.ini
push 0x20
mov byte [esp + 0x218], al
mov dword [esp + 0x219], eax
mov dword [esp + 0x21d], eax
mov dword [esp + 0x221], eax
mov dword [esp + 0x225], eax
mov dword [esp + 0x229], eax
mov dword [esp + 0x22d], eax
mov dword [esp + 0x231], eax
mov word [esp + 0x235], ax
mov byte [esp + 0x237], al
mov byte [esp + 0x1f8], al
mov dword [esp + 0x1f9], eax
mov dword [esp + 0x1fd], eax
mov dword [esp + 0x201], eax
mov dword [esp + 0x205], eax
mov dword [esp + 0x209], eax
mov dword [esp + 0x20d], eax
mov dword [esp + 0x211], eax
mov word [esp + 0x215], ax
mov byte [esp + 0x217], al
mov byte [esp + 0x1d8], al
mov dword [esp + 0x1d9], eax
mov dword [esp + 0x1dd], eax
mov dword [esp + 0x1e1], eax
mov dword [esp + 0x1e5], eax
mov dword [esp + 0x1e9], eax
mov dword [esp + 0x1ed], eax
mov dword [esp + 0x1f1], eax
mov word [esp + 0x1f5], ax
mov byte [esp + 0x1f7], al
lea eax, [esp + 0x218]
push eax
push 0x426625
push str.JoinServerODBC
push str.JoinServerInfo
call edi
push str..JoinServer.ini
push 0x20
lea ecx, [esp + 0x1f8]
push ecx
push 0x426625
push str.JoinServerUSER
push str.JoinServerInfo
call edi
push str..JoinServer.ini
push 0x20
lea edx, [esp + 0x1d8]
push edx
push 0x426625
push str.JoinServerPASS
push str.JoinServerInfo
call edi
push str..JoinServer.ini
push 0xdaa2
push str.JoinServerPort
push str.JoinServerInfo
call esi
push str..JoinServer.ini
push 0x10
lea ecx, [esp + 0x1c8]
push ecx
movzx eax, ax
push str.127.0.0.1
mov dword [esp + 0x20], eax
xor eax, eax
push str.ConnectServerAddress
push str.JoinServerInfo
mov byte [esp + 0x1d8], 0
mov dword [esp + 0x1d9], eax
mov dword [esp + 0x1dd], eax
mov dword [esp + 0x1e1], eax
mov word [esp + 0x1e5], ax
mov byte [esp + 0x1e7], al
call edi
push str..JoinServer.ini
push 0xd905
push str.ConnectServerPort
push str.JoinServerInfo
call esi
push str..JoinServer.ini
push 0
push str.MaxConnectionPerIP
push str.JoinServerInfo
movzx edi, ax
call esi
push str..JoinServer.ini
push 0
push str.MaxConnectionPerHID
push str.JoinServerInfo
mov word [0x431aac], ax
call esi
push str..JoinServer.ini
push 0
push str.CaseSensitive
push str.JoinServerInfo
mov word [0x431aa8], ax
call esi
push str..JoinServer.ini
push 0
push str.MD5Encryption
push str.JoinServerInfo
mov dword [0x431aa4], eax
call esi
mov dword [0x431aa0], eax
lea edx, [esp + 0x1d0]
push edx
lea eax, [esp + 0x1f4]
push eax
lea eax, [esp + 0x218]
mov ecx, 0x431c40
call fcn.00408c10
test al, al
jne 0x405387
push str.Could_not_connect_to_database__ODBC_Error_
push 1
call fcn.0040b1b0
add esp, 8
jmp 0x4053fa
mov eax, dword [esp + 0x10]
call fcn.00409ea0
test al, al
jne 0x4053a0
mov esi, 0x431c40
call fcn.00408ca0
jmp 0x4053fa
push edi
lea eax, [esp + 0x1c4]
call fcn.0040aee0
test al, al
jne 0x4053c7
mov esi, 0x4fb450
call fcn.00409f00
mov esi, 0x431c40
call fcn.00408ca0
jmp 0x4053fa
call fcn.004040d0
mov ecx, dword [0x431ab4]
push 0
push 0x3e8
push 0x64
push ecx
call dword [sym.imp.USER32.dll_SetTimer]
jmp 0x4053fa
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.WSAStartup___failed_with_error:__d
push 1
call fcn.0040b1b0
add esp, 0xc
mov edx, dword [0x431ab4]
push 0
push 0x7d0
push 0x65
push edx
call dword [sym.imp.USER32.dll_SetTimer]
push 0x69
push ebx
call dword [sym.imp.USER32.dll_LoadAcceleratorsA]
mov edi, dword [sym.imp.USER32.dll_GetMessageA]
push 0
push 0
mov esi, eax
push 0
lea eax, [esp + 0x20]
push eax
call edi
test eax, eax
je 0x405478
mov ebx, dword [sym.imp.USER32.dll_TranslateAcceleratorA]
jmp 0x405440
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x14]
push ecx
push esi
push edx
call ebx
test eax, eax
jne 0x405467
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.USER32.dll_DispatchMessageA]
push 0
push 0
push 0
lea edx, [esp + 0x20]
push edx
call edi
test eax, eax
jne 0x405440
mov eax, dword [0x431ba8]
push eax
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
jmp 0x405496
mov ecx, dword [esp + 0x334]
mov eax, dword [esp + 0x1c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040cf87
mov esp, ebp
pop ebp
ret 0x10