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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x118
cmp dword [0x42066e], 0
jne 0x408431
xor eax, eax
jmp 0x408676
mov eax, dword [ebp + 8]
push eax
push 0
call fcn.00409919
add esp, 8
test eax, eax
jne 0x40844d
mov eax, 0xfffffff7
jmp 0x408676
call fcn.00409828
mov dword [ebp - 8], 0
jmp 0x408464
mov ecx, dword [ebp - 8]
add ecx, 1
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 8]
cmp edx, dword [0x420676]
jge 0x40848f
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 + 0x42067a]
cmp ecx, eax
jne 0x40848d
xor eax, eax
jmp 0x408676
jmp 0x40845b
mov ecx, dword [0x4206be]
mov dword [ebp - 0xc], ecx
cmp dword [ebp - 0xc], 0
jne 0x4084a5
xor eax, eax
jmp 0x408676
push 0x421220
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [0x42066e]
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 [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 dword [edx + 4], 0x7d04
mov eax, dword [0x42066e]
mov word [eax + 8], 1
mov ecx, dword [0x42066e]
mov dx, word [ebp + 0x10]
mov word [ecx + 0xa], dx
mov eax, dword [0x42066e]
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 0x4085c1
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 0x408596
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 [0x42066e]
xor eax, eax
mov ax, word [edx + 0xc]
push eax
mov ecx, dword [0x42066e]
push ecx
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 4]
push eax
call sub.WSOCK32.dll_send
cmp eax, 0xffffffff
jne 0x40863e
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 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 0x408676
cmp dword [0x42123c], 0
je 0x408666
call fcn.00409a2b
cmp dword [0x4206c8], 0
je 0x408666
push 0
push 0
mov eax, dword [ebp - 4]
push eax
call dword [0x4206c8]
add esp, 0xc
push 0x421220
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 1
mov esp, ebp
pop ebp
ret