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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x164
push ebx
push esi
push edi
mov eax, dword [0x4b0916]
mov dword [ebp - 4], eax
mov dword [ebp - 8], 0
mov ecx, dword [ebp + 8]
and ecx, 0xff
test ecx, ecx
jg 0x46b7e2
mov eax, 0xfffffffc
jmp 0x46bc00
call fcn.0046bc10
mov dword [ebp - 0x10], 0
jmp 0x46b7f9
mov edx, dword [ebp - 0x10]
add edx, 1
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 0x10]
cmp eax, dword [0x4b08ce]
jge 0x46b825
mov ecx, dword [ebp + 8]
and ecx, 0xff
mov edx, dword [ebp - 0x10]
xor eax, eax
mov al, byte [edx + 0x4b08d2]
cmp ecx, eax
jne 0x46b823
xor eax, eax
jmp 0x46bc00
jmp 0x46b7f0
mov ecx, dword [0x4b08ba]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x46b845
mov eax, 0xfffffffe
jmp 0x46bc00
mov dl, byte [ebp + 0xc]
mov byte [ebp - 0x124], dl
cmp byte [ebp - 0x124], 0
jb 0x46b96b
cmp byte [ebp - 0x124], 6
jbe 0x46b876
cmp byte [ebp - 0x124], 0x17
je 0x46b945
jmp 0x46b96b
mov eax, dword [ebp + 8]
and eax, 0xff
cmp eax, 0xf0
jge 0x46b899
mov ecx, dword [ebp + 8]
and ecx, 0xff
push ecx
call sub.WINDCS32.dll_sysini_GetPcuFamily
cmp eax, 7
jne 0x46b8a4
mov edx, dword [ebp - 0xc]
mov al, byte [ebp + 0xc]
mov byte [edx + 4], al
jmp 0x46b8b9
mov ecx, dword [ebp + 0xc]
and ecx, 0xff
mov edx, dword [ebp - 0xc]
mov al, byte [ecx + 0x4a91c0]
mov byte [edx + 4], al
mov ecx, dword [ebp + 0x14]
and ecx, 0xffff
test ecx, ecx
jl 0x46b8d7
mov edx, dword [ebp + 0x14]
and edx, 0xffff
cmp edx, 0x7cff
jle 0x46b8ed
mov eax, dword [0x4b08ba]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, 0xfffffffc
jmp 0x46bc00
mov ecx, dword [ebp + 0x18]
and ecx, 0xffff
cmp ecx, 1
jl 0x46b90c
mov edx, dword [ebp + 0x18]
and edx, 0xffff
cmp edx, 0x7d00
jle 0x46b922
mov eax, dword [0x4b08ba]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, 0xfffffffb
jmp 0x46bc00
mov ecx, dword [ebp - 0xc]
mov dx, word [ebp + 0x10]
mov word [ecx + 2], dx
mov eax, dword [ebp - 0xc]
mov cx, word [ebp + 0x14]
mov word [eax + 5], cx
mov edx, dword [ebp - 0xc]
mov ax, word [ebp + 0x18]
mov word [edx + 7], ax
jmp 0x46b995
mov ecx, dword [ebp - 0xc]
mov byte [ecx + 4], 0x17
mov edx, dword [ebp - 0xc]
mov word [edx + 2], 0
mov eax, dword [ebp - 0xc]
mov word [eax + 5], 0
mov ecx, dword [ebp - 0xc]
mov dx, word [ebp + 0x18]
mov word [ecx + 7], dx
jmp 0x46b995
mov eax, dword [ebp - 0xc]
mov cl, byte [ebp + 0xc]
mov byte [eax + 4], cl
mov edx, dword [ebp - 0xc]
mov ax, word [ebp + 0x10]
mov word [edx + 2], ax
mov ecx, dword [ebp - 0xc]
mov dx, word [ebp + 0x14]
mov word [ecx + 5], dx
mov eax, dword [ebp - 0xc]
mov cx, word [ebp + 0x18]
mov word [eax + 7], cx
mov edx, dword [ebp - 0xc]
mov word [edx + 9], 0
mov eax, dword [ebp - 0xc]
mov word [eax + 0xc], 0
mov ecx, dword [ebp - 0xc]
mov byte [ecx + 0xb], 0
cmp dword [ebp + 0x1c], 0
je 0x46b9f6
mov edx, dword [ebp + 8]
and edx, 0xff
push edx
call sub.WINDCS32.dll_sysini_GetPcuFamily
cmp eax, 7
jne 0x46b9d1
mov eax, dword [ebp - 0xc]
mov byte [eax + 0xb], 0x4e
jmp 0x46b9d8
mov ecx, dword [ebp - 0xc]
mov byte [ecx + 0xb], 0xa
mov edx, dword [ebp - 0xc]
xor eax, eax
mov al, byte [edx + 0xb]
push eax
mov ecx, dword [ebp + 0x1c]
push ecx
mov edx, dword [ebp - 0xc]
add edx, 0xe
push edx
call sub.MSVCRT.dll_memcpy
add esp, 0xc
jmp 0x46ba09
push 0x4e
push 0
mov eax, dword [ebp - 0xc]
add eax, 0xe
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
cmp dword [ebp + 0x20], 0
je 0x46ba30
mov ecx, dword [ebp + 0x18]
and ecx, 0xffff
shl ecx, 1
push ecx
mov edx, dword [ebp + 0x20]
push edx
mov eax, dword [ebp - 0xc]
add eax, 0x5c
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
jmp 0x46ba37
mov dword [ebp - 8], 1
push 0x4b0ee0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [ebp + 0x18]
and ecx, 0xffff
lea edx, [ecx + ecx + 0x5c]
mov dword [ebp - 0x14], edx
push 0xfa5c
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [0x4b08c6]
add ecx, 0x20
push ecx
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov edx, dword [0x4b08ba]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
cmp dword [ebp - 8], 0
je 0x46ba95
push 0x4b0ee0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 0xfffffffa
jmp 0x46bc00
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 [0x4b08b4]
mov dword [ecx], edx
mov eax, dword [0x4b08c6]
mov dword [eax + 4], 0x7d15
mov ecx, dword [0x4b08c6]
mov word [ecx + 8], 1
movzx dx, byte [ebp + 8]
mov eax, dword [0x4b08c6]
mov word [eax + 0xa], dx
mov ecx, dword [ebp - 0x14]
add ecx, 0x20
mov edx, dword [0x4b08c6]
mov word [edx + 0xc], cx
mov dword [ebp - 0x120], 0
mov dword [ebp - 0x11c], 0x7a120
mov dword [ebp - 0x118], 0
cmp dword [ebp - 0x118], 0x40
jae 0x46bb34
mov eax, dword [ebp - 0x118]
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 4]
mov dword [ebp + eax*4 - 0x114], edx
mov eax, dword [ebp - 0x118]
add eax, 1
mov dword [ebp - 0x118], eax
xor ecx, ecx
test ecx, ecx
jne 0x46bb09
lea edx, [ebp - 0x120]
push edx
push 0
lea eax, [ebp - 0x118]
push eax
push 0
push 0
call sub.WSOCK32.dll_select
push 0
mov ecx, dword [0x4b08c6]
xor edx, edx
mov dx, word [ecx + 0xc]
push edx
mov eax, dword [0x4b08c6]
push eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 4]
push edx
call sub.WSOCK32.dll_send
cmp eax, 0xffffffff
jne 0x46bbb3
call sub.WSOCK32.dll_WSAGetLastError
push eax
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 4]
push ecx
push str.WMC____4.4X___wmc_WriteBstX:_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]
xor eax, eax
jmp 0x46bc00
cmp dword [0x4b0efc], 0
je 0x46bbf0
call fcn.0046be40
cmp dword [0x4b0924], 0
je 0x46bbf0
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 [0x4b0924]
add esp, 0x1c
push 0x4b0ee0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret