Function at 0x140010d00
Capabilities:
Persist via windows service
Set registry value

Disassembly:
mov rax, rsp
push rdi
sub rsp, 0x160
mov qword [rsp + 0x48], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov rax, qword [0x1400d9180]
xor rax, rsp
mov qword [rsp + 0x150], rax
mov rbx, rcx
xor esi, esi
cmp dword [0x1400db1c0], esi
je 0x140010d5b
cmp qword [0x1400d8050], 0xffffffffffffffff
je 0x140010d5b
lea rcx, str.Proximity:_ProximitySaveInitialRssi___triggers_active__stopping_trigger_thread.
call fcn.14000d630
call fcn.14000dd30
mov esi, 1
mov rcx, rbx
call fcn.14000dc20
lea rcx, str.Proximity:_ProximitySaveInitialRssi___sleep_2000_before_reading_RSSI
call fcn.14000d630
mov ecx, 0x7d0
call qword [sym.imp.KERNEL32.dll_Sleep]
mov r9d, 7
xor r8d, r8d
lea rdx, [rsp + 0x30]
mov rcx, rbx
call fcn.140050c34
mov edi, eax
test eax, eax
je 0x140010dee
test rbx, rbx
je 0x140010dd8
movzx r8d, byte [rbx]
shl r8, 8
movzx ecx, byte [rbx + 1]
add r8, rcx
shl r8, 8
movzx ecx, byte [rbx + 2]
add r8, rcx
shl r8, 8
movzx eax, byte [rbx + 3]
add r8, rax
shl r8, 8
movzx eax, byte [rbx + 4]
add r8, rax
shl r8, 8
movzx eax, byte [rbx + 5]
add r8, rax
jmp 0x140010ddb
xor r8d, r8d
mov edx, edi
lea rcx, str.Proximity:_ProximitySaveInitialRssi___failed___d__bda_012I64x
call fcn.14000d630
jmp 0x140010f31
movsx edx, byte [rsp + 0x30]
lea rcx, str.Proximity:_ProximitySaveInitialRssi___initial_RSSI_after_pairing___d
call fcn.14000d630
test rbx, rbx
je 0x140010e41
movzx r9d, byte [rbx]
shl r9, 8
movzx eax, byte [rbx + 1]
add r9, rax
shl r9, 8
movzx eax, byte [rbx + 2]
add r9, rax
shl r9, 8
movzx eax, byte [rbx + 3]
add r9, rax
shl r9, 8
movzx eax, byte [rbx + 4]
add r9, rax
shl r9, 8
movzx eax, byte [rbx + 5]
add r9, rax
jmp 0x140010e44
xor r9d, r9d
lea r8, str.SYSTEMCurrentControlSet_servicesBTHPORTParametersDevices_012I64x
mov edx, 0x100
lea rcx, [rsp + 0x50]
call fcn.14005d88c
test eax, eax
jg 0x140010eb2
test rbx, rbx
je 0x140010e9f
movzx edx, byte [rbx]
shl rdx, 8
movzx eax, byte [rbx + 1]
add rdx, rax
shl rdx, 8
movzx eax, byte [rbx + 2]
add rdx, rax
shl rdx, 8
movzx eax, byte [rbx + 3]
add rdx, rax
shl rdx, 8
movzx eax, byte [rbx + 4]
add rdx, rax
shl rdx, 8
movzx eax, byte [rbx + 5]
add rdx, rax
jmp 0x140010ea1
xor edx, edx
lea rcx, str.Proximity:_ProximitySaveInitialRssi__:_sprintf_s_failed._bda_012I64x
call fcn.14000d630
jmp 0x140010f76
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
mov r9d, 0x20006
xor r8d, r8d
lea rdx, [rsp + 0x50]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov r8d, eax
test eax, eax
je 0x140010f2f
test rbx, rbx
je 0x140010f1f
movzx edx, byte [rbx]
shl rdx, 8
movzx ecx, byte [rbx + 1]
add rdx, rcx
shl rdx, 8
movzx ecx, byte [rbx + 2]
add rdx, rcx
shl rdx, 8
movzx eax, byte [rbx + 3]
add rdx, rax
shl rdx, 8
movzx eax, byte [rbx + 4]
add rdx, rax
shl rdx, 8
movzx eax, byte [rbx + 5]
add rdx, rax
jmp 0x140010f21
xor edx, edx
lea rcx, str.Proximity:_ProximitySaveInitialRssi__:_RegOpenKeyExA_failed._bda_012I64x_err_d
call fcn.14000d630
jmp 0x140010f76
xor edi, edi
test edi, edi
jne 0x140010f76
movsx ecx, byte [rsp + 0x30]
call fcn.14005e370
mov dword [rsp + 0x40], eax
lea r9d, [rdi + 4]
mov dword [rsp + 0x28], r9d
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, str.InitialRSSI
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [0x1400db1c0], 0
je 0x140010ff1
lea rcx, str.Proximity:_ProximitySaveInitialRssi___initial_RSSI_read__restoring_previous_triggers
call fcn.14000d630
lea r11, [0x1400d8068]
mov qword [rsp + 0x40], r11
cmp dword [0x1400d8070], 0
je 0x140010fae
mov rcx, qword [0x1400d8068]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
call fcn.14000f7d0
lea rcx, [0x1400db1c8]
test eax, eax
je 0x140010fd5
mov r9d, dword [0x1400db24c]
mov r8d, dword [0x1400db248]
mov edx, esi
call fcn.1400107a0
jmp 0x140010fdb
call fcn.14000dc20
nop
cmp dword [0x1400d8070], 0
je 0x140010ff1
mov rcx, qword [0x1400d8068]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [rsp + 0x150]
xor rcx, rsp
call fcn.14005ba20
lea r11, [rsp + 0x160]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret