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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x70
mov eax, dword [0x7a9040]
xor eax, ebp
mov dword [esp + 0x68], eax
mov dword [esp + 0x34], 0x10
xor esi, esi
dec esi
mov dword [esp + 0x54], esi
mov dword [esp + 0x50], esi
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, esi
je 0x505bd9
mov edi, eax
mov ebx, dword [ebp + 0x14]
xor eax, eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x60], eax
mov word [esp + 0x58], 2
push 0x7f000001
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [esp + 0x5c], eax
mov word [esp + 0x5a], 0
xor esi, esi
dec esi
mov dword [ebx + 4], esi
mov dword [ebx], esi
lea eax, [esp + 0x20]
mov dword [eax], 1
push 4
push eax
push 0xfffffffffffffffb
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, esi
je 0x505bbf
lea ebx, [esp + 0x58]
push 0x10
push ebx
push edi
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x505bbf
lea eax, [esp + 0x34]
push eax
push ebx
push edi
call dword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
je 0x505bbf
cmp dword [esp + 0x34], 0x10
jl 0x505bbf
push 1
push edi
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
je 0x505bbf
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov ecx, dword [ebp + 0x14]
mov dword [ecx], eax
cmp eax, 0xffffffff
je 0x505bbf
push 0x10
push ebx
push eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x505bbf
push 1
push edi
call fcn.004fe470
add esp, 8
test eax, eax
jns 0x505bee
mov ebx, dword [sym.imp.WS2_32.dll_closesocket]
push edi
call ebx
mov edi, dword [ebp + 0x14]
push dword [edi]
call ebx
mov edi, dword [edi + 4]
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [esp + 0x68]
xor ecx, ebp
call fcn.00650d60
mov eax, esi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
lea eax, [esp + 0x50]
mov dword [eax], edi
mov dword [eax + 4], 0x300
xor ebx, ebx
push ebx
push 0x3e8
push 1
push eax
call fcn.00500ea0
add esp, 0x10
push ebx
push ebx
push edi
call dword [sym.imp.WS2_32.dll_accept]
mov ecx, dword [ebp + 0x14]
mov dword [ecx + 4], eax
cmp eax, 0xffffffff
je 0x505bbf
pcmpeqd xmm0, xmm0
movdqa xmmword [esp + 0x20], xmm0
lea eax, [esp + 0x20]
push eax
call fcn.0050a160
add esp, 4
mov al, 0xff
lea ecx, [esp + 0x44]
mov byte [ecx + 8], al
mov dword [ecx + 4], esi
mov dword [ecx], esi
mov byte [esp + 0x40], al
mov dword [esp + 0x3c], esi
mov dword [esp + 0x38], esi
push 9
push ecx
push 0
call fcn.00500a20
add esp, 0xc
test eax, eax
jne 0x505bbf
push 0
push 9
lea eax, [esp + 0x4c]
push eax
mov eax, dword [ebp + 0x14]
push dword [eax]
call dword [sym.imp.WS2_32.dll_send]
mov dword [esp + 0xc], 9
lea eax, [esp + 0x38]
mov dword [esp + 8], eax
mov ebx, dword [ebp + 0x14]
mov eax, dword [ebx + 4]
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], 0x300
xor ebx, ebx
push ebx
push 0x3e8
push 1
lea eax, [esp + 0x5c]
push eax
call fcn.00500ea0
add esp, 0x10
push ebx
push dword [esp + 0x10]
push dword [esp + 0x10]
mov eax, dword [ebp + 0x14]
push dword [eax + 4]
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
jne 0x505d26
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
lea eax, [esp + 0x10]
push eax
call fcn.0050a160
sub esp, 0x1c
movaps xmm0, xmmword [esp + 0x40]
movups xmmword [esp + 0x10], xmm0
movdqu xmm0, xmmword [esp + 0x30]
movdqu xmmword [esp], xmm0
call fcn.0050a240
add esp, 0x20
mov ecx, 0xea60
cmp ecx, eax
mov eax, 0
sbb eax, edx
jl 0x505bbf
cmp ebx, 0x2733
je 0x505c8c
jmp 0x505bbf
sub dword [esp + 0xc], eax
je 0x505d35
add dword [esp + 8], eax
jmp 0x505c8c
lea eax, [esp + 0x38]
push 9
push eax
lea eax, [esp + 0x4c]
push eax
call fcn.00652bcd
add esp, 0xc
test eax, eax
jne 0x505bbf
xor esi, esi
jmp 0x505bd2