Function at 0x140040aa0
Capabilities:
Encode data using xor

Disassembly:
push rdi
push r13
sub rsp, 0x38
movabs rax, 0xfffffffffffffff
mov r13, rcx
bsr rcx, rax
mov edi, 1
mov eax, edi
shl rax, cl
cmp rdx, rax
ja 0x140040828
lea rax, [rdx - 1]
mov qword [rsp + 0x50], rbx
mov rbx, qword [r13 + 8]
or rax, rdi
bsr rcx, rax
mov r8, rbx
mov qword [rsp + 0x30], r12
inc ecx
shl rdi, cl
lea rcx, [r13 + 0x18]
lea rdx, [rdi + rdi]
call fcn.14001ab10
mov qword [r13 + 0x38], rdi
lea rax, [rdi - 1]
mov qword [r13 + 0x30], rax
mov rcx, qword [r13 + 8]
mov rcx, qword [rcx]
mov rdx, rcx
cmp rcx, rbx
je 0x14004073e
mov qword [rsp + 0x58], rbp
movabs rax, 0xcbf29ce484222325
mov qword [rsp + 0x60], rsi
movabs rbp, 0x100000001b3
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], r15
mov r14, qword [rcx + 0x28]
lea r10, [rcx + 0x10]
mov rdx, qword [rdx]
mov rdi, qword [rcx + 0x20]
cmp r14, 7
jbe 0x14004065a
mov r10, qword [rcx + 0x10]
lea r11, [rdi + rdi]
xor r8d, r8d
mov r9, rax
test r11, r11
je 0x140040684
nop dword [rax]
movzx eax, byte [r10 + r8]
inc r8
xor r9, rax
imul r9, rbp
cmp r8, r11
jb 0x140040670
mov r15, qword [r13 + 0x30]
and r15, r9
shl r15, 4
add r15, qword [r13 + 0x18]
cmp qword [r15], rbx
jne 0x14004069d
mov qword [r15], rcx
jmp 0x140040710
mov rax, qword [r15 + 8]
cmp qword [rax + 0x28], 7
lea r9, [rax + 0x10]
mov r8, qword [r9 + 0x10]
jbe 0x1400406b3
mov r9, qword [r9]
lea r10, [rcx + 0x10]
cmp r14, 7
jbe 0x1400406c1
mov r10, qword [rcx + 0x10]
cmp rdi, r8
jne 0x140040758
test rdi, rdi
je 0x1400406e7
sub r10, r9
movzx r8d, word [r9]
cmp word [r10 + r9], r8w
jne 0x140040750
add r9, 2
sub rdi, 1
jne 0x1400406d2
mov r10, qword [rax]
cmp r10, rcx
je 0x140040710
mov r9, qword [rcx + 8]
mov qword [r9], rdx
mov r8, qword [rdx + 8]
mov qword [r8], r10
mov rax, qword [r10 + 8]
mov qword [rax], rcx
mov qword [r10 + 8], r8
mov qword [rdx + 8], r9
mov qword [rcx + 8], rax
mov qword [r15 + 8], rcx
mov rcx, rdx
movabs rax, 0xcbf29ce484222325
cmp rdx, rbx
jne 0x140040641
mov r15, qword [rsp + 0x20]
mov r14, qword [rsp + 0x28]
mov rsi, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x58]
mov rbx, qword [rsp + 0x50]
mov r12, qword [rsp + 0x30]
add rsp, 0x38
pop r13
pop rdi
ret
mov rdi, qword [rcx + 0x20]
mov r14, qword [rcx + 0x28]
mov rbp, qword [r15]
cmp rbp, rax
je 0x1400407f5
nop dword [rax]
nop dword [rax + rax]
mov rax, qword [rax + 8]
cmp qword [rax + 0x28], 7
lea r8, [rax + 0x10]
mov r9, qword [r8 + 0x10]
jbe 0x140040786
mov r8, qword [r8]
lea r11, [rcx + 0x10]
cmp r14, 7
jbe 0x140040794
mov r11, qword [rcx + 0x10]
cmp rdi, r9
jne 0x1400407ec
test rdi, rdi
je 0x1400407b9
mov r10, rdi
sub r11, r8
movzx r9d, word [r8]
cmp word [r11 + r8], r9w
jne 0x1400407ec
add r8, 2
sub r10, 1
jne 0x1400407a4
mov r10, qword [rax]
movabs rbp, 0x100000001b3
mov r9, qword [rcx + 8]
mov qword [r9], rdx
mov r8, qword [rdx + 8]
mov qword [r8], r10
mov rax, qword [r10 + 8]
mov qword [rax], rcx
mov qword [r10 + 8], r8
mov qword [rdx + 8], r9
mov qword [rcx + 8], rax
jmp 0x140040714
cmp rbp, rax
jne 0x140040770
mov r10, qword [rcx + 8]
movabs rbp, 0x100000001b3
mov qword [r10], rdx
mov r9, qword [rdx + 8]
mov qword [r9], rax
mov r8, qword [rax + 8]
mov qword [r8], rcx
mov qword [rax + 8], r9
mov qword [rdx + 8], r10
mov qword [rcx + 8], r8
mov qword [r15], rcx
jmp 0x140040714
lea rcx, str.invalid_hash_bucket_count
call fcn.140057d28
int3
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov rdx, qword [rcx + 0x10]
mov rdi, rcx
add rdx, 1
mov rbx, qword [rcx + 0x38]
xorps xmm0, xmm0
js 0x140040ac5
cvtsi2ss xmm0, rdx
jmp 0x140040ada
mov rax, rdx
and edx, 1
shr rax, 1
or rax, rdx
cvtsi2ss xmm0, rax
addss xmm0, xmm0
divss xmm0, dword [rcx]
call fcn.140088aa8
movss xmm1, dword [0x1400a9d30]
xor ecx, ecx
comiss xmm0, xmm1
jb 0x140040b08
subss xmm0, xmm1
comiss xmm0, xmm1
jae 0x140040b08
movabs rax, 0x8000000000000000
mov rcx, rax
cvttss2si rax, xmm0
add rax, rcx
mov ecx, 8
cmp rax, rcx
cmova rcx, rax
cmp rbx, rcx
jae 0x140040b3a
cmp rbx, 0x200
jae 0x140040b37
lea rbx, [rbx*8]
cmp rbx, rcx
jae 0x140040b3a
mov rbx, rcx
mov rdx, rbx
mov rcx, rdi
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
jmp 0x1400405a0