Function at 0x180004640
Capabilities:
Set registry value

Disassembly:
push rdi
sub rsp, 0x2a0
mov rax, qword [0x18002a008]
xor rax, rsp
mov qword [rsp + 0x290], rax
xor edi, edi
lea rcx, [rsp + 0x80]
xor edx, edx
mov qword [rsp + 0x78], rdi
mov r8d, 0x208
mov qword [rsp + 0x70], rdi
call fcn.180007560
cmp qword [0x18002bf58], rdi
jne 0x18000468f
mov eax, 0x8000ffff
jmp 0x1800048f9
mov dword [rsp + 0x68], 0x8c
lea r8, str.CLSID_08X__04X__04X__02X_02X__02X_02X_02X_02X_02X_02X
mov dword [rsp + 0x60], 0xb
lea rcx, [rsp + 0x80]
mov dword [rsp + 0x58], 0xe0
mov r9d, 0xc637e2d2
mov dword [rsp + 0x50], 7
mov edx, 0x104
mov dword [rsp + 0x48], 0xaf
mov dword [rsp + 0x40], 0xd2
mov dword [rsp + 0x38], 0x43
mov dword [rsp + 0x30], 0x9c
mov dword [rsp + 0x28], 0x4ace
mov dword [rsp + 0x20], 0x1a0
mov qword [rsp + 0x2b0], rbx
call fcn.180004240
test eax, eax
jns 0x180004714
mov ebx, 0x80004005
jmp 0x1800048ca
mov qword [rsp + 0x40], rdi
lea rax, [rsp + 0x78]
mov qword [rsp + 0x38], rax
lea rdx, [rsp + 0x80]
mov qword [rsp + 0x30], rdi
xor r9d, r9d
mov dword [rsp + 0x28], 0xf003f
xor r8d, r8d
mov rcx, 0xffffffff80000000
mov dword [rsp + 0x20], edi
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov ebx, eax
test eax, eax
jle 0x18000475e
movzx ebx, ax
or ebx, 0x80070000
test ebx, ebx
js 0x1800048ca
mov rcx, qword [rsp + 0x78]
lea rax, str.Win8_SDK_HW_MFT_Sample
mov dword [rsp + 0x28], 0x2e
mov r9d, 1
xor r8d, r8d
mov qword [rsp + 0x20], rax
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ebx, eax
test eax, eax
jle 0x18000479f
movzx ebx, ax
or ebx, 0x80070000
test ebx, ebx
js 0x1800048ca
mov rcx, qword [rsp + 0x78]
lea rax, [rsp + 0x70]
mov qword [rsp + 0x40], rdi
lea rdx, str.InprocServer32
mov qword [rsp + 0x38], rax
xor r9d, r9d
mov qword [rsp + 0x30], rdi
xor r8d, r8d
mov dword [rsp + 0x28], 0xf003f
mov dword [rsp + 0x20], edi
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov ebx, eax
test eax, eax
jle 0x1800047ee
movzx ebx, ax
or ebx, 0x80070000
mov rcx, qword [0x18002bf58]
lea rdx, [rsp + 0x80]
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x180004912
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test eax, eax
jle 0x180004826
movzx ebx, ax
or ebx, 0x80070000
test ebx, ebx
js 0x1800048ca
lea rcx, [rsp + 0x80]
mov rax, 0xffffffffffffffff
nop dword [rax]
cmp word [rcx + rax*2 + 2], di
lea rax, [rax + 1]
jne 0x180004840
mov rcx, qword [rsp + 0x70]
lea eax, [rax*2 + 2]
mov dword [rsp + 0x28], eax
mov r9d, 1
lea rax, [rsp + 0x80]
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ebx, eax
test eax, eax
jle 0x180004888
movzx ebx, ax
or ebx, 0x80070000
test ebx, ebx
js 0x1800048ca
mov rcx, qword [rsp + 0x70]
lea rax, str.Both
mov dword [rsp + 0x28], 0xa
lea rdx, str.ThreadingModel
mov r9d, 1
mov qword [rsp + 0x20], rax
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ebx, eax
test eax, eax
jle 0x1800048ca
movzx ebx, ax
or ebx, 0x80070000
mov rcx, qword [rsp + 0x70]
test rcx, rcx
je 0x1800048df
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov qword [rsp + 0x70], rdi
mov rcx, qword [rsp + 0x78]
test rcx, rcx
je 0x1800048ef
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, ebx
mov rbx, qword [rsp + 0x2b0]
mov rcx, qword [rsp + 0x290]
xor rcx, rsp
call fcn.180005130
add rsp, 0x2a0
pop rdi
ret
cmp eax, 0x104
jne 0x180004826
mov ebx, 0x80004005
jmp 0x1800048ca