Function at 0x469a10
Capabilities:
Get socket status
Initialize winsock library
Print debug messages
Read .ini file
Read and send data from client to server
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3ec
push ebx
push esi
push edi
mov dword [ebp - 0x298], 0
mov dword [ebp - 0x29c], 0xffffffff
mov eax, dword [ebp + 0xc]
push eax
push 0
push str.WMC____4.4X___wmc_Connect:_AppName_s_n
push 0x4b1180
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push 0x4b1180
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
cmp dword [0x4b0916], 0
je 0x469a90
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [0x4b0916]
mov eax, dword [edx + 4]
push eax
push str.WMC____4.4X___wmc_Connect:_AppName_s_still_connected___n
push 0x4b1180
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push 0x4b1180
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
xor eax, eax
jmp 0x469ef9
mov dword [0x4b0920], 0
mov dword [0x4b0924], 0
push 0
push 0xffffffffffffffff
call sub.WINDCS32.dll_Ordinal_69
push eax
push str._s_syslogging.ini
lea ecx, [ebp - 0x104]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea edx, [ebp - 0x104]
push edx
push 1
push str.EnableUserLogging
push str.Global
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov dword [0x4b0efc], eax
call fcn.00469950
mov eax, dword [ebp + 8]
mov dword [0x4b08b4], eax
lea ecx, [ebp - 0x294]
push ecx
push 0x101
call sub.WSOCK32.dll_WSAStartup
test eax, eax
je 0x469b0a
xor eax, eax
jmp 0x469ef9
push 0x13
mov edx, dword [ebp + 0xc]
push edx
push 0x4b08a0
call dword [sym.imp.MSVCRT.dll_strncpy]
add esp, 0xc
push 0xfe08
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [0x4b08c6], eax
push 0xff0
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [0x4b08ca], eax
push 0xfa5c
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [0x4b08ba], eax
push 0xfa5c
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [0x4b08be], eax
push 0xfe08
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [0x4b08c2], eax
cmp dword [0x4b08c6], 0
je 0x469ba3
cmp dword [0x4b08ca], 0
je 0x469ba3
cmp dword [0x4b08ba], 0
je 0x469ba3
cmp dword [0x4b08c2], 0
jne 0x469bcd
push str.WMC___wmc_Connect:_Out_of_memory____call_wmc_Disconnect___..._n
push 0x4b1180
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 8
push 0x4b1180
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call fcn.0046a030
xor eax, eax
jmp 0x469ef9
push 0x4b0ee0
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0x4b0f00
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [ebp - 0x2a0], 0x100007f
mov eax, dword [ebp - 0x2a0]
push eax
call fcn.00469980
add esp, 4
mov dword [ebp - 0x29c], eax
cmp dword [ebp - 0x29c], 0xffffffff
jne 0x469c17
call sub.WSOCK32.dll_WSACleanup
xor eax, eax
jmp 0x469ef9
push 0x10022
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 0x298], eax
cmp dword [ebp - 0x298], 0
jne 0x469c52
mov ecx, dword [ebp - 0x29c]
push ecx
call sub.WSOCK32.dll_closesocket
call sub.WSOCK32.dll_WSACleanup
xor eax, eax
jmp 0x469ef9
push 0x780
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edx, dword [ebp - 0x298]
mov dword [edx + 0xfe20], eax
mov eax, dword [ebp - 0x298]
cmp dword [eax + 0xfe20], 0
jne 0x469cba
mov ecx, dword [ebp - 0x29c]
push ecx
call sub.WSOCK32.dll_closesocket
mov edx, dword [ebp - 0x298]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalHandle]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [ebp - 0x298]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalHandle]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
call sub.WSOCK32.dll_WSACleanup
xor eax, eax
jmp 0x469ef9
mov ecx, dword [ebp - 0x298]
mov edx, dword [0x4b0916]
mov dword [ecx], edx
mov eax, dword [ebp - 0x298]
mov dword [0x4b0916], eax
mov ecx, dword [ebp - 0x298]
mov edx, dword [ebp - 0x2a0]
mov dword [ecx + 8], edx
mov eax, dword [ebp - 0x298]
mov ecx, dword [ebp - 0x29c]
mov dword [eax + 4], ecx
mov edx, dword [ebp - 0x298]
add edx, 0x18
mov eax, dword [ebp - 0x298]
mov dword [eax + 0xc], edx
mov ecx, dword [ebp - 0x298]
mov edx, dword [ecx + 0xc]
add edx, 0x20
mov eax, dword [ebp - 0x298]
mov dword [eax + 0x10], edx
mov dword [0x4b0ef8], 0
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp - 0x298]
mov eax, dword [edx + 4]
push eax
push str.WMC____4.4X___wmc_Connect:_Init_wmc_communication_for_Appl_s_n
push 0x4b1180
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push 0x4b1180
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push 0x21
push 0x7d19
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 0x29c]
push edx
call sub.WSOCK32.dll_WSAAsyncSelect
push 0x4b0ee0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0x20
push 0
mov eax, dword [0x4b08c6]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
mov ecx, dword [0x4b08c6]
mov edx, dword [ebp + 8]
mov dword [ecx], edx
mov eax, dword [0x4b08c6]
mov dword [eax + 4], 0x7d05
mov ecx, dword [ebp + 0xc]
push ecx
call sub.MSVCRT.dll_strlen
add esp, 4
add eax, 1
mov edx, dword [0x4b08c6]
mov word [edx + 8], ax
mov eax, dword [0x4b08c6]
xor ecx, ecx
mov cx, word [eax + 8]
add ecx, 0x20
mov edx, dword [0x4b08c6]
mov word [edx + 0xc], cx
mov eax, dword [0x4b08c6]
mov word [eax + 0xe], 0x400
call sub.WINDCS32.dll_sysini_GetAreaForApplikation
mov ecx, dword [0x4b08c6]
mov byte [ecx + 0x10], al
call sub.WINDCS32.dll_Ordinal_53_1
mov edx, dword [0x4b08c6]
mov byte [edx + 0x11], al
mov eax, dword [0x4b08c6]
xor ecx, ecx
mov cx, word [eax + 8]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [0x4b08c6]
add eax, 0x20
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov dword [ebp - 0x3ac], 0
mov dword [ebp - 0x3a8], 0x7a120
mov dword [ebp - 0x3a4], 0
cmp dword [ebp - 0x3a4], 0x40
jae 0x469e5e
mov ecx, dword [ebp - 0x3a4]
mov edx, dword [ebp - 0x298]
mov eax, dword [edx + 4]
mov dword [ebp + ecx*4 - 0x3a0], eax
mov ecx, dword [ebp - 0x3a4]
add ecx, 1
mov dword [ebp - 0x3a4], ecx
xor edx, edx
test edx, edx
jne 0x469e30
lea eax, [ebp - 0x3ac]
push eax
push 0
lea ecx, [ebp - 0x3a4]
push ecx
push 0
push 0
call sub.WSOCK32.dll_select
push 0
mov edx, dword [0x4b08c6]
xor eax, eax
mov ax, word [edx + 0xc]
push eax
mov ecx, dword [0x4b08c6]
push ecx
mov edx, dword [ebp - 0x298]
mov eax, dword [edx + 4]
push eax
call sub.WSOCK32.dll_send
cmp eax, 0xffffffff
jne 0x469ee9
call sub.WSOCK32.dll_WSAGetLastError
push eax
mov ecx, dword [ebp - 0x298]
mov edx, dword [ecx + 4]
push edx
push str.WMC____4.4X___wmc_Connect:_Send_FAILED_with__d___n
push 0x4b1180
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push 0x4b1180
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push 0x4b0ee0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call fcn.0046a030
xor eax, eax
jmp 0x469ef9
push 0x4b0ee0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret