Function at 0x408035
Capabilities:
Get socket status
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x120
mov dword [ebp - 0x14], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0x10], 0
mov eax, dword [ebp + 0x10]
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0x1c]
mov dword [ecx], 0xffffffff
cmp dword [0x42066e], 0
je 0x408081
cmp dword [ebp + 0x18], 0x1fe
jg 0x408081
cmp dword [ebp + 0x10], 0
jne 0x408088
xor eax, eax
jmp 0x4082a4
cmp dword [ebp + 0x14], 0
je 0x4080bc
mov dword [ebp - 0xc], 0
jmp 0x4080a9
mov edx, dword [ebp - 0xc]
add edx, 1
mov dword [ebp - 0xc], edx
mov eax, dword [ebp + 0x14]
add eax, 4
mov dword [ebp + 0x14], eax
mov ecx, dword [ebp - 0xc]
cmp ecx, dword [ebp + 0x18]
jge 0x4080bc
mov edx, dword [ebp + 0x14]
mov dword [edx], 0x8000
jmp 0x408097
mov eax, dword [0x4206be]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x4080d1
xor eax, eax
jmp 0x4082a4
mov ecx, dword [0x420672]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x408176
mov dword [ebp - 0xc], 0
jmp 0x4080fd
mov edx, dword [ebp - 0xc]
add edx, 1
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp + 0x18]
jge 0x408169
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 8]
mov dword [edx + ecx*4], 0x8000
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
mov dword [ecx + eax*4 + 0x7f8], 1
push 0
mov edx, dword [ebp - 0xc]
imul edx, edx, 0xd
mov eax, dword [ebp - 4]
add eax, edx
push eax
call fcn.00409919
add esp, 8
test eax, eax
jne 0x40814f
mov ecx, dword [ebp + 0x1c]
mov edx, dword [ebp - 0xc]
mov dword [ecx], edx
mov eax, 0xfffffff7
jmp 0x4082a4
mov eax, dword [ebp - 0xc]
imul eax, eax, 0xd
mov ecx, dword [ebp - 0x14]
add ecx, dword [ebp - 0xc]
mov edx, dword [ebp + 0x10]
mov al, byte [edx + eax]
mov byte [ecx + 0xfe24], al
jmp 0x4080f4
mov ecx, dword [0x420672]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov edx, dword [ebp + 0xc]
mov ax, word [edx]
add ax, 1
mov ecx, dword [ebp + 0xc]
mov word [ecx], ax
push 0x421220
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0x20
push 0
mov edx, dword [0x42066e]
push edx
call fcn.00413a30
add esp, 0xc
mov eax, dword [0x42066e]
mov ecx, dword [0x42065c]
mov dword [eax], ecx
mov edx, dword [0x42066e]
mov eax, dword [ebp + 8]
mov dword [edx + 4], eax
mov ecx, dword [0x42066e]
mov dx, word [ebp + 0x18]
mov word [ecx + 8], dx
mov eax, dword [0x42066e]
mov ecx, dword [ebp + 0xc]
mov dx, word [ecx]
mov word [eax + 0xa], dx
mov eax, dword [ebp + 0x18]
imul eax, eax, 0xd
add eax, 0x20
mov ecx, dword [0x42066e]
mov word [ecx + 0xc], ax
mov edx, dword [ebp + 0x18]
imul edx, edx, 0xd
push edx
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [0x42066e]
add ecx, 0x20
push ecx
call fcn.00413c30
add esp, 0xc
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0x7a120
mov dword [ebp - 0x120], 0
cmp dword [ebp - 0x120], 0x40
jae 0x40824d
mov edx, dword [ebp - 0x120]
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + 4]
mov dword [ebp + edx*4 - 0x11c], ecx
mov edx, dword [ebp - 0x120]
add edx, 1
mov dword [ebp - 0x120], edx
xor eax, eax
test eax, eax
jne 0x408222
lea ecx, [ebp - 0x1c]
push ecx
push 0
lea edx, [ebp - 0x120]
push edx
push 0
push 0
call sub.WSOCK32.dll_select
push 0
mov eax, dword [0x42066e]
xor ecx, ecx
mov cx, word [eax + 0xc]
push ecx
mov edx, dword [0x42066e]
push edx
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + 4]
push ecx
call sub.WSOCK32.dll_send
push 0x421220
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [0x4206c2], 0
mov eax, 1
mov esp, ebp
pop ebp
ret