Function at 0x41dec0
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.0041c650
mov rbx, rax
test ah, 2
jne 0x41e2c8
test bh, 1
jne 0x41e2ec
test bl, 0x80
jne 0x41e30d
test bl, 0x10
jne 0x41e32e
and ebx, 4
jne 0x41e34f
lea r8, [0x0041b230]
lea rcx, [0x0041b670]
mov rdx, r8
call fcn.0041c330
test eax, esi
jne 0x41e2b0
lea rcx, str.scrypt:_mix_function_power_on_self_test_failed
mov ebx, 4
call qword [0x005b80e0]
mov dword [rsp + 0x9c], 6
call fcn.0041ced0
test eax, eax
jne 0x41df65
lea rcx, str.scrypt:_hash_function_power_on_self_test_failed
call qword [0x005b80e0]
mov dword [rsp + 0x9c], ebx
lea rax, [0x005c1800]
lea r15, [0x005c1760]
mov qword [rsp + 0x58], 0
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0xa0]
mov dword [rsp + 0x98], 1
mov qword [rsp + 0x90], rax
mov rax, qword [rsp + 0x38]
mov rdx, qword [rax + 8]
movzx edi, byte [rax + 0x10]
mov qword [rsp + 0x88], rax
movzx r14d, byte [rax + 0x12]
movzx esi, byte [rax + 0x11]
mov rax, qword [rax]
mov qword [rsp + 0x60], rdx
mov ebx, edi
mov rcx, rax
mov qword [rsp + 0x48], rax
call sub.msvcrt.dll_strlen
mov qword [rsp + 0x50], rax
call fcn.0041c650
lea rdx, [0x0041f210]
mov qword [rsp + 0x40], rdx
test ah, 2
jne 0x41e040
lea rdx, [0x0041e730]
mov qword [rsp + 0x40], rdx
test ah, 1
jne 0x41e040
lea rdx, [0x0041e390]
mov qword [rsp + 0x40], rdx
test al, 0x80
jne 0x41e040
lea rdx, [0x0041ead0]
mov qword [rsp + 0x40], rdx
test al, 0x10
jne 0x41e040
test al, 4
lea rdx, [0x0041ee70]
lea rax, [0x0041c7e0]
cmovne rax, rdx
mov qword [rsp + 0x40], rax
nop word cs:[rax + rax]
mov ecx, dword [0x00625720]
test ecx, ecx
je 0x41e280
cmp bl, 0x1e
jbe 0x41e060
lea rcx, str.scrypt:_N_out_of_range
call qword [0x005b80e0]
cmp sil, 7
jbe 0x41e073
lea rcx, str.scrypt:_r_out_of_range
call qword [0x005b80e0]
cmp r14b, 0x19
jbe 0x41e086
lea rcx, str.scrypt:_p_out_of_range
call qword [0x005b80e0]
mov ebx, 1
lea ecx, [rdi + 1]
mov ebp, 0x100
mov r13d, ebx
mov eax, ebx
shl r13d, cl
mov ecx, esi
shl eax, cl
mov ecx, r14d
shl ebx, cl
mov ecx, esi
mov dword [rsp + 0x34], eax
shl ebp, cl
mov ecx, r13d
mov dword [rsp + 0x30], ebx
mov esi, ebp
imul rcx, rsi
add rcx, 0x7f
call sub.msvcrt.dll_malloc
lea r12, [rax + 0x7f]
mov qword [rsp + 0x80], rax
and r12, 0xffffffffffffff80
test rax, rax
je 0x41e37e
mov eax, dword [rsp + 0x30]
add eax, 1
mov edi, eax
imul edi, ebp
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 0x41e36c
mov ecx, r14d
mov eax, ebp
add rsi, rdi
mov rdx, qword [rsp + 0x50]
shl eax, cl
mov qword [rsp + 0x20], rsi
mov r9, qword [rsp + 0x58]
xor ebx, ebx
mov qword [rsp + 0x28], rax
mov r8, qword [rsp + 0x60]
xor r14d, r14d
mov rcx, qword [rsp + 0x48]
mov qword [rsp + 0x70], rax
call fcn.0041dc30
mov edx, dword [rsp + 0x30]
test edx, edx
je 0x41e18c
mov rax, r12
mov qword [rsp + 0x58], r15
mov r15d, r14d
mov r14, qword [rsp + 0x40]
mov r12d, ebp
mov rbp, rax
mov eax, dword [rsp + 0x34]
mov ecx, ebx
mov r9d, r13d
mov r8, rbp
add rcx, rsi
mov rdx, rdi
add r15d, 1
add ebx, r12d
mov dword [rsp + 0x20], eax
call r14
cmp dword [rsp + 0x30], r15d
jne 0x41e160
mov r15, qword [rsp + 0x58]
mov rbx, qword [rsp + 0x90]
mov rcx, qword [rsp + 0x48]
mov r8, rsi
mov r9, qword [rsp + 0x70]
mov rdx, qword [rsp + 0x50]
mov qword [rsp + 0x20], rbx
call fcn.0041d840
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, rbx
nop dword [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 0x41e1e0
mov rsi, qword [rsp + 0x88]
sub ecx, 1
add qword [rsp + 0x38], 0x18
add r15, 0x40
shr ecx, 8
and dword [rsp + 0x98], ecx
mov rax, qword [rsp + 0x38]
cmp qword [rsi + 0x18], 0
je 0x41e240
mov rcx, qword [rax + 8]
call sub.msvcrt.dll_strlen
mov qword [rsp + 0x58], rax
jmp 0x41df9c
mov eax, dword [rsp + 0x98]
test eax, eax
jne 0x41e260
lea rcx, str.scrypt:_scrypt_power_on_self_test_failed
call qword [0x005b80e0]
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 [0x00625720], 1
call fcn.0041dec0
test eax, eax
jne 0x41e04e
lea rcx, str.scrypt:_power_on_self_test_failed
call qword [0x005b80e0]
jmp 0x41e04e
mov dword [rsp + 0x9c], 7
mov ebx, 5
jmp 0x41df48
lea r8, [0x0041b240]
lea rcx, [fcn.00419980]
mov rdx, r8
call fcn.0041c330
and eax, 1
mov esi, eax
test bh, 1
je 0x41def2
lea r8, [0x0041b240]
lea rcx, [fcn.00419bc0]
mov rdx, r8
call fcn.0041c330
and esi, eax
test bl, 0x80
je 0x41defb
lea r8, [0x0041b240]
lea rcx, [fcn.00419f40]
mov rdx, r8
call fcn.0041c330
and esi, eax
test bl, 0x10
je 0x41df04
lea r8, [0x0041b240]
lea rcx, [fcn.0041a320]
mov rdx, r8
call fcn.0041c330
and esi, eax
and ebx, 4
je 0x41df0d
lea r8, [0x0041b240]
lea rcx, [fcn.0041a7b0]
mov rdx, r8
call fcn.0041c330
and esi, eax
jmp 0x41df0d
lea rcx, str.scrypt:_out_of_memory
call qword [0x005b80e0]
jmp 0x41e10b
lea rcx, str.scrypt:_out_of_memory
call qword [0x005b80e0]
jmp 0x41e0db