Function at 0x20185680
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x68
mov qword [rsp + 0x28], r9
mov qword [rsp + 0x38], r8
mov r8, rdx
mov r14, rcx
mov ebx, dword [rsp + 0xf0]
mov rsi, qword [rsp + 0xe8]
mov r11, qword [rsp + 0xe0]
mov rdx, qword [rsp + 0xd0]
mov rax, qword [0x205da420]
xor rax, rsp
mov qword [rsp + 0x60], rax
mov r15d, ebx
and r15d, 0x1f
cmp r15d, 9
mov qword [rsp + 0x30], r8
jae 0x2018573f
cmp r15d, 2
jbe 0x201857a2
cmp r15d, 5
jbe 0x20185803
cmp r15d, 6
je 0x201858c2
cmp r15d, 8
je 0x2018600b
mov rax, qword [rsp + 0x38]
mov qword [rsi], rax
mov rax, qword [rsp + 0xd8]
mov qword [rax], r11
cmp r11, qword [rsp + 0x28]
je 0x20185ef9
mov rcx, qword [rsi]
cmp rcx, r14
je 0x20185ef9
mov rdi, r11
mov rax, qword [rsp + 0x28]
jmp 0x20185cca
cmp r15d, 0xc
jbe 0x201857df
cmp r15d, 0xe
jbe 0x20185822
cmp r15d, 0xf
je 0x2018600b
cmp r15d, 0x10
ja 0x201858ec
mov rax, qword [rsp + 0xd8]
mov qword [rsi], rax
mov rax, qword [rsp + 0x28]
mov qword [r8], rax
xor ebp, ebp
cmp rax, r11
je 0x20185933
mov rcx, qword [rsi]
cmp rcx, rdx
je 0x20185933
mov rdi, r11
mov rax, rdx
mov r8d, r14d
xor r9d, r9d
jmp 0x20185ce2
test r15d, r15d
je 0x2018588a
mov r13d, 1
cmp r15d, 2
jne 0x201859a1
mov qword [rsp + 0x58], r14
mov qword [rsp + 0x50], r14
mov rax, qword [rsp + 0x38]
mov qword [rsp + 0x48], rax
xor edx, edx
cmp rdx, r11
jb 0x201859e5
jmp 0x2018594c
cmp r15d, 0xb
jae 0x2018587b
cmp r15d, 9
jne 0x2018589d
mov rcx, rsi
call fcn.20423890
mov r13, rsi
jmp 0x201859a1
cmp r15d, 3
je 0x201858d4
mov r13d, 6
cmp r15d, 5
je 0x2018600b
jmp 0x201859a1
cmp r15d, 0xd
jne 0x201858b2
mov rdi, r11
mov rax, qword [rsp + 0xd8]
mov r8, qword [rax + 8]
test r8, r8
sete bpl
movzx eax, byte [0x20587e82]
cmp al, 0xe0
jne 0x201858fa
test ebx, 0x200
jne 0x20185d99
lea rcx, [rsp + 0x58]
xor r10d, r10d
mov r9, qword [rsp + 0x38]
mov r11, rdi
test bl, 0x20
jne 0x20185a21
jmp 0x20185a02
mov rdi, r11
cmp r15d, 0xc
je 0x20185ff3
ud2
mov rdi, r11
cmp dword [rsp + 0x28], 0
jne 0x20186056
jmp 0x20186079
xor r13d, r13d
mov rax, qword [rsp + 0x28]
cmp dword [rax + 0x14], 1
sete r13b
jmp 0x201859a1
mov rcx, rdx
call fcn.20423908
xor r13d, r13d
jmp 0x201859a1
mov rcx, qword [rsp + 0x28]
call fcn.20422320
xor r13d, r13d
jmp 0x201859a1
mov rdi, r11
call fcn.20183810
mov r13d, eax
movzx r12d, byte [0x205ec328]
jmp 0x20185a73
mov qword [r14], r8
mov r13d, 3
jmp 0x201859a1
test bl, bl
js 0x20186079
mov cl, 0x1a
mov al, 0x73
lock cmpxchg byte [0x20587e82], cl
je 0x20185944
test ebx, 0x800
je 0x20185f20
cmp al, 0xe0
je 0x20185936
mov r12d, 0xd
mov rax, rdi
test bl, 0x40
jne 0x20185904
jmp 0x20185ba3
xor r8d, r8d
test ebx, 0x10000
jne 0x20185d99
jmp 0x201859c2
mov rcx, r8
jmp 0x2018606a
mov rdi, r11
mov qword [rsp + 0x40], rdx
mov rax, rdx
mov r12, qword [rsp + 0x38]
mov rsi, qword [rsp + 0xe8]
test ebx, 0x800
je 0x2018599c
mov r8, qword [rsp + 0x30]
mov rcx, qword [r8]
lea rdx, [rcx + 2]
mov qword [r8], rdx
mov word [rcx], r12w
mov rcx, qword [rsi]
cmp rcx, qword [rsp + 0xd0]
je 0x201859c2
mov rdx, qword [rsp + 0x30]
cmp qword [rdx], rdi
jne 0x20185d5b
jmp 0x201859c2
mov r13, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.20421ce0
mov rax, r13
add rsp, 0x68
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov rax, qword [rsp + 0xd8]
jmp 0x20185efe
test ebx, 0x400
mov rdx, qword [rsp + 0x40]
je 0x201859a1
cmp rdx, r11
jae 0x2018594c
lea rcx, [rsp + 0x58]
xor r10d, r10d
mov r9, qword [rsp + 0x38]
mov rax, r11
mov rsi, qword [rsp + 0xe8]
test bl, 0x20
jne 0x20185a21
mov rax, qword [rsp + 0x48]
movzx eax, byte [rax + rdx]
mov rcx, qword [rsp + 0x50]
mov byte [rcx + rdx], al
inc rdx
cmp rdx, r11
jae 0x2018594c
jmp 0x201859e5
mov qword [rsp + 0x40], rdx
mov rdi, r11
cmp r10b, 0xf7
ja 0x20185a50
and r9d, 7
mov r10d, 3
mov bpl, 1
mov r12d, r9d
test ebx, 0x1000
jne 0x20185fd8
jmp 0x2018606a
and r9d, 3
cmp r10b, 0xfc
mov r10d, 5
sbb r10d, 0
jmp 0x20185fd5
mov r13d, r12d
test bl, 0x40
je 0x20185e01
mov rcx, qword [0x20588470]
mov eax, dword [0x20588468]
lea edx, [r12 + r13]
add eax, edx
add eax, 0xffff50f5
cdqe
add rax, rcx
mov rcx, qword [rsp + 0x30]
call qword [case.0x200c66ec.0]
mov rcx, qword [0x20588480]
mov esi, dword [0x20588460]
or esi, r12d
lea eax, [rsi + r13]
add eax, 0xffff50f5
cdqe
add rax, rcx
mov ecx, r14d
mov edx, 0xc655adfb
call qword [case.0x200c66ec.0]
test al, 1
jne 0x20185f20
lea rcx, [rsp + 0x58]
test ebx, 0x200
jne 0x20185b08
add esi, r13d
mov r8d, 0xaf0b
sub r8d, esi
xor r10d, r10d
mov r12d, r14d
xor r11d, r11d
mov rax, qword [rsp + 0xd0]
xor ebp, ebp
mov rsi, qword [rsp + 0xe8]
jmp 0x20185e01
mov r10d, r15d
mov r11, rdi
mov rax, rdi
mov rsi, qword [rsp + 0xe8]
test bl, bl
jns 0x20186021
lea rdx, [rcx + 1]
mov qword [rsi], rdx
movzx r8d, byte [rcx + 1]
mov r13d, 2
cmp r8b, 0xbf
jg 0x201859a1
shl r12d, 6
and r8d, 0x3f
or r12d, r8d
lea rdx, [rcx + 2]
mov qword [rsi], rdx
cmp r10d, 2
jb 0x20185b96
movzx edx, byte [rdx]
cmp dl, 0xbf
jg 0x201859cf
shl r12d, 6
and edx, 0x3f
or edx, r12d
lea r9, [rcx + 3]
mov qword [rsi], r9
cmp r10d, 2
jne 0x20185bb9
mov rdi, r11
test ebx, 0x200000
jne 0x20185c28
mov r12d, edx
cmp byte [r14], 0
jne 0x20185e7b
jmp 0x20185ba3
mov rdi, r11
cmp byte [r14], 0
jne 0x20185e7b
mov byte [r14], 1
cmp r12d, 0x10ffff
jbe 0x20185964
jmp 0x20185e90
movzx r9d, byte [r9]
cmp r9b, 0xbf
jg 0x201859a1
test ebx, 0x80000
jne 0x20185c3e
shl edx, 6
and r9d, 0x3f
or r9d, edx
lea rdx, [rcx + 4]
mov qword [rsi], rdx
cmp r10d, 4
jb 0x20185c56
movzx esi, byte [rdx]
cmp sil, 0xbf
jg 0x201859a1
mov rdi, r11
shl r9d, 6
and esi, 0x3f
or esi, r9d
lea r11, [rcx + 5]
mov rdx, qword [rsp + 0xe8]
mov qword [rdx], r11
cmp r10d, 4
jne 0x20185c6b
mov rcx, rax
mov rax, qword [rsp + 0xd0]
mov r8d, eax
jmp 0x20185ed4
mov r8d, 2
xor r10d, r10d
mov rax, qword [rsp + 0xd0]
jmp 0x20185d3b
mov rdi, r11
xor ebp, ebp
xor r8d, r8d
xor eax, eax
xor r11d, r11d
xor r12d, r12d
xor r10d, r10d
jmp 0x20185df0
mov rdi, r11
mov r12d, r9d
cmp byte [r14], 0
jne 0x20185e7b
jmp 0x20185ba3
mov bpl, 1
xor r9d, r9d
jmp 0x20185d06
add r12d, r12d
lea ecx, [r12 + r12*2]
add cl, 0xf4
shr r8d, cl
and r8b, 0x3f
or r8b, 0x80
mov r9, qword [rsp + 0xd8]
mov rcx, qword [r9]
lea rdx, [rcx + 1]
mov qword [r9], rdx
mov byte [rcx], r8b
mov rsi, qword [rsp + 0xe8]
mov rcx, qword [rsi]
cmp rcx, r14
je 0x20185ef9
mov rdx, qword [rsp + 0xd8]
mov r8, qword [rsp + 0x28]
cmp qword [rdx], r8
je 0x20185ef9
movzx r8d, word [rcx]
lea rcx, [rsp + 0x50]
mov bpl, 1
mov r10d, r8d
mov r9d, r8d
cmp r8d, 0x7f
jbe 0x20185d3b
test ebx, 0x100
jne 0x20185d53
movzx r10d, r9w
lea rcx, [rsp + 0x48]
cmp r10d, 0x800
jae 0x20185dd3
mov r11, rcx
mov esi, r14d
test ebx, 0x100000
jne 0x20185dad
movzx r9d, byte [r11]
cmp r9b, 0xbf
jg 0x20185e90
shl esi, 6
and r9d, 0x3f
or r9d, esi
add rcx, 6
mov rsi, qword [rsp + 0xe8]
jmp 0x20185e6b
xor ebp, ebp
test ebx, 0x4000
jne 0x20185dcb
lea r8, [rsp + 0x58]
jmp 0x20185f2a
mov rax, qword [rsp + 0xd0]
movzx r10d, byte [rcx]
movzx r9d, r10b
test r9b, r9b
jns 0x20185e68
xor ebp, ebp
mov r12d, r9d
mov r8, rcx
test bx, bx
jns 0x20185fa5
mov al, 0xe0
xchg byte [0x20587e82], al
mov r13, qword [rsp + 0xd0]
test ebx, 0x400
jne 0x20185a9b
lea r13, [0x20587e70]
test bpl, 1
cmove r13, r8
jmp 0x201859a1
shr r9d, 6
or r9b, 0xc0
mov r12d, 1
xor r11d, r11d
mov r10d, r9d
mov rsi, qword [rsp + 0xe8]
jmp 0x20185df0
xor r11d, r11d
xor r12d, r12d
jmp 0x20185df0
test ebx, 0x40000
je 0x2018600b
shr r10d, 0xc
or r10b, 0xe0
mov r12d, 2
mov r11b, 1
mov rcx, qword [rsp + 0x30]
cmp byte [rcx], 0
jne 0x20185a67
mov byte [rcx], 1
mov rcx, rax
mov r9, qword [rsp + 0xd8]
sub rcx, qword [r9]
lea r9d, [r12 + 1]
cmp rcx, r9
jl 0x20185ef9
test bl, 0x20
jne 0x20185f20
add qword [rsi], 2
mov r13, qword [rsp + 0xd8]
mov rcx, qword [r13]
lea rsi, [rcx + 1]
mov qword [r13], rsi
mov byte [rcx], r10b
test bpl, 1
je 0x20185ca0
test ebx, 0x2000
jne 0x20185e9b
lea rcx, [rsp + 0x58]
mov rax, qword [rsp + 0xd0]
mov rsi, qword [rsp + 0xe8]
inc rcx
mov qword [rsi], rcx
mov r12d, r9d
cmp byte [r14], 0
je 0x20185ba3
test ebx, 0x400000
jne 0x20185ef9
cmp r12d, 0x10ffff
jbe 0x20185964
mov r13d, 2
jmp 0x201859a1
lea ecx, [r12 + r12]
lea ecx, [rcx + rcx*2]
add cl, 0xfa
mov edx, r8d
shr edx, cl
and dl, 0x3f
or dl, 0x80
mov r10, qword [rsp + 0xd8]
mov rcx, qword [r10]
lea r9, [rcx + 1]
mov qword [r10], r9
mov byte [rcx], dl
xor esi, esi
mov ecx, 0
test r11b, r11b
je 0x20185ca0
test ebx, 0x20000
jne 0x20185c76
mov rax, rcx
mov r12d, esi
mov rsi, qword [rsp + 0xe8]
cmp byte [r14], 0
jne 0x20185e7b
jmp 0x20185ba3
mov rax, qword [rsp + 0x38]
cmp qword [rsi], rax
sete al
or al, byte [0x205ec328]
movzx eax, al
and eax, 1
movzx r13d, byte [0x205ec0c9]
or r13, rax
jmp 0x201859a1
mov r13, qword [rsp + 0x30]
jmp 0x201859a1
mov eax, 0xb
lea r9, [0x20587e70]
lea r10, [0x20473df0]
lea rcx, [rsp + 0x48]
nop word cs:[rax + rax]
lea r11d, [rax - 1]
and r11d, 0xe
movzx r11d, byte [r11 + r10]
xor r11b, 0xbf
add byte [rax + r9 - 0xb], r11b
mov r11d, eax
and r11d, 0xf
movzx r11d, byte [r11 + r10]
xor r11b, 0xbf
add byte [rax + r9 - 0xa], r11b
add rax, 2
cmp rax, 0x1d
jne 0x20185f50
mov r12d, 0x11
mov r10b, 0xc2
mov r9d, 0x943f54fb
mov rax, qword [rsp + 0xd0]
test bx, bx
js 0x20185d7d
cmp r10b, 0xbf
jbe 0x20186097
cmp r10b, 0xdf
ja 0x20185fc1
and r9d, 0x1f
mov r10d, 1
jmp 0x20185fd5
cmp r10b, 0xef
ja 0x20186081
and r9d, 0xf
mov r10d, 2
mov r12d, r9d
mov rdx, rax
sub rdx, rcx
lea r8d, [r10 + 1]
cmp rdx, r8
jge 0x20186013
test ebx, 0x200
jne 0x201859c2
cmp dword [rsp + 0x28], 0
mov rdx, qword [rsp + 0x40]
je 0x20186051
test bl, 0x40
mov r11, rdi
jne 0x20185a13
xor r13d, r13d
jmp 0x201859a1
mov r13d, r15d
mov r11, rdi
test bl, bl
js 0x20185b21
mov rcx, qword [0x20588478]
mov eax, dword [0x20588464]
add r12d, r13d
add eax, r12d
add eax, 0xffff50f5
cdqe
add rax, rcx
mov r13, qword [rsp + 0x30]
mov rcx, r13
call qword [case.0x200c66ec.0]
jmp 0x201859a1
test bl, 0x20
jne 0x201860a8
mov qword [rsp + 0x40], rdx
mov rcx, rsi
call fcn.200782c0
lea rcx, [rsp + 0x58]
xor ebp, ebp
mov r8, rcx
test ebx, 0x100
je 0x20185f2a
mov r13, rsi
jmp 0x201859a1
mov r11, rdi
mov rdx, qword [rsp + 0x40]
test bl, 0x20
jne 0x20185a21
jmp 0x20185a02
inc rcx
mov qword [rsi], rcx
mov r13d, 2
jmp 0x201859a1
mov r13d, 1
jmp 0x201859a1