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

Disassembly:
sub esp, 0x1f8
push ebx
push ebp
push esi
push edi
push 0x3e8
mov edi, 6
push 2
push edi
mov dword [esp + 0x34], 0x64
call sub.WSOCK32.dll_socket
mov ebx, eax
cmp ebx, 0xffffffff
je 0x404a8c
xor eax, eax
lea ecx, [esp + 0x30]
mov dword [esp + 0x30], eax
push 0xe
mov dword [esp + 0x38], eax
xor esi, esi
mov dword [esp + 0x3c], eax
push ecx
mov word [esp + 0x44], ax
push ebx
mov word [esp + 0x3c], di
mov word [esp + 0x48], si
call sub.WSOCK32.dll_bind
cmp eax, 0xffffffff
jne 0x4048d8
call sub.WSOCK32.dll_WSAGetLastError
push ebx
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1f8
ret
lea edx, [esp + 0x2c]
push 4
push edx
push 0x20
push 0xffff
push ebx
mov dword [esp + 0x40], 1
call sub.WSOCK32.dll_setsockopt
cmp eax, 0xffffffff
jne 0x404911
call sub.WSOCK32.dll_WSAGetLastError
push ebx
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1f8
ret
lea eax, [esp + 0x28]
push 4
push eax
push 0x1006
push 0xffff
push ebx
call sub.WSOCK32.dll_setsockopt
cmp eax, 0xffffffff
jne 0x404945
call sub.WSOCK32.dll_WSAGetLastError
push ebx
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1f8
ret
xor ecx, ecx
or edx, 0xffffffff
mov dword [esp + 0x18], ecx
push 0x452
mov dword [esp + 0x20], ecx
mov word [esp + 0x1c], di
mov dword [esp + 0x24], ecx
mov dword [esp + 0x22], edx
mov word [esp + 0x28], cx
mov word [esp + 0x26], dx
call sub.WSOCK32.dll_htons
push 1
mov word [esp + 0x28], ax
call sub.WSOCK32.dll_htons
push 0x920
mov word [esp + 0x18], ax
call sub.WSOCK32.dll_htons
mov word [esp + 0x16], ax
lea eax, [esp + 0x18]
push 0xe
push eax
push esi
lea ecx, [esp + 0x20]
push 4
push ecx
push ebx
call sub.WSOCK32.dll_sendto
cmp eax, 0xffffffff
jne 0x4049c5
call sub.WSOCK32.dll_WSAGetLastError
push ebx
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1f8
ret
mov ecx, 0x70
xor eax, eax
lea edi, [esp + 0x44]
lea edx, [esp + 0x40]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x18]
push edx
push eax
push esi
lea ecx, [esp + 0x50]
push 0x1c2
push ecx
push ebx
mov dword [esp + 0x58], 0xe
call sub.WSOCK32.dll_recvfrom
cmp eax, 0xffffffff
jne 0x404a14
call sub.WSOCK32.dll_WSAGetLastError
push ebx
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1f8
ret
lea ebp, [eax - 2]
mov dword [esp + 0x10], esi
shr ebp, 6
cmp ebp, esi
jle 0x404a81
mov esi, dword [esp + 0x20c]
lea edi, [esp + 0x48]
mov dx, word [edi - 2]
push edx
call fcn.00404ae0
add esp, 4
cmp ax, 0x920
jne 0x404a71
mov eax, esi
mov edx, dword [0x414798]
shl eax, 6
sub eax, esi
push 0xf
lea eax, [eax + eax*4]
lea eax, [esi + eax*4]
lea ecx, [eax + eax*8]
shl ecx, 1
sub ecx, esi
lea eax, [edx + ecx*2 + 0xb130]
push eax
push edi
call fcn.00407930
add esp, 0xc
test eax, eax
je 0x404a9e
mov eax, dword [esp + 0x10]
add edi, 0x40
inc eax
cmp eax, ebp
mov dword [esp + 0x10], eax
jl 0x404a2d
push ebx
call sub.WSOCK32.dll_closesocket
cmp eax, 0xffffffff
jne 0x404a91
call sub.WSOCK32.dll_WSAGetLastError
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1f8
ret
push ebx
call sub.WSOCK32.dll_closesocket
mov eax, esi
pop edi
shl eax, 6
sub eax, esi
lea ecx, [eax + eax*4]
lea eax, [esi + ecx*4]
mov ecx, dword [0x414798]
lea edx, [eax + eax*8]
mov eax, 1
shl edx, 1
sub edx, esi
pop esi
pop ebp
pop ebx
mov dword [ecx + edx*2 + 0xb124], eax
add esp, 0x1f8
ret