Function at 0x487360
Capabilities:
Create raw socket
Create tcp socket
Create udp socket
Initialize winsock library
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
sub esp, 0x3c8
mov eax, dword [0x4b1120]
xor eax, esp
mov dword [esp + 0x3c4], eax
push ebp
mov ebp, dword [esp + 0x3d0]
push edi
mov edi, dword [esp + 0x3e4]
push ebp
lea eax, [esp + 0x1d0]
push 0x100
push eax
mov dword [esp + 0x20], edi
call fcn.00449d9d
push str.www.avanquest.com
lea ecx, [esp + 0x2dc]
push 0x100
push ecx
call fcn.00449d9d
add esp, 0x18
lea edx, [esp + 0x3c]
push edx
push 0x102
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x4873e8
test edi, edi
je 0x4873cf
mov dword [edi], eax
pop edi
xor al, al
pop ebp
mov ecx, dword [esp + 0x3c4]
xor ecx, esp
call fcn.00447645
add esp, 0x3c8
ret
push ebx
push 0
push 0
push 0
push 1
push 3
push 2
call dword [sym.imp.WS2_32.dll_WSASocketW]
mov ebx, eax
mov dword [esp + 0x14], ebx
cmp ebx, 0xffffffff
jne 0x487432
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test edi, edi
je 0x487412
mov dword [edi], eax
call dword [sym.imp.WS2_32.dll_WSACleanup]
pop ebx
pop edi
xor al, al
pop ebp
mov ecx, dword [esp + 0x3c4]
xor ecx, esp
call fcn.00447645
add esp, 0x3c8
ret
cmp dword [esp + 0x3e0], 1
jge 0x487447
mov dword [esp + 0x3e0], 0x3e8
push esi
mov esi, dword [sym.imp.WS2_32.dll_setsockopt]
push 4
lea eax, [esp + 0x3e8]
push eax
push 0x1006
push 0xffff
push ebx
call esi
cmp eax, 0xffffffff
jne 0x487472
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x4874c5
push 4
lea ecx, [esp + 0x3e8]
push ecx
push 0x1005
push 0xffff
push ebx
call esi
cmp eax, 0xffffffff
jne 0x487496
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x4874c5
xor eax, eax
push eax
push eax
lea edx, [esp + 0x2c]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
push edx
lea eax, [esp + 0x34]
push eax
push ebp
call fcn.00487260
add esp, 0x14
mov dword [esp + 0x14], eax
test eax, eax
je 0x4874df
test edi, edi
je 0x4874cb
mov dword [edi], eax
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor al, al
jmp 0x4876d4
mov edi, dword [esp + 0x3e0]
cmp edi, 1
jge 0x4874f0
mov edi, 0x20
mov ebp, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push 0x400
push 8
add edi, 8
call ebp
mov ebx, dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
call ebx
mov esi, eax
test esi, esi
jne 0x487537
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x48751f
mov dword [eax], 8
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor al, al
jmp 0x4876d4
push 0x400
push 0
push esi
call fcn.00447660
push edi
mov eax, esi
call fcn.004871b0
add esp, 0x10
push 0x400
push 8
call ebp
push eax
call ebx
mov ebx, eax
test ebx, ebx
jne 0x487592
push esi
push eax
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x48757a
mov dword [eax], 8
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor al, al
jmp 0x4876d4
mov dword [esp + 0x20], 0x10
mov byte [esp + 0x13], 0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp dword [esp + 0x3e8], 0
jge 0x4875ba
mov dword [esp + 0x3e8], 4
xor ebp, ebp
cmp dword [esp + 0x3e8], ebp
jl 0x48768f
lea esp, [esp]
xor eax, eax
mov word [esi + 2], ax
mov eax, edi
mov ecx, esi
mov word [esi + 6], bp
call fcn.004871f0
mov edx, dword [esp + 0x18]
push 0x10
lea ecx, [esp + 0x28]
push ecx
push 0
push edi
push esi
push edx
mov word [esi + 2], ax
call dword [sym.imp.WS2_32.dll_sendto]
cmp eax, 0xffffffff
je 0x487624
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x38]
push ecx
push 0
push 0x400
push ebx
push edx
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp eax, 0xffffffff
jne 0x48765b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esp + 0x14], eax
cmp eax, 0x274c
jne 0x48768f
push 0x1f4
mov dword [esp + 0x18], 0
call dword [sym.imp.KERNEL32.dll_Sleep]
inc ebp
movzx eax, bp
cmp eax, dword [esp + 0x3e8]
jle 0x4875d0
jmp 0x48768f
mov edi, dword [ebx]
and edi, 0xf
add edi, edi
add edi, edi
lea ecx, [edi + 8]
cmp eax, ecx
jae 0x487672
mov byte [esp + 0x13], 0
jmp 0x48768f
cmp byte [edi + ebx], 0
je 0x48767f
mov byte [esp + 0x13], 0
jmp 0x48768f
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp word [edi + ebx + 4], ax
sete byte [esp + 0x13]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push esi
push 0
call edi
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
push eax
call esi
push ebx
push 0
call edi
push eax
call esi
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4876bf
mov edx, dword [esp + 0x14]
mov dword [eax], edx
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov al, byte [esp + 0x13]
mov ecx, dword [esp + 0x3d4]
pop esi
pop ebx
pop edi
pop ebp
xor ecx, esp
call fcn.00447645
add esp, 0x3c8
ret