Function at 0x495f10
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Get local ipv4 addresses
Get socket information
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration
Start tcp server

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x168
mov eax, dword [0x4fb128]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov dword [eax], 0xffffffff
push edi
mov dword [ebp - 0x140], eax
mov dword [ebp - 0x148], ebx
mov dword [ebp - 0x154], 0x10
mov dword [ebp - 0x158], 0x10
mov dword [ebp - 0x144], 1
mov dword [ebx], 0xffffffff
call sub.KERNEL32.dll_GetCurrentProcessId
mov esi, dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0x150], eax
mov eax, dword [0x50266c]
push 6
mov dword [ebp - 0x14c], eax
push 1
inc eax
push 2
mov dword [0x50266c], eax
call esi
mov edi, eax
mov dword [ebp - 0x13c], edi
cmp edi, 0xffffffff
jne 0x495fc1
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call esi
test eax, eax
je 0x49622d
call esi
pop edi
pop esi
add eax, 0xafc80
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0047232c
mov esp, ebp
pop ebp
ret
push str.127.0.0.1
mov dword [ebp - 0x14], 2
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0x10], eax
push 0x10
lea eax, [ebp - 0x14]
push eax
push edi
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x496008
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call esi
test eax, eax
jne 0x495ffb
xor esi, esi
jmp 0x49624e
call esi
lea esi, [eax + 0xafc80]
jmp 0x49624e
lea eax, [ebp - 0x154]
push eax
lea eax, [ebp - 0x24]
push eax
push edi
call dword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
je 0x495fe8
push 1
push edi
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
je 0x495fe8
push 6
push 1
push 2
call esi
mov dword [ebx], eax
cmp eax, 0xffffffff
je 0x495fe8
push 0x10
lea ecx, [ebp - 0x24]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x495fe8
push 0
push 8
lea eax, [ebp - 0x150]
push eax
push dword [ebx]
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 8
je 0x49608c
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call esi
test eax, eax
je 0x496082
call esi
mov esi, eax
add esi, 0xafc80
jne 0x49624e
mov esi, 0x16
jmp 0x49624e
lea eax, [ebp - 0x144]
push eax
push 0x8004667e
push edi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
je 0x495fe8
mov ebx, dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4960c0
mov eax, dword [ebp - 0x13c]
mov dword [ebp - 0x134], eax
xor edi, edi
lea eax, [ebp - 0x160]
push eax
push edi
push edi
lea eax, [ebp - 0x138]
push eax
push edi
mov dword [ebp - 0x138], 1
mov dword [ebp - 0x160], 1
mov dword [ebp - 0x15c], edi
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x49610a
push 0x64
call esi
jmp 0x4960c0
test eax, eax
je 0x4960c0
lea eax, [ebp - 0x158]
push eax
lea eax, [ebp - 0x34]
push eax
push dword [ebp - 0x13c]
call dword [sym.imp.WS2_32.dll_accept]
mov ecx, dword [ebp - 0x140]
mov dword [ecx], eax
cmp eax, 0xffffffff
jne 0x496150
call ebx
test eax, eax
jne 0x496240
xor esi, esi
jmp 0x496248
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
lea esp, [esp]
mov eax, edi
inc edi
test eax, eax
je 0x49615b
push 1
call esi
push 0
push 8
lea eax, [ebp - 0x168]
push eax
mov eax, dword [ebp - 0x140]
push dword [eax]
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
jne 0x4961c2
call ebx
test eax, eax
je 0x49613c
call ebx
lea esi, [eax + 0xafc80]
cmp esi, 0xb
je 0x496143
cmp esi, 0xafd68
je 0x496143
cmp esi, 0xafcd9
je 0x496143
cmp esi, 0xafd57
je 0x496143
cmp esi, 0xafd24
je 0x496143
cmp esi, 0xafca1
je 0x496143
cmp esi, 0xb23b3
jne 0x496248
jmp 0x496143
cmp eax, 8
jne 0x4961e1
lea ecx, [ebp - 0x150]
lea edx, [ebp - 0x168]
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x4961e1
mov eax, dword [ecx + 4]
cmp eax, dword [edx + 4]
je 0x4961f4
mov eax, dword [ebp - 0x140]
push dword [eax]
call dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x4960c0
lea eax, [ebp - 0x144]
push eax
mov eax, dword [ebp - 0x140]
push 0x8004667e
push dword [eax]
mov dword [ebp - 0x144], 0
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
je 0x496132
push dword [ebp - 0x13c]
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0047232c
mov esp, ebp
pop ebp
ret
call ebx
lea esi, [eax + 0xafc80]
mov edi, dword [ebp - 0x13c]
mov ebx, dword [ebp - 0x140]
mov eax, dword [ebx]
cmp eax, 0xffffffff
je 0x496262
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebp - 0x148]
mov eax, dword [eax]
cmp eax, 0xffffffff
je 0x496276
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebp - 0x148]
mov dword [ebx], 0xffffffff
push edi
mov dword [eax], 0xffffffff
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebp - 4]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.0047232c
mov esp, ebp
pop ebp
ret