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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x124
mov eax, dword [0x4310be]
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], 0
mov ecx, dword [ebp + 8]
and ecx, 0xff
test ecx, ecx
jg 0x41398f
mov eax, 0xfffffffc
jmp 0x413da4
call fcn.00413da8
mov dword [ebp - 0xc], 0
jmp 0x4139a6
mov edx, dword [ebp - 0xc]
add edx, 1
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0xc]
cmp eax, dword [0x431076]
jge 0x4139d2
mov ecx, dword [ebp + 8]
and ecx, 0xff
mov edx, dword [ebp - 0xc]
xor eax, eax
mov al, byte [edx + 0x43107a]
cmp ecx, eax
jne 0x4139d0
xor eax, eax
jmp 0x413da4
jmp 0x41399d
mov ecx, dword [0x431062]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x4139f2
mov eax, 0xfffffffe
jmp 0x413da4
mov dl, byte [ebp + 0xc]
mov byte [ebp - 0x124], dl
cmp byte [ebp - 0x124], 0
jb 0x413b18
cmp byte [ebp - 0x124], 6
jbe 0x413a23
cmp byte [ebp - 0x124], 0x17
je 0x413af2
jmp 0x413b18
mov eax, dword [ebp + 8]
and eax, 0xff
cmp eax, 0xf0
jge 0x413a46
mov ecx, dword [ebp + 8]
and ecx, 0xff
push ecx
call sub.WINDCS32.dll_sysini_GetPcuFamily
cmp eax, 7
jne 0x413a51
mov edx, dword [ebp - 8]
mov al, byte [ebp + 0xc]
mov byte [edx + 4], al
jmp 0x413a66
mov ecx, dword [ebp + 0xc]
and ecx, 0xff
mov edx, dword [ebp - 8]
mov al, byte [ecx + 0x42cc40]
mov byte [edx + 4], al
mov ecx, dword [ebp + 0x14]
and ecx, 0xffff
test ecx, ecx
jl 0x413a84
mov edx, dword [ebp + 0x14]
and edx, 0xffff
cmp edx, 0x7cff
jle 0x413a9a
mov eax, dword [0x431062]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, 0xfffffffc
jmp 0x413da4
mov ecx, dword [ebp + 0x18]
and ecx, 0xffff
cmp ecx, 1
jl 0x413ab9
mov edx, dword [ebp + 0x18]
and edx, 0xffff
cmp edx, 0x7d00
jle 0x413acf
mov eax, dword [0x431062]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, 0xfffffffb
jmp 0x413da4
mov ecx, dword [ebp - 8]
mov dx, word [ebp + 0x10]
mov word [ecx + 2], dx
mov eax, dword [ebp - 8]
mov cx, word [ebp + 0x14]
mov word [eax + 5], cx
mov edx, dword [ebp - 8]
mov ax, word [ebp + 0x18]
mov word [edx + 7], ax
jmp 0x413b42
mov ecx, dword [ebp - 8]
mov byte [ecx + 4], 0x17
mov edx, dword [ebp - 8]
mov word [edx + 2], 0
mov eax, dword [ebp - 8]
mov word [eax + 5], 0
mov ecx, dword [ebp - 8]
mov dx, word [ebp + 0x18]
mov word [ecx + 7], dx
jmp 0x413b42
mov eax, dword [ebp - 8]
mov cl, byte [ebp + 0xc]
mov byte [eax + 4], cl
mov edx, dword [ebp - 8]
mov ax, word [ebp + 0x10]
mov word [edx + 2], ax
mov ecx, dword [ebp - 8]
mov dx, word [ebp + 0x14]
mov word [ecx + 5], dx
mov eax, dword [ebp - 8]
mov cx, word [ebp + 0x18]
mov word [eax + 7], cx
mov edx, dword [ebp - 8]
mov word [edx + 9], 0
mov eax, dword [ebp - 8]
mov word [eax + 0xc], 0
mov ecx, dword [ebp - 8]
mov byte [ecx + 0xb], 0
cmp dword [ebp + 0x1c], 0
je 0x413ba3
mov edx, dword [ebp + 8]
and edx, 0xff
push edx
call sub.WINDCS32.dll_sysini_GetPcuFamily
cmp eax, 7
jne 0x413b7e
mov eax, dword [ebp - 8]
mov byte [eax + 0xb], 0x4e
jmp 0x413b85
mov ecx, dword [ebp - 8]
mov byte [ecx + 0xb], 0xa
mov edx, dword [ebp - 8]
xor eax, eax
mov al, byte [edx + 0xb]
push eax
mov ecx, dword [ebp + 0x1c]
push ecx
mov edx, dword [ebp - 8]
add edx, 0xe
push edx
call fcn.0041f530
add esp, 0xc
jmp 0x413bb6
push 0x4e
push 0
mov eax, dword [ebp - 8]
add eax, 0xe
push eax
call fcn.0041ee40
add esp, 0xc
cmp dword [ebp + 0x20], 0
je 0x413bdd
mov ecx, dword [ebp + 0x18]
and ecx, 0xffff
shl ecx, 1
push ecx
mov edx, dword [ebp + 0x20]
push edx
mov eax, dword [ebp - 8]
add eax, 0x5c
push eax
call fcn.0041f530
add esp, 0xc
jmp 0x413be4
mov dword [ebp - 4], 1
push 0x431880
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [ebp + 0x18]
and ecx, 0xffff
lea edx, [ecx + ecx + 0x5c]
mov dword [ebp - 0x10], edx
push 0xfa5c
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [0x43106e]
add ecx, 0x20
push ecx
call fcn.0041f530
add esp, 0xc
mov edx, dword [0x431062]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
cmp dword [ebp - 4], 0
je 0x413c42
push 0x431880
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 0xfffffffa
jmp 0x413da4
push 0x20
push 0
mov eax, dword [0x43106e]
push eax
call fcn.0041ee40
add esp, 0xc
mov ecx, dword [0x43106e]
mov edx, dword [0x43105c]
mov dword [ecx], edx
mov eax, dword [0x43106e]
mov dword [eax + 4], 0x7d15
mov ecx, dword [0x43106e]
mov word [ecx + 8], 1
movzx dx, byte [ebp + 8]
mov eax, dword [0x43106e]
mov word [eax + 0xa], dx
mov ecx, dword [ebp - 0x10]
add ecx, 0x20
mov edx, dword [0x43106e]
mov word [edx + 0xc], cx
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0x7a120
mov dword [ebp - 0x120], 0
cmp dword [ebp - 0x120], 0x40
jae 0x413cdb
mov eax, dword [ebp - 0x120]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx + 4]
mov dword [ebp + eax*4 - 0x11c], edx
mov eax, dword [ebp - 0x120]
add eax, 1
mov dword [ebp - 0x120], eax
xor ecx, ecx
test ecx, ecx
jne 0x413cb0
lea edx, [ebp - 0x1c]
push edx
push 0
lea eax, [ebp - 0x120]
push eax
push 0
push 0
call sub.WSOCK32.dll_select
push 0
mov ecx, dword [0x43106e]
xor edx, edx
mov dx, word [ecx + 0xc]
push edx
mov eax, dword [0x43106e]
push eax
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx + 4]
push edx
call sub.WSOCK32.dll_send
cmp eax, 0xffffffff
jne 0x413d57
call sub.WSOCK32.dll_WSAGetLastError
push eax
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + 4]
push ecx
push str.WMC____4.4X___wmc_WriteBstX:_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 0x413da4
cmp dword [0x43189c], 0
je 0x413d94
call fcn.00413fab
cmp dword [0x4310cc], 0
je 0x413d94
push 0
push 0
mov dx, word [ebp + 0x18]
push edx
mov ax, word [ebp + 0x14]
push eax
mov cx, word [ebp + 0x10]
push ecx
mov dl, byte [ebp + 0xc]
push edx
movzx ax, byte [ebp + 8]
push eax
call dword [0x4310cc]
add esp, 0x1c
push 0x431880
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 1
mov esp, ebp
pop ebp
ret