Function at 0x41cad0
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xe8
mov esi, 1
call fcn.0041b4c0
mov rbx, rax
test ah, 2
jne 0x41cec8
test bh, 1
jne 0x41ceec
test bl, 0x80
jne 0x41cf0d
test bl, 0x10
jne 0x41cf2e
and ebx, 4
jne 0x41cf4f
lea r8, [0x0041a140]
lea rcx, [0x0041a5c0]
mov rdx, r8
call fcn.0041b100
test eax, esi
jne 0x41ceb0
lea rcx, str.scrypt:_mix_function_power_on_self_test_failed
mov ebx, 4
call qword [0x0066e0e0]
mov dword [rsp + 0x9c], 6
call fcn.0041bc80
test eax, eax
jne 0x41cb75
lea rcx, str.scrypt:_hash_function_power_on_self_test_failed
call qword [0x0066e0e0]
mov dword [rsp + 0x9c], ebx
lea rax, [0x00677b00]
lea r15, [0x00677a60]
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0xa0]
mov dword [rsp + 0x98], 1
mov qword [rsp + 0x90], rax
mov rax, qword [rsp + 0x40]
lea rdi, [0x0041de50]
movzx ebp, byte [rax + 0x10]
movzx ebx, byte [rax + 0x11]
mov qword [rsp + 0x88], rax
movzx r14d, byte [rax + 0x12]
mov r13, qword [rax + 8]
mov rax, qword [rax]
mov esi, ebp
mov rcx, rax
mov qword [rsp + 0x50], rax
call sub.msvcrt.dll_strlen
mov qword [rsp + 0x58], rax
call fcn.0041b4c0
mov qword [rsp + 0x48], rdi
test ah, 2
jne 0x41cc48
lea rdi, [0x0041d340]
mov qword [rsp + 0x48], rdi
test ah, 1
jne 0x41cc48
lea rdi, [0x0041cf90]
mov qword [rsp + 0x48], rdi
test al, 0x80
jne 0x41cc48
lea rdi, [0x0041d6f0]
mov qword [rsp + 0x48], rdi
test al, 0x10
jne 0x41cc48
test al, 4
lea rdx, [0x0041daa0]
lea rax, [0x0041b650]
cmovne rax, rdx
mov qword [rsp + 0x48], rax
nop dword [rax]
mov ecx, dword [0x006e3720]
test ecx, ecx
je 0x41ce80
cmp sil, 0x1e
jbe 0x41cc69
lea rcx, str.scrypt:_N_out_of_range
call qword [0x0066e0e0]
cmp bl, 7
jbe 0x41cc7b
lea rcx, str.scrypt:_r_out_of_range
call qword [0x0066e0e0]
cmp r14b, 0x19
jbe 0x41cc8e
lea rcx, str.scrypt:_p_out_of_range
call qword [0x0066e0e0]
mov eax, 1
inc ebp
mov esi, 0x100
shlx ecx, eax, ebp
shlx edi, eax, ebx
mov rbp, rcx
shlx ebx, esi, ebx
imul rcx, rbx
shlx eax, eax, r14d
mov dword [rsp + 0x3c], edi
mov rsi, rbx
mov dword [rsp + 0x38], eax
add rcx, 0x7f
call sub.msvcrt.dll_malloc
lea r12, [rax + 0x7f]
mov qword [rsp + 0x80], rax
and r12, 0xffffffffffffff80
test rax, rax
je 0x41cf7e
mov eax, dword [rsp + 0x38]
inc eax
mov edi, eax
imul edi, esi
lea rcx, [rdi + 0x7f]
mov qword [rsp + 0x68], rdi
call sub.msvcrt.dll_malloc
lea rdi, [rax + 0x7f]
mov qword [rsp + 0x78], rax
and rdi, 0xffffffffffffff80
test rax, rax
je 0x41cf6c
add rbx, rdi
shlx eax, esi, r14d
mov qword [rsp + 0x28], rax
mov rdx, qword [rsp + 0x58]
mov qword [rsp + 0x20], rbx
mov r9, qword [rsp + 0x60]
mov r8, r13
xor r14d, r14d
mov rcx, qword [rsp + 0x50]
mov qword [rsp + 0x70], rax
xor r13d, r13d
call fcn.0041c870
mov edx, dword [rsp + 0x38]
test edx, edx
je 0x41cd93
mov qword [rsp + 0x60], r15
mov r15d, r14d
mov r14, r12
mov r12d, esi
mov esi, r13d
mov r13, qword [rsp + 0x48]
nop dword [rax + rax]
mov eax, dword [rsp + 0x3c]
mov ecx, esi
mov r9d, ebp
mov r8, r14
add rcx, rbx
mov rdx, rdi
inc r15d
add esi, r12d
mov dword [rsp + 0x20], eax
call r13
cmp dword [rsp + 0x38], r15d
jne 0x41cd68
mov r15, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x90]
mov rcx, qword [rsp + 0x50]
mov r8, rbx
mov r9, qword [rsp + 0x70]
mov rdx, qword [rsp + 0x58]
mov qword [rsp + 0x20], rsi
call fcn.0041c4a0
xor eax, eax
mov rcx, qword [rsp + 0x68]
push rdi
push rcx
rep stosb byte [rdi], al
pop rcx
pop rdi
mov rcx, qword [rsp + 0x80]
call sub.msvcrt.dll_free
mov rcx, qword [rsp + 0x78]
call sub.msvcrt.dll_free
xor edx, edx
xor ecx, ecx
mov r8, rsi
nop word [rax + rax]
movzx eax, byte [r15 + rdx]
xor al, byte [r8 + rdx]
inc rdx
movzx eax, al
or ecx, eax
cmp rdx, 0x40
jne 0x41cde8
mov rbx, qword [rsp + 0x88]
dec ecx
add qword [rsp + 0x40], 0x18
add r15, 0x40
shr ecx, 8
and dword [rsp + 0x98], ecx
mov rax, qword [rsp + 0x40]
cmp qword [rbx + 0x18], 0
je 0x41ce40
mov rcx, qword [rax + 8]
call sub.msvcrt.dll_strlen
mov qword [rsp + 0x60], rax
jmp 0x41cbac
mov eax, dword [rsp + 0x98]
test eax, eax
jne 0x41ce60
lea rcx, str.scrypt:_scrypt_power_on_self_test_failed
call qword [0x0066e0e0]
and dword [rsp + 0x9c], 0xfffffffb
mov eax, dword [rsp + 0x9c]
add rsp, 0xe8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov dword [0x006e3720], 1
call fcn.0041cad0
test eax, eax
jne 0x41cc56
lea rcx, str.scrypt:_power_on_self_test_failed
call qword [0x0066e0e0]
jmp 0x41cc56
mov dword [rsp + 0x9c], 7
mov ebx, 5
jmp 0x41cb58
lea r8, [0x0041a150]
lea rcx, [fcn.004188b0]
mov rdx, r8
call fcn.0041b100
and eax, 1
mov esi, eax
test bh, 1
je 0x41cb02
lea r8, [0x0041a150]
lea rcx, [fcn.00418af0]
mov rdx, r8
call fcn.0041b100
and esi, eax
test bl, 0x80
je 0x41cb0b
lea r8, [0x0041a150]
lea rcx, [fcn.00418e70]
mov rdx, r8
call fcn.0041b100
and esi, eax
test bl, 0x10
je 0x41cb14
lea r8, [0x0041a150]
lea rcx, [fcn.00419250]
mov rdx, r8
call fcn.0041b100
and esi, eax
and ebx, 4
je 0x41cb1d
lea r8, [0x0041a150]
lea rcx, [fcn.004196e0]
mov rdx, r8
call fcn.0041b100
and esi, eax
jmp 0x41cb1d
lea rcx, str.scrypt:_out_of_memory
call qword [0x0066e0e0]
jmp 0x41cd11
lea rcx, str.scrypt:_out_of_memory
call qword [0x0066e0e0]
jmp 0x41cce2