Function at 0x140046980
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x38
mov rax, qword [rcx + 0x10]
test rax, rax
je case.default.0x140046c1b
mov rsi, rcx
mov r14, qword [rcx + 8]
mov rcx, qword [rcx + 0x38]
shr rcx, 3
cmp rcx, rax
jbe 0x140046ac2
mov r13, qword [r14]
cmp r13, r14
je case.default.0x140046c1b
mov rbx, qword [rsi + 0x18]
mov rax, qword [r13 + 8]
mov qword [rsp + 0x30], rax
mov rdi, qword [r13 + 0x10]
mov rcx, rdi
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
test rax, rax
je 0x140046c26
mov ecx, 0x84222325
cmp rax, 8
jb 0x140046a8b
mov rdx, rax
shr rdx, 3
xor r8d, r8d
nop dword [rax]
movzx r9d, byte [rdi + r8*8]
xor r9d, ecx
imul ecx, r9d, 0x1b3
movzx r9d, byte [rdi + r8*8 + 1]
xor r9d, ecx
imul ecx, r9d, 0x1b3
movzx r9d, byte [rdi + r8*8 + 2]
xor r9d, ecx
imul ecx, r9d, 0x1b3
movzx r9d, byte [rdi + r8*8 + 3]
xor r9d, ecx
imul ecx, r9d, 0x1b3
movzx r9d, byte [rdi + r8*8 + 4]
xor r9d, ecx
imul ecx, r9d, 0x1b3
movzx r9d, byte [rdi + r8*8 + 5]
xor r9d, ecx
imul ecx, r9d, 0x1b3
movzx r9d, byte [rdi + r8*8 + 6]
xor r9d, ecx
imul ecx, r9d, 0x1b3
movzx r9d, byte [rdi + r8*8 + 7]
xor r9d, ecx
imul ecx, r9d, 0x1b3
inc r8
cmp rdx, r8
jne 0x140046a00
mov rdx, rax
and rdx, 0xfffffffffffffff8
cmp rdx, rax
jae 0x140046ab7
nop word [rax + rax]
movzx r8d, byte [rdi + rdx]
xor r8d, ecx
imul ecx, r8d, 0x1b3
inc rdx
cmp rax, rdx
jne 0x140046aa0
and ecx, 0x7fffffff
jmp 0x140046c2b
mov rax, qword [r14 + 8]
mov qword [rax], 0
mov rdi, qword [r14]
test rdi, rdi
je 0x140046b91
mov rbx, qword [rdi]
mov edx, 0x20
mov rcx, rdi
call fcn.140117b2c
test rbx, rbx
je 0x140046b8d
mov rdi, qword [rbx]
mov edx, 0x20
mov rcx, rbx
call fcn.140117b2c
test rdi, rdi
je 0x140046b8d
mov rbx, qword [rdi]
mov edx, 0x20
mov rcx, rdi
call fcn.140117b2c
test rbx, rbx
je 0x140046b8d
mov rdi, qword [rbx]
mov edx, 0x20
mov rcx, rbx
call fcn.140117b2c
test rdi, rdi
je 0x140046b8d
mov rbx, qword [rdi]
mov edx, 0x20
mov rcx, rdi
call fcn.140117b2c
test rbx, rbx
je 0x140046b8d
mov rdi, qword [rbx]
mov edx, 0x20
mov rcx, rbx
call fcn.140117b2c
test rdi, rdi
je 0x140046b8d
mov rbx, qword [rdi]
mov edx, 0x20
mov rcx, rdi
call fcn.140117b2c
test rbx, rbx
je 0x140046b8d
mov rdi, qword [rbx]
mov edx, 0x20
mov rcx, rbx
call fcn.140117b2c
test rdi, rdi
jne 0x140046ad9
mov r14, qword [rsi + 8]
mov qword [r14], r14
mov qword [r14 + 8], r14
mov qword [rsi + 0x10], 0
mov rax, qword [rsi + 0x18]
mov rdx, qword [rsi + 0x20]
cmp rax, rdx
je case.default.0x140046c1b
sub rdx, rax
mov rcx, rdx
shr rcx, 6
cmp rdx, 0x40
jb 0x140046bf8
lea r8, [rax + 0x38]
mov r9, rcx
nop dword [rax + rax]
mov qword [r8 - 0x38], r14
mov qword [r8 - 0x30], r14
mov qword [r8 - 0x28], r14
mov qword [r8 - 0x20], r14
mov qword [r8 - 0x18], r14
mov qword [r8 - 0x10], r14
mov qword [r8 - 8], r14
mov qword [r8], r14
add r8, 0x40
dec r9
jne 0x140046bd0
and edx, 0x38
add rdx, 0xfffffffffffffff8
shr rdx, 3
cmp rdx, 6
ja case.default.0x140046c1b
lea r8, [0x140124e90]
movsxd rdx, dword [r8 + rdx*4]
add rdx, r8
jmp rdx
shl rcx, 3
jmp 0x140046efd
mov ecx, 0x4222325
mov edx, 0x1f31d
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_ldiv]
imul ecx, eax, 0xfffff4ec
shr rax, 0x20
imul eax, eax, 0x41a7
lea edx, [rax + rcx]
add edx, 0x7fffffff
add eax, ecx
cmovns edx, eax
movsxd rax, edx
and rax, qword [rsi + 0x30]
lea rbp, [rax + rax]
shl rax, 4
lea rcx, [rbx + rax]
mov qword [rsp + 0x28], rcx
mov r12, qword [rbx + rax]
mov qword [rsp + 0x20], rbx
mov r15, qword [rbx + rax + 8]
mov rbx, r13
nop dword [rax]
mov rdi, qword [rbx]
mov edx, 0x20
mov rcx, rbx
call fcn.140117b2c
dec qword [rsi + 0x10]
cmp rbx, r15
je 0x140046cd6
cmp rdi, r14
je 0x140046cbc
mov rbx, qword [rdi]
mov edx, 0x20
mov rcx, rdi
call fcn.140117b2c
dec qword [rsi + 0x10]
cmp rdi, r15
je 0x140046cd3
cmp rbx, r14
jne 0x140046c80
cmp r12, r13
mov rbp, qword [rsp + 0x28]
jne 0x140046ea4
mov qword [rbp], r14
jmp 0x140046ea4
mov rdi, rbx
mov rax, qword [rsp + 0x30]
cmp r12, r13
jne 0x140046ceb
mov rax, qword [rsp + 0x28]
mov qword [rax], r14
mov rax, r14
mov r12, qword [rsp + 0x20]
mov qword [r12 + rbp*8 + 8], rax
cmp rdi, r14
je 0x140046ea4
mov r13, qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_ldiv]
mov rbx, qword [rdi + 0x10]
mov rcx, rbx
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
mov ecx, 0x84222325
test rax, rax
je 0x140046df7
cmp rax, 8
jb 0x140046dcb
mov rdx, rax
shr rdx, 3
xor r8d, r8d
nop word cs:[rax + rax]
movzx r9d, byte [rbx + r8*8]
xor r9d, ecx
imul ecx, r9d, 0x1b3
movzx r9d, byte [rbx + r8*8 + 1]
xor r9d, ecx
imul ecx, r9d, 0x1b3
movzx r9d, byte [rbx + r8*8 + 2]
xor r9d, ecx
imul ecx, r9d, 0x1b3
movzx r9d, byte [rbx + r8*8 + 3]
xor r9d, ecx
imul ecx, r9d, 0x1b3
movzx r9d, byte [rbx + r8*8 + 4]
xor r9d, ecx
imul ecx, r9d, 0x1b3
movzx r9d, byte [rbx + r8*8 + 5]
xor r9d, ecx
imul ecx, r9d, 0x1b3
movzx r9d, byte [rbx + r8*8 + 6]
xor r9d, ecx
imul ecx, r9d, 0x1b3
movzx r9d, byte [rbx + r8*8 + 7]
xor r9d, ecx
imul ecx, r9d, 0x1b3
inc r8
cmp rdx, r8
jne 0x140046d40
mov rdx, rax
and rdx, 0xfffffffffffffff8
cmp rdx, rax
jae 0x140046df7
nop word [rax + rax]
movzx r8d, byte [rbx + rdx]
xor r8d, ecx
imul ecx, r8d, 0x1b3
inc rdx
cmp rax, rdx
jne 0x140046de0
and ecx, 0x7fffffff
mov edx, 0x1f31d
call r13
imul ecx, eax, 0xfffff4ec
shr rax, 0x20
imul eax, eax, 0x41a7
lea edx, [rax + rcx]
add edx, 0x7fffffff
add eax, ecx
cmovns edx, eax
movsxd rax, edx
and rax, qword [rsi + 0x30]
lea r15, [rax + rax]
shl rax, 4
lea rbp, [r12 + rax]
mov r12, qword [r12 + rax + 8]
nop dword [rax + rax]
mov rbx, qword [rdi]
mov edx, 0x20
mov rcx, rdi
call fcn.140117b2c
dec qword [rsi + 0x10]
cmp rdi, r12
je 0x140046e85
cmp rbx, r14
je 0x140046cca
mov rdi, qword [rbx]
mov edx, 0x20
mov rcx, rbx
call fcn.140117b2c
dec qword [rsi + 0x10]
cmp rbx, r12
je 0x140046e8a
cmp rdi, r14
jne 0x140046e40
jmp 0x140046cca
mov rdi, rbx
jmp 0x140046e8d
mov rbx, rdi
mov r12, qword [rsp + 0x20]
mov qword [r12 + r15*8], r14
mov qword [r12 + r15*8 + 8], r14
cmp rbx, r14
jne 0x140046d05
mov rax, qword [rsp + 0x30]
mov qword [rax], r14
mov qword [r14 + 8], rax
jmp case.default.0x140046c1b
shl rcx, 3
jmp 0x140046ef8
shl rcx, 3
jmp 0x140046ef3
shl rcx, 3
jmp 0x140046eee
shl rcx, 3
jmp 0x140046ee9
shl rcx, 3
jmp 0x140046ee4
lea rdx, [rcx*8]
shl rcx, 6
mov qword [rcx + rax + 0x30], r14
mov rcx, rdx
mov qword [rax + rcx*8 + 0x28], r14
mov qword [rax + rcx*8 + 0x20], r14
mov qword [rax + rcx*8 + 0x18], r14
mov qword [rax + rcx*8 + 0x10], r14
mov qword [rax + rcx*8 + 8], r14
mov qword [rax + rcx*8], r14
add rsp, 0x38
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret