Function at 0x140001000
Capabilities:
Initialize winsock library
Resolve dns

Disassembly:
sub rsp, 0x658
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x640], rax
mov ecx, 0x202
lea rdx, [rsp + 0x70]
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x14000106d
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, str.Cant_initialize_Winsock__Quitting
call fcn.1400012e0
mov rcx, rax
lea rdx, [0x1400014b0]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov eax, 1
mov rcx, qword [rsp + 0x640]
xor rcx, rsp
call fcn.140001500
add rsp, 0x658
ret
xor r8d, r8d
mov qword [rsp + 0x668], rsi
mov esi, 2
mov qword [rsp + 0x650], rdi
mov ecx, esi
lea edx, [r8 + 1]
call qword [sym.imp.WS2_32.dll_socket]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x1400010c5
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, str.Cant_create_socket__Quitting
call fcn.1400012e0
mov rcx, rax
lea rdx, [0x1400014b0]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
lea eax, [rsi - 1]
jmp 0x14000123a
mov ecx, 0xd2f0
mov qword [rsp + 0x660], rbx
mov word [rsp + 0x58], si
call qword [sym.imp.WS2_32.dll_htons]
xor ebx, ebx
lea rdx, [rsp + 0x58]
mov rcx, rdi
mov word [rsp + 0x5a], ax
mov dword [rsp + 0x5c], ebx
lea r8d, [rbx + 0x10]
call qword [sym.imp.WS2_32.dll_bind]
mov edx, 0x7fffffff
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_listen]
lea r8, [rsp + 0x50]
mov dword [rsp + 0x50], socket
lea rdx, [rsp + 0x40]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_accept]
xor edx, edx
lea rcx, [rsp + 0x230]
mov r8d, 0x401
call sub.VCRUNTIME140.dll_memset
xorps xmm0, xmm0
mov dword [rsp + 0x30], ebx
lea rax, [rsp + 0x210]
mov dword [rsp + 0x28], 0x20
mov r9d, 0x401
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x230]
lea edx, [rbx + 0x10]
lea rcx, [rsp + 0x40]
movups xmmword [rsp + 0x210], xmm0
movups xmmword [rsp + 0x220], xmm0
call qword [sym.imp.WS2_32.dll_getnameinfo]
test eax, eax
jne 0x1400011b9
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, [rsp + 0x230]
call fcn.1400012e0
mov rcx, rax
lea rdx, str._connected_on_port
call fcn.1400012e0
mov rcx, rax
lea rdx, [rsp + 0x210]
call fcn.1400012e0
jmp 0x140001211
mov r9d, 0x401
lea r8, [rsp + 0x230]
lea rdx, [rsp + 0x44]
mov ecx, esi
call qword [sym.imp.WS2_32.dll_inet_ntop]
movzx ecx, word [rsp + 0x42]
call qword [sym.imp.WS2_32.dll_ntohs]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, [rsp + 0x230]
movzx ebx, ax
call fcn.1400012e0
mov rcx, rax
lea rdx, str._connected_on_port
call fcn.1400012e0
mov rcx, rax
movzx edx, bx
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_short_int____ptr64]
lea rdx, [0x1400014b0]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov rbx, qword [rsp + 0x660]
xor eax, eax
mov rsi, qword [rsp + 0x668]
mov rdi, qword [rsp + 0x650]
mov rcx, qword [rsp + 0x640]
xor rcx, rsp
call fcn.140001500
add rsp, 0x658
ret