Function at 0x18021c520
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x80
mov rsi, rcx
mov r15, rsi
add r15, 0x41
movzx eax, byte [rsi + 0x41]
test eax, eax
je 0x18021c555
jmp 0x18021c545
sub eax, 1
je 0x18021c799
jmp 0x18021c550
jmp 0x18021c693
mov r12, qword [rsi + 0x38]
mov rax, rsi
add rax, 0x40
mov bpl, byte [rax]
mov rbx, qword [rsi]
mov rdi, qword [rsi + 8]
xor ecx, ecx
cmp rdi, 0
jl case.0x180207cac.183
cmp rdi, 0
sete al
xchg esp, eax
rol byte [rcx - 0x42], 1
add dword [rax], eax
add byte [rax], al
test al, 1
jne 0x18021c5b0
jmp 0x18021c585
mov al, byte [0x1805297c8]
mov rcx, rdi
mov edx, 1
call fcn.1802cbf10
mov r14, rax
mov ecx, 1
cmp r14, 0
cmp esi, 0
je case.0x180207cac.183
jmp 0x18021c5b0
mov rdx, rdi
call fcn.180407090
mov rcx, r14
mov rdx, rbx
mov r8, rdi
call fcn.180468b10
mov byte [rsp + 0x58], bpl
mov byte [rsp + 0x59], 0
mov qword [rsp + 0x40], rdi
mov qword [rsp + 0x48], r14
mov qword [rsp + 0x50], rdi
and al, 0x50
lea rcx, [rsp + 0x60]
lea rdx, [rsp + 0x40]
call fcn.18027b040
cmp qword [rsp + 0x60], 8
je 0x18021c5f2
invalid
ud2
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x28]
mov qword [rsi + 0x10], rax
mov rax, qword [rsp + 0x30]
xor byte [rax - 0x77], cl
invalid
invalid
mov rax, qword [rsp + 0x38]
mov qword [rsi + 0x20], rax
mov qword [rsi + 0x28], r12
mov rax, rsi
add rax, 0x30
xor byte [rbx + 0x30012c0d], cl
invalid
add ecx, dword [0x18051c76c]
imul ecx, ecx, 0x79297f2d
add ecx, 0xfc637e1a
sub ecx, 0x4e0f4df7
cmp ecx, 0xa096f8d3
clc
xchg esi, eax
invalid
jae 0x18021c7e3
jmp 0x18021c662
mov ecx, dword [0x18051c770]
sub ecx, dword [0x18051c774]
and ecx, 0x85518a8f
sub ecx, 0x5fc4910b
xor ecx, 0xd39ac210
mov byte [rax], 0
cmp ecx, 0xc3d49e9
je 0x18021c662
jmp 0x18021c68d
mov byte [rsi + 0x31], 2
jmp 0x18021c695
jmp 0x18021c695
mov rdi, rsi
add rdi, 0x10
adc byte [rax - 0x77], cl
stc
call fcn.180206770
mov rax, rsi
mov eax, esi
add rax, 0x30
cmp byte [rax], 0
cmp byte [rax], al
jne 0x18021c735
mov r8, qword [rdi]
cmp r8, 0
sete al
xchg esp, eax
invalid
test al, 1
jne 0x18021c735
jmp 0x18021c6c4
mov eax, dword [0x18051c778]
xor eax, dword [0x18051c77c]
mov ecx, 0xf494ab11
xor edx, edx
div ecx
and eax, 0x8634e706
out 0x34, eax
invalid
imul eax, eax, 0x3519f8e7
cmp eax, 0x427ab326
mov bl, 0x7a
invalid
jae 0x18021c7f7
mov eax, dword [0x18051c780]
or eax, dword [0x18051c784]
or eax, 0x11309f6f
mov ecx, 0xdee3ad28
xor edx, edx
div ecx
add eax, 0x8b0bf9ad
stc
invalid
mov ecx, dword [rax - 0x77]
mov ecx, esi
add rcx, 0x18
cmp eax, 0xa127e2cc
ja 0x18021c7f7
xchg edi, edx
add byte [rax], al
invalid
jmp 0x18021c722
mov rcx, qword [rcx]
mov rdx, r8
mov r8d, 1
call fcn.1802cbf20
in eax, dx
invalid
or al, byte [rax]
jmp 0x18021c735
mov byte [r15], 1
mov eax, dword [0x18051c788]
xor eax, dword [0x18051c78c]
or eax, 0xd7888723
add eax, 0x1a2a47d4
add eax, 0x11881b19
cmp eax, 0xc0e3ec88
jae 0x18021c808
jmp 0x18021c761
mov eax, dword [0x18051c790]
xor eax, dword [0x18051c794]
xor eax, 0xa56404ed
xor eax, 0x2bac3f13
mov ecx, 0xce341b33
xor edx, edx
div ecx
cmp eax, 0x8578e014
je 0x18021c761
add rsp, 0x80
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
ud2
mov eax, dword [0x18051c7a0]
and eax, dword [0x18051c7a4]
or eax, 0xecc72ffc
or eax, 0xb75d8a4b
sub eax, 0x3b5e576b
cmp eax, 0x3c8d39e3
jbe 0x18021c7bf
ud2
movsd dword [rdi], dword [rsi]
mov edi, ss
jb 0x18021c7d0
int 0xca
cmc
push rax
mov byte [rax], 0
jmp 0x18021c660
outsd dx, dword [rsi]
cmc
cmc
invalid
pop rbp
imul dword [rbx - 0x150402]
mov ah, 0xe9
invalid