Function at 0x180004df0
Capabilities:
Set registry value

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r14
lea rbp, [rsp - 0xce0]
sub rsp, 0xde0
mov rbx, rdx
mov rdi, rcx
lea rdx, [rbp + 0xd0]
xor ecx, ecx
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov esi, eax
test rbx, rbx
je 0x180004e2e
cmp word [rbx], 0
jne 0x180004e35
lea rbx, [rbp + 0xd0]
mov r9, rbx
lea r8, [0x18025e870]
mov edx, 0x800
lea rcx, [rbp + 0x4e0]
call fcn.180004d20
mov r9, rdi
lea r8, str.discord__s
mov edx, 0x80
lea rcx, [rsp + 0x50]
call fcn.180004d20
mov r9, rdi
lea r8, str.URL:Run_game__s_protocol
mov edx, 0x100
lea rcx, [rbp - 0x30]
call fcn.180004d20
xor r14d, r14d
lea r9, [rsp + 0x50]
lea r8, str.SoftwareClasses_s
mov word [rbp + 0xd18], r14w
mov edx, 0x200
lea rcx, [rbp + 0x2e0]
call fcn.180004d20
mov qword [rsp + 0x40], r14
lea rax, [rbp + 0xd20]
mov qword [rsp + 0x38], rax
lea rdx, [rbp + 0x2e0]
mov qword [rsp + 0x30], r14
xor r9d, r9d
mov dword [rsp + 0x28], 0x20006
xor r8d, r8d
mov rcx, 0xffffffff80000001
mov dword [rsp + 0x20], r14d
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x180004f11
lea ecx, [r14 + 2]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, str.Error_creating_key_n
call fcn.180004cd0
add rsp, 0xde0
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret
lea rcx, [rbp - 0x30]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov rcx, qword [rbp + 0xd20]
mov r9d, 1
inc eax
xor r8d, r8d
add eax, eax
xor edx, edx
mov dword [rsp + 0x28], eax
lea rax, [rbp - 0x30]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jns 0x180004f62
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, str.Error_writing_description_n
call fcn.180004cd0
lea rcx, [rbp - 0x30]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov rcx, qword [rbp + 0xd20]
lea rax, [rbp + 0xd18]
mov dword [rsp + 0x28], 2
lea rdx, str.URL_Protocol
mov r9d, 1
mov qword [rsp + 0x20], rax
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jns 0x180004fbb
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, str.Error_writing_description_n
call fcn.180004cd0
mov rdi, qword [rbp + 0xd20]
lea rax, [rbp + 0xd28]
mov qword [rsp + 0x40], r14
lea rdx, str.DefaultIcon
mov qword [rsp + 0x38], rax
xor r9d, r9d
mov qword [rsp + 0x30], r14
xor r8d, r8d
mov dword [rsp + 0x28], 0xf003f
mov rcx, rdi
mov dword [rsp + 0x20], r14d
mov qword [rbp + 0xd28], r14
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov ebx, eax
test eax, eax
jne 0x18000504e
mov rcx, qword [rbp + 0xd28]
lea eax, [rsi*2 + 2]
mov dword [rsp + 0x28], eax
lea r9d, [rbx + 1]
lea rax, [rbp + 0xd0]
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rbp + 0xd28]
mov ebx, eax
test rcx, rcx
je 0x18000504e
cmp rcx, rdi
je 0x18000504e
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
jns 0x18000506c
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, str.Error_writing_icon_n
call fcn.180004cd0
lea rcx, [rbp + 0x4e0]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov rsi, qword [rbp + 0xd20]
lea rdx, str.shellopencommand
mov qword [rsp + 0x40], r14
xor r9d, r9d
xor r8d, r8d
mov qword [rbp + 0xd28], r14
lea edi, [rax + 1]
mov rcx, rsi
lea rax, [rbp + 0xd28]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], 0xf003f
mov dword [rsp + 0x20], r14d
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov ebx, eax
test eax, eax
jne 0x18000510b
mov rcx, qword [rbp + 0xd28]
lea eax, [rdi + rdi]
mov dword [rsp + 0x28], eax
lea r9d, [rbx + 1]
lea rax, [rbp + 0x4e0]
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rbp + 0xd28]
mov ebx, eax
test rcx, rcx
je 0x18000510b
cmp rcx, rsi
je 0x18000510b
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
jns 0x180005129
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, str.Error_writing_command_n
call fcn.180004cd0
mov rcx, qword [rbp + 0xd20]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
add rsp, 0xde0
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret