Function at 0x496c00
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 [0x4ce724]
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 0x496c30
xor eax, eax
lea esp, [esp]
mov cl, byte [eax + 0x4c6364]
mov byte [esp + eax + 0x40], cl
inc eax
test cl, cl
jne 0x496c40
lea eax, [esp + 0x40]
push eax
push 0x102
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x496c82
test edi, edi
je 0x496c69
mov dword [edi], eax
pop edi
xor al, al
pop ebp
mov ecx, dword [esp + 0x1c8]
xor ecx, esp
call fcn.00467fff
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 0x496ccc
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test edi, edi
je 0x496cac
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.00467fff
add esp, 0x1cc
ret
cmp dword [esp + 0x1e4], 1
jge 0x496ce1
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 0x496d20
push 4
lea edx, [esp + 0x1ec]
push edx
push 0x1005
push 0xffff
push esi
call ebx
cmp eax, 0xffffffff
jne 0x496d40
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test edi, edi
je 0x496d2c
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 0x496f70
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.00496a00
mov ebp, eax
add esp, 0x10
test ebp, ebp
je 0x496d86
test edi, edi
je 0x496d72
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 0x496f70
mov edi, dword [esp + 0x1e4]
cmp edi, 1
jge 0x496d97
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 0x496ddc
mov eax, dword [esp + 0x18]
test eax, eax
je 0x496dc4
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 0x496f70
push 0x400
push 0
push esi
call fcn.00468010
push edi
push esi
call fcn.004968f0
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 0x496e40
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 0x496e28
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 0x496f70
mov dword [esp + 0x24], 0x10
mov byte [esp + 0x13], 0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp dword [esp + 0x1ec], 0
jge 0x496e68
mov dword [esp + 0x1ec], 4
cmp dword [esp + 0x1ec], 0
mov dword [esp + 0x20], 0
jl 0x496f2b
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.00496930
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 0x496eda
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 0x496f12
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebp, eax
cmp ebp, 0x274c
jne 0x496f2f
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 0x496e80
jmp 0x496f2f
lea edx, [esp + 0x38]
push edx
push eax
mov eax, dword [esp + 0x24]
push eax
call fcn.004969c0
add esp, 0xc
mov byte [esp + 0x13], al
jmp 0x496f2f
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 0x496f5f
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.00467fff
add esp, 0x1cc
ret