Function at 0x4093e0
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 [0x4206be]
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], 0
mov ecx, dword [ebp + 8]
and ecx, 0xff
test ecx, ecx
jg 0x40940f
mov eax, 0xfffffffc
jmp 0x409824
call fcn.00409828
mov dword [ebp - 0xc], 0
jmp 0x409426
mov edx, dword [ebp - 0xc]
add edx, 1
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0xc]
cmp eax, dword [0x420676]
jge 0x409452
mov ecx, dword [ebp + 8]
and ecx, 0xff
mov edx, dword [ebp - 0xc]
xor eax, eax
mov al, byte [edx + 0x42067a]
cmp ecx, eax
jne 0x409450
xor eax, eax
jmp 0x409824
jmp 0x40941d
mov ecx, dword [0x420662]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x409472
mov eax, 0xfffffffe
jmp 0x409824
mov dl, byte [ebp + 0xc]
mov byte [ebp - 0x124], dl
cmp byte [ebp - 0x124], 0
jb 0x409598
cmp byte [ebp - 0x124], 6
jbe 0x4094a3
cmp byte [ebp - 0x124], 0x17
je 0x409572
jmp 0x409598
mov eax, dword [ebp + 8]
and eax, 0xff
cmp eax, 0xf0
jge 0x4094c6
mov ecx, dword [ebp + 8]
and ecx, 0xff
push ecx
call sub.WINDCS32.dll_sysini_GetPcuFamily
cmp eax, 7
jne 0x4094d1
mov edx, dword [ebp - 8]
mov al, byte [ebp + 0xc]
mov byte [edx + 4], al
jmp 0x4094e6
mov ecx, dword [ebp + 0xc]
and ecx, 0xff
mov edx, dword [ebp - 8]
mov al, byte [ecx + 0x41dd48]
mov byte [edx + 4], al
mov ecx, dword [ebp + 0x14]
and ecx, 0xffff
test ecx, ecx
jl 0x409504
mov edx, dword [ebp + 0x14]
and edx, 0xffff
cmp edx, 0x7cff
jle 0x40951a
mov eax, dword [0x420662]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, 0xfffffffc
jmp 0x409824
mov ecx, dword [ebp + 0x18]
and ecx, 0xffff
cmp ecx, 1
jl 0x409539
mov edx, dword [ebp + 0x18]
and edx, 0xffff
cmp edx, 0x7d00
jle 0x40954f
mov eax, dword [0x420662]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, 0xfffffffb
jmp 0x409824
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 0x4095c2
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 0x4095c2
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 0x409623
mov edx, dword [ebp + 8]
and edx, 0xff
push edx
call sub.WINDCS32.dll_sysini_GetPcuFamily
cmp eax, 7
jne 0x4095fe
mov eax, dword [ebp - 8]
mov byte [eax + 0xb], 0x4e
jmp 0x409605
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.00413c30
add esp, 0xc
jmp 0x409636
push 0x4e
push 0
mov eax, dword [ebp - 8]
add eax, 0xe
push eax
call fcn.00413a30
add esp, 0xc
cmp dword [ebp + 0x20], 0
je 0x40965d
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.00413c30
add esp, 0xc
jmp 0x409664
mov dword [ebp - 4], 1
push 0x421220
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 [0x42066e]
add ecx, 0x20
push ecx
call fcn.00413c30
add esp, 0xc
mov edx, dword [0x420662]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
cmp dword [ebp - 4], 0
je 0x4096c2
push 0x421220
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 0xfffffffa
jmp 0x409824
push 0x20
push 0
mov eax, dword [0x42066e]
push eax
call fcn.00413a30
add esp, 0xc
mov ecx, dword [0x42066e]
mov edx, dword [0x42065c]
mov dword [ecx], edx
mov eax, dword [0x42066e]
mov dword [eax + 4], 0x7d15
mov ecx, dword [0x42066e]
mov word [ecx + 8], 1
movzx dx, byte [ebp + 8]
mov eax, dword [0x42066e]
mov word [eax + 0xa], dx
mov ecx, dword [ebp - 0x10]
add ecx, 0x20
mov edx, dword [0x42066e]
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 0x40975b
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 0x409730
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 [0x42066e]
xor edx, edx
mov dx, word [ecx + 0xc]
push edx
mov eax, dword [0x42066e]
push eax
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx + 4]
push edx
call sub.WSOCK32.dll_send
cmp eax, 0xffffffff
jne 0x4097d7
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 0x421120
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push 0x421120
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push 0x421220
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
jmp 0x409824
cmp dword [0x42123c], 0
je 0x409814
call fcn.00409a2b
cmp dword [0x4206cc], 0
je 0x409814
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 [0x4206cc]
add esp, 0x1c
push 0x421220
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 1
mov esp, ebp
pop ebp
ret