Function at 0x403520
Capabilities:
Terminate process
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x68
mov esi, ecx
mov rbx, rdx
cmp ecx, 3
jg 0x403578
mov ecx, 0x69
mov r12d, 1
call sym.output_message
mov rcx, qword [rbx + 8]
call qword [sym.imp.ucrtbase.dll__wcsupr]
mov ecx, 0x6a
mov rdx, rax
call sym.output_message
mov eax, r12d
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rcx, qword [rbx + 0x10]
lea rdx, [rsp + 0x40]
lea r8, [rsp + 0x50]
call sym.parse_registry_key
test eax, eax
je 0x4037a0
cmp esi, 4
je 0x4037ab
lea eax, [rsi - 5]
mov r12, qword [sym.imp.kernel32.dll_lstrcmpiW]
lea rdi, [rbx + 0x20]
xor ebp, ebp
lea r14, [rbx + rax*8 + 0x28]
xor r15d, r15d
lea r13, [0x004091bc]
mov rsi, qword [rdi]
movzx eax, word [rsi]
and eax, 0xfffffffd
cmp ax, 0x2d
jne 0x40353a
movzx ecx, word [rsi + 2]
mov edx, 0x79
call sym.is_char
test eax, eax
je 0x403748
cmp word [rsi + 4], 0
jne 0x403748
mov r15d, 1
add rdi, 8
cmp r14, rdi
jne 0x4035bb
mov r9d, ebp
or r9d, 0x20019
cmp ebp, 0x300
je 0x40353a
lea rax, [rsp + 0x48]
xor r8d, r8d
mov rdx, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x40]
mov qword [rsp + 0x20], rax
call qword [sym.imp.advapi32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4037bb
mov rdx, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x40]
add r15d, 1
call sym.get_long_key
mov r12, qword [rbx + 0x18]
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x28], pe_nt_image_headers64
mov rsi, rax
mov rbx, qword [sym.imp.kernel32.dll_CreateFileW]
mov edx, 0x40000000
mov qword [rsp + 0x30], 0
mov rcx, r12
mov dword [rsp + 0x20], r15d
call rbx
mov r13, rax
cmp rax, 0xffffffffffffffff
je 0x4037d0
lea rax, str.Windows_Registry_Editor_Version_5.00_r_n
mov r8, rax
nop word [rax + rax]
add r8, 2
cmp word [r8], 0
jne 0x4036a0
sub r8d, eax
lea rbx, [rsp + 0x58]
mov rcx, r13
mov qword [rsp + 0x20], 0
mov r9, rbx
and r8d, 0xfffffffe
lea rdx, str.Windows_Registry_Editor_Version_5.00_r_n
mov rdi, qword [sym.imp.kernel32.dll_WriteFile]
call rdi
mov rdx, qword [rsp + 0x48]
mov r8, rsi
mov r9d, ebp
mov rcx, r13
call sym.export_registry_data
mov r12d, eax
lea rax, [0x0040915c]
mov r8, rax
nop word cs:[rax + rax]
add r8, 2
cmp word [r8], 0
jne 0x403700
sub r8d, eax
mov r9, rbx
lea rdx, [0x0040915c]
mov rcx, r13
mov qword [rsp + 0x20], 0
and r8d, 0xfffffffe
call rdi
mov rcx, r13
call qword [sym.imp.kernel32.dll_CloseHandle]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.advapi32.dll_RegCloseKey]
jmp 0x403561
add rsi, 2
mov rdx, r13
mov rcx, rsi
call r12
test eax, eax
jne 0x403770
test ebp, 0x200
jne 0x40353a
or ebp, 0x200
jmp 0x4035f5
lea rdx, [0x004091ca]
mov rcx, rsi
call r12
mov edx, ebp
and edx, 0x100
or edx, eax
jne 0x40353a
or ebp, 0x100
jmp 0x4035f5
mov r12d, 1
jmp 0x403561
mov r9d, 0x20019
xor r15d, r15d
xor ebp, ebp
jmp 0x403614
mov ecx, 0x6e
mov r12d, 1
call sym.output_message
jmp 0x403561
mov rax, qword gs:[0x30]
mov r8d, dword [rax + 0x68]
cmp r8d, 0x50
jne 0x403837
mov rdx, r12
mov ecx, 0x15e
call sym.ask_confirm
test eax, eax
jne 0x403806
mov ecx, 0x6d
call sym.output_message
xor ecx, ecx
call qword [sym.imp.ucrtbase.dll_exit]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
mov rcx, r12
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], pe_nt_image_headers64
mov dword [rsp + 0x20], 2
call rbx
mov r13, rax
jmp 0x40368d
lea rax, [rsp + 0x58]
mov ecx, 0x1300
xor r9d, r9d
xor edx, edx
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], rax
call qword [sym.imp.kernel32.dll_FormatMessageW]
mov rcx, qword [rsp + 0x58]
mov rax, rcx
jmp 0x403870
add rax, 2
cmp word [rax], 0
jne 0x40386c
sub rax, rcx
sar rax, 1
mov rdx, rax
call sym.output_writeconsole
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.kernel32.dll_LocalFree]
mov ecx, 1
call qword [sym.imp.ucrtbase.dll_exit]
nop
nop
nop
nop
nop
nop