Function at 0x403930
Capabilities:
Create udp socket
Initialize winsock library
Read .ini file
Resolve dns
Terminate thread

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff0
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x344
mov eax, dword [0x410040]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebx + 8]
push esi
push edi
mov dword [ebp - 0x324], eax
jmp 0x403973
push 1
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
push 0x407600
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov edi, dword [ebp - 0x324]
mov esi, dword [sym.imp.USER32.dll_LoadStringA]
push 0x64
push 0x4dc518
push 0x67
push edi
mov dword [0x4dc580], eax
call esi
push 0x64
push 0x4dc4b0
push 0x6d
push edi
call esi
mov esi, dword [sym.imp.USER32.dll_LoadIconA]
push 0x6b
push edi
mov dword [ebp - 0x40], 0x30
mov dword [ebp - 0x3c], 3
mov dword [ebp - 0x38], 0x404000
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], edi
call esi
push 0x7f00
push 0
mov dword [ebp - 0x28], eax
call dword [sym.imp.USER32.dll_LoadCursorA]
push 0x6c
push dword [ebp - 0x2c]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], 6
mov dword [ebp - 0x1c], 0x6d
mov dword [ebp - 0x18], 0x4dc4b0
call esi
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x40]
push eax
call dword [sym.imp.USER32.dll_RegisterClassExA]
push 0
push edi
push 0
push 0
push 0x258
push 0x258
push 0
push closesocket
push 0xcf0000
push 0x4dc518
push 0x4dc4b0
push 0
mov dword [0x4dc514], edi
call dword [sym.imp.USER32.dll_CreateWindowExA]
mov dword [0x4dc4ac], eax
test eax, eax
je 0x403a75
push dword [ebx + 0x14]
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
push dword [0x4dc4ac]
call dword [sym.imp.USER32.dll_UpdateWindow]
mov eax, 1
test eax, eax
je 0x403fda
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push str..JoinServer.ini
push 0x20
push 0x4dc48c
push 0x40b37c
push str.CustomerName
push str.JoinServerInfo
call esi
push str..JoinServer.ini
push 0x24
push 0x4dc468
push 0x40b37c
push str.CustomerHardwareId
push str.JoinServerInfo
call esi
push 0
push 0
push 0
push str.LOUIS_MS_EMULATOR
push 0x40c828
lea eax, [ebp - 0x190]
push str.__s___s_JoinServer__QueueSize_:__d___AccountCount_:__d__d_
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x1c
lea eax, [ebp - 0x190]
push eax
push dword [0x4dc4ac]
call dword [sym.imp.USER32.dll_SetWindowTextA]
mov eax, dword [0x4dc4ac]
push 0x40d308
push ecx
mov dword [0x4d9494], eax
call fcn.00406df0
push str.LOG_ACCOUNT
push ecx
call fcn.00406df0
lea eax, [ebp - 0x320]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x403f02
push str..JoinServer.ini
push 0x20
lea eax, [ebp - 0x70]
xorps xmm0, xmm0
push eax
push 0x40b37c
push str.JoinServerODBC
push str.JoinServerInfo
movaps xmmword [ebp - 0x70], xmm0
movaps xmmword [ebp - 0x60], xmm0
movaps xmmword [ebp - 0x90], xmm0
movaps xmmword [ebp - 0x80], xmm0
movaps xmmword [ebp - 0x30], xmm0
movaps xmmword [ebp - 0x20], xmm0
call esi
push str..JoinServer.ini
push 0x20
lea eax, [ebp - 0x90]
push eax
push 0x40b37c
push str.JoinServerUSER
push str.JoinServerInfo
call esi
push str..JoinServer.ini
push 0x20
lea eax, [ebp - 0x30]
push eax
push 0x40b37c
push str.JoinServerPASS
push str.JoinServerInfo
call esi
push str..JoinServer.ini
push 0xb
push 0x4dc454
push str.XwefDastoD
push str.GlobalPassword
push str.JoinServerInfo
call esi
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
push str..JoinServer.ini
push 0xdaa2
push str.JoinServerPort
push str.JoinServerInfo
call esi
push str..JoinServer.ini
movzx eax, ax
xorps xmm0, xmm0
push 0x10
mov dword [ebp - 0x324], eax
lea eax, [ebp - 0x50]
push eax
push str.127.0.0.1
push str.ConnectServerAddress
push str.JoinServerInfo
movaps xmmword [ebp - 0x50], xmm0
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push str..JoinServer.ini
push 0xd905
push str.ConnectServerPort
push str.JoinServerInfo
call esi
push str..JoinServer.ini
push 0
push str.CaseSensitive
movzx eax, ax
push str.JoinServerInfo
mov dword [ebp - 0x328], eax
call esi
push str..JoinServer.ini
push 0
push str.MD5Encryption
push str.JoinServerInfo
mov dword [0x4dc464], eax
call esi
push str..JoinServer.ini
push 0
push str.MaxHardwareIdConnection
push str.JoinServerInfo
mov dword [0x4dc460], eax
call esi
mov dword [0x4dc450], eax
mov esi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcpy_s]
lea eax, [ebp - 0x70]
push eax
push 0x20
push 0x410550
call esi
add esp, 0xc
lea eax, [ebp - 0x90]
push eax
push 0x20
push 0x410570
call esi
add esp, 0xc
lea eax, [ebp - 0x30]
push eax
push 0x20
push 0x410590
call esi
mov esi, dword [sym.imp.ODBC32.dll_SQLAllocHandle]
add esp, 0xc
push 0x410548
push dword [0x410544]
push 2
call esi
test ax, 0xfffe
jne 0x403ef1
push 0xfffffffffffffffd
push 0x410590
push 0xfffffffffffffffd
push 0x410570
push 0xfffffffffffffffd
push 0x410550
push dword [0x410548]
call dword [sym.imp.ODBC32.dll_SQLConnect]
test ax, 0xfffe
jne 0x403ef1
push 0x41054c
push dword [0x410548]
push 3
call esi
test ax, 0xfffe
jne 0x403ef1
push dword [ebp - 0x324]
call fcn.00408500
test al, al
jne 0x403d76
mov eax, dword [0x41054c]
mov esi, dword [sym.imp.ODBC32.dll_SQLFreeHandle]
test eax, eax
je 0x403d3d
push eax
push 3
call esi
mov dword [0x41054c], 0
mov eax, dword [0x410548]
test eax, eax
je 0x403d55
push eax
push 2
call esi
mov dword [0x410548], 0
mov eax, dword [0x410544]
test eax, eax
je 0x403f18
push eax
push 1
call esi
mov dword [0x410544], 0
jmp 0x403f18
push 0
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [0x4d9ef4], eax
cmp eax, 0xffffffff
jne 0x403d9a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str._SocketManagerUdp__WSASocket___failed_with_error:__d
jmp 0x403df3
mov eax, 2
mov word [0x4d9ef8], ax
lea eax, [ebp - 0x50]
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
push dword [ebp - 0x328]
mov dword [0x4d9efc], eax
call dword [sym.imp.WS2_32.dll_htons]
cmp dword [0x4d9efc], 0xffffffff
mov word [0x4d9efa], ax
jne 0x403eb5
lea eax, [ebp - 0x50]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov ecx, eax
test ecx, ecx
jne 0x403e9e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str._SocketManagerUdp__gethostbyname___failed_with_error:__d
push 1
call fcn.00409690
mov eax, dword [0x4d9f08]
add esp, 0xc
test eax, eax
je 0x403e25
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [0x4d9f08]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x4d9f08], 0
mov eax, dword [0x4d9ef4]
cmp eax, 0xffffffff
je 0x403e40
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [0x4d9ef4], 0xffffffff
mov ecx, 0x4d9e60
call fcn.004087c0
mov eax, dword [0x41054c]
mov esi, dword [sym.imp.ODBC32.dll_SQLFreeHandle]
test eax, eax
je 0x403e68
push eax
push 3
call esi
mov dword [0x41054c], 0
mov eax, dword [0x410548]
test eax, eax
je 0x403e80
push eax
push 2
call esi
mov dword [0x410548], 0
mov eax, dword [0x410544]
test eax, eax
je 0x403f18
push eax
push 1
call esi
mov dword [0x410544], 0
jmp 0x403f18
movsx eax, word [ecx + 0xa]
push eax
mov eax, dword [ecx + 0xc]
push dword [eax]
push 0x4d9efc
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
push 0x1000
push 0
push 0x4daf10
call sub.VCRUNTIME140.dll_memset
add esp, 8
mov dword [0x4dbf10], 0
call fcn.004033b0
mov esi, dword [sym.imp.USER32.dll_SetTimer]
push 0
push 0x3e8
push 0x64
push dword [0x4dc4ac]
call esi
jmp 0x403f1e
push str.Could_not_connect_to_database
push 1
call fcn.00409690
add esp, 8
jmp 0x403f18
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.WSAStartup___failed_with_error:__d
push 1
call fcn.00409690
add esp, 0xc
mov esi, dword [sym.imp.USER32.dll_SetTimer]
call fcn.00408050
call fcn.004081b0
push 0
push 0x7d0
push 0x65
push dword [0x4dc4ac]
call esi
push 0x6d
push edi
call dword [sym.imp.USER32.dll_LoadAcceleratorsA]
mov esi, dword [sym.imp.USER32.dll_GetMessageA]
push 0
push 0
mov dword [ebp - 0x328], eax
lea eax, [ebp - 0x344]
push 0
push eax
call esi
test eax, eax
je 0x403fb6
mov edi, dword [sym.imp.USER32.dll_TranslateMessage]
nop word [eax + eax]
lea eax, [ebp - 0x344]
push eax
push dword [ebp - 0x328]
push dword [ebp - 0x344]
call dword [sym.imp.USER32.dll_TranslateAcceleratorA]
test eax, eax
jne 0x403fa3
lea eax, [ebp - 0x344]
push eax
call edi
lea eax, [ebp - 0x344]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
push 0
push 0
push 0
lea eax, [ebp - 0x344]
push eax
call esi
test eax, eax
jne 0x403f70
push dword [0x4dc580]
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
jmp 0x403fd4
mov eax, dword [ebp - 0x33c]
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.00409857
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x10