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

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x80]
sub rsp, 0x180
mov rax, qword [0x1400d9180]
xor rax, rsp
mov qword [rbp + 0x70], rax
xor r13d, r13d
mov rsi, rdx
mov r14, rcx
lea r12d, [r13 + 1]
mov edi, r13d
mov qword [rsp + 0x58], r13
mov r15b, r13b
test rcx, rcx
je 0x140056a67
test rdx, rdx
je 0x140056a67
mov rax, qword [rdx + 8]
test rax, rax
je 0x140056a67
cmp dword [rdx + 0x10], r13d
je 0x140056a67
lea r9, str.SYSTEMCurrentControlSetServicesBTHPORTParameters
lea r8, str._sDevices_012I64xCachedServices
lea rcx, [rsp + 0x70]
mov edx, 0x100
mov qword [rsp + 0x20], rax
call fcn.14005d88c
lea r11, [rsp + 0x58]
lea rdx, [rsp + 0x70]
mov r9d, 0x20006
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x20], r11
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x14005615d
lea edi, [rax + 4]
lea rdx, str.BtwProvisionedHidDevsCreateRegistryMs:_SDP_key_exist_already_n
mov ecx, edi
call fcn.140046d10
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rdx, str.BtwProvisionedHidDevsCreateRegistryMs:_CachedServices_registry_exists_already_n
mov ecx, edi
mov qword [rsp + 0x58], r13
mov r15b, r12b
call fcn.140046d10
jmp 0x14005655e
mov edx, dword [rsi + 0x124]
test edx, edx
jne 0x140056173
lea rdx, str.BtwProvisionedHidDevsCreateRegistryMs:_error:_no_HID_SDP_n
jmp 0x140056a6e
lea r12, [rsi + 0x128]
lea r8, [rsp + 0x64]
mov rcx, r12
call fcn.14005a344
test al, al
jne 0x1400561a6
lea rdx, str.BtwProvisionedHidDevsCreateRegistryMs:_handle_is_not_found_in_the_HID_SDP_record_n
mov ecx, 1
call fcn.140046d10
mov ebx, 6
jmp 0x140056a7b
mov edx, dword [rsi + 0x1128]
test edx, edx
jne 0x1400561c1
lea rdx, str.BtwProvisionedHidDevsCreateRegistryMs:_error:_no_PNP_SDP_n
mov ecx, 1
jmp 0x140056a71
lea r13, [rsi + 0x112c]
lea r8, [rsp + 0x60]
mov rcx, r13
call fcn.14005a344
xor ebx, ebx
test al, al
jne 0x1400561f7
lea rdx, str.BtwProvisionedHidDevsCreateRegistryMs:_handle_is_not_found_in_the_HID_SDP_record_n
lea ecx, [rbx + 1]
call fcn.140046d10
mov ebx, 6
xor r13d, r13d
jmp 0x140056a7b
mov rax, qword [rsi + 8]
lea r9, str.SYSTEMCurrentControlSetServicesBTHPORTParameters
lea r8, str._sDevices_012I64x
lea rcx, [rsp + 0x70]
mov edx, 0x100
mov qword [rsp + 0x20], rax
call fcn.14005d88c
mov qword [rsp + 0x40], rbx
lea rax, [rsp + 0x58]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rbx
lea rdx, [rsp + 0x70]
xor r9d, r9d
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x28], 0x20006
mov dword [rsp + 0x20], ebx
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov ebx, eax
test eax, eax
je 0x140056262
mov edi, 0x462
jmp 0x1400561ef
mov rcx, qword [rsp + 0x58]
mov edi, 4
lea rax, [rsp + 0x50]
lea rdx, str.DibServiceVersion
mov r9d, edi
xor r8d, r8d
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x50], 0x20000
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ebx, eax
test eax, eax
je 0x1400562a5
mov edi, 0x465
jmp 0x1400561ef
movzx eax, word [rsi]
mov rcx, qword [rsp + 0x58]
lea rdx, [0x1400bba1c]
mov dword [rsp + 0x50], eax
lea rax, [rsp + 0x50]
mov r9d, edi
xor r8d, r8d
mov dword [rsp + 0x28], edi
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ebx, eax
test eax, eax
je 0x1400562e2
mov edi, 0x468
jmp 0x1400561ef
movzx eax, word [rsi + 2]
mov rcx, qword [rsp + 0x58]
lea rdx, [0x1400bba18]
mov dword [rsp + 0x50], eax
lea rax, [rsp + 0x50]
mov r9d, edi
xor r8d, r8d
mov dword [rsp + 0x28], edi
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ebx, eax
test eax, eax
je 0x140056320
mov edi, 0x46b
jmp 0x1400561ef
mov rcx, qword [rsp + 0x58]
lea rax, [rsp + 0x50]
lea rdx, str.VIDType
mov r9d, edi
xor r8d, r8d
mov dword [rsp + 0x28], edi
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x50], 2
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ebx, eax
test eax, eax
je 0x14005635e
mov edi, 0x46e
jmp 0x1400561ef
mov eax, dword [rsi + 0x10]
mov rcx, qword [rsp + 0x58]
lea rdx, [0x1400bba08]
mov dword [rsp + 0x50], eax
lea rax, [rsp + 0x50]
mov r9d, edi
xor r8d, r8d
mov dword [rsp + 0x28], edi
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ebx, eax
test eax, eax
je 0x14005639b
mov edi, 0x471
jmp 0x1400561ef
lea rbx, [rsi + 0x14]
mov rcx, rbx
call fcn.14005bc90
mov rcx, qword [rsp + 0x58]
lea rdx, str.Name
inc eax
mov r9d, 3
xor r8d, r8d
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rbx
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ebx, eax
test eax, eax
je 0x1400563dd
mov edi, 0x473
jmp 0x1400561ef
mov rcx, qword [rsp + 0x58]
lea rax, [rsp + 0x50]
lea rdx, str.Store_Link_Key
mov r9d, edi
xor r8d, r8d
mov dword [rsp + 0x28], edi
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x50], 1
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ebx, eax
test eax, eax
je 0x14005641b
mov edi, 0x476
jmp 0x1400561ef
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rax, qword [rsi + 8]
lea r9, str.SYSTEMCurrentControlSetServicesBTHPORTParameters
lea r8, str._sDevices_012I64xCachedServices
lea rcx, [rsp + 0x70]
xor ebx, ebx
mov edx, 0x100
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x58], rbx
call fcn.14005d88c
mov qword [rsp + 0x40], rbx
lea rax, [rsp + 0x58]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rbx
lea rdx, [rsp + 0x70]
xor r9d, r9d
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x28], 0x20006
mov dword [rsp + 0x20], ebx
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov ebx, eax
test eax, eax
je 0x14005649b
mov edi, 0x47d
jmp 0x1400561ef
mov r9d, dword [rsp + 0x64]
lea r8, str._08x
lea rcx, [rsp + 0x70]
mov edx, 0x100
call fcn.14005d88c
mov r11d, dword [rsi + 0x124]
mov rcx, qword [rsp + 0x58]
mov dword [rsp + 0x28], r11d
mov qword [rsp + 0x20], r12
mov r12d, 3
lea rdx, [rsp + 0x70]
xor r8d, r8d
mov r9d, r12d
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ebx, eax
test eax, eax
je 0x1400564f3
mov edi, 0x480
jmp 0x1400561ef
mov r9d, dword [rsp + 0x60]
lea r8, str._08x
lea rcx, [rsp + 0x70]
mov edx, 0x100
call fcn.14005d88c
mov r11d, dword [rsi + 0x1128]
mov rcx, qword [rsp + 0x58]
mov dword [rsp + 0x28], r11d
lea rdx, [rsp + 0x70]
mov r9d, r12d
xor r8d, r8d
mov qword [rsp + 0x20], r13
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
xor r13d, r13d
mov ebx, eax
test eax, eax
je 0x140056548
mov edi, 0x483
jmp 0x140056a7b
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov qword [rsp + 0x58], r13
mov r12d, 1
mov rax, qword [rsi + 8]
lea r9, str.SYSTEMCurrentControlSetServicesBTHPORTParameters
lea r8, str._sDevices_012I64xServicesFor_012I64x00001124_0000_1000_8000_00805f9b34fb
lea rcx, [rsp + 0x70]
mov edx, 0x100
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], rax
call fcn.14005d88c
mov qword [rsp + 0x40], r13
lea rax, [rsp + 0x58]
lea rdx, [rsp + 0x70]
xor r9d, r9d
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r13
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x28], 0x20006
mov dword [rsp + 0x20], r13d
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov ebx, eax
test eax, eax
je 0x1400565d2
mov edi, 0x48b
jmp 0x140056a7b
mov rcx, qword [rsp + 0x58]
lea rax, [rsp + 0x50]
lea rdx, str.Instance
mov r9d, edi
xor r8d, r8d
mov dword [rsp + 0x28], edi
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x50], r12d
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ebx, eax
test eax, eax
je 0x14005660d
mov edi, 0x48e
jmp 0x140056a7b
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rax, qword [rsi + 8]
lea r9, str.SYSTEMCurrentControlSetServicesBTHPORTParameters
lea r8, str._sDevices_012I64xServicesFor_012I64x00001124_0000_1000_8000_00805f9b34fbC00000000
lea rcx, [rsp + 0x70]
mov edx, 0x100
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x58], r13
mov qword [rsp + 0x20], rax
call fcn.14005d88c
mov qword [rsp + 0x40], r13
lea rax, [rsp + 0x58]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r13
lea rdx, [rsp + 0x70]
xor r9d, r9d
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x28], 0x20006
mov dword [rsp + 0x20], r13d
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov ebx, eax
test eax, eax
je 0x140056691
mov edi, 0x495
jmp 0x140056a7b
mov ebx, 0x100
lea rcx, [rsp + 0x70]
xor edx, edx
mov r8d, ebx
call fcn.14005bab0
mov rcx, qword [rsp + 0x58]
lea rax, [rsp + 0x70]
lea rdx, str.PriLangServiceName
mov r9d, 3
xor r8d, r8d
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ebx, eax
test eax, eax
je 0x1400566de
mov edi, 0x499
jmp 0x140056a7b
mov rcx, qword [rsp + 0x58]
lea rax, [0x140093c2f]
lea rdx, str.DeviceString
mov r9d, r12d
xor r8d, r8d
mov dword [rsp + 0x28], r12d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ebx, eax
test eax, eax
je 0x140056717
mov edi, 0x49b
jmp 0x140056a7b
mov rcx, qword [rsp + 0x58]
lea rax, [rsp + 0x50]
lea rdx, str.CounterInstanceId
mov r9d, edi
xor r8d, r8d
mov dword [rsp + 0x28], edi
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x50], r13d
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ebx, eax
test eax, eax
je 0x140056752
mov edi, 0x49e
jmp 0x140056a7b
mov rcx, qword [rsp + 0x58]
lea rax, [rsp + 0x50]
lea rdx, str.Enabled
mov r9d, edi
xor r8d, r8d
mov dword [rsp + 0x28], edi
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x50], r12d
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ebx, eax
test eax, eax
je 0x14005678d
mov edi, 0x4a1
jmp 0x140056a7b
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea r12, [rsi + 0x114]
mov qword [rsp + 0x58], r13
cmp dword [r12], r13d
jne 0x1400568a4
cmp dword [rsi + 0x118], r13d
jne 0x1400568a4
cmp dword [rsi + 0x11c], r13d
jne 0x1400568a4
cmp dword [rsi + 0x120], r13d
jne 0x1400568a4
mov r12d, 0x100
lea r9, str.SYSTEMCurrentControlSetServicesBTHPORTParameters
lea r8, str._sPerDevices_012I64x
lea rcx, [rsp + 0x70]
mov edx, r12d
mov qword [rsp + 0x20], r14
call fcn.14005d88c
mov qword [rsp + 0x40], r13
lea rax, [rsp + 0x58]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r13
lea rdx, [rsp + 0x70]
xor r9d, r9d
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x28], 0x20006
mov dword [rsp + 0x20], r13d
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov ebx, eax
test eax, eax
je 0x140056844
mov edi, 0x4b7
jmp 0x140056a7b
mov r9, qword [rsi + 8]
lea r8, str._012I64x
lea rcx, [rsp + 0x70]
mov rdx, r12
call fcn.14005d88c
mov rcx, qword [rsp + 0x58]
lea rax, [rsp + 0x70]
lea rdx, [rsp + 0x70]
mov r9d, 3
xor r8d, r8d
mov dword [rsp + 0x28], r13d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ebx, eax
test eax, eax
je 0x140056894
mov edi, 0x4ba
jmp 0x140056a7b
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x140056970
lea r9, str.SYSTEMCurrentControlSetServicesBTHPORTParameters
lea r8, str._sKeys_012I64x
lea rcx, [rsp + 0x70]
mov edx, 0x100
mov qword [rsp + 0x20], r14
call fcn.14005d88c
mov qword [rsp + 0x40], r13
lea rax, [rsp + 0x58]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r13
lea rdx, [rsp + 0x70]
xor r9d, r9d
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x28], 0x20006
mov dword [rsp + 0x20], r13d
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov ebx, eax
test eax, eax
je 0x14005690f
mov edi, 0x4ab
jmp 0x140056a7b
mov r9, qword [rsi + 8]
lea r8, str._012I64x
lea rcx, [rsp + 0x70]
mov edx, 0x100
call fcn.14005d88c
mov rcx, qword [rsp + 0x58]
lea rdx, [rsp + 0x70]
mov r9d, 3
xor r8d, r8d
mov dword [rsp + 0x28], socket
mov qword [rsp + 0x20], r12
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ebx, eax
test eax, eax
je 0x14005695f
mov edi, 0x4ae
jmp 0x140056a7b
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov r12d, 0x100
mov rax, qword [rsi + 8]
lea r9, str.SYSTEMCurrentControlSetServicesHidBth
lea r8, str._sParametersDevices_012I64x_012I64x
mov qword [rsp + 0x28], rax
lea rcx, [rsp + 0x70]
mov rdx, r12
mov qword [rsp + 0x20], r14
mov qword [rsp + 0x58], r13
call fcn.14005d88c
mov qword [rsp + 0x40], r13
lea rax, [rsp + 0x58]
lea rdx, [rsp + 0x70]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r13
xor r9d, r9d
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x28], 0x20006
mov dword [rsp + 0x20], r13d
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov ebx, eax
test eax, eax
je 0x1400569e7
mov edi, 0x4c1
jmp 0x140056a7b
mov rcx, qword [rsp + 0x58]
lea rax, [rsp + 0x50]
lea rdx, str.VirtuallyCabled
mov r9d, edi
xor r8d, r8d
mov dword [rsp + 0x28], edi
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x50], 1
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ebx, eax
test eax, eax
je 0x140056a22
mov edi, 0x4c4
jmp 0x140056a7b
mov rcx, qword [rsp + 0x58]
lea rax, [rsp + 0x50]
lea rdx, str.ConnectionAuthenticated
mov r9d, edi
xor r8d, r8d
mov dword [rsp + 0x28], edi
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x50], r13d
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ebx, eax
test eax, eax
je 0x140056a5a
mov edi, 0x4c7
jmp 0x140056a7b
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x140056abf
lea rdx, str.BtwProvisionedHidDevsCreateRegistryMs:_invalid_parameter_n
mov ecx, r12d
call fcn.140046d10
mov ebx, 0x57
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x140056a8b
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
je 0x140056abf
test edi, edi
je 0x140056aaa
lea rdx, str.BtwProvisionedHidDevsCreateRegistryMs:_error__d_on_line__d_n
mov r9d, edi
mov r8d, ebx
mov ecx, 1
call fcn.140046d10
mov r8, qword [rsi + 8]
test r15b, r15b
mov ecx, r13d
sete cl
mov rdx, r14
call fcn.140055d80
movzx eax, bx
or eax, 0x80070000
test ebx, ebx
cmovle eax, ebx
mov rcx, qword [rbp + 0x70]
xor rcx, rsp
call fcn.14005ba20
mov rbx, qword [rsp + 0x1d0]
add rsp, 0x180
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret