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

Disassembly:
mov al, byte [0x81c644]
sub esp, 0x20
test al, al
push ebx
push ebp
push esi
push edi
mov ebp, ecx
jne 0x46a683
mov ecx, 0x83f450
call fcn.005ddd50
mov byte [0x81c644], 1
call dword [sym.imp.WINMM.dll_timeGetTime]
mov ecx, dword [0x83f450]
cmp eax, ecx
jbe 0x46a69b
sub eax, ecx
mov dword [esp + 0x10], eax
jmp 0x46a6a7
mov ecx, dword [0x83f454]
add ecx, eax
mov dword [esp + 0x10], ecx
mov al, byte [ebp + 0xa7e8]
mov dword [esp + 0x14], 0
test al, al
je 0x46aa45
cmp dword [esp + 0x14], 5
jle 0x46a709
mov al, byte [0x81c644]
test al, al
jne 0x46a6de
mov ecx, 0x83f450
call fcn.005ddd50
mov byte [0x81c644], 1
call dword [sym.imp.WINMM.dll_timeGetTime]
mov ecx, dword [0x83f450]
cmp eax, ecx
jbe 0x46a6f2
sub eax, ecx
jmp 0x46a6fa
mov edx, dword [0x83f454]
add eax, edx
sub eax, dword [esp + 0x10]
cmp eax, 0x1388
ja 0x46a894
mov eax, dword [esp + 0x14]
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
inc eax
push 0
mov dword [esp + 0x18], eax
call ebx
mov ecx, dword [ebp + 4]
lea eax, [esp + 0x18]
push eax
push 0x4004667f
push ecx
call sub.WSOCK32.dll_ioctlsocket
test eax, eax
jne 0x46a89a
mov eax, dword [esp + 0x18]
test eax, eax
je 0x46a89a
mov ecx, dword [ebp + 4]
lea edx, [esp + 0x1c]
lea eax, [esp + 0x20]
push edx
push eax
lea esi, [ebp + 0xa568]
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 0x46a843
mov ecx, ebp
call fcn.0046a5b0
mov ebx, eax
lea ecx, [edi - 4]
push ebx
mov dword [ebx + 4], ecx
mov edx, dword [esi]
mov eax, ecx
lea esi, [ebp + 0xa56c]
lea edi, [ebx + 0x14]
mov dword [ebx + 0x10], 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 0x46a7da
mov al, byte [ebx + 0xa]
test al, al
je 0x46a7c4
push ebx
call fcn.00672c80
add esp, 4
jmp 0x46a6bd
mov byte [ebx + 9], 0
mov eax, dword [ebp + 0xa564]
dec eax
mov dword [ebp + 0xa564], eax
jmp 0x46a6bd
mov dword [ebx], 0
mov eax, dword [esp + 0x24]
mov dword [ebx], eax
mov ecx, dword [esp + 0x22]
push ecx
call sub.WSOCK32.dll_ntohs
lea esi, [ebp + 0x28]
mov word [ebx + 0xc], ax
mov eax, dword [esi + 8]
mov ecx, dword [esi + 0x10]
cmp ecx, eax
jl 0x46a82f
mov cl, byte [esi + 0xd]
test cl, cl
jne 0x46a810
test eax, eax
jne 0x46a6bd
mov ecx, dword [esi + 0x14]
test ecx, ecx
jle 0x46a6bd
mov edx, dword [esi]
add ecx, eax
push 0
push ecx
mov ecx, esi
call dword [edx + 8]
test al, al
je 0x46a6bd
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
jmp 0x46a6bd
mov eax, dword [ebp + 4]
mov dword [esp + 0x14], 4
cmp eax, 0xffffffff
je 0x46a89a
lea ecx, [esp + 0x14]
lea edx, [esp + 0x10]
push ecx
push edx
push 0x1007
push 0xffff
push eax
call sub.WSOCK32.dll_getsockopt
mov eax, dword [esp + 0x14]
mov edx, dword [ebp + 4]
lea ecx, [esp + 0x10]
push eax
push ecx
push 0x1007
push 0xffff
push edx
mov dword [esp + 0x24], 0
call sub.WSOCK32.dll_setsockopt
jmp 0x46a89a
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
mov al, byte [0x81c644]
test al, al
jne 0x46a8b4
mov ecx, 0x83f450
call fcn.005ddd50
mov byte [0x81c644], 1
call dword [sym.imp.WINMM.dll_timeGetTime]
mov ecx, dword [0x83f450]
cmp eax, ecx
jbe 0x46a8cc
sub eax, ecx
mov dword [esp + 0x10], eax
jmp 0x46a8d8
mov ecx, dword [0x83f454]
add ecx, eax
mov dword [esp + 0x10], ecx
mov eax, dword [ebp + 0x50]
xor edi, edi
test eax, eax
je 0x46aa45
cmp edi, 5
jle 0x46a92f
mov al, byte [0x81c644]
test al, al
jne 0x46a904
mov ecx, 0x83f450
call fcn.005ddd50
mov byte [0x81c644], 1
call dword [sym.imp.WINMM.dll_timeGetTime]
mov ecx, dword [0x83f450]
cmp eax, ecx
jbe 0x46a918
sub eax, ecx
jmp 0x46a920
mov edx, dword [0x83f454]
add eax, edx
sub eax, dword [esp + 0x10]
cmp eax, 0x1388
ja 0x46aa45
push 0
inc edi
call ebx
mov eax, dword [ebp + 0x44]
mov esi, dword [eax]
mov word [esp + 0x20], 2
mov ax, word [esi + 0xc]
test ax, ax
jne 0x46a950
mov cx, word [ebp + 0xc]
push ecx
jmp 0x46a951
push eax
call sub.WSOCK32.dll_htons
mov word [esp + 0x22], ax
mov edx, dword [esi]
mov dword [esp + 0x24], edx
mov ecx, dword [esi + 4]
lea eax, [esp + 0x20]
push 0x10
push eax
mov eax, dword [ebp + 4]
add ecx, 4
push 0
lea edx, [esi + 0x10]
push ecx
push edx
push eax
call sub.WSOCK32.dll_sendto
cmp eax, 0xffffffff
je 0x46a9de
mov eax, dword [ebp + 0x50]
test eax, eax
jle 0x46a9a8
lea ecx, [eax - 1]
xor eax, eax
test ecx, ecx
mov dword [ebp + 0x50], ecx
jle 0x46a9a8
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 0x46a996
mov al, byte [esi + 0xa]
test al, al
je 0x46a9ba
push esi
call fcn.00672c80
add esp, 4
jmp 0x46a9cb
mov byte [esi + 9], 0
mov eax, dword [ebp + 0xa564]
dec eax
mov dword [ebp + 0xa564], eax
mov eax, dword [ebp + 0x50]
test eax, eax
jne 0x46a8e5
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2733
je 0x46aa41
mov eax, dword [ebp + 4]
mov dword [esp + 0x14], 4
cmp eax, 0xffffffff
je 0x46aa45
lea ecx, [esp + 0x14]
lea edx, [esp + 0x10]
push ecx
push edx
push 0x1007
push 0xffff
push eax
call sub.WSOCK32.dll_getsockopt
mov eax, dword [esp + 0x14]
mov edx, dword [ebp + 4]
lea ecx, [esp + 0x10]
push eax
push ecx
push 0x1007
push 0xffff
push edx
mov dword [esp + 0x24], 0
call sub.WSOCK32.dll_setsockopt
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
push 0
call ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret