Function at 0x405e20
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
sub esp, 0x20
lea eax, [esp]
push ebx
push ebp
mov ebp, ecx
push esi
push edi
push eax
mov ecx, dword [ebp + 4]
push 0x4004667f
push ecx
call sub.WSOCK32.dll_ioctlsocket
test eax, eax
jne 0x405f53
mov eax, dword [esp + 0x10]
test eax, eax
je 0x405fca
mov ecx, dword [ebp + 4]
lea edx, [esp + 0x1c]
lea eax, [esp + 0x20]
push edx
push eax
lea esi, [ebp + 0x62068]
push 0
push 0x280
push esi
push ecx
mov dword [esp + 0x34], 0x10
call sub.WSOCK32.dll_recvfrom
mov edi, eax
cmp edi, 0xffffffff
je 0x405f68
mov ecx, ebp
call fcn.00405d90
mov ebx, eax
lea ecx, [edi - 4]
push ebx
mov dword [ebx + 4], ecx
mov edx, dword [esi]
mov eax, ecx
lea esi, [ebp + 0x6206c]
lea edi, [ebx + 0x10]
mov dword [ebx + 0xc], edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edx, dword [ebp]
mov ecx, ebp
call dword [edx + 4]
test al, al
jne 0x405eee
push 0x40ef98
call fcn.00401430
mov al, byte [ebx + 0xa]
add esp, 4
test al, al
je 0x405edb
push ebx
call fcn.0040649a
add esp, 4
jmp 0x405f38
mov byte [ebx + 9], 0
mov eax, dword [ebp + 0x62064]
dec eax
mov dword [ebp + 0x62064], eax
jmp 0x405f38
mov dword [ebx], 0
mov eax, dword [esp + 0x24]
lea esi, [ebp + 0x28]
mov dword [ebx], eax
mov eax, dword [esi + 8]
mov ecx, dword [esi + 0x10]
cmp ecx, eax
jl 0x405f29
mov cl, byte [esi + 0xd]
test cl, cl
jne 0x405f12
test eax, eax
jne 0x405f38
mov ecx, dword [esi + 0x14]
test ecx, ecx
jle 0x405f38
mov edx, dword [esi]
add ecx, eax
push 0
push ecx
mov ecx, esi
call dword [edx + 8]
test al, al
je 0x405f38
mov eax, dword [esi + 0x10]
mov edx, dword [esi + 4]
lea ecx, [eax + 1]
mov dword [esi + 0x10], ecx
mov dword [edx + eax*4], ebx
mov ecx, dword [ebp + 4]
lea eax, [esp + 0x10]
push eax
push 0x4004667f
push ecx
call sub.WSOCK32.dll_ioctlsocket
test eax, eax
je 0x405e44
call sub.WSOCK32.dll_WSAGetLastError
push eax
push 0x40ef74
call fcn.00401430
add esp, 8
jmp 0x405fca
call sub.WSOCK32.dll_WSAGetLastError
push eax
push 0x40ef50
call fcn.00401430
mov eax, dword [ebp + 4]
add esp, 8
cmp eax, 0xffffffff
mov dword [esp + 0x14], 4
je 0x405fca
lea edx, [esp + 0x14]
lea ecx, [esp + 0x18]
push edx
push ecx
push 0x1007
push 0xffff
push eax
call sub.WSOCK32.dll_getsockopt
mov edx, dword [esp + 0x14]
mov ecx, dword [ebp + 4]
lea eax, [esp + 0x18]
push edx
push eax
push 0x1007
push 0xffff
push ecx
mov dword [esp + 0x2c], 0
call sub.WSOCK32.dll_setsockopt
mov eax, dword [ebp + 0x50]
test eax, eax
je 0x4060d8
mov edi, 2
mov edx, dword [ebp + 0x44]
mov ax, word [ebp + 0xc]
push eax
mov esi, dword [edx]
mov word [esp + 0x24], di
call sub.WSOCK32.dll_htons
mov word [esp + 0x22], ax
mov ecx, dword [esi]
mov dword [esp + 0x24], ecx
mov eax, dword [esi + 4]
lea edx, [esp + 0x20]
push 0x10
push edx
mov edx, dword [ebp + 4]
add eax, 4
push 0
lea ecx, [esi + 0xc]
push eax
push ecx
push edx
call sub.WSOCK32.dll_sendto
cmp eax, 0xffffffff
je 0x406076
mov eax, dword [ebp + 0x50]
test eax, eax
jle 0x406040
lea ecx, [eax - 1]
xor eax, eax
test ecx, ecx
mov dword [ebp + 0x50], ecx
jle 0x406040
mov ecx, dword [ebp + 0x44]
inc eax
mov edx, dword [ecx + eax*4]
mov dword [ecx + eax*4 - 4], edx
mov ecx, dword [ebp + 0x50]
cmp eax, ecx
jl 0x40602e
mov al, byte [esi + 0xa]
test al, al
je 0x406052
push esi
call fcn.0040649a
add esp, 4
jmp 0x406063
mov byte [esi + 9], 0
mov eax, dword [ebp + 0x62064]
dec eax
mov dword [ebp + 0x62064], eax
mov eax, dword [ebp + 0x50]
test eax, eax
jne 0x405fda
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
call sub.WSOCK32.dll_WSAGetLastError
push eax
push 0x40ef30
call fcn.00401430
mov eax, dword [ebp + 4]
add esp, 8
cmp eax, 0xffffffff
mov dword [esp + 0x18], 4
je 0x4060d8
lea ecx, [esp + 0x18]
lea edx, [esp + 0x14]
push ecx
push edx
push 0x1007
push 0xffff
push eax
call sub.WSOCK32.dll_getsockopt
mov eax, dword [esp + 0x18]
mov edx, dword [ebp + 4]
lea ecx, [esp + 0x14]
push eax
push ecx
push 0x1007
push 0xffff
push edx
mov dword [esp + 0x28], 0
call sub.WSOCK32.dll_setsockopt
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret