Function at 0x6699a0
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x128
call fcn.00693bc0
sub rsp, rax
mov rax, qword [0x0072f1d0]
mov qword [rsp + 0xd0], rax
mov qword [rsp + 0x120], rbx
mov rbx, qword [rsp + 0x150]
mov qword [rsp + 0x118], rbp
mov qword [rsp + 0x110], rsi
mov qword [rsp + 0x108], rdi
mov rdi, rcx
lea rcx, [rsp + 0x58]
mov qword [rsp + 0xf0], r14
mov rsi, r9
mov rbp, r8
mov qword [rsp + 0x40], r8
mov qword [rsp + 0x48], rdx
xor r14d, r14d
call fcn.005d2780
test rsi, rsi
cmove rsi, rbp
mov rcx, rbp
mov qword [rsp + 0x50], rsi
call fcn.005b4490
test eax, eax
mov ebp, eax
mov dword [rsp + 0x30], eax
js 0x669d78
mov esi, dword [rsp + 0x158]
cmp esi, 0xffffffff
jne 0x669a9f
mov esi, eax
mov rcx, qword [rdi + 0x18]
mov qword [rsp + 0xf8], r13
mov qword [rsp + 0xe8], r15
call fcn.005c6580
mov rcx, rdi
lea r13d, [rax - 1]
and r13d, 7
call fcn.005ae7a0
mov r15d, 0xff
mov edx, r15d
mov ecx, r13d
mov edi, eax
shl edx, cl
test byte [rbx], dl
je 0x669ad2
lea r9, [0x0076d9f0]
lea edx, [r15 - 0x6a]
lea r8d, [r15 - 0x7a]
mov ecx, 4
mov dword [rsp + 0x20], reloc.WS2_32.dll_WSACleanup
call fcn.005ad900
jmp 0x669d68
cmp esi, 0xfffffffe
jne 0x669aa6
jmp 0x669a3c
cmp esi, 0xfffffffe
jge 0x669a3c
mov edx, __WSAFDIsSet
lea r9, [0x0076d9d8]
mov ecx, 4
lea r8d, [rdx - 0xd]
mov dword [rsp + 0x20], WSAGetLastError
call fcn.005ad900
jmp 0x669d78
test r13d, r13d
jne 0x669adc
inc rbx
dec edi
lea eax, [rbp + rsi + 2]
cmp edi, eax
jge 0x669b0b
mov edx, __WSAFDIsSet
lea r9, [0x0076da08]
mov ecx, 4
lea r8d, [rdx - 0x28]
mov dword [rsp + 0x20], 0x7e
call fcn.005ad900
jmp 0x669d68
movsxd rax, edi
cmp byte [rax + rbx - 1], 0xbc
je 0x669b3c
mov edx, __WSAFDIsSet
lea r9, [0x0076da20]
mov ecx, 4
lea r8d, [rdx - 0xf]
mov dword [rsp + 0x20], 0x83
call fcn.005ad900
jmp 0x669d68
sub edi, ebp
lea rdx, [0x0076da38]
mov r8d, 0x88
dec edi
mov qword [rsp + 0x100], r12
movsxd rbp, edi
mov ecx, edi
lea rax, [rbx + rbp]
mov qword [rsp + 0x38], rax
call fcn.005bde70
test rax, rax
mov r12, rax
jne 0x669b95
lea r9, [0x0076da50]
lea ecx, [rax + 4]
lea r8d, [rax + 0x41]
mov edx, __WSAFDIsSet
mov dword [rsp + 0x20], Ordinal_143
call fcn.005ad900
jmp 0x669d53
mov rax, qword [rsp + 0x50]
mov r9d, dword [rsp + 0x30]
mov r8, qword [rsp + 0x38]
mov edx, edi
mov rcx, r12
mov qword [rsp + 0x20], rax
call fcn.00649bc0
test eax, eax
js 0x669d53
test edi, edi
jle 0x669bdf
mov rcx, r12
sub rbx, r12
nop
nop
nop
movzx eax, byte [rbx + rcx]
inc rcx
xor byte [rcx - 1], al
dec rbp
jne 0x669bd0
test r13d, r13d
je 0x669bf3
mov ecx, 8
sub ecx, r13d
sar r15d, cl
and byte [r12], r15b
mov ebx, r14d
cmp byte [r12], bl
jne 0x669c10
lea ecx, [rdi - 1]
mov rax, r12
cmp ebx, ecx
jge 0x669c10
inc rax
inc ebx
cmp byte [rax], r14b
je 0x669c02
movsxd rax, ebx
inc ebx
cmp byte [rax + r12], 1
je 0x669c43
mov edx, __WSAFDIsSet
lea r9, [0x0076da68]
mov ecx, 4
lea r8d, [rdx - 0xe]
mov dword [rsp + 0x20], reloc.WS2_32.dll___WSAFDIsSet
call fcn.005ad900
jmp 0x669d53
test esi, esi
js 0x669c76
mov eax, edi
sub eax, ebx
cmp eax, esi
je 0x669c76
mov edx, __WSAFDIsSet
lea r9, [0x0076da80]
mov ecx, 4
lea r8d, [rdx - 0xd]
mov dword [rsp + 0x20], 0x9c
call fcn.005ad900
jmp 0x669d53
mov rdx, qword [rsp + 0x40]
lea rcx, [rsp + 0x58]
xor r8d, r8d
call fcn.005d27f0
test eax, eax
je 0x669d53
lea rdx, [0x006d6130]
lea rcx, [rsp + 0x58]
mov r8d, 8
call fcn.005d2a60
test eax, eax
je 0x669d53
movsxd rsi, dword [rsp + 0x30]
mov rdx, qword [rsp + 0x48]
lea rcx, [rsp + 0x58]
mov r8, rsi
call fcn.005d2a60
test eax, eax
je 0x669d53
sub edi, ebx
je 0x669ce9
movsxd rdx, ebx
lea rcx, [rsp + 0x58]
movsxd r8, edi
add rdx, r12
call fcn.005d2a60
test eax, eax
je 0x669d53
lea rdx, [rsp + 0x90]
lea rcx, [rsp + 0x58]
xor r8d, r8d
call fcn.005d2a80
test eax, eax
je 0x669d53
mov rdx, qword [rsp + 0x38]
lea rcx, [rsp + 0x90]
mov r9d, 1
mov r8, rsi
mov dword [rsp + 0x20], 1
call sub.msvcrt.dll_memcmp
test eax, eax
je 0x669d4d
mov edx, __WSAFDIsSet
lea r9, [0x0076da98]
mov ecx, 4
lea r8d, [rdx - 0x2d]
mov dword [rsp + 0x20], 0xac
call fcn.005ad900
jmp 0x669d53
mov r14d, 1
test r12, r12
je 0x669d60
mov rcx, r12
call fcn.005be2c0
mov r12, qword [rsp + 0x100]
mov r13, qword [rsp + 0xf8]
mov r15, qword [rsp + 0xe8]
lea rcx, [rsp + 0x58]
call fcn.005d2b30
mov rdi, qword [rsp + 0x108]
mov rsi, qword [rsp + 0x110]
mov rbp, qword [rsp + 0x118]
mov rbx, qword [rsp + 0x120]
mov eax, r14d
mov r14, qword [rsp + 0xf0]
mov rcx, qword [rsp + 0xd0]
call fcn.00693b90
add rsp, 0x128
ret