Function at 0x180001480
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Initialize winsock library
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x690]
sub rsp, 0x790
mov rax, qword [0x180008040]
xor rax, rsp
mov qword [rbp + 0x680], rax
mov rbx, rcx
mov qword [rbp - 0x68], rcx
xor r13d, r13d
mov ecx, 0x202
lea rdx, [rbp + 0xe0]
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x180001518
xorps xmm0, xmm0
movups xmmword [rbx], xmm0
mov qword [rbx + 0x10], reloc.WS2_32.dll_inet_addr
mov qword [rbx + 0x18], recv
movsd xmm0, qword [str.wsa_startup]
movsd qword [rbx], xmm0
movzx ecx, word [0x180005548]
mov word [rbx + 8], cx
movzx ecx, byte [0x18000554a]
mov byte [rbx + 0xa], cl
mov byte [rbx + 0xb], r13b
jmp 0x180001a84
mov edx, 1
mov esi, 2
mov r8d, 6
mov ecx, esi
call qword [sym.imp.WS2_32.dll_socket]
mov r12, rax
cmp rax, 0xffffffffffffffff
jne 0x18000157e
call qword [sym.imp.WS2_32.dll_WSACleanup]
xorps xmm0, xmm0
movups xmmword [rbx], xmm0
mov qword [rbx + 0x10], recv
mov qword [rbx + 0x18], recv
movsd xmm0, qword [str.invalid_socket]
movsd qword [rbx], xmm0
mov eax, dword [0x180005558]
mov dword [rbx + 8], eax
movzx eax, word [0x18000555c]
mov word [rbx + 0xc], ax
mov byte [rbx + 0xe], r13b
jmp 0x180001a84
mov word [rbp - 0x68], si
lea rcx, [0x180005560]
call qword [sym.imp.WS2_32.dll_inet_addr]
mov dword [rbp - 0x64], eax
mov ecx, 0x32c8
call qword [sym.imp.WS2_32.dll_htons]
mov word [rbp - 0x66], ax
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rbp - 0x68]
mov rcx, r12
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x180001605
mov rcx, r12
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
xorps xmm0, xmm0
movups xmmword [rbx], xmm0
mov qword [rbx + 0x10], 7
mov qword [rbx + 0x18], recv
mov rax, qword [0x180005570]
mov dword [rbx], eax
movzx eax, word [0x180005574]
mov word [rbx + 4], ax
movzx eax, byte [reloc.WS2_32.dll_WSACleanup]
mov byte [rbx + 6], al
mov byte [rbx + 7], r13b
jmp 0x180001a84
xor edx, edx
mov r8d, 0x110
lea rcx, [rbp - 0x30]
call sub.VCRUNTIME140.dll_memset
lea rcx, [rbp - 0x30]
call fcn.180002c30
nop
lea rcx, [rsp + 0x38]
call fcn.1800012a0
mov rdi, rax
mov r8, qword [rax + 0x10]
mov rcx, qword [rax + 0x18]
mov rax, rcx
sub rax, r8
cmp rax, 8
jb 0x1800016d5
lea rax, [r8 + 8]
mov qword [rdi + 0x10], rax
mov rsi, rdi
cmp rcx, 0xf
jbe 0x180001659
mov rsi, qword [rdi]
lea rax, [0x180005590]
mov r15d, 8
lea rcx, str.get_key_
cmp rax, rsi
jbe 0x18000168d
lea rax, [rsi + r8]
cmp rcx, rax
ja 0x18000168d
cmp rsi, rcx
ja 0x180001685
mov r14, r13
jmp 0x180001690
mov r14, rsi
sub r14, rcx
jmp 0x180001690
mov r14, r15
inc r8
lea rcx, [rsi + 8]
mov rdx, rsi
call sub.VCRUNTIME140.dll_memmove
mov r8, r14
lea rdx, str.get_key_
mov rcx, rsi
call sub.VCRUNTIME140.dll_memcpy
sub r15, r14
lea rdx, str.get_key_
add rdx, 8
add rdx, r14
lea rcx, [rsi + r14]
mov r8, r15
call sub.VCRUNTIME140.dll_memcpy
mov esi, 2
jmp 0x1800016ee
mov r15d, 8
mov qword [rsp + 0x28], r15
mov edx, r15d
mov rcx, rdi
call fcn.1800038d0
mov rdi, rax
xorps xmm0, xmm0
movups xmmword [rsp + 0x58], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x68], xmm1
movups xmm0, xmmword [rdi]
movups xmmword [rsp + 0x58], xmm0
movups xmm1, xmmword [rdi + 0x10]
movups xmmword [rsp + 0x68], xmm1
mov qword [rdi + 0x10], r13
mov qword [rdi + 0x18], recv
mov byte [rdi], 0
mov rcx, qword [rsp + 0x68]
mov rdx, qword [rsp + 0x70]
mov rax, rdx
sub rax, rcx
cmp rax, 1
jb 0x18000175a
lea rax, [rcx + 1]
mov qword [rsp + 0x68], rax
lea rax, [rsp + 0x58]
cmp rdx, 0xf
cmova rax, qword [rsp + 0x58]
mov word [rax + rcx], 0x3f
lea rax, [rsp + 0x58]
jmp 0x180001779
mov qword [rsp + 0x20], 1
lea r9, [0x180005580]
mov edx, 1
lea rcx, [rsp + 0x58]
call fcn.180003580
xorps xmm0, xmm0
movups xmmword [rsp + 0x78], xmm0
mov qword [rbp - 0x78], r13
mov qword [rbp - 0x70], r13
movups xmm0, xmmword [rax]
movups xmmword [rsp + 0x78], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp - 0x78], xmm1
mov qword [rax + 0x10], r13
mov qword [rax + 0x18], recv
mov byte [rax], 0
mov rdx, qword [rsp + 0x70]
cmp rdx, 0xf
jbe 0x1800017e8
inc rdx
mov rcx, qword [rsp + 0x58]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1800017e3
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1800017e3
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180004184
movdqa xmm0, xmmword [0x180005760]
movdqu xmmword [rsp + 0x68], xmm0
mov byte [rsp + 0x58], 0
mov rdx, qword [rsp + 0x50]
cmp rdx, 0xf
jbe 0x18000183b
inc rdx
mov rcx, qword [rsp + 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180001836
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180001836
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180004184
cmp qword [rbp + 0x60], 0
je 0x1800019a5
xorps xmm0, xmm0
movups xmmword [rsp + 0x58], xmm0
mov qword [rsp + 0x68], r13
mov qword [rsp + 0x70], recv
mov byte [rsp + 0x58], 0
mov rax, qword [rbp - 0x30]
movsxd rcx, dword [rax + 4]
lea rax, [rbp - 0x30]
add rcx, rax
mov dl, 0xa
call qword [sym.imp.MSVCP140.dll_public:_char___cdecl_std::basic_ios_char__struct_std::char_traits_char__::widen_char_const___ptr64]
movzx r8d, al
lea rdx, [rsp + 0x58]
lea rcx, [rbp - 0x30]
call fcn.180003730
mov rcx, qword [rax]
movsxd rcx, dword [rcx + 4]
add rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_bool___cdecl_std::ios_base::operator_bool_void_const___ptr64]
test al, al
je 0x18000193c
lea rdx, [rsp + 0x58]
cmp qword [rsp + 0x70], 0xf
cmova rdx, qword [rsp + 0x58]
mov r8, qword [rsp + 0x68]
lea rcx, [rsp + 0x78]
call fcn.180003120
mov rcx, qword [rbp - 0x78]
mov rdx, qword [rbp - 0x70]
cmp rcx, rdx
jae 0x1800018ee
lea rax, [rcx + 1]
mov qword [rbp - 0x78], rax
lea rax, [rsp + 0x78]
cmp rdx, 0xf
cmova rax, qword [rsp + 0x78]
mov word [rax + rcx], 0xa
jmp 0x1800018fb
mov r9b, 0xa
lea rcx, [rsp + 0x78]
call fcn.180003410
mov rax, qword [rbp - 0x30]
movsxd rcx, dword [rax + 4]
lea rax, [rbp - 0x30]
add rcx, rax
mov dl, 0xa
call qword [sym.imp.MSVCP140.dll_public:_char___cdecl_std::basic_ios_char__struct_std::char_traits_char__::widen_char_const___ptr64]
movzx r8d, al
lea rdx, [rsp + 0x58]
lea rcx, [rbp - 0x30]
call fcn.180003730
mov rcx, qword [rax]
movsxd rcx, dword [rcx + 4]
add rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_bool___cdecl_std::ios_base::operator_bool_void_const___ptr64]
test al, al
jne 0x1800018a2
lea rcx, [rbp - 0x20]
call fcn.180003060
test rax, rax
jne 0x180001965
mov rax, qword [rbp - 0x30]
movsxd rcx, dword [rax + 4]
lea rax, [rbp - 0x30]
add rcx, rax
xor r8d, r8d
mov edx, esi
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
nop
mov rdx, qword [rsp + 0x70]
cmp rdx, 0xf
jbe 0x1800019a5
inc rdx
mov rcx, qword [rsp + 0x58]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1800019a0
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1800019a0
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180004184
lea rax, [rsp + 0x78]
mov rcx, qword [rsp + 0x78]
mov r9, qword [rbp - 0x70]
cmp r9, 0xf
cmova rax, rcx
mov rdi, 0xffffffffffffffff
mov r8, rdi
inc r8
cmp byte [rax + r8], 0
jne 0x1800019c5
lea rdx, [rsp + 0x78]
cmp r9, 0xf
cmova rdx, rcx
xor r9d, r9d
mov rcx, r12
call qword [sym.imp.WS2_32.dll_send]
cmp eax, edi
jne 0x180001ab7
mov rcx, r12
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
xorps xmm0, xmm0
movups xmmword [rbx], xmm0
mov qword [rbx + 0x10], recv
mov qword [rbx + 0x18], recv
movsd xmm0, qword [str.socket_error]
movsd qword [rbx], xmm0
mov eax, dword [0x1800055a0]
mov dword [rbx + 8], eax
mov byte [rbx + 0xc], 0
mov rdx, qword [rbp - 0x70]
cmp rdx, 0xf
jbe 0x180001a6a
inc rdx
mov rcx, qword [rsp + 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180001a65
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x180001baa
call fcn.180004184
mov qword [rbp - 0x78], r13
mov qword [rbp - 0x70], recv
mov byte [rsp + 0x78], 0
lea rcx, [rbp - 0x30]
call fcn.180001bc0
mov rax, rbx
mov rcx, qword [rbp + 0x680]
xor rcx, rsp
call fcn.180003b10
lea r11, [rsp + 0x790]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
xorps xmm0, xmm0
movups xmmword [rbp - 0x58], xmm0
movdqa xmm1, xmmword [0x180005770]
movdqu xmmword [rbp - 0x48], xmm1
mov eax, dword [str.false]
mov dword [rbp - 0x58], eax
movzx eax, byte [0x180005500]
mov byte [rbp - 0x54], al
mov byte [rbp - 0x53], 0
xor r9d, r9d
mov r8d, 0x400
lea rdx, [rbp + 0x280]
mov rcx, r12
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x180001b3c
cdqe
cmp rax, 0x400
jae 0x180001bb1
mov byte [rbp + rax + 0x280], 0
lea rax, [rbp + 0x280]
nop dword [rax]
inc rdi
cmp byte [rax + rdi], 0
jne 0x180001b20
mov r8, rdi
lea rdx, [rbp + 0x280]
lea rcx, [rbp - 0x58]
call fcn.1800031a0
mov rcx, r12
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
movups xmm0, xmmword [rbp - 0x58]
movups xmmword [rbx], xmm0
movups xmm1, xmmword [rbp - 0x48]
movups xmmword [rbx + 0x10], xmm1
movdqa xmm0, xmmword [0x180005760]
movdqu xmmword [rbp - 0x48], xmm0
mov byte [rbp - 0x58], 0
mov rdx, qword [rbp - 0x70]
cmp rdx, 0xf
jbe 0x180001a6a
inc rdx
mov rcx, qword [rsp + 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180001a65
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180001a65
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call fcn.180003c38
int3