Function at 0x41c860
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.0041b010
mov rbx, rax
test ah, 2
jne 0x41cc68
test bh, 1
jne 0x41cc8c
test bl, 0x80
jne 0x41ccad
test bl, 0x10
jne 0x41ccce
and ebx, 4
jne 0x41ccef
lea r8, [0x00419bd0]
lea rcx, [0x0041a0c0]
mov rdx, r8
call fcn.0041ad00
test eax, esi
jne 0x41cc50
lea rcx, str.scrypt:_mix_function_power_on_self_test_failed
mov ebx, 4
call qword [0x005a50e0]
mov dword [rsp + 0x9c], 6
call fcn.0041b880
test eax, eax
jne 0x41c905
lea rcx, str.scrypt:_hash_function_power_on_self_test_failed
call qword [0x005a50e0]
mov dword [rsp + 0x9c], ebx
mov qword [rsp + 0x60], 0
lea rax, [0x005ae8a0]
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0xa0]
lea r15, [0x005ae800]
mov qword [rsp + 0x90], rax
mov dword [rsp + 0x98], 1
mov rax, qword [rsp + 0x40]
movzx edi, byte [rax + 0x10]
mov qword [rsp + 0x88], rax
movzx r14d, byte [rax + 0x12]
movzx ebx, byte [rax + 0x11]
mov r13, qword [rax + 8]
mov rax, qword [rax]
mov esi, edi
mov rcx, rax
mov qword [rsp + 0x50], rax
call sub.msvcrt.dll_strlen
mov qword [rsp + 0x58], rax
call fcn.0041b010
lea rdx, [0x0041dbf0]
mov qword [rsp + 0x48], rdx
test ah, 2
jne 0x41c9d8
lea rdx, [0x0041d0e0]
mov qword [rsp + 0x48], rdx
test ah, 1
jne 0x41c9d8
lea rdx, [0x0041cd30]
mov qword [rsp + 0x48], rdx
test al, 0x80
jne 0x41c9d8
lea rdx, [0x0041d490]
mov qword [rsp + 0x48], rdx
test al, 0x10
jne 0x41c9d8
lea rdx, [0x0041d840]
test al, 4
lea rax, [0x0041b1a0]
cmovne rax, rdx
mov qword [rsp + 0x48], rax
nop dword [rax]
mov ecx, dword [0x0060e720]
test ecx, ecx
je 0x41cc20
cmp sil, 0x1e
jbe 0x41c9f9
lea rcx, str.scrypt:_N_out_of_range
call qword [0x005a50e0]
cmp bl, 7
jbe 0x41ca0b
lea rcx, str.scrypt:_r_out_of_range
call qword [0x005a50e0]
cmp r14b, 0x19
jbe 0x41ca1e
lea rcx, str.scrypt:_p_out_of_range
call qword [0x005a50e0]
lea ecx, [rdi + 1]
mov eax, 1
mov esi, 0x100
mov r12d, eax
mov edi, eax
shl r12d, cl
mov ecx, ebx
shl edi, cl
mov ecx, r14d
shl eax, cl
mov ecx, ebx
mov dword [rsp + 0x3c], edi
shl esi, cl
mov ecx, r12d
mov dword [rsp + 0x38], eax
mov ebx, esi
imul rcx, rbx
add rcx, 0x7f
call sub.msvcrt.dll_malloc
lea rbp, [rax + 0x7f]
mov qword [rsp + 0x80], rax
and rbp, 0xffffffffffffff80
test rax, rax
je 0x41cd1e
mov eax, dword [rsp + 0x38]
add eax, 1
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 0x41cd0c
mov ecx, r14d
mov eax, esi
mov rdx, qword [rsp + 0x58]
add rbx, rdi
shl eax, cl
mov r9, qword [rsp + 0x60]
mov r8, r13
mov qword [rsp + 0x20], rbx
mov rcx, qword [rsp + 0x50]
mov qword [rsp + 0x28], rax
xor r13d, r13d
xor r14d, r14d
mov qword [rsp + 0x70], rax
call fcn.0041c600
mov edx, dword [rsp + 0x38]
test edx, edx
je 0x41cb2b
mov qword [rsp + 0x60], r15
mov r15d, r14d
mov r14, rbp
mov ebp, esi
mov esi, r13d
mov r13, qword [rsp + 0x48]
nop word cs:[rax + rax]
mov eax, dword [rsp + 0x3c]
mov ecx, esi
mov r9d, r12d
mov r8, r14
add rcx, rbx
mov rdx, rdi
add r15d, 1
add esi, ebp
mov dword [rsp + 0x20], eax
call r13
cmp dword [rsp + 0x38], r15d
jne 0x41cb00
mov r15, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x90]
mov r8, rbx
mov rcx, qword [rsp + 0x50]
mov r9, qword [rsp + 0x70]
mov rdx, qword [rsp + 0x58]
mov qword [rsp + 0x20], rsi
call fcn.0041c230
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]
add rdx, 1
movzx eax, al
or ecx, eax
cmp rdx, 0x40
jne 0x41cb80
mov rbx, qword [rsp + 0x88]
sub ecx, 1
add r15, 0x40
add qword [rsp + 0x40], 0x18
shr ecx, 8
and dword [rsp + 0x98], ecx
mov rax, qword [rsp + 0x40]
cmp qword [rbx + 0x18], 0
je 0x41cbe0
mov rcx, qword [rax + 8]
call sub.msvcrt.dll_strlen
mov qword [rsp + 0x60], rax
jmp 0x41c93c
mov eax, dword [rsp + 0x98]
test eax, eax
jne 0x41cc00
lea rcx, str.scrypt:_scrypt_power_on_self_test_failed
call qword [0x005a50e0]
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 [0x0060e720], 1
call fcn.0041c860
test eax, eax
jne 0x41c9e6
lea rcx, str.scrypt:_power_on_self_test_failed
call qword [0x005a50e0]
jmp 0x41c9e6
mov dword [rsp + 0x9c], 7
mov ebx, 5
jmp 0x41c8e8
lea r8, [0x00419be0]
lea rcx, [fcn.00418330]
mov rdx, r8
call fcn.0041ad00
and eax, 1
mov esi, eax
test bh, 1
je 0x41c892
lea r8, [0x00419be0]
lea rcx, [fcn.00418570]
mov rdx, r8
call fcn.0041ad00
and esi, eax
test bl, 0x80
je 0x41c89b
lea r8, [0x00419be0]
lea rcx, [fcn.004188f0]
mov rdx, r8
call fcn.0041ad00
and esi, eax
test bl, 0x10
je 0x41c8a4
lea r8, [0x00419be0]
lea rcx, [fcn.00418cd0]
mov rdx, r8
call fcn.0041ad00
and esi, eax
and ebx, 4
je 0x41c8ad
lea r8, [0x00419be0]
lea rcx, [fcn.00419160]
mov rdx, r8
call fcn.0041ad00
and esi, eax
jmp 0x41c8ad
lea rcx, str.scrypt:_out_of_memory
call qword [0x005a50e0]
jmp 0x41caa3
lea rcx, str.scrypt:_out_of_memory
call qword [0x005a50e0]
jmp 0x41ca73