Function at 0x5061f0
Capabilities:
Create raw socket
Create tcp socket
Create udp socket
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push 0xffffffffffffffff
push 0x5d03cc
mov eax, dword fs:[0]
push eax
sub esp, 0x2c8
mov eax, dword [0x65d4e4]
xor eax, esp
mov dword [esp + 0x2c4], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x65d4e4]
xor eax, esp
push eax
lea eax, [esp + 0x2dc]
mov dword fs:[0], eax
push 1
push 3
mov edi, 2
push edi
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
jne 0x506312
push 1
push edi
lea ecx, [esp + 0x28]
call fcn.0040b040
mov dword [esp + 0x2e4], 0
call sub.WS2_32.dll_WSAGetLastError
push eax
lea eax, [esp + 0x24]
push str.socket:
push eax
call fcn.00409b60
add esp, 8
mov ecx, eax
call fcn.0041ca40
lea ecx, [esp + 0x1b4]
push ecx
lea ecx, [esp + 0x24]
call fcn.004094f0
mov esi, 0x10
cmp dword [eax + 0x18], esi
mov byte [esp + 0x2e4], 1
jb 0x5062a4
mov eax, dword [eax + 4]
jmp 0x5062a7
add eax, 4
push eax
push str.BaseLib::SocketPing
push 0x1280
push str..common_function.cpp
push 0xf0000000
call fcn.00409860
mov ecx, eax
call fcn.004fb930
cmp dword [esp + 0x1cc], esi
jb 0x5062e1
mov edx, dword [esp + 0x1b8]
push edx
call fcn.00595eb8
add esp, 4
lea ecx, [esp + 0x6c]
mov dword [esp + 0x2e4], 0xffffffff
call fcn.00409e00
lea eax, [esp + 0x6c]
push eax
mov dword [esp + 0x70], vtable.std::ios_base.0
call fcn.005cdcde
add esp, 4
or eax, 0xffffffff
jmp 0x5065be
xor eax, eax
xor ebx, ebx
mov dword [esp + 0x1a4], eax
push ebx
mov dword [esp + 0x1ac], eax
mov dword [esp + 0x1b0], eax
mov dword [esp + 0x1b4], eax
mov word [esp + 0x1a8], di
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [esp + 0x2ec]
mov word [esp + 0x1a6], ax
xor eax, eax
mov dword [esp + 0x2b5], eax
mov dword [esp + 0x1a8], ecx
mov dword [esp + 0x2b9], eax
mov dword [esp + 0x2bd], eax
mov dword [esp + 0x2c1], eax
mov dword [esp + 0x2c5], eax
mov dword [esp + 0x2c9], eax
mov dword [esp + 0x2cd], eax
mov dword [esp + 0x2d1], eax
mov byte [esp + 0x2b4], 8
mov byte [esp + 0x2b5], bl
mov word [esp + 0x2b6], bx
call sub.KERNEL32.dll_GetCurrentProcessId
mov word [esp + 0x2b8], ax
mov word [esp + 0x2ba], 1
lea eax, [esp + 0x2b4]
xor ecx, ecx
mov edx, 4
lea ecx, [ecx]
movzx ebp, word [eax]
add ecx, ebp
add eax, edi
sub edx, 1
jne 0x5063d0
mov eax, ecx
sar eax, 0x10
and ecx, 0xffff
add eax, ecx
mov edx, eax
sar edx, 0x10
add eax, edx
not eax
mov word [esp + 0x2b6], ax
mov ebp, 0x10
push ebp
lea eax, [esp + 0x1a8]
push eax
push ebx
push 0x21
lea ecx, [esp + 0x2c4]
push ecx
push esi
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jge 0x5064ec
push 1
push edi
lea ecx, [esp + 0x28]
call fcn.0040b040
mov dword [esp + 0x2e4], edi
call sub.WS2_32.dll_WSAGetLastError
push eax
lea edx, [esp + 0x24]
push str.sendto:
push edx
call fcn.00409b60
add esp, 8
mov ecx, eax
call fcn.0041ca40
lea eax, [esp + 0x1b4]
push eax
lea ecx, [esp + 0x24]
call fcn.004094f0
cmp dword [eax + 0x18], ebp
mov byte [esp + 0x2e4], 3
jb 0x506477
mov eax, dword [eax + 4]
jmp 0x50647a
add eax, 4
push eax
push str.BaseLib::SocketPing
push 0x12a7
push str..common_function.cpp
push 0xf0000000
call fcn.00409860
mov ecx, eax
call fcn.004fb930
cmp dword [esp + 0x1cc], ebp
jb 0x5064b4
mov ecx, dword [esp + 0x1b8]
push ecx
call fcn.00595eb8
add esp, 4
lea ecx, [esp + 0x6c]
mov dword [esp + 0x2e4], 0xffffffff
call fcn.00409e00
lea edx, [esp + 0x6c]
push edx
mov dword [esp + 0x70], vtable.std::ios_base.0
call fcn.005cdcde
add esp, 4
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
jmp 0x5065be
mov edi, dword [sym.imp.WS2_32.dll_recvfrom]
lea ebp, [esi + 1]
jmp 0x506500
mov eax, 1
mov dword [esp + 0x18], eax
mov dword [esp + 0xa0], eax
lea eax, [esp + 0x18]
push eax
push ebx
push ebx
lea ecx, [esp + 0xac]
push ecx
push ebp
mov dword [esp + 0x30], ebx
mov dword [esp + 0xb8], esi
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jle 0x5065ab
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x1b8]
push eax
push ebx
push 0xe4
lea ecx, [esp + 0x1e0]
push ecx
push esi
mov word [esp + 0x1fe], bx
mov word [esp + 0x200], bx
mov word [esp + 0x202], bx
mov dword [esp + 0x2c], 0x10
call edi
cmp eax, 0xffffffff
je 0x5065b2
cmp byte [esp + 0x1d9], 1
jne 0x506500
cmp byte [esp + 0x1e4], bl
jne 0x506500
mov dx, word [esp + 0x1e8]
cmp dx, word [esp + 0x2b8]
jne 0x506500
jmp 0x5065b5
mov ebx, 1
jmp 0x5065b5
or ebx, 0xffffffff
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, ebx
mov ecx, dword [esp + 0x2dc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x2c4]
xor ecx, esp
call fcn.005b1988
add esp, 0x2d4
ret