Function at 0x180046b50
Capabilities:
Encode data using xor

Disassembly:
push rbx
sub rsp, 0x30
mov rbx, qword [0x180147368]
mov eax, dword [rbx + 0x1a08]
cmp dword [rbx + 0x1a0c], eax
je 0x180046e93
cmp dword [rbx + 0x1a58], 2
mov qword [rsp + 0x48], rbp
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], r14
jl 0x180046b9e
nop dword [rax]
call fcn.180046670
cmp dword [rbx + 0x1a58], 1
jg 0x180046b90
mov rax, qword [rbx + 0x118]
test rax, rax
je 0x180046c0c
movss xmm1, dword [rbx + 0x2f88]
ucomiss xmm1, dword [0x180004dc0]
jp 0x180046bbd
je 0x180046bea
movss xmm0, dword [rbx + 0x2f8c]
subss xmm0, dword [rbx + 0x2f84]
subss xmm1, dword [rbx + 0x2f80]
mulss xmm0, xmm0
mulss xmm1, xmm1
addss xmm0, xmm1
comiss xmm0, dword [0x180005cb8]
jbe 0x180046c0c
cvttss2si edx, dword [rbx + 0x2f84]
cvttss2si ecx, dword [rbx + 0x2f80]
call rax
movsd xmm0, qword [rbx + 0x2f80]
movsd qword [rbx + 0x2f88], xmm0
mov rax, qword [rbx + 0x1a80]
mov byte [rbx + 0x1a15], 0
test rax, rax
je 0x180046c2c
cmp byte [rax + 0x80], 0
jne 0x180046c2c
mov byte [rax + 0x7e], 0
call fcn.180046670
cmp qword [rbx + 0x1d18], 0
je 0x180046c40
call fcn.18004dab0
movzx eax, byte [rbx + 0x1f1c]
xor ebp, ebp
test al, al
je 0x180046d33
mov eax, dword [rbx + 0x1f44]
inc eax
cmp eax, dword [rbx + 0x1a08]
jge 0x180046c86
test byte [rbx + 0x1f20], 0x20
jne 0x180046c82
movsxd rcx, dword [rbx + 0x1f28]
mov rax, qword [0x180147368]
cmp byte [rcx + rax + 0x138], bpl
jne 0x180046c86
mov al, 1
jmp 0x180046c88
xor al, al
cmp byte [rbx + 0x1f6a], bpl
jne 0x180046c95
test al, al
je 0x180046ca9
call fcn.180045960
movzx eax, byte [rbx + 0x1f1c]
test al, al
je 0x180046d33
mov eax, dword [rbx + 0x1a08]
cmp dword [rbx + 0x1f24], eax
jge 0x180046d33
test byte [rbx + 0x1f20], 1
jne 0x180046d33
cmp byte [0x180005b1f], bpl
mov eax, dword [0x180005b1c]
mov dword [rsp + 0x40], eax
mov byte [rbx + 0x1f1d], 1
je 0x180046d22
mov r8, rbp
movabs r9, 0x47ae147ae147ae15
nop word [rax + rax]
mov rax, r9
mul r8
mov rax, r8
sub rax, rdx
shr rax, 1
add rax, rdx
shr rax, 5
movsx eax, al
imul ecx, eax, 0x32
movzx eax, r8b
sub al, cl
add al, 0x31
xor byte [rsp + r8 + 0x40], al
inc r8
cmp r8, 4
jb 0x180046cf0
lea rcx, [rsp + 0x40]
call fcn.1800531e0
mov byte [rbx + 0x1f1d], bpl
mov eax, dword [rbx + 0x1a08]
mov dword [rbx + 0x1a0c], eax
mov byte [rbx + 0x1a14], bpl
call fcn.1800545b0
lea r14, [rbx + 0x1a48]
mov ecx, dword [r14 + 4]
test ecx, ecx
jns 0x180046d72
mov eax, ecx
cdq
sub eax, edx
mov edx, ebp
sar eax, 1
add eax, ecx
mov rcx, r14
test eax, eax
cmovg edx, eax
call fcn.1800563d0
mov dword [r14], ebp
mov rcx, r14
mov edx, dword [rbx + 0x1a28]
call fcn.1800563d0
mov ecx, dword [rbx + 0x1a28]
mov esi, ebp
test ecx, ecx
je 0x180046dd2
mov rdi, rbp
nop dword [rax]
nop word [rax + rax]
mov rax, qword [rbx + 0x1a30]
mov rdx, qword [rdi + rax]
cmp byte [rdx + 0x7e], bpl
je 0x180046dba
test dword [rdx + 0xc], 0x1000000
jne 0x180046dc2
mov rcx, r14
call fcn.180041b30
mov ecx, dword [rbx + 0x1a28]
inc esi
add rdi, 8
cmp esi, ecx
jne 0x180046da0
mov eax, dword [r14]
mov rsi, qword [rsp + 0x50]
mov dword [rbx + 0x1a28], eax
mov eax, dword [rbx + 0x1a2c]
mov dword [r14], ecx
mov ecx, dword [r14 + 4]
mov dword [r14 + 4], eax
mov rax, qword [rbx + 0x1a30]
mov dword [rbx + 0x1a2c], ecx
mov rcx, qword [r14 + 8]
mov qword [r14 + 8], rax
mov eax, dword [rbx + 0x1a78]
mov r14, qword [rsp + 0x20]
mov dword [rbx + 0x3b8], eax
mov rax, qword [rbx + 0xa8]
mov qword [rbx + 0x1a30], rcx
mov byte [rax], bpl
mov qword [rbx + 0x140], rbp
mov ecx, dword [rbx + 0x155c]
test ecx, ecx
jns 0x180046e55
mov eax, ecx
cdq
sub eax, edx
mov edx, ebp
sar eax, 1
add eax, ecx
lea rcx, [rbx + 0x1558]
test eax, eax
cmovg edx, eax
call fcn.180056290
mov rdi, qword [rsp + 0x28]
xorps xmm0, xmm0
mov dword [rbx + 0x1558], ebp
xor eax, eax
mov rbp, qword [rsp + 0x48]
movups xmmword [rbx + 0x34c], xmm0
movups xmmword [rbx + 0x35c], xmm0
movups xmmword [rbx + 0x36c], xmm0
movups xmmword [rbx + 0x37c], xmm0
movups xmmword [rbx + 0x38c], xmm0
mov dword [rbx + 0x39c], eax
add rsp, 0x30
pop rbx
ret