Function at 0x180064b10
Capabilities:
Encode data using xor

Disassembly:
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x150
mov qword [rsp + 0x58], 0xfffffffffffffffe
mov rax, qword [0x18028f9a8]
xor rax, rsp
mov qword [rsp + 0x140], rax
mov rbx, r9
mov rsi, r8
mov qword [rsp + 0x40], r8
mov rax, rdx
mov qword [rsp + 0x28], rdx
mov r14, rcx
mov qword [rsp + 0x30], rcx
mov qword [rsp + 0x48], r8
mov qword [rsp + 0x38], rbx
mov rcx, qword [rsp + 0x1b0]
mov qword [rsp + 0x50], rcx
test r8, r8
je 0x180064b7f
xor edx, edx
mov rcx, rax
call fcn.1801a4970
test rsi, rsi
jne 0x180064b8b
xor eax, eax
jmp 0x180064f3f
mov r8, qword [rbx + 0x10]
cmp qword [rbx + 0x18], 0x10
jb 0x180064b99
mov rbx, qword [rbx]
lea rcx, [r14 + 8]
mov rdx, rbx
call fcn.180036570
nop
mov rax, qword [r14]
mov rcx, r14
call qword [rax]
mov rbx, rax
mov qword [rsp + 0x30], rax
mov rdx, rax
lea rcx, [rsp + 0x68]
call fcn.1800360e0
nop
mov rcx, rsi
test rbx, rbx
jne 0x180064be7
lea r8, str.gold
lea rdx, str.round_up
lea rcx, str.align_to_must_not_be_0
call fcn.180044fb0
int3
xor edx, edx
mov rax, rsi
div rbx
test rdx, rdx
je 0x180064bfd
mov rcx, rsi
sub rcx, rdx
add rcx, rbx
xor edx, edx
mov rax, rcx
div rbx
mov rcx, rax
imul rax, qword [rsp + 0x1c8], 0x3e8
xor edx, edx
div rcx
mov rdi, rax
mov dword [rsp + 0x24], 1
mov r13, qword [rsp + 0x1c0]
mov r12, qword [rsp + 0x68]
lea rax, [rsp + 0x48]
lea rcx, [rsp + 0x30]
cmp rsi, rbx
cmovae rax, rcx
mov r15, qword [rax]
mov rax, qword [r14]
mov r8, qword [rsp + 0x1b8]
mov rdx, qword [rsp + 0x50]
mov rcx, r14
call qword [rax + 0x10]
mov eax, dword [rsp + 0x24]
mov esi, eax
inc eax
mov dword [rsp + 0x24], eax
xor ebx, ebx
nop dword [rax]
movzx ecx, bl
not cl
and cl, 3
shl cl, 3
mov edx, esi
shr edx, cl
mov byte [rsp + 0x20], dl
mov rax, qword [r14]
mov r8d, 1
lea rdx, [rsp + 0x20]
mov rcx, r14
call qword [rax + 0x10]
inc rbx
cmp rbx, 4
jne 0x180064c70
mov rax, qword [r14]
mov rdx, r12
mov rcx, r14
call qword [rax + 0x18]
mov r9, r15
mov r8, r12
mov rax, qword [rsp + 0x28]
mov rdx, rax
cmp r15, 0x10
jb 0x180064d04
mov r11, r12
sub r11, rax
mov r10, r15
shr r10, 4
imul r9, r10, 0xfffffffffffffff0
add r9, r15
nop dword [rax]
nop dword [rax + rax]
mov rcx, qword [r8]
xor rcx, qword [rdx]
mov rax, qword [rdx + 8]
xor rax, qword [r11 + rdx + 8]
mov qword [rdx], rcx
mov qword [rdx + 8], rax
add rdx, 0x10
add r8, 0x10
sub r10, 1
jne 0x180064ce0
test r9, r9
je 0x180064d21
sub r8, rdx
nop dword [rax]
movzx eax, byte [r8 + rdx]
xor byte [rdx], al
lea rdx, [rdx + 1]
sub r9, 1
jne 0x180064d10
test r13, r13
jne 0x180064e3e
lea rcx, [rsp + 0x38]
call fcn.180041140
mov r13d, 1
mov rsi, qword [rsp + 0x70]
sub rsi, r12
mov rbx, qword [rsp + 0x38]
nop word [rax + rax]
mov rax, qword [r14]
mov r8, rsi
mov rdx, r12
mov rcx, r14
call qword [rax + 0x10]
mov rax, qword [r14]
mov rdx, r12
mov rcx, r14
call qword [rax + 0x18]
mov r9, r15
mov r8, r12
mov rax, qword [rsp + 0x28]
mov rdx, rax
cmp r15, 0x10
jb 0x180064dc0
mov r11, r12
sub r11, rax
mov r10, r15
shr r10, 4
imul r9, r10, 0xfffffffffffffff0
add r9, r15
nop dword [rax]
nop word [rax + rax]
mov rcx, qword [r11 + rdx + 8]
mov rax, qword [rdx]
xor rax, qword [r8]
xor qword [rdx + 8], rcx
mov qword [rdx], rax
add rdx, 0x10
add r8, 0x10
sub r10, 1
jne 0x180064da0
test r9, r9
je 0x180064de1
sub r8, rdx
nop dword [rax + rax]
movzx eax, byte [r8 + rdx]
xor byte [rdx], al
lea rdx, [rdx + 1]
sub r9, 1
jne 0x180064dd0
inc r13
movabs rax, 0x346dc5d63886594b
mul r13
shr rdx, 0xb
imul rcx, rdx, 0x2710
cmp r13, rcx
jne 0x180064d50
lea rcx, [rsp + 0x60]
call fcn.180041140
mov rcx, qword [rax]
sub rcx, rbx
movabs rax, 0x20c49ba5e353f7cf
imul rcx
sar rdx, 7
mov rax, rdx
shr rax, 0x3f
add rdx, rax
cmp rdi, rdx
jl 0x180064efb
jmp 0x180064d50
cmp r13, 1
je 0x180064efb
mov rsi, qword [rsp + 0x70]
sub rsi, r12
lea rbx, [r13 - 1]
nop dword [rax]
nop dword [rax + rax]
mov rax, qword [r14]
mov r8, rsi
mov rdx, r12
mov rcx, r14
call qword [rax + 0x10]
mov rax, qword [r14]
mov rdx, r12
mov rcx, r14
call qword [rax + 0x18]
mov r9, r15
mov r8, r12
mov rcx, qword [rsp + 0x28]
mov rax, rcx
cmp r15, 0x10
jb 0x180064ed4
mov r11, r12
sub r11, rcx
mov r10, r15
shr r10, 4
imul r9, r10, 0xfffffffffffffff0
add r9, r15
nop dword [rax]
nop word [rax + rax]
mov rdx, qword [rax]
xor rdx, qword [r8]
mov rcx, qword [rax + 8]
xor rcx, qword [r11 + rax + 8]
mov qword [rax], rdx
mov qword [rax + 8], rcx
add rax, 0x10
add r8, 0x10
sub r10, 1
jne 0x180064eb0
test r9, r9
je 0x180064ef1
sub r8, rax
nop dword [rax]
movzx ecx, byte [r8 + rax]
xor byte [rax], cl
lea rax, [rax + 1]
sub r9, 1
jne 0x180064ee0
sub rbx, 1
jne 0x180064e60
mov rsi, qword [rsp + 0x40]
sub rsi, r15
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x48], rsi
add qword [rsp + 0x28], r15
test rsi, rsi
mov rbx, qword [rsp + 0x30]
jne 0x180064c31
test r12, r12
je 0x180064f3c
mov rdx, qword [rsp + 0x78]
sub rdx, r12
mov r8d, 1
mov rcx, r12
call fcn.180033660
nop
mov rax, r13
mov rcx, qword [rsp + 0x140]
xor rcx, rsp
call fcn.180186840
add rsp, 0x150
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret