Function at 0x477580
Capabilities:
Create tcp socket
Create thread
Create udp socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x49a2dd
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push esi
push edi
mov eax, dword [0x4d04c0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x18], edi
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
xorps xmm0, xmm0
mov dword [edi + 8], eax
movups xmmword [edi + 0x6bc], xmm0
cmp dword [edi + 0x24], 0
lea esi, [edi + 0x14]
mov ecx, 2
mov dword [ebp - 0x10], esi
mov word [edi + 0x6bc], cx
je 0x4775f0
cmp dword [esi + 0x14], 0xf
mov eax, esi
jbe 0x4775e7
mov eax, dword [esi]
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
jmp 0x4775fb
push 0
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [ebp - 0x10], esi
mov dword [edi + 0x6c0], eax
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_htons]
mov word [edi + 0x6be], ax
lea eax, [edi + 0x6bc]
push 0x10
push eax
push dword [edi + 8]
call dword [sym.imp.WS2_32.dll_bind]
mov ecx, dword [edi + 8]
cmp eax, 0xffffffff
jne 0x47764e
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [edi + 8], 0xffffffff
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
push 0x1ff
push ecx
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
js 0x477639
lea esi, [edi + 0x30]
lea eax, [esi + 0x680]
cmp esi, eax
je 0x47768a
mov edi, eax
nop dword [eax]
mov ecx, esi
call fcn.00476300
mov byte [esi + 0x60], 0
add esi, 0x68
cmp esi, edi
jne 0x477670
mov edi, dword [ebp - 0x18]
lea esi, [edi + 0x14]
jmp 0x47768d
mov esi, dword [ebp - 0x10]
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 1
push eax
push 0x8004667e
push dword [edi + 8]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp dword [edi + 0x24], 0
mov byte [edi + 0x6b8], 0
jne 0x4776c9
mov ecx, dword [ebp + 8]
push 0x416670
push ecx
push str.TCP_Server:_start_thread_at_port
push dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
jmp 0x477702
push str.TCP_Server:_start_thread_at_IP
push dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.004156b0
add esp, 8
mov ecx, esi
cmp dword [esi + 0x14], 0xf
jbe 0x4776e6
mov ecx, dword [esi]
push dword [esi + 0x10]
push ecx
push eax
call fcn.00416020
mov ecx, dword [ebp + 8]
add esp, 0xc
push 0x416670
push ecx
push str._port
push eax
call fcn.004156b0
add esp, 8
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___int_]
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
push 8
call fcn.00489a19
add esp, 4
test eax, eax
je 0x477733
mov dword [eax], edi
mov dword [eax + 4], 0x4763c0
jmp 0x477735
xor eax, eax
mov dword [ebp + 8], eax
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], 0
push ecx
push 0
push eax
push 0x476160
push 0
push 0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
mov ecx, eax
add esp, 0x18
mov dword [ebp - 0x1c], ecx
test ecx, ecx
je 0x477794
cmp dword [edi + 0x6b4], 0
je 0x477770
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_terminate]
mov eax, dword [ebp - 0x18]
mov dword [edi + 0x6b4], eax
mov al, 1
mov dword [edi + 0x6b0], ecx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
push 6
mov dword [ebp - 0x18], 0
call sub.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_
int3