Function at 0x140056f90
Capabilities:
Set registry value

Disassembly:
mov r11, rsp
push rbx
push r12
sub rsp, 0x4f8
mov eax, dword [rcx + 8]
xor r12d, r12d
cmp dword [rcx + 4], 1
mov ebx, r12d
sete bl
test eax, eax
mov qword [rsp + 0x40], r12
mov dword [r11 + 0x10], r12d
mov dword [r11 + 0x18], r12d
mov dword [r11 + 8], r12d
mov dword [rsp + 0x48], 1
mov dword [r11 + 0x20], eax
je 0x1400572a5
cmp eax, 1
mov qword [r11 - 0x28], rdi
jne 0x140056feb
cmp dword [rcx + 0xc], 1
mov eax, r12d
setne al
mov dword [r11 + 8], eax
jmp 0x14005700b
cmp eax, 2
jne 0x140056ffc
mov eax, dword [rcx + 0xc]
mov dword [rsp + 0x510], eax
jmp 0x14005700b
cmp eax, 3
jne 0x14005700b
mov eax, dword [rcx + 0xc]
mov dword [rsp + 0x510], eax
test ebx, ebx
je 0x14005702c
lea rcx, [0x1400c0798]
mov r9d, 2
xor r8d, r8d
xor edx, edx
call qword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
mov rdi, rax
jmp 0x140057047
lea rcx, [0x1400c0798]
mov r9d, 8
xor r8d, r8d
xor edx, edx
call qword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
mov rdi, rax
cmp rdi, 0xffffffffffffffff
je 0x14005729d
lea rdx, [rsp + 0x2e0]
mov rcx, rdi
mov dword [rsp + 0x2e0], 0x128
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInfoListDetailA]
test eax, eax
jne 0x14005708d
mov rcx, rdi
call qword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov rdi, qword [rsp + 0x4e0]
add rsp, 0x4f8
pop r12
pop rbx
ret
mov qword [rsp + 0x4f0], rbp
lea r8, [rsp + 0x50]
xor edx, edx
mov rcx, rdi
mov qword [rsp + 0x4e8], rsi
mov dword [rsp + 0x50], 0x20
mov esi, r12d
movsxd rbp, ebx
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x140057284
nop
nop
nop
nop
mov ecx, dword [rsp + 0x64]
lea rdx, [rsp + 0x410]
xor r9d, r9d
mov r8d, 0xc8
xor bl, bl
mov qword [rsp + 0x20], r12
call qword [0x1400df4b0]
test eax, eax
jne 0x1400573b8
lea rax, [rsp + 0x518]
lea r9, [rsp + 0x520]
lea rdx, [rsp + 0x50]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x210]
mov r8d, 1
mov rcx, rdi
mov dword [rsp + 0x28], 0xc8
mov qword [rsp + 0x20], rax
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyA]
test eax, eax
je 0x140057150
lea rcx, [rsp + 0x210]
call fcn.140055fd0
test al, al
sete bl
jmp 0x140057166
bt dword [0x1400dd138], 0x10
jae 0x140057166
lea rcx, str.PowerXpressUpdateRegistry:_fail_to_find_device_registry_n
call fcn.14000cbb0
lea rax, [rsp + 0x518]
lea r9, [rsp + 0x520]
lea rdx, [rsp + 0x50]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x140]
mov r8d, 9
mov rcx, rdi
mov dword [rsp + 0x28], 0xc8
mov qword [rsp + 0x20], rax
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyA]
test rbp, rbp
je 0x1400572b0
test bl, bl
je 0x1400573b8
lea r9, [rsp + 0x140]
lea r8, str.SYSTEMCurrentControlSetControlClass
lea rdx, str._s_s
lea rcx, [rsp + 0x70]
call fcn.14007dc1c
bt dword [0x1400dd138], 0x10
jae 0x1400571f0
lea rdx, [rsp + 0x70]
lea rcx, str.PowerXpressUpdateRegistry:__IGPU__registry:_s_n
call fcn.14000cbb0
lea rax, [rsp + 0x40]
lea rdx, [rsp + 0x70]
mov r9d, 0x2001f
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x140057279
mov rcx, qword [rsp + 0x40]
lea rax, [rsp + 0x528]
lea rdx, str.PXReason
mov r9d, 4
xor r8d, r8d
mov dword [rsp + 0x28], 4
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov rcx, qword [rsp + 0x40]
lea rax, [rsp + 0x510]
lea rdx, str.PXValue
mov r9d, 4
xor r8d, r8d
mov dword [rsp + 0x28], 4
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, rdi
call qword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov rsi, qword [rsp + 0x4e8]
mov rbp, qword [rsp + 0x4f0]
mov rdi, qword [rsp + 0x4e0]
add rsp, 0x4f8
pop r12
pop rbx
ret
test bl, bl
jne 0x1400573b8
lea r9, [rsp + 0x140]
lea r8, str.SYSTEMCurrentControlSetControlClass
lea rdx, str._s_s
lea rcx, [rsp + 0x70]
call fcn.14007dc1c
bt dword [0x1400dd138], 0x10
jae 0x1400572f3
lea rdx, [rsp + 0x70]
lea rcx, str.PowerXpressUpdateRegistry:__DGPU__registry:_s_n
call fcn.14000cbb0
lea rax, [rsp + 0x40]
lea rdx, [rsp + 0x70]
mov r9d, 0x2001f
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x1400573ad
mov rcx, qword [rsp + 0x40]
lea rax, [rsp + 0x528]
lea rdx, str.PXReason
mov r9d, 4
xor r8d, r8d
mov dword [rsp + 0x28], 4
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov rcx, qword [rsp + 0x40]
lea rax, [rsp + 0x510]
lea rdx, str.PXValue
mov r9d, 4
xor r8d, r8d
mov dword [rsp + 0x28], 4
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov rcx, qword [rsp + 0x40]
lea rax, [rsp + 0x48]
lea rdx, str.PXBlockModeSet
mov r9d, 4
xor r8d, r8d
mov dword [rsp + 0x28], 4
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
add esi, 1
lea r8, [rsp + 0x50]
mov rcx, rdi
mov edx, esi
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
jne 0x1400570d0
jmp 0x140057284