Function at 0x140016a60
Capabilities:
Connect socket
Initialize winsock library

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
mov qword [rsp + 0x20], r12
push rbp
push r14
push r15
lea rbp, [rsp - 0x220]
sub rsp, 0x320
mov rax, qword [0x140058028]
xor rax, rsp
mov qword [rbp + 0x210], rax
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x40], rax
xor edi, edi
lea r12, [0x140058ec0]
mov qword [rsp + 0x40], r12
xorps xmm0, xmm0
movups xmmword [0x140058ee0], xmm0
mov qword [0x140058ef0], rdi
mov ebx, recv
mov qword [0x140058ef8], rbx
mov byte [0x140058ee0], dil
lea rcx, [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_GetCurrentHwProfileW]
lea r15, [rdi - 1]
test eax, eax
je 0x140016b1c
xorps xmm0, xmm0
movups xmmword [rsp + 0x50], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x60], xmm1
lea rax, [rsp + 0x74]
mov r8, r15
inc r8
cmp word [rax + r8*2], 0
jne 0x140016b01
lea rdx, [rsp + 0x74]
lea rcx, [rsp + 0x50]
call fcn.140009680
nop
lea rdx, [rsp + 0x50]
cmp qword [rsp + 0x68], 8
cmovae rdx, qword [rsp + 0x50]
mov rax, qword [rsp + 0x60]
lea r14, [rdx + rax*2]
lea rsi, [rsp + 0x50]
cmovae rsi, qword [rsp + 0x50]
xorps xmm0, xmm0
movups xmmword [rsp + 0x20], xmm0
mov qword [rsp + 0x30], rdi
mov qword [rsp + 0x38], rbx
cmp rsi, r14
jne 0x140016b62
mov byte [rsp + 0x20], 0
jmp 0x140016c47
mov rax, r14
sub rax, rsi
sar rax, 1
movabs rcx, 0x7fffffffffffffff
cmp rax, rcx
ja 0x140016dcf
cmp rax, 0x10
jb 0x140016c00
mov rbx, rax
or rbx, 0xf
cmp rbx, rcx
jbe 0x140016b95
mov rbx, rcx
jmp 0x140016ba1
mov eax, socket
cmp rbx, rax
cmovb rbx, rax
mov rcx, rbx
add rcx, 1
cmovb rcx, r15
cmp rcx, 0x1000
jb 0x140016be4
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x140016dc9
mov rcx, rax
call fcn.140028cb0
mov rcx, rax
test rax, rax
je 0x140016c8c
add rax, 0x27
and rax, 0xffffffffffffffe0
mov qword [rax - 8], rcx
jmp 0x140016bf3
test rcx, rcx
je 0x140016bf0
call fcn.140028cb0
jmp 0x140016bf3
mov rax, rdi
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x38], rbx
nop dword [rax]
lea rcx, [rsp + 0x20]
cmp rbx, 0x10
cmovae rcx, qword [rsp + 0x20]
movzx eax, byte [rsi]
mov byte [rdi + rcx], al
mov rdi, qword [rsp + 0x30]
inc rdi
mov qword [rsp + 0x30], rdi
add rsi, 2
cmp rsi, r14
je 0x140016c32
mov rbx, qword [rsp + 0x38]
jmp 0x140016c00
lea rax, [rsp + 0x20]
cmp qword [rsp + 0x38], 0x10
cmovae rax, qword [rsp + 0x20]
mov byte [rdi + rax], 0
lea rdx, [rsp + 0x20]
lea rcx, [0x140058ee0]
call fcn.140007570
mov rdx, qword [rsp + 0x38]
cmp rdx, 0x10
jb 0x140016c99
inc rdx
mov rcx, qword [rsp + 0x20]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140016c93
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140016c93
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400290f0
nop
mov rdx, qword [rsp + 0x68]
cmp rdx, 8
jb 0x140016cde
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140016cd9
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140016cd9
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400290f0
mov ecx, 0x202
lea rdx, [rbp + 0x70]
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x140016cf8
mov byte [0x140058ec0], 0
xor r8d, r8d
lea edx, [r8 + 1]
mov ebx, 2
mov ecx, ebx
call qword [sym.imp.WS2_32.dll_socket]
mov qword [0x140058ec8], rax
cmp rax, 0xffffffffffffffff
jne 0x140016d28
mov byte [0x140058ec0], 0
call qword [sym.imp.WS2_32.dll_WSACleanup]
jmp 0x140016d96
mov word [0x140058ed0], bx
mov ecx, 0x1f90
call qword [sym.imp.WS2_32.dll_htons]
mov word [0x140058ed2], ax
lea rcx, str.127.0.0.1
call qword [sym.imp.WS2_32.dll_inet_addr]
mov dword [0x140058ed4], eax
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [0x140058ed0]
mov rcx, qword [0x140058ec8]
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x140016d8f
mov byte [0x140058ec0], 0
mov rcx, qword [0x140058ec8]
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
jmp 0x140016d96
mov byte [0x140058ec0], 1
mov rax, r12
mov rcx, qword [rbp + 0x210]
xor rcx, rsp
call fcn.140028c90
lea r11, [rsp + 0x320]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov r12, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
call fcn.140001150
nop
call fcn.1400011f0
int3