Function at 0x18021c070
Capabilities:
Encode data using xor

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x30]
mov rsi, rcx
mov eax, 0x20
call fcn.18045a590
sub rsp, rax
mov rbx, rsp
mov eax, 0x20
call fcn.18045a590
sub rsp, rax
mov rdx, rsp
mov r13, rsi
add r13, 0x41
movzx eax, byte [r13]
test eax, eax
je 0x18021c0ca
jmp 0x18021c0ba
sub eax, 1
je 0x18021c402
jmp 0x18021c0c5
jmp 0x18021c2eb
mov rax, qword [rsi + 0x38]
mov r14b, byte [rsi + 0x40]
mov r8, qword [rsi]
mov rdi, qword [rsi + 8]
xor r12d, r12d
cmp rdi, 0
jl 0x18021c18e
mov qword [rbp - 0x28], rdx
mov qword [rbp - 0x30], rax
cmp rdi, 0
sete al
mov r15d, 1
test al, 1
mov qword [rbp], r8
jne 0x18021c1fb
jmp 0x18021c109
mov al, byte [0x1805297c8]
sub rsp, 0x20
mov rcx, rdi
mov edx, 1
call fcn.1802cbf10
add rsp, 0x20
mov r15, rax
cmp r15, 0
sete al
mov r12d, 1
test al, 1
mov r8, qword [rbp]
jne 0x18021c18e
jmp 0x18021c13e
mov eax, dword [0x18051c708]
xor edx, edx
div dword [0x18051c70c]
add eax, 0x12468dff
imul eax, eax, 0xe651938d
imul eax, eax, 0xd3d2e0c
cmp eax, 0x39b3c16
jb 0x18021c455
jmp 0x18021c16a
mov eax, dword [0x18051c710]
and eax, dword [0x18051c714]
xor eax, 0xfd26ad2f
add eax, 0xe2d2ab16
or eax, 0xaee71db5
cmp eax, 0x1db5051d
je 0x18021c16a
jmp 0x18021c1fb
mov eax, dword [0x18051c718]
imul eax, dword [0x18051c71c]
mov ecx, 0x862a50ae
xor edx, edx
div ecx
add eax, 0xc38130a8
xor eax, 0xd2a88dcc
cmp eax, 0xee5184b2
ja 0x18021c466
mov eax, dword [0x18051c720]
xor eax, dword [0x18051c724]
mov ecx, 0x5305ea2c
xor edx, edx
div ecx
imul eax, eax, 0x61070440
imul esi, eax, 0xe615f818
sub rsp, 0x20
mov rcx, r12
mov rdx, rdi
call fcn.180407090
add rsp, 0x20
cmp esi, 0x45c4251e
jae 0x18021c466
ud2
mov eax, dword [0x18051c728]
imul eax, dword [0x18051c72c]
and eax, 0x1b7e02df
add eax, 0x844465ff
or eax, 0x9d27736d
cmp eax, 0xd16a5ffc
je 0x18021c48a
mov eax, dword [0x18051c730]
xor edx, edx
div dword [0x18051c734]
xor eax, 0x6b707196
add eax, 0x15e436ad
imul r12d, eax, 0x6dbbde67
sub rsp, 0x20
mov rcx, r15
mov rdx, r8
mov r8, rdi
call fcn.180468b10
add rsp, 0x20
mov byte [rbp - 8], r14b
mov byte [rbp - 7], 0x63
mov qword [rbp - 0x20], rdi
mov qword [rbp - 0x18], r15
mov qword [rbp - 0x10], rdi
lea rdx, [rbp - 0x20]
sub rsp, 0x20
mov rcx, rbx
call fcn.18027b040
mov r8, qword [rbp]
add rsp, 0x20
cmp qword [rbx], 8
sete al
cmp r12d, 0xef4f1662
je 0x18021c48a
test al, 1
jne 0x18021c2a1
jmp 0x18021c29d
ud2
mov rax, qword [rbx + 8]
mov rcx, qword [rbp - 0x28]
mov qword [rcx], rax
mov rax, qword [rbx + 0x10]
mov qword [rcx + 8], rax
mov rax, qword [rbx + 0x18]
mov qword [rcx + 0x10], rax
mov rax, qword [rcx]
mov qword [rsi + 0x10], rax
mov rax, qword [rcx + 8]
mov qword [rsi + 0x18], rax
mov rax, qword [rcx + 0x10]
mov qword [rsi + 0x20], rax
mov rax, qword [rbp - 0x30]
mov qword [rsi + 0x28], rax
mov byte [rsi + 0x30], 0
mov rax, rsi
add rax, 0x31
mov byte [rax], 2
jmp 0x18021c347
mov eax, dword [0x18051c738]
imul eax, dword [0x18051c73c]
mov ecx, 0x177f334a
xor edx, edx
div ecx
mov ecx, 0xd65617b8
xor edx, edx
div ecx
mov ecx, 0x5d68173f
xor edx, edx
div ecx
cmp eax, 0xb1e509cc
ja 0x18021c4dd
mov eax, dword [0x18051c740]
sub eax, dword [0x18051c744]
imul eax, eax, 0x85ba3a89
or eax, 0x16f4f749
xor eax, 0xcbd8ae8f
cmp eax, 0x901c8a1f
jbe 0x18021c4dd
jmp 0x18021c347
mov rdi, rsi
add rdi, 0x10
sub rsp, 0x20
mov rcx, rdi
call fcn.180206770
add rsp, 0x20
mov rax, rsi
add rax, 0x30
cmp byte [rax], 0
jne 0x18021c394
mov rdx, qword [rdi]
cmp rdx, 0
sete al
test al, 1
jne 0x18021c394
jmp 0x18021c37a
add rsi, 0x18
mov rcx, qword [rsi]
sub rsp, 0x20
mov r8d, 1
call fcn.1802cbf20
add rsp, 0x20
mov eax, dword [0x18051c748]
or eax, dword [0x18051c74c]
mov ecx, 0xfa9f97a
xor edx, edx
div ecx
sub eax, 0x66426220
xor eax, 0x9c7209e9
cmp eax, 0x902bdf9e
ja 0x18021c4ee
jmp 0x18021c3c0
mov eax, dword [0x18051c750]
sub eax, dword [0x18051c754]
mov ecx, 0xd21c85dd
xor edx, edx
div ecx
sub eax, 0xfb745624
mov ecx, 0xff45e04
xor edx, edx
div ecx
mov byte [r13], 1
cmp eax, 0x9671380a
je 0x18021c3c0
jmp 0x18021c3f1
lea rsp, [rbp + 8]
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop rsi
pop r15
pop rbp
ret
ud2
invalid
invalid
or dl, byte [rdx + 0x69f6d39a]
push rsi
out dx, al
sub eax, 0x48c2b613
sub esp, 0x20
mov rcx, r15
mov rdx, r8
mov r8, rdi
call fcn.180468b10
add rsp, 0x20
mov byte [rbp - 8], r14b
mov byte [rbp - 7], 0x63
mov qword [rbp - 0x20], rdi
mov qword [rbp - 0x18], r15
mov qword [rbp - 0x10], rdi
lea rdx, [rbp - 0x20]
sub rsp, 0x20
mov rcx, rbx
call fcn.18027b040
mov r8, qword [rbp]
add rsp, 0x20
jmp 0x18021c222
mov esp, 0xc14c19ac
mov bl, 0x6c
in al, dx
mov al, 0x8d
test eax, 0xfe30e9a9
invalid
xchg ebp, eax
in eax, 0xe9
movabs dword [0xd823013b384054b], eax
mov byte [r13], 1
jmp 0x18021c3be