Function at 0x180006670
Capabilities:
Encode data using xor
Initialize winsock library
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x5318
call fcn.180033170
sub rsp, rax
mov qword [rsp + 0x128], 0xfffffffffffffffe
mov rax, qword [0x180049170]
xor rax, rsp
mov qword [rsp + 0x5300], rax
mov r13, r9
mov qword [rsp + 0x90], r9
mov r12, r8
movzx ebx, dx
mov rdi, rcx
mov r14d, 0xffffff9d
mov qword [rsp + 0x30], 0xffffffffffffffff
mov qword [rsp + 0x150], socket
xor r15d, r15d
mov qword [rsp + 0x148], r15
mov byte [rsp + 0x138], r15b
lea ecx, [r14 + 0x6b]
call fcn.18000b8ac
test rax, rax
je 0x180006702
lea rcx, [rsp + 0x40]
mov qword [rax], rcx
jmp 0x180006705
mov rax, r15
mov qword [rsp + 0x40], rax
lea rcx, [rsp + 0x40]
call fcn.180006230
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x70], r15
mov esi, r15d
mov rbp, r15
mov qword [rsp + 0x38], r15
mov ecx, 0x102
lea rdx, [rsp + 0x160]
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x1800067dd
mov rax, qword [rsp + 0x68]
mov rdi, qword [rax]
mov qword [rax], rax
mov rax, qword [rsp + 0x68]
mov qword [rax + 8], rax
mov qword [rsp + 0x70], r15
mov rcx, qword [rsp + 0x68]
cmp rdi, rcx
je 0x1800067a8
nop word [rax + rax]
mov rbx, qword [rdi]
cmp qword [rdi + 0x30], 0x10
jb 0x180006783
mov rcx, qword [rdi + 0x18]
call fcn.18000b8f0
mov qword [rdi + 0x30], select
mov qword [rdi + 0x28], r15
mov byte [rdi + 0x18], 0
mov rcx, rdi
call fcn.18000b8f0
mov rdi, rbx
mov rcx, qword [rsp + 0x68]
cmp rbx, rcx
jne 0x180006770
call fcn.18000b8f0
mov qword [rsp + 0x68], r15
mov rcx, qword [rsp + 0x40]
call fcn.18000b8f0
nop
cmp qword [rsp + 0x150], 0x10
jb 0x1800067d5
mov rcx, qword [rsp + 0x138]
call fcn.18000b8f0
or eax, 0xffffffff
jmp 0x180006db8
movzx r8d, bx
mov dword [rsp + 0x20], r15d
mov r9d, 0x5dc
mov rdx, rdi
lea rcx, [rsp + 0x30]
call fcn.1800078e0
test eax, eax
je 0x180006d21
mov edx, 0x1388
mov rcx, qword [rsp + 0x30]
call fcn.180007450
mov edx, 0x1388
mov rcx, qword [rsp + 0x30]
call fcn.180007480
mov r8, r12
lea rdx, str.__cmd_secneg_s
lea rcx, [rsp + 0x300]
call fcn.18001ddac
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x300]
repne scasb al, byte [rdi]
not rcx
dec rcx
mov rdi, rcx
mov word [rsp + 0x300], cx
xor r9d, r9d
mov r8d, ecx
lea rdx, [rsp + 0x300]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.WS2_32.dll_send]
cmp eax, edi
jne 0x180006d14
test eax, eax
jle 0x180006afb
xor r9d, r9d
mov r8d, 0x5000
lea rdx, [rsp + 0x300]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x180006afb
movsxd r8, eax
lea rdx, [rsp + 0x300]
lea rcx, [rsp + 0x130]
call fcn.1800063b0
mov r11, qword [rsp + 0x148]
cmp r11, 2
jb 0x180006880
nop word [rax + rax]
lea rax, [rsp + 0x138]
mov rcx, qword [rsp + 0x138]
mov rdi, qword [rsp + 0x150]
cmp rdi, 0x10
cmovae rax, rcx
movzx eax, word [rax]
mov rbx, rax
cmp r11, rax
jb 0x180006880
lea rdx, [rsp + 0x138]
cmp rdi, 0x10
cmovae rdx, rcx
mov qword [rsp + 0xb8], socket
mov qword [rsp + 0xb0], r15
mov byte [rsp + 0xa0], 0
add eax, 0xfffffffe
movsxd r12, eax
add rdx, 2
mov r8, r12
lea rcx, [rsp + 0x98]
call fcn.180001df0
nop
mov rdi, qword [rsp + 0x68]
lea r9, [rsp + 0x98]
mov r8, qword [rdi + 8]
mov rdx, rdi
lea rcx, [rsp + 0x40]
call fcn.1800065a0
mov rdx, rax
movabs rax, 0x666666666666666
mov rcx, qword [rsp + 0x70]
sub rax, rcx
cmp rax, 1
jb 0x180006a4a
inc rcx
mov qword [rsp + 0x70], rcx
mov qword [rdi + 8], rdx
mov rax, qword [rdx + 8]
mov qword [rax], rdx
cmp qword [rsp + 0xb8], 0x10
jb 0x1800069aa
mov rcx, qword [rsp + 0xa0]
call fcn.18000b8f0
add rbp, r12
mov r11, qword [rsp + 0x148]
cmp r11, rbx
cmovb rbx, r11
test rbx, rbx
je 0x180006a39
lea rdi, [rsp + 0x138]
mov rax, qword [rsp + 0x138]
mov rdx, qword [rsp + 0x150]
cmp rdx, 0x10
cmovae rdi, rax
lea rcx, [rsp + 0x138]
cmp rdx, 0x10
cmovae rcx, rax
sub r11, rbx
lea r8, [rbx + rdi]
mov r9, r11
call fcn.18001cb58
mov rdx, qword [rsp + 0x148]
sub rdx, rbx
mov qword [rsp + 0x148], rdx
lea rax, [rsp + 0x138]
cmp qword [rsp + 0x150], 0x10
cmovae rax, qword [rsp + 0x138]
mov byte [rdx + rax], 0
mov r11, qword [rsp + 0x148]
inc esi
cmp r11, 2
jae 0x1800068d0
jmp 0x180006880
mov qword [rsp + 0xe0], socket
mov qword [rsp + 0xd8], r15
mov byte [rsp + 0xc8], 0
mov r8d, reloc.WS2_32.dll_recv
lea rdx, str.list_T__too_long
lea rcx, [rsp + 0xc0]
call fcn.180001df0
nop
lea rcx, [rsp + 0xe8]
call fcn.18001c94c
nop
lea rax, vtable.std::logic_error.0
mov qword [rsp + 0xe8], rax
mov qword [rsp + 0x120], socket
mov qword [rsp + 0x118], r15
mov byte [rsp + 0x108], 0
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rdx, [rsp + 0xc0]
lea rcx, [rsp + 0x100]
call fcn.180001cd0
nop
lea rax, vtable.std::length_error.0
mov qword [rsp + 0xe8], rax
lea rdx, [0x1800451b0]
lea rcx, [rsp + 0xe8]
call fcn.18001cbd8
nop
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp qword [rsp + 0x70], 0
je 0x180006d14
mov edx, ebp
mov rcx, r13
call fcn.180001760
mov r15, rax
mov rdi, qword [rsp + 0x68]
mov rax, qword [rdi]
mov qword [rsp + 0x88], rax
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x80], rax
movaps xmm0, xmmword [rsp + 0x80]
movdqa xmmword [rsp + 0x80], xmm0
mov r12, qword [rsp + 0x80]
mov r13, qword [rsp + 0x88]
test r12, r12
je 0x180006b62
cmp r12, rax
je 0x180006b67
call fcn.18001d178
cmp r13, rdi
je 0x180006d00
test r12, r12
jne 0x180006b7e
call fcn.18001d178
xor edx, edx
jmp 0x180006b82
mov rdx, qword [r12]
cmp r13, qword [rdx + 0x28]
jne 0x180006b8d
call fcn.18001d178
xor edx, edx
lea r8d, [rdx + 2]
lea rcx, [r13 + 0x10]
call fcn.180001570
mov rbp, qword [r13 + 0x28]
cmp rbp, 1
jbe 0x180006d0b
cmp qword [r13 + 0x30], 0x10
jb 0x180006bba
lea rsi, [r13 + 0x18]
mov rax, qword [rsi]
jmp 0x180006bc1
lea rsi, [r13 + 0x18]
mov rax, rsi
cmp byte [rax], 0x64
je 0x180006bda
xor edx, edx
lea rcx, [r13 + 0x10]
call fcn.1800061c0
cmp byte [rax], 0x67
je 0x180006bda
xor edx, edx
jmp 0x180006bdf
mov edx, 1
mov rcx, qword [r13 + 0x30]
cmp rcx, 0x10
jb 0x180006bee
mov rax, qword [rsi]
jmp 0x180006bf1
mov rax, rsi
xor r14d, r14d
cmp byte [rax], 0x67
sete r14b
test edx, edx
je 0x180006c68
cmp rcx, 0x10
jb 0x180006c0a
mov rdi, qword [rsi]
jmp 0x180006c0d
mov rdi, rsi
inc rdi
lea rcx, [r13 + 0x10]
call fcn.180006210
add rax, rbp
cmp rdi, rax
jae 0x180006c38
xor byte [rdi], 0x64
inc rdi
lea rcx, [r13 + 0x10]
call fcn.180006210
add rax, rbp
cmp rdi, rax
jb 0x180006c21
cmp qword [r13 + 0x30], 0x10
jb 0x180006c42
mov rsi, qword [rsi]
lea r8, [rbp - 1]
lea rdx, [rsi + 1]
mov rcx, r15
call fcn.18001d970
lea r15, [r15 + rbp - 1]
mov rcx, qword [rsp + 0x38]
lea rcx, [rcx + rbp - 1]
mov qword [rsp + 0x38], rcx
jmp 0x180006c6d
mov rcx, qword [rsp + 0x38]
test r14d, r14d
jne 0x180006ca2
test r12, r12
jne 0x180006c80
call fcn.18001d178
xor edx, edx
jmp 0x180006c84
mov rdx, qword [r12]
cmp r13, qword [rdx + 0x28]
jne 0x180006c8f
call fcn.18001d178
mov r13, qword [r13]
mov rdi, qword [rsp + 0x68]
mov rax, qword [rsp + 0x40]
jmp 0x180006b58
cmp ecx, 0xffffffff
jne 0x180006ccc
mov rdi, qword [rsp + 0x90]
mov rcx, qword [rdi]
test rcx, rcx
jne 0x180006cbf
xor r15d, r15d
mov ecx, r15d
jmp 0x180006cdb
movsxd rdx, dword [rcx - 0xc]
call fcn.18001cbbc
mov ecx, eax
jmp 0x180006cd4
mov rdi, qword [rsp + 0x90]
test ecx, ecx
js 0x180006cf5
xor r15d, r15d
mov rax, qword [rdi]
cmp ecx, dword [rax - 0xc]
jg 0x180006cf5
mov dword [rax - 0x10], ecx
movsxd rcx, ecx
mov rax, qword [rdi]
mov byte [rcx + rax], 0
mov r14d, r15d
jmp 0x180006d14
mov ecx, 0x80070057
call fcn.180001030
int3
mov r14d, 0xffffff9d
xor r15d, r15d
jmp 0x180006d14
mov r14d, 0xffffff9d
xor r15d, r15d
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.WS2_32.dll_closesocket]
jmp 0x180006d27
mov r14d, 0xfffffffe
mov rax, qword [rsp + 0x68]
mov rdi, qword [rax]
mov qword [rax], rax
mov rax, qword [rsp + 0x68]
mov qword [rax + 8], rax
mov qword [rsp + 0x70], r15
mov rcx, qword [rsp + 0x68]
cmp rdi, rcx
je 0x180006d88
nop word [rax + rax]
mov rbx, qword [rdi]
cmp qword [rdi + 0x30], 0x10
jb 0x180006d63
mov rcx, qword [rdi + 0x18]
call fcn.18000b8f0
mov qword [rdi + 0x30], select
mov qword [rdi + 0x28], r15
mov byte [rdi + 0x18], 0
mov rcx, rdi
call fcn.18000b8f0
mov rdi, rbx
mov rcx, qword [rsp + 0x68]
cmp rbx, rcx
jne 0x180006d50
call fcn.18000b8f0
mov qword [rsp + 0x68], r15
mov rcx, qword [rsp + 0x40]
call fcn.18000b8f0
nop
cmp qword [rsp + 0x150], 0x10
jb 0x180006db5
mov rcx, qword [rsp + 0x138]
call fcn.18000b8f0
mov eax, r14d
mov rcx, qword [rsp + 0x5300]
xor rcx, rsp
call fcn.18001d8a0
add rsp, 0x5318
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret