Function at 0x4a78e0
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 [0x4cd724]
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.00469f5d
push str.www.avanquest.com
lea ecx, [esp + 0x2dc]
push 0x100
push ecx
call fcn.00469f5d
add esp, 0x18
lea edx, [esp + 0x3c]
push edx
push 0x102
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x4a7968
test edi, edi
je 0x4a794f
mov dword [edi], eax
pop edi
xor al, al
pop ebp
mov ecx, dword [esp + 0x3c4]
xor ecx, esp
call fcn.004677af
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 0x4a79b2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test edi, edi
je 0x4a7992
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.004677af
add esp, 0x3c8
ret
cmp dword [esp + 0x3e0], 1
jge 0x4a79c7
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 0x4a79f2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x4a7a45
push 4
lea ecx, [esp + 0x3e8]
push ecx
push 0x1005
push 0xffff
push ebx
call esi
cmp eax, 0xffffffff
jne 0x4a7a16
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x4a7a45
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.004a77e0
add esp, 0x14
mov dword [esp + 0x14], eax
test eax, eax
je 0x4a7a5f
test edi, edi
je 0x4a7a4b
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 0x4a7c54
mov edi, dword [esp + 0x3e0]
cmp edi, 1
jge 0x4a7a70
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 0x4a7ab7
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4a7a9f
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 0x4a7c54
push 0x400
push 0
push esi
call fcn.004677c0
push edi
mov eax, esi
call fcn.004a7730
add esp, 0x10
push 0x400
push 8
call ebp
push eax
call ebx
mov ebx, eax
test ebx, ebx
jne 0x4a7b12
push esi
push eax
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4a7afa
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 0x4a7c54
mov dword [esp + 0x20], 0x10
mov byte [esp + 0x13], 0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp dword [esp + 0x3e8], 0
jge 0x4a7b3a
mov dword [esp + 0x3e8], 4
xor ebp, ebp
cmp dword [esp + 0x3e8], ebp
jl 0x4a7c0f
lea esp, [esp]
xor eax, eax
mov word [esi + 2], ax
mov eax, edi
mov ecx, esi
mov word [esi + 6], bp
call fcn.004a7770
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 0x4a7ba4
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 0x4a7bdb
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esp + 0x14], eax
cmp eax, 0x274c
jne 0x4a7c0f
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 0x4a7b50
jmp 0x4a7c0f
mov edi, dword [ebx]
and edi, 0xf
add edi, edi
add edi, edi
lea ecx, [edi + 8]
cmp eax, ecx
jae 0x4a7bf2
mov byte [esp + 0x13], 0
jmp 0x4a7c0f
cmp byte [edi + ebx], 0
je 0x4a7bff
mov byte [esp + 0x13], 0
jmp 0x4a7c0f
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 0x4a7c3f
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.004677af
add esp, 0x3c8
ret