Function at 0x430040
Capabilities:
Create thread
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 0x44a1e0
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push 0x44a1e0
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
cmp dword [0x449dde], 0
je 0x4300c0
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [0x449dde]
mov eax, dword [edx + 4]
push eax
push str.WMC____4.4X___wmc_Connect:_AppName_s_still_connected___n
push 0x44a1e0
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push 0x44a1e0
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
xor eax, eax
jmp 0x430548
mov dword [0x449de8], 0
mov dword [0x449dec], 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 [0x44a1bc], eax
call fcn.0042ff80
mov eax, dword [ebp + 8]
mov dword [0x449d7c], eax
lea ecx, [ebp - 0x294]
push ecx
push 0x101
call sub.WSOCK32.dll_WSAStartup
test eax, eax
je 0x43013a
xor eax, eax
jmp 0x430548
push 0x13
mov edx, dword [ebp + 0xc]
push edx
push 0x449d68
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 [0x449d8e], eax
push 0xff0
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [0x449d92], eax
push 0xfa5c
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [0x449d82], eax
push 0xfa5c
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [0x449d86], eax
push 0xfe08
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [0x449d8a], eax
cmp dword [0x449d8e], 0
je 0x4301d3
cmp dword [0x449d92], 0
je 0x4301d3
cmp dword [0x449d82], 0
je 0x4301d3
cmp dword [0x449d8a], 0
jne 0x4301fd
push str.WMC___wmc_Connect:_Out_of_memory____call_wmc_Disconnect___..._n
push 0x44a1e0
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 8
push 0x44a1e0
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call fcn.00430680
xor eax, eax
jmp 0x430548
push 0x44a1a0
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0x44a1c0
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [ebp - 0x2a0], 0x100007f
mov eax, dword [ebp - 0x2a0]
push eax
call fcn.0042ffb0
add esp, 4
mov dword [ebp - 0x29c], eax
cmp dword [ebp - 0x29c], 0xffffffff
jne 0x430247
call sub.WSOCK32.dll_WSACleanup
xor eax, eax
jmp 0x430548
push 0x1002a
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 0x430282
mov ecx, dword [ebp - 0x29c]
push ecx
call sub.WSOCK32.dll_closesocket
call sub.WSOCK32.dll_WSACleanup
xor eax, eax
jmp 0x430548
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 0x4302ea
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 0x430548
mov ecx, dword [ebp - 0x298]
mov edx, dword [0x449dde]
mov dword [ecx], edx
mov eax, dword [ebp - 0x298]
mov dword [0x449dde], 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 [0x44a1b8], 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:_Create_new_thread_for_wmc_communication_for_Appl_s_n
push 0x44a1e0
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push 0x44a1e0
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov ecx, dword [ebp - 0x298]
mov dword [ecx + 0xfe28], 0
mov edx, dword [ebp - 0x298]
push edx
push 0
push 0x42fcc0
call dword [sym.imp.MSVCRT.dll__beginthread]
add esp, 0xc
mov ecx, dword [ebp - 0x298]
mov dword [ecx + 0xfe24], eax
push 0x44a1a0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0x20
push 0
mov edx, dword [0x449d8e]
push edx
call sub.MSVCRT.dll_memset
add esp, 0xc
mov eax, dword [0x449d8e]
mov ecx, dword [ebp + 8]
mov dword [eax], ecx
mov edx, dword [0x449d8e]
mov dword [edx + 4], 0x7d05
mov eax, dword [ebp + 0xc]
push eax
call sub.MSVCRT.dll_strlen
add esp, 4
add eax, 1
mov ecx, dword [0x449d8e]
mov word [ecx + 8], ax
mov edx, dword [0x449d8e]
xor eax, eax
mov ax, word [edx + 8]
add eax, 0x20
mov ecx, dword [0x449d8e]
mov word [ecx + 0xc], ax
mov edx, dword [0x449d8e]
mov word [edx + 0xe], 0x400
call sub.WINDCS32.dll_sysini_GetAreaForApplikation
mov ecx, dword [0x449d8e]
mov byte [ecx + 0x10], al
call sub.WINDCS32.dll_Ordinal_53
mov edx, dword [0x449d8e]
mov byte [edx + 0x11], al
mov eax, dword [0x449d8e]
xor ecx, ecx
mov cx, word [eax + 8]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [0x449d8e]
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 0x4304ad
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 0x43047f
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 [0x449d8e]
xor eax, eax
mov ax, word [edx + 0xc]
push eax
mov ecx, dword [0x449d8e]
push ecx
mov edx, dword [ebp - 0x298]
mov eax, dword [edx + 4]
push eax
call sub.WSOCK32.dll_send
cmp eax, 0xffffffff
jne 0x430538
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 0x44a1e0
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push 0x44a1e0
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push 0x44a1a0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call fcn.00430680
xor eax, eax
jmp 0x430548
push 0x44a1a0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret