Function at 0x180021740
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x10], rdx
push rbp
push rdi
push r12
mov eax, 0x1050
call fcn.1801a2440
sub rsp, rax
xor eax, eax
mov r12, rdx
mov rdi, rcx
mov ebp, 1
mov dword [rsp + 0x1080], eax
cmp dword [rcx + 4], eax
je 0x180021804
mov rcx, qword [0x1801a5a98]
lea rdx, str.Script_Error____
call fcn.180006d30
mov rcx, rax
lea rdx, str.Internal_error__
call fcn.180006d30
mov rcx, rax
lea rdx, str.CATComponentScript::Execute_object_not_valid
call fcn.180006d30
mov rcx, rax
mov dl, 0xa
call fcn.180017b90
mov rcx, rax
lea rdx, [0x1801a7af8]
call fcn.180006d30
mov rcx, rax
mov dl, 0xa
call fcn.180017b90
mov rcx, rax
lea rdx, [0x1801a7c10]
call fcn.180006d30
mov rcx, rax
lea rdx, str._____n
call fcn.180006d30
mov rcx, rax
lea rdx, [0x180006f00]
call qword [0x1801a5ad0]
lea eax, [rbp - 2]
add rsp, 0x1050
pop r12
pop rdi
pop rbp
ret
cmp dword [rcx + 0xc], eax
jne 0x180021823
add rcx, 0x10
call fcn.180021c80
mov eax, 0xffffffff
add rsp, 0x1050
pop r12
pop rdi
pop rbp
ret
test rdx, rdx
jne 0x18002184c
lea rdx, [0x1801a7af8]
lea rcx, str.CATComponentScript::Execute_component_argument_not_valid
call fcn.180019d30
mov eax, 0xffffffff
add rsp, 0x1050
pop r12
pop rdi
pop rbp
ret
mov qword [rsp + 0x1088], rbx
mov ebx, eax
mov qword [rsp + 0x1048], rsi
mov qword [rsp + 0x1040], r13
mov qword [rsp + 0x1038], r14
mov qword [rsp + 0x1030], r15
mov r15d, eax
mov rax, qword [rcx + 0x128]
movsxd rcx, dword [rax + 4]
test byte [rcx + rdi + 0x138], 6
jne 0x18002194b
mov r8d, 0x1000
lea rdx, [rsp + 0x30]
lea rcx, [rdi + 0x128]
call qword [0x1801a59b8]
movsxd r12, dword [rdi + 0x130]
lea eax, [rbx - 1]
lea r14d, [r12 + r15]
cmp r14d, eax
jle 0x18002190b
nop dword [rax]
mov rsi, qword [rdi + 0x110]
movsxd rbp, ebx
add ebx, 0x1000
movsxd rcx, ebx
call fcn.1801a2110
mov qword [rdi + 0x110], rax
test rax, rax
je 0x180021bee
test rsi, rsi
je 0x180021903
mov r8, rbp
mov rdx, rsi
mov rcx, rax
call fcn.1801a3408
mov rcx, rsi
call fcn.1801a1d24
lea eax, [rbx - 1]
cmp r14d, eax
jg 0x1800218c0
movsxd rcx, r15d
lea rdx, [rsp + 0x30]
add rcx, qword [rdi + 0x110]
mov r8, r12
call fcn.1801a3408
mov rax, qword [rdi + 0x128]
mov r15d, r14d
movsxd rcx, dword [rax + 4]
test byte [rcx + rdi + 0x138], 6
je 0x180021892
mov r12, qword [rsp + 0x1078]
mov ebp, 1
lea rcx, [rdi + 0x128]
call fcn.180021fd0
cmp dword [rdi + 8], 0
mov rcx, qword [rdi + 0x110]
mov rdx, rcx
je 0x18002198e
cmp r15d, 1
jle 0x18002198e
mov edx, ebp
nop
movzx eax, byte [rcx]
add edx, 2
xor byte [rcx + 1], al
lea rcx, [rcx + 2]
not al
mov byte [rcx - 2], al
cmp edx, r15d
jl 0x180021970
mov rdx, qword [rdi + 0x110]
movsxd rax, r15d
mov byte [rax + rdx], 0
cmp dword [rdi + 8], 0
jne 0x180021aef
mov ecx, dword [rdi]
lea eax, [rcx - 6]
cmp eax, 4
jbe 0x1800219b2
cmp ecx, 0xc
jne 0x180021aef
mov rcx, qword [rdi + 0x118]
lea rdx, [0x1801a8734]
call fcn.1801a3426
test rax, rax
je 0x180021c70
mov rcx, qword [rdi + 0x118]
lea rdx, [0x1801a8734]
call fcn.1801a3426
mov rcx, qword [rdi + 0x118]
lea rdx, [0x1801a8734]
mov rbx, rax
call fcn.1801a3426
mov rcx, qword [rdi + 0x118]
lea rdx, [0x1801a8734]
mov rbp, rax
call fcn.1801a3426
mov edx, dword [rdi + 0x118]
xor r15d, r15d
mov ecx, dword [rdi + 0x120]
mov rsi, rax
mov r14, qword [rdi + 0x118]
sub ecx, ebx
sub esi, edx
mov dword [rsp + 0x1070], r15d
lea ebx, [rdx - 5]
add ebx, ecx
cmp qword [0x180271ec0], r15
jne 0x180021a8b
lea rcx, str.JS0GROUP
call qword [0x1801a58c0]
test rax, rax
je 0x180021a8b
cmp word [rax + 0x24], r15w
jne 0x180021a8b
cmp word [rax + 0x26], r15w
jne 0x180021a8b
movsxd rcx, dword [rax + 0x3c]
cmp dword [rcx + rax + 0xb0], r15d
je 0x180021a8b
cmp dword [rcx + rax + 0xb4], 0x1000
jb 0x180021a8b
lea rdx, [0x180271ec0]
lea ecx, [r15 + 4]
call sym.JS0GROUP.dll_private:_static_void___cdecl_CATLM::GetCATLM_int__struct_CATLM::CATLMServices____ptr64____ptr64_
lea rax, [rsp + 0x1070]
mov r9d, ebx
mov qword [rsp + 0x28], rax
lea r8, [rbp + 5]
lea rax, [rsp + 0x1080]
mov rcx, r14
mov qword [rsp + 0x20], rax
lea edx, [rsi + 5]
mov rax, qword [0x180271ec0]
call qword [rax + 0x238]
mov ebx, dword [rsp + 0x1070]
mov esi, eax
mov eax, dword [0x180270700]
cmp eax, 0xffffffff
jne 0x180021adf
call qword [0x1801a58c8]
mov dword [0x180270700], eax
cmp ebx, eax
je 0x180021ae6
call r15
test esi, esi
mov ebp, r15d
setne bpl
mov rbx, qword [rdi + 0x110]
mov edx, 0xa
mov rcx, rbx
call fcn.1801a342c
mov rsi, rax
test rax, rax
je 0x180021b9f
nop
lea rdx, [rsp + 0x30]
mov byte [rsi], 0
sub rdx, rbx
nop dword [rax + rax]
movzx ecx, byte [rbx]
mov byte [rbx + rdx], cl
lea rbx, [rbx + 1]
test cl, cl
jne 0x180021b20
mov byte [rsi], 0xa
cmp dword [rdi + 8], 0
jne 0x180021b4c
cmp byte [rsp + 0x30], 0x45
jne 0x180021b4c
cmp byte [rsp + 0x31], 0x4f
jne 0x180021b4c
cmp byte [rsp + 0x32], 0x46
je 0x180021b9f
mov r8d, dword [rdi + 0xc]
lea rcx, [rsp + 0x30]
mov edx, dword [rdi]
call fcn.180022de0
test rax, rax
je 0x180021c70
cmp dword [rax + 8], 0
jne 0x180021c70
mov r8, qword [rax]
mov rdx, r12
mov rcx, rax
call qword [r8 + 8]
test eax, eax
jne 0x180021c70
lea rbx, [rsi + 1]
mov rcx, rbx
lea edx, [rax + 0xa]
call fcn.1801a342c
mov rsi, rax
test rax, rax
jne 0x180021b10
test ebp, ebp
jne 0x180021bb8
mov edx, dword [sym.JS0GROUP.dll_int_const_CATComponentLicense_NIL]
mov rcx, r12
or edx, dword [rsp + 0x1080]
call sym.JS0GROUP.dll_public:_int___cdecl_CATComponentPackaging::SetLicense_int____ptr64
xor eax, eax
mov r14, qword [rsp + 0x1038]
mov r13, qword [rsp + 0x1040]
mov rsi, qword [rsp + 0x1048]
mov rbx, qword [rsp + 0x1088]
mov r15, qword [rsp + 0x1030]
add rsp, 0x1050
pop r12
pop rdi
pop rbp
ret
mov rcx, qword [0x1801a5a98]
lea rdx, str.Script_Error____
call fcn.180006d30
mov rcx, rax
lea rdx, str.Internal_error__
call fcn.180006d30
mov rcx, rax
lea rdx, str.CATComponentScript::Execute_allocation_failed
call fcn.180006d30
mov rcx, rax
mov dl, 0xa
call fcn.180017b90
mov rcx, rax
lea rdx, [0x1801a7af8]
call fcn.180006d30
mov rcx, rax
mov dl, 0xa
call fcn.180017b90
mov rcx, rax
lea rdx, [0x1801a7c10]
call fcn.180006d30
mov rcx, rax
lea rdx, str._____n
call fcn.180006d30
mov rcx, rax
lea rdx, [0x180006f00]
call qword [0x1801a5ad0]
mov eax, 0xffffffff
jmp 0x180021bba