Function at 0x1400038f0
Capabilities:
Create thread
Query or enumerate registry value

Disassembly:
mov r11, rsp
push r12
push r14
push r15
sub rsp, 0x2a0
mov qword [rsp + 0x60], 0xfffffffffffffffe
mov qword [r11 + 0x10], rbx
mov qword [r11 + 0x18], rsi
mov qword [r11 + 0x20], rdi
mov rax, qword [0x14000a160]
xor rax, rsp
mov qword [rsp + 0x290], rax
mov rbx, rcx
mov qword [rsp + 0x58], rcx
xor r14d, r14d
mov r12d, r14d
mov qword [rsp + 0x50], r14
cmp dword [rcx + 0x2b8], r12d
jne 0x1400039f1
xor eax, eax
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x78], rax
mov qword [r11 - 0x238], rax
mov dword [rsp + 0x68], 0x20
mov dword [rsp + 0x6c], 5
mov eax, dword [0x140007360]
mov dword [rsp + 0x74], eax
mov eax, dword [0x140007364]
mov dword [rsp + 0x78], eax
mov eax, dword [0x140007368]
mov dword [rsp + 0x7c], eax
mov eax, dword [0x14000736c]
mov dword [rsp + 0x80], eax
lea r8d, [r14 + 1]
lea rdx, [rsp + 0x68]
mov rcx, qword [rcx + 0x290]
call qword [sym.imp.USER32.dll_RegisterDeviceNotificationW]
mov r12, rax
mov qword [rsp + 0x50], rax
test rax, rax
jne 0x1400039e0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.CHpMonitorService::Run___RegisterDeviceNotificationFailed__x
mov rcx, rbx
call fcn.140001550
call qword [sym.imp.KERNEL32.dll_DebugBreak]
jmp 0x140003c14
lea rdx, str.CHpMonitorService::Run___RegisterDeviceNotification_Succeeded
mov rcx, rbx
call fcn.140001550
jmp 0x140003a12
lea rdx, str.CHpMonitorService::Run___No_RegisterDeviceNotification_Debugging
call fcn.140001550
lea rcx, [rbx + 0x2e0]
call qword [sym.imp.accelerometerdll.DLL_unsigned_char___cdecl_FindAccelerometerDevice_void____ptr64____ptr64_]
test al, al
je 0x140003c14
mov qword [rsp + 0x28], r14
mov dword [rsp + 0x20], r14d
mov r9, rbx
lea r8, [0x1400036e0]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.MSVCR110.dll__beginthreadex]
mov r15d, r14d
mov dword [rsp + 0x38], r14d
nop dword [rax + rax]
cmp dword [rbx + 0x2b4], 0
je 0x140003bf5
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rdi, [rbx + 0x2e0]
cmp qword [rdi], 0
jne 0x140003a92
mov rcx, rdi
call qword [sym.imp.accelerometerdll.DLL_unsigned_char___cdecl_FindAccelerometerDevice_void____ptr64____ptr64_]
mov rcx, rbx
test al, al
jne 0x140003a86
lea rdx, str.CHpMonitorService_service_Accelerometer_Not_Found
call fcn.140001550
mov qword [rdi], r14
jmp 0x140003a92
lea rdx, str.CHpMonitorService_service_Accelerometer_Found
call fcn.140001550
cmp byte [rbx + 0x2dc], 0
jne 0x140003be4
cmp qword [rdi], 0
je 0x140003be4
mov ecx, 0x7d0
call qword [sym.imp.KERNEL32.dll_Sleep]
mov qword [rsp + 0x40], r14
mov dword [rsp + 0x34], r14d
lea r8, [rsp + 0x34]
mov edx, 2
mov rcx, qword [rdi]
call qword [sym.imp.accelerometerdll.DLL_unsigned_long_int___cdecl_GetAccelerometerProperty_void____ptr64__enum__ACCELEROMETER_PROPERTY_FLAGS__void____ptr64_]
test eax, eax
jne 0x140003be4
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
lea rdx, str.SoftwarePoliciesHewlett_PackardHP_3D_DriveGuard
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140003bc0
lea esi, [rax + 1]
mov word [rsp + 0x90], r14w
xor edx, edx
mov r8d, 0x1fc
lea rcx, [rsp + 0x92]
call sub.MSVCR110.dll_memset
mov dword [rsp + 0x48], 0xff
lea rax, [rsp + 0x48]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x90]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea rdx, str.FreeFallProtectionMode
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140003b7f
lea rdx, str.false
lea rcx, [rsp + 0x90]
call qword [sym.imp.MSVCR110.dll__wcsicmp]
test eax, eax
cmove esi, r14d
mov byte [rsp + 0x30], sil
lea r8, [rsp + 0x30]
mov edx, 2
mov rcx, qword [rdi]
call qword [sym.imp.accelerometerdll.DLL_unsigned_long_int___cdecl_SetAccelerometerProperty_void____ptr64__enum__ACCELEROMETER_PROPERTY_FLAGS__void____ptr64_]
test eax, eax
jne 0x140003ba5
mov edx, esi
mov rcx, rbx
call fcn.140003ca0
cmp dword [rsp + 0x34], esi
jne 0x140003bc0
inc r15d
mov dword [rsp + 0x38], r15d
cmp r15d, 3
jne 0x140003bc0
mov byte [rbx + 0x2dc], 1
jmp 0x140003bd4
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x140003be4
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [rbx + 0x2d4]
add dword [rbx + 0x2d8], eax
jmp 0x140003a40
cmp dword [rbx + 0x2b8], 0
jne 0x140003c14
mov rcx, r12
call qword [sym.imp.USER32.dll_UnregisterDeviceNotification]
mov rcx, qword [rbx + 0x2e0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x290]
xor rcx, rsp
call fcn.140004420
lea r11, [rsp + 0x2a0]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop r12
ret