Function at 0x14004a710
Capabilities:
Persist via windows service
Query or enumerate registry key
Query or enumerate registry value
Set registry value

Disassembly:
push rbp
push r14
push r15
lea rbp, [rsp - 0x53d0]
mov eax, 0x54d0
call fcn.14005ba50
sub rsp, rax
mov qword [rsp + 0x78], 0xfffffffffffffffe
mov qword [rsp + 0x54f0], rsi
mov qword [rsp + 0x54f8], rdi
mov qword [rsp + 0x5500], r12
mov qword [rsp + 0x5508], r13
mov rax, qword [0x1400d9180]
xor rax, rsp
mov qword [rbp + 0x53c0], rax
lea rcx, [rbp + 0x10]
call fcn.1400261f4
mov rdi, 0xffffffff80000002
mov qword [rbp + 0x428], rdi
lea rcx, [rbp + 0x10]
call fcn.140022d94
xor r14d, r14d
cmp dword [rbp + 0x2a1c], r14d
jne 0x14004a7a4
xor edx, edx
lea rcx, str.EnableRemoteWakeup:_m_dwEnableRemoteWakeup__d_n
call fcn.1400300fc
jmp 0x14004ad00
mov word [rbp + 0x4fa0], r14w
lea r8, [rbp + 0x2a20]
mov r15d, 0x104
mov edx, r15d
lea rcx, [rbp + 0x4fa0]
call fcn.14005fbe4
lea rdx, [rbp + 0x4fa0]
lea rcx, str.EnableRemoteWakeup:_szPidVidList__s_n
call fcn.1400300fc
lea rcx, [rbp + 0x4fa0]
call fcn.14005d25c
test rax, rax
je 0x14004ad00
lea rax, [rsp + 0x68]
mov qword [rsp + 0x20], rax
mov r9d, 0x20007
xor r8d, r8d
lea rdx, str.SYSTEMCurrentControlSetServicesBthportParameters
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, 4
test eax, eax
jne 0x14004a8a7
mov dword [rsp + 0x40], r14d
lea rax, [rsp + 0x44]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea rdx, str.SystemRemoteWakeSupported
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x14004a865
mov edx, dword [rsp + 0x40]
lea rcx, str.EnableRemoteWakeup:_RegQueryValueEx_SystemRemoteWakeSupported_value___d_n
call fcn.1400300fc
cmp dword [rsp + 0x40], r14d
jne 0x14004a89a
mov dword [rsp + 0x40], 1
mov dword [rsp + 0x28], esi
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
mov r9d, esi
xor r8d, r8d
lea rdx, str.SystemRemoteWakeSupported
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x14004a8b3
lea rcx, str.EnableRemoteWakeup:_Reg_open_failed_HKLMSystemCCSServicesBthportParameters__n
call fcn.1400300fc
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
mov r9d, 0x2000e
xor r8d, r8d
lea rdx, str.SYSTEMCurrentControlSetEnumUSB
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x14004a8ed
lea rcx, str.EnableRemoteWakeup:_Reg_open_failed_SYSTEMCurrentControlSetEnumUSB__n
call fcn.1400300fc
xor eax, eax
jmp 0x14004ad05
mov rax, qword [str.BT2K_INS.dll]
mov qword [rbp + 0x4b60], rax
mov rax, qword [0x14009df60]
mov qword [rbp + 0x4b68], rax
mov rax, qword [0x14009df68]
mov qword [rbp + 0x4b70], rax
movzx eax, word [0x14009df70]
mov word [rbp + 0x4b78], ax
mov word [rbp + 0x51b0], r14w
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp + 0x51b2]
call fcn.14005bab0
lea rcx, [rbp + 0x32b0]
call fcn.140026df4
lea rcx, [rbp + 0x32b0]
call fcn.140022d94
mov rdx, r15
lea rcx, [rbp + 0x51b0]
test eax, eax
jne 0x14004a988
lea rax, [rbp + 0x4b60]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0x36d0]
lea r8, [0x14009a050]
call fcn.14005ce1c
jmp 0x14004a99b
lea r9, [rbp + 0x4b60]
lea r8, [0x14009df50]
call fcn.14005ce1c
mov r13d, r14d
xor edx, edx
jmp 0x14004aca9
lea rdx, [rbp + 0x4b80]
lea rcx, str.EnableRemoteWakeup:_found_VID_PID__s__n
call fcn.1400300fc
lea rdx, [rbp + 0x4b80]
lea rcx, [rbp + 0x4fa0]
call fcn.1400604d4
test rax, rax
je 0x14004aca3
lea rcx, str.EnableRemoteWakeup:_matches_PID_VID_in_list_n
call fcn.1400300fc
lea r11, [rsp + 0x60]
mov qword [rsp + 0x20], r11
mov r9d, 0x2000e
xor r8d, r8d
lea rdx, [rbp + 0x4b80]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x14004ac90
mov r12d, r14d
xor edx, edx
jmp 0x14004ac37
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
mov r9d, 0x2000e
xor r8d, r8d
lea rdx, [rbp + 0x4d90]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x14004ac1e
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
mov r9d, 0x2000f
xor r8d, r8d
lea rdx, str.Device_Parameters
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x14004abfe
mov dword [rsp + 0x44], esi
mov dword [rsp + 0x40], r14d
lea rax, [rsp + 0x44]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea rdx, str.RemoteWakeEnabled
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x14004ab0c
mov edx, dword [rsp + 0x40]
lea rcx, str.EnableRemoteWakeup:_RegQueryValueEx_RemoteWakeEnabled_value___d_n
call fcn.1400300fc
cmp dword [rsp + 0x40], r14d
je 0x14004ab0c
lea rax, [rsp + 0x44]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea rdx, str.DeviceRemoteWakeSupported
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x14004ab0c
mov edx, dword [rsp + 0x40]
lea rcx, str.EnableRemoteWakeup:_RegQueryValueEx_DeviceRemoteWakeSupported_value___d_n
call fcn.1400300fc
cmp dword [rsp + 0x40], r14d
jne 0x14004ac11
mov dword [rsp + 0x40], 1
mov dword [rsp + 0x28], esi
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
mov r9d, esi
xor r8d, r8d
lea rdx, str.RemoteWakeEnabled
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov dword [rsp + 0x40], 1
mov dword [rsp + 0x28], esi
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
mov r9d, esi
xor r8d, r8d
lea rdx, str.DeviceRemoteWakeSupported
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea rcx, str.EnableRemoteWakeup:_RemoteWakeEnabled__DeviceRemoteWakeSupported__1_set__n
call fcn.1400300fc
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rcx, [rbp + 0x51b0]
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rsi, rax
test rax, rax
je 0x14004ac0c
lea rdx, str.BT2K_RefreshDevice
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rdi, rax
test rax, rax
je 0x14004abf3
lea rax, [rbp - 0x78]
mov qword [rbp - 0x80], rax
mov r8d, 3
lea rdx, [rbp + 0x4b80]
lea rcx, [rbp - 0x80]
call fcn.14004b928
nop
mov rcx, qword [rbp - 0x80]
call rdi
mov edi, eax
lea rax, [rbp - 0x78]
mov rcx, qword [rbp - 0x80]
cmp rcx, rax
je 0x14004abe5
call fcn.14005c1e4
mov edx, edi
lea rcx, str.EnableRemoteWakeup:_BT2K_RefreshDevice__d_n
call fcn.1400300fc
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x14004ac0c
lea rcx, str.EnableRemoteWakeup:_RegOpenKeyEx_false_Device_Parameters__n
call fcn.1400300fc
jmp 0x14004ac11
mov esi, 4
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x14004ac31
lea rdx, [rbp + 0x4d90]
lea rcx, str.EnableRemoteWakeup:_RegOpenKeyEx_false__s_n
call fcn.1400300fc
inc r12d
mov edx, r12d
mov qword [rsp + 0x38], r14
mov qword [rsp + 0x30], r14
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], r14
mov word [rbp + 0x4d90], r14w
mov dword [rsp + 0x4c], r15d
lea r9, [rsp + 0x4c]
lea r8, [rbp + 0x4d90]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
je 0x14004aa17
lea rcx, str.EnableRemoteWakeup:_RegEnumKeyEx_szKeyNameDevInstance_false_n
call fcn.1400300fc
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x14004aca3
lea rdx, [rbp + 0x4b80]
lea rcx, str.EnableRemoteWakeup:_RegOpenKeyEx_false__s_n
call fcn.1400300fc
inc r13d
mov edx, r13d
mov qword [rsp + 0x38], r14
mov qword [rsp + 0x30], r14
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], r14
mov word [rbp + 0x4b80], r14w
mov dword [rsp + 0x48], r15d
lea r9, [rsp + 0x48]
lea r8, [rbp + 0x4b80]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
je 0x14004a9a5
lea rcx, str.EnableRemoteWakeup:_RegEnumKeyEx_szKeyNamePidVid_false_n
call fcn.1400300fc
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 1
mov rcx, qword [rbp + 0x53c0]
xor rcx, rsp
call fcn.14005ba20
lea r11, [rsp + 0x54d0]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov r12, qword [r11 + 0x30]
mov r13, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret