Function at 0x4963a0
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, 0x1cc
mov eax, dword [0x4cd724]
xor eax, esp
mov dword [esp + 0x1c8], eax
push ebp
mov ebp, dword [esp + 0x1d4]
push edi
mov edi, dword [esp + 0x1e8]
lea edx, [esp + 0x40]
mov dword [esp + 0x10], edi
mov eax, ebp
sub edx, ebp
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4963d0
xor eax, eax
lea esp, [esp]
mov cl, byte [eax + 0x4c5094]
mov byte [esp + eax + 0x40], cl
inc eax
test cl, cl
jne 0x4963e0
lea eax, [esp + 0x40]
push eax
push 0x102
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x496422
test edi, edi
je 0x496409
mov dword [edi], eax
pop edi
xor al, al
pop ebp
mov ecx, dword [esp + 0x1c8]
xor ecx, esp
call fcn.004677af
add esp, 0x1cc
ret
push esi
push 0
push 0
push 0
push 1
push 3
push 2
call dword [sym.imp.WS2_32.dll_WSASocketW]
mov esi, eax
mov dword [esp + 0x10], esi
cmp esi, 0xffffffff
jne 0x49646c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test edi, edi
je 0x49644c
mov dword [edi], eax
call dword [sym.imp.WS2_32.dll_WSACleanup]
pop esi
pop edi
xor al, al
pop ebp
mov ecx, dword [esp + 0x1c8]
xor ecx, esp
call fcn.004677af
add esp, 0x1cc
ret
cmp dword [esp + 0x1e4], 1
jge 0x496481
mov dword [esp + 0x1e4], 0x3e8
push ebx
mov ebx, dword [sym.imp.WS2_32.dll_setsockopt]
push 4
lea ecx, [esp + 0x1ec]
push ecx
push 0x1006
push 0xffff
push esi
call ebx
cmp eax, 0xffffffff
je 0x4964c0
push 4
lea edx, [esp + 0x1ec]
push edx
push 0x1005
push 0xffff
push esi
call ebx
cmp eax, 0xffffffff
jne 0x4964e0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test edi, edi
je 0x4964cc
mov dword [edi], eax
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor al, al
jmp 0x496710
xor eax, eax
push eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x34]
push ecx
push ebp
call fcn.004961a0
mov ebp, eax
add esp, 0x10
test ebp, ebp
je 0x496526
test edi, edi
je 0x496512
mov dword [edi], ebp
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor al, al
jmp 0x496710
mov edi, dword [esp + 0x1e4]
cmp edi, 1
jge 0x496537
mov edi, 0x20
push 0x400
push 8
add edi, 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov ebx, dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
call ebx
mov esi, eax
test esi, esi
jne 0x49657c
mov eax, dword [esp + 0x18]
test eax, eax
je 0x496564
mov dword [eax], 8
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor al, al
jmp 0x496710
push 0x400
push 0
push esi
call fcn.004677c0
push edi
push esi
call fcn.00496090
add esp, 0x14
push 0x400
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call ebx
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x4965e0
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4965c8
mov dword [eax], 8
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor al, al
jmp 0x496710
mov dword [esp + 0x24], 0x10
mov byte [esp + 0x13], 0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp dword [esp + 0x1ec], 0
jge 0x496608
mov dword [esp + 0x1ec], 4
cmp dword [esp + 0x1ec], 0
mov dword [esp + 0x20], 0
jl 0x4966cb
mov edi, edi
mov dx, word [esp + 0x20]
xor ecx, ecx
push edi
push esi
mov word [esi + 2], cx
mov word [esi + 6], dx
call fcn.004960d0
mov ebx, dword [esp + 0x1c]
add esp, 8
push 0x10
mov word [esi + 2], ax
lea eax, [esp + 0x2c]
push eax
push 0
push edi
push esi
push ebx
call dword [sym.imp.WS2_32.dll_sendto]
cmp eax, 0xffffffff
je 0x49667a
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x3c]
push edx
push 0
push 0x400
push eax
push ebx
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp eax, 0xffffffff
jne 0x4966b2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebp, eax
cmp ebp, 0x274c
jne 0x4966cf
push 0x1f4
xor ebp, ebp
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [esp + 0x20]
inc eax
movzx ecx, ax
cmp ecx, dword [esp + 0x1ec]
mov dword [esp + 0x20], eax
jle 0x496620
jmp 0x4966cf
lea edx, [esp + 0x38]
push edx
push eax
mov eax, dword [esp + 0x24]
push eax
call fcn.00496160
add esp, 0xc
mov byte [esp + 0x13], al
jmp 0x4966cf
mov ebx, dword [esp + 0x14]
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
mov ecx, dword [esp + 0x1c]
push ecx
push 0
call edi
push eax
call esi
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4966ff
mov dword [eax], ebp
push ebx
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 + 0x1d8]
pop ebx
pop esi
pop edi
pop ebp
xor ecx, esp
call fcn.004677af
add esp, 0x1cc
ret