Function at 0x50db70
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 0x5db90c
mov eax, dword fs:[0]
push eax
sub esp, 0x2c8
mov eax, dword [0x66d4f4]
xor eax, esp
mov dword [esp + 0x2c4], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x66d4f4]
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 0x50dc92
push 1
push edi
lea ecx, [esp + 0x28]
call fcn.0040a750
mov dword [esp + 0x2e4], 0
call sub.WS2_32.dll_WSAGetLastError
push eax
lea eax, [esp + 0x24]
push str.socket:
push eax
call fcn.00409270
add esp, 8
mov ecx, eax
call fcn.0041c7c0
lea ecx, [esp + 0x1b4]
push ecx
lea ecx, [esp + 0x24]
call fcn.00408c00
mov esi, 0x10
cmp dword [eax + 0x18], esi
mov byte [esp + 0x2e4], 1
jb 0x50dc24
mov eax, dword [eax + 4]
jmp 0x50dc27
add eax, 4
push eax
push str.BaseLib::SocketPing
push 0x120f
push str..common_function.cpp
push 0xf0000000
call fcn.00408f70
mov ecx, eax
call fcn.00512650
cmp dword [esp + 0x1cc], esi
jb 0x50dc61
mov edx, dword [esp + 0x1b8]
push edx
call fcn.005a1b1d
add esp, 4
lea ecx, [esp + 0x6c]
mov dword [esp + 0x2e4], 0xffffffff
call fcn.00409510
lea eax, [esp + 0x6c]
push eax
mov dword [esp + 0x70], vtable.std::ios_base.0
call fcn.005d9cc4
add esp, 4
or eax, 0xffffffff
jmp 0x50df3e
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 0x50dd50
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 0x50de6c
push 1
push edi
lea ecx, [esp + 0x28]
call fcn.0040a750
mov dword [esp + 0x2e4], edi
call sub.WS2_32.dll_WSAGetLastError
push eax
lea edx, [esp + 0x24]
push str.sendto:
push edx
call fcn.00409270
add esp, 8
mov ecx, eax
call fcn.0041c7c0
lea eax, [esp + 0x1b4]
push eax
lea ecx, [esp + 0x24]
call fcn.00408c00
cmp dword [eax + 0x18], ebp
mov byte [esp + 0x2e4], 3
jb 0x50ddf7
mov eax, dword [eax + 4]
jmp 0x50ddfa
add eax, 4
push eax
push str.BaseLib::SocketPing
push 0x1236
push str..common_function.cpp
push 0xf0000000
call fcn.00408f70
mov ecx, eax
call fcn.00512650
cmp dword [esp + 0x1cc], ebp
jb 0x50de34
mov ecx, dword [esp + 0x1b8]
push ecx
call fcn.005a1b1d
add esp, 4
lea ecx, [esp + 0x6c]
mov dword [esp + 0x2e4], 0xffffffff
call fcn.00409510
lea edx, [esp + 0x6c]
push edx
mov dword [esp + 0x70], vtable.std::ios_base.0
call fcn.005d9cc4
add esp, 4
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
jmp 0x50df3e
mov edi, dword [sym.imp.WS2_32.dll_recvfrom]
lea ebp, [esi + 1]
jmp 0x50de80
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 0x50df2b
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 0x50df32
cmp byte [esp + 0x1d9], 1
jne 0x50de80
cmp byte [esp + 0x1e4], bl
jne 0x50de80
mov dx, word [esp + 0x1e8]
cmp dx, word [esp + 0x2b8]
jne 0x50de80
jmp 0x50df35
mov ebx, 1
jmp 0x50df35
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.005bd2d7
add esp, 0x2d4
ret