Function at 0x412998
Capabilities:
Get socket status
Print debug messages
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x118
cmp dword [0x43106e], 0
jne 0x4129b1
xor eax, eax
jmp 0x412bf6
mov eax, dword [ebp + 8]
push eax
push 0
call fcn.00413e99
add esp, 8
test eax, eax
jne 0x4129cd
mov eax, 0xfffffff7
jmp 0x412bf6
call fcn.00413da8
mov dword [ebp - 8], 0
jmp 0x4129e4
mov ecx, dword [ebp - 8]
add ecx, 1
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 8]
cmp edx, dword [0x431076]
jge 0x412a0f
mov eax, dword [ebp + 8]
xor ecx, ecx
mov cl, byte [eax + 1]
mov edx, dword [ebp - 8]
xor eax, eax
mov al, byte [edx + 0x43107a]
cmp ecx, eax
jne 0x412a0d
xor eax, eax
jmp 0x412bf6
jmp 0x4129db
mov ecx, dword [0x4310be]
mov dword [ebp - 0xc], ecx
cmp dword [ebp - 0xc], 0
jne 0x412a25
xor eax, eax
jmp 0x412bf6
push 0x431880
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [0x43106e]
add edx, 0x20
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 8]
mov dl, byte [ecx]
mov byte [eax], dl
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 8]
mov dl, byte [ecx + 1]
mov byte [eax + 1], dl
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 8]
mov dl, byte [ecx + 2]
mov byte [eax + 2], dl
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 8]
mov dx, word [ecx + 3]
mov word [eax + 3], dx
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 8]
mov dx, word [ecx + 5]
mov word [eax + 5], dx
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 0xc]
mov dword [eax + 0xf], ecx
mov edx, dword [ebp - 4]
mov eax, dword [ebp + 8]
mov cx, word [eax + 7]
mov word [edx + 7], cx
mov edx, dword [ebp - 4]
mov eax, dword [ebp + 8]
mov cx, word [eax + 9]
mov word [edx + 9], cx
mov edx, dword [ebp - 4]
mov eax, dword [ebp + 8]
mov cx, word [eax + 0xb]
mov word [edx + 0xb], cx
push 0x20
push 0
mov edx, dword [0x43106e]
push edx
call fcn.0041ee40
add esp, 0xc
mov eax, dword [0x43106e]
mov ecx, dword [0x43105c]
mov dword [eax], ecx
mov edx, dword [0x43106e]
mov dword [edx + 4], 0x7d04
mov eax, dword [0x43106e]
mov word [eax + 8], 1
mov ecx, dword [0x43106e]
mov dx, word [ebp + 0x10]
mov word [ecx + 0xa], dx
mov eax, dword [0x43106e]
mov word [eax + 0xc], 0x33
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0x7a120
mov dword [ebp - 0x118], 0
cmp dword [ebp - 0x118], 0x40
jae 0x412b41
mov ecx, dword [ebp - 0x118]
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 4]
mov dword [ebp + ecx*4 - 0x114], eax
mov ecx, dword [ebp - 0x118]
add ecx, 1
mov dword [ebp - 0x118], ecx
xor edx, edx
test edx, edx
jne 0x412b16
lea eax, [ebp - 0x14]
push eax
push 0
lea ecx, [ebp - 0x118]
push ecx
push 0
push 0
call sub.WSOCK32.dll_select
push 0
mov edx, dword [0x43106e]
xor eax, eax
mov ax, word [edx + 0xc]
push eax
mov ecx, dword [0x43106e]
push ecx
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 4]
push eax
call sub.WSOCK32.dll_send
cmp eax, 0xffffffff
jne 0x412bbe
call sub.WSOCK32.dll_WSAGetLastError
push eax
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 4]
push edx
push str.WMC____4.4X___wmc_SendWertX:_Send_FAILED_with__d___n
push 0x44d880
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push 0x44d880
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push 0x431880
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
jmp 0x412bf6
cmp dword [0x43189c], 0
je 0x412be6
call fcn.00413fab
cmp dword [0x4310c8], 0
je 0x412be6
push 0
push 0
mov eax, dword [ebp - 4]
push eax
call dword [0x4310c8]
add esp, 0xc
push 0x431880
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 1
mov esp, ebp
pop ebp
ret