Function at 0x180009bb0
Capabilities:
Encode data using xor

Disassembly:
push rsi
mov eax, 0x2040
call fcn.180003000
sub rsp, rax
cmp dword [0x180020ed0], 0
mov rsi, rcx
jne 0x180009bd9
mov eax, 0x80000002
add rsp, 0x2040
pop rsi
ret
cmp byte [0x180020ef8], 0xff
jne 0x180009bf0
mov eax, 0x80000008
add rsp, 0x2040
pop rsi
ret
lea rcx, [rsp + 0x1040]
xor edx, edx
mov r8d, 0x1000
mov qword [rsp + 0x2050], rbx
mov qword [rsp + 0x2060], rdi
call fcn.180003060
lea rcx, [rsp + 0x40]
xor edx, edx
mov r8d, 0x1000
call fcn.180003060
lea rcx, [rsp + 0x30]
mov edx, 1
call fcn.18000c3f0
movzx eax, byte [0x180020ef8]
movzx r8d, word [rsi + 0x810]
movzx r11d, byte [rsp + 0x30]
mov ecx, r8d
mov edx, 0x10
mov byte [rsp + 0x1040], r11b
mov byte [rsp + 0x1041], al
call fcn.180008140
movzx ecx, r8w
mov rdx, rsi
movsxd rbx, eax
shr cx, 8
mov byte [rsp + 0x1042], cl
movzx ecx, byte [rsi + 0x810]
mov byte [rsp + 0x1043], cl
lea rcx, [rsp + 0x1044]
call fcn.180003160
lea edi, [rbx + 4]
xor r11b, r11b
test edi, edi
jle 0x180009cbd
lea rax, [rsp + 0x1040]
mov ecx, edi
nop
nop
xor r11b, byte [rax]
add rax, 1
sub rcx, 1
jne 0x180009cb0
mov rax, rbx
movzx eax, byte [0x180020ef9]
mov byte [rsp + rbx + 0x1044], r11b
cmp al, 1
jne 0x180009d41
xor r9d, r9d
mov byte [rsp + 0x28], al
lea r8, [0x180020ab0]
lea rcx, [0x180020ee8]
lea edx, [r9 + 0x10]
mov byte [rsp + 0x20], al
call fcn.18000b400
lea r8, [0x180020ee8]
lea rcx, [rsp + 0x1044]
xor r9d, r9d
mov edx, ebx
mov byte [rsp + 0x28], 0
mov byte [rsp + 0x20], 1
call fcn.18000b400
xor r9d, r9d
lea r8, [0x180020ab0]
lea rcx, [0x180020ee8]
lea edx, [r9 + 0x10]
mov byte [rsp + 0x28], 0
mov byte [rsp + 0x20], 1
call fcn.18000b400
jmp 0x180009e21
cmp al, 2
jne 0x180009db2
xor r9d, r9d
lea r8, [0x180020ab0]
lea rcx, [0x180020ee8]
lea edx, [r9 + 0x10]
mov byte [rsp + 0x28], 1
mov byte [rsp + 0x20], 1
call fcn.18000f7c0
lea r8, [0x180020ee8]
lea rcx, [rsp + 0x1044]
xor r9d, r9d
mov edx, ebx
mov byte [rsp + 0x28], 0
mov byte [rsp + 0x20], 1
call fcn.18000f7c0
xor r9d, r9d
lea r8, [0x180020ab0]
lea rcx, [0x180020ee8]
lea edx, [r9 + 0x10]
mov byte [rsp + 0x28], 0
mov byte [rsp + 0x20], 1
call fcn.18000f7c0
jmp 0x180009e21
cmp al, 3
jne 0x180009e21
xor r9d, r9d
lea r8, [0x180020ab0]
lea rcx, [0x180020ee8]
lea edx, [r9 + 0x10]
mov byte [rsp + 0x28], 1
mov byte [rsp + 0x20], 1
call fcn.18000cd50
lea r8, [0x180020ee8]
lea rcx, [rsp + 0x1044]
xor r9d, r9d
mov edx, ebx
mov byte [rsp + 0x28], 0
mov byte [rsp + 0x20], 1
call fcn.18000cd50
xor r9d, r9d
lea r8, [0x180020ab0]
lea rcx, [0x180020ee8]
lea edx, [r9 + 0x10]
mov byte [rsp + 0x28], 0
mov byte [rsp + 0x20], 1
call fcn.18000cd50
test edi, edi
jle 0x180009e45
lea rcx, [rsp + 0x1041]
mov edx, edi
nop
movzx eax, byte [rsp + 0x1040]
add rcx, 1
xor byte [rcx - 1], al
sub rdx, 1
jne 0x180009e30
mov eax, dword [0x180020ed0]
lea edx, [rbx + 5]
mov dword [rsp + 0x2058], 0x1000
cmp eax, 1
jne 0x180009e7a
lea r9, [rsp + 0x2058]
lea r8, [rsp + 0x40]
lea rcx, [rsp + 0x1040]
call fcn.1800087c0
jmp 0x180009ebe
cmp eax, 2
jne 0x180009e9b
lea r9, [rsp + 0x2058]
lea r8, [rsp + 0x40]
lea rcx, [rsp + 0x1040]
call fcn.180008ba0
jmp 0x180009ebe
cmp eax, 3
jne 0x18000a140
lea r9, [rsp + 0x2058]
lea r8, [rsp + 0x40]
lea rcx, [rsp + 0x1040]
call fcn.180008cb0
test eax, eax
jne 0x180009ed1
call fcn.180009910
mov eax, 0x80000012
jmp 0x18000a145
mov eax, dword [rsp + 0x2058]
add eax, 0xffffffff
test eax, eax
jle 0x180009f02
lea rcx, [rsp + 0x41]
mov edx, eax
nop
nop
nop
movzx eax, byte [rsp + 0x40]
add rcx, 1
xor byte [rcx - 1], al
sub rdx, 1
jne 0x180009ef0
movzx eax, byte [0x180020ef8]
cmp byte [rsp + 0x41], al
jne 0x180009ec7
mov ebx, dword [rsp + 0x2058]
add ebx, 0xfffffffb
mov eax, ebx
cdq
and edx, 0xf
add eax, edx
and eax, 0xf
sub eax, edx
jne 0x180009ec7
movzx eax, byte [0x180020ef9]
cmp al, 1
jne 0x180009f9e
xor r9d, r9d
mov byte [rsp + 0x28], al
lea r8, [0x180020ab0]
lea rcx, [0x180020ee8]
lea edx, [r9 + 0x10]
mov byte [rsp + 0x20], al
call fcn.18000b400
lea r8, [0x180020ee8]
lea rcx, [rsp + 0x44]
xor r9d, r9d
mov edx, ebx
mov byte [rsp + 0x28], 1
mov byte [rsp + 0x20], 1
call fcn.18000b400
xor r9d, r9d
lea r8, [0x180020ab0]
lea rcx, [0x180020ee8]
lea edx, [r9 + 0x10]
mov byte [rsp + 0x28], 0
mov byte [rsp + 0x20], 1
call fcn.18000b400
jmp 0x18000a078
cmp al, 2
jne 0x18000a00c
xor r9d, r9d
lea r8, [0x180020ab0]
lea rcx, [0x180020ee8]
lea edx, [r9 + 0x10]
mov byte [rsp + 0x28], 1
mov byte [rsp + 0x20], 1
call fcn.18000f7c0
lea r8, [0x180020ee8]
lea rcx, [rsp + 0x44]
xor r9d, r9d
mov edx, ebx
mov byte [rsp + 0x28], 1
mov byte [rsp + 0x20], 1
call fcn.18000f7c0
xor r9d, r9d
lea r8, [0x180020ab0]
lea rcx, [0x180020ee8]
lea edx, [r9 + 0x10]
mov byte [rsp + 0x28], 0
mov byte [rsp + 0x20], 1
call fcn.18000f7c0
jmp 0x18000a078
cmp al, 3
jne 0x18000a078
xor r9d, r9d
lea r8, [0x180020ab0]
lea rcx, [0x180020ee8]
lea edx, [r9 + 0x10]
mov byte [rsp + 0x28], 1
mov byte [rsp + 0x20], 1
call fcn.18000cd50
lea r8, [0x180020ee8]
lea rcx, [rsp + 0x44]
xor r9d, r9d
mov edx, ebx
mov byte [rsp + 0x28], 1
mov byte [rsp + 0x20], 1
call fcn.18000cd50
xor r9d, r9d
lea r8, [0x180020ab0]
lea rcx, [0x180020ee8]
lea edx, [r9 + 0x10]
mov byte [rsp + 0x28], 0
mov byte [rsp + 0x20], 1
call fcn.18000cd50
add ebx, 4
xor cl, cl
test ebx, ebx
jle 0x18000a09c
lea rax, [rsp + 0x40]
mov edx, ebx
nop
nop
xor cl, byte [rax]
add rax, 1
sub rdx, 1
jne 0x18000a090
movsxd rax, dword [rsp + 0x2058]
cmp cl, byte [rsp + rax + 0x3f]
jne 0x180009ec7
movzx eax, byte [rsp + 0x42]
shl ax, 8
movzx r9d, ax
movzx eax, byte [rsp + 0x43]
add r9d, eax
cmp r9d, 2
jl 0x180009ec7
movsxd rax, r9d
movzx ecx, byte [rsp + rax + 0x42]
movzx eax, byte [rsp + rax + 0x43]
shl cx, 8
add cx, ax
movzx eax, cx
and ax, 0xff00
cmp ax, 0x6800
jne 0x18000a0fd
mov byte [rsi + 0x10], cl
mov word [rsi + 0x812], 1
mov cx, ax
call fcn.180008150
test eax, eax
mov edi, eax
jne 0x18000a13c
sub r9w, 2
lea rcx, [rsi + 0x10]
xor edx, edx
mov r8d, 0x800
mov word [rsi + 0x812], r9w
call fcn.180003060
movzx r8d, word [rsi + 0x812]
lea rdx, [rsp + 0x44]
lea rcx, [rsi + 0x10]
call fcn.180003160
mov eax, edi
jmp 0x18000a145
mov eax, 0x80000002
mov rbx, qword [rsp + 0x2050]
mov rdi, qword [rsp + 0x2060]
add rsp, 0x2040
pop rsi
ret