Function at 0x140006a70
Capabilities:
Delete registry key
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push rbp
push rbx
lea rbp, [rsp - 0x81c8]
mov eax, 0x82c8
call fcn.14004f660
sub rsp, rax
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x8190], rax
mov qword [rsp + 0x82f8], rsi
xor ebx, ebx
mov qword [rsp + 0x82c0], rdi
mov rsi, r8
mov qword [rsp + 0x82b8], r12
xor r8d, r8d
mov qword [rsp + 0x60], rdx
mov rdi, rcx
mov qword [rsp + 0x82b0], r13
lea rdx, [rsp + 0x70]
mov qword [rsp + 0x82a8], r14
mov r14d, ebx
mov qword [rsp + 0x70], rbx
mov qword [rsp + 0x58], rbx
mov qword [rbp - 0x80], rbx
call fcn.140020240
test eax, eax
jne 0x1400070d6
xor r8d, r8d
lea rdx, [rsp + 0x58]
mov rcx, rdi
call fcn.140020240
test eax, eax
jne 0x1400070d6
mov r13, qword [rsp + 0x70]
lea rdx, [rbp + 0x190]
mov rcx, r13
call fcn.14000e590
test rax, rax
jne 0x140006bab
call fcn.14003d440
movsxd r8, dword [rax]
lea eax, [r8 - 0x64]
cmp eax, 0x28
ja 0x140006b53
lfence
mov r13, qword [rsp + 0x70]
lea rdi, str.Address_already_in_use
mov rdi, qword [rdi + r8*8 - 0x320]
jmp 0x140006b67
lea rdi, [0x140094b80]
mov edx, 0x5e
mov rcx, rdi
call fcn.14003fc40
mov qword [rsp + 0x40], rdi
lea rax, str.failed_PKCS11_add_of___.100s_:_realpath:__s
mov qword [rsp + 0x38], r13
lea rdx, str.process_remove_smartcard_key
mov qword [rsp + 0x30], rax
lea rcx, str.C:__w1_scontribwin32win32compat_ssh_agentkeyagent_request.c
mov qword [rsp + 0x28], rbx
xor r9d, r9d
mov r8d, 0x32b
mov dword [rsp + 0x20], 2
call fcn.14001ae20
jmp 0x140007110
cmp byte [rbp + 0x190], 0x2f
mov r12, 0xffffffffffffffff
jne 0x140006be1
lea rax, [rbp + 0x190]
mov r8, r12
inc r8
cmp byte [rax + r8], bl
jne 0x140006bc5
lea rdx, [rbp + 0x191]
lea rcx, [rbp + 0x190]
call fcn.14004fc40
cmp dword [rsi + 0x40048], 2
mov rcx, 0xffffffff80000002
mov qword [rbp - 0x80], rcx
mov edi, ebx
mov qword [rsp + 0x82a0], r15
jg 0x140006c76
mov rcx, qword [rsi + 0x28]
call qword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
test eax, eax
je 0x14000709f
lea rdx, [rbp - 0x80]
mov qword [rbp - 0x80], rbx
mov ecx, 0xf003f
call qword [sym.imp.ADVAPI32.dll_RegOpenCurrentUser]
test eax, eax
je 0x140006c64
mov dword [rsp + 0x38], eax
lea rdx, str.get_user_root
lea rax, str.unable_to_open_users_registry_hive__ERROR____d
xor r9d, r9d
mov qword [rsp + 0x30], rax
lea rcx, str.C:__w1_scontribwin32win32compat_ssh_agentkeyagent_request.c
mov qword [rsp + 0x28], rbx
mov r8d, 0x52
mov dword [rsp + 0x20], 5
call fcn.14001ae20
mov edi, r12d
call qword [sym.imp.ADVAPI32.dll_RevertToSelf]
test edi, edi
jne 0x14000709f
mov rcx, qword [rbp - 0x80]
lea rax, [rsp + 0x70]
mov qword [rsp + 0x70], rbx
mov r9d, 0x20100
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov qword [rsp + 0x78], rbx
lea rdx, str.SOFTWAREOpenSSHAgentPKCS11_Providers
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140006cdb
mov rcx, qword [rsp + 0x70]
lea rax, [rsp + 0x78]
mov r9d, 0x20100
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, [rbp + 0x190]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x140006cdb
cmp qword [rsp + 0x78], rbx
je 0x140006cdb
mov edi, 1
jmp 0x140006cdd
mov edi, ebx
mov rcx, qword [rsp + 0x70]
test rcx, rcx
je 0x140006ced
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
je 0x14000709f
mov rcx, qword [rbp - 0x80]
lea rax, [rsp + 0x70]
mov r9d, 0x10108
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov qword [rsp + 0x70], rbx
lea rdx, str.SOFTWAREOpenSSHAgentKeys
mov qword [rsp + 0x78], rbx
mov esi, ebx
mov dword [rbp - 0x78], 0xff
mov r15d, ebx
mov rdi, rbx
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140006ea1
nop word [rax + rax]
mov rcx, qword [rsp + 0x78]
mov r14d, esi
mov dword [rbp - 0x78], 0xff
test rcx, rcx
je 0x140006d5f
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov qword [rsp + 0x78], rbx
mov rcx, qword [rsp + 0x70]
lea r9, [rbp - 0x78]
mov qword [rsp + 0x38], rbx
lea r8, [rbp - 0x70]
mov qword [rsp + 0x30], rbx
mov edx, esi
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
inc esi
test eax, eax
jne 0x140006e86
mov rcx, qword [rsp + 0x70]
lea rax, [rsp + 0x78]
mov r9d, 0x101
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, [rbp - 0x70]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140006d40
mov rcx, qword [rsp + 0x78]
lea rax, [rsp + 0x68]
mov qword [rsp + 0x28], rax
lea rdx, str.comment
xor r9d, r9d
mov qword [rsp + 0x20], rbx
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140006d40
mov eax, dword [rsp + 0x68]
cmp eax, 0x800
ja 0x140006d40
test rdi, rdi
je 0x140006e07
mov rcx, rdi
call fcn.14003d000
mov eax, dword [rsp + 0x68]
add eax, 1
mov ecx, eax
cmovb rcx, r12
call fcn.14003d014
mov rdi, rax
test rax, rax
je 0x140006e94
mov rcx, qword [rsp + 0x78]
lea rax, [rsp + 0x68]
mov qword [rsp + 0x28], rax
lea rdx, str.comment
xor r9d, r9d
mov qword [rsp + 0x20], rdi
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140006e99
mov eax, dword [rsp + 0x68]
lea rdx, [rbp + 0x190]
mov rcx, rdi
mov byte [rax + rdi], bl
mov r8d, dword [rsp + 0x68]
call fcn.14003d480
test eax, eax
jne 0x140006d40
mov rcx, qword [rsp + 0x70]
lea rdx, [rbp - 0x70]
call qword [sym.imp.ADVAPI32.dll_RegDeleteTreeW]
test eax, eax
jne 0x140006e99
mov esi, r14d
jmp 0x140006d40
cmp eax, 0x103
mov eax, 1
cmove r15d, eax
test rdi, rdi
je 0x140006ea1
mov rcx, rdi
call fcn.14003d000
mov rcx, qword [rsp + 0x70]
test rcx, rcx
je 0x140006eb1
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rsp + 0x78]
test rcx, rcx
je 0x140006ec1
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test r15d, r15d
je 0x14000709c
mov rcx, qword [rbp - 0x80]
lea rax, [rsp + 0x70]
mov r9d, 0x10108
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov qword [rsp + 0x70], rbx
lea rdx, str.SOFTWAREOpenSSHAgentPKCS11_Providers
mov qword [rsp + 0x78], rbx
mov esi, ebx
mov dword [rbp - 0x78], 0xff
mov r15d, ebx
mov rdi, rbx
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140007071
nop
mov rcx, qword [rsp + 0x78]
mov r14d, esi
mov dword [rbp - 0x78], 0xff
test rcx, rcx
je 0x140006f2f
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov qword [rsp + 0x78], rbx
mov rcx, qword [rsp + 0x70]
lea r9, [rbp - 0x78]
mov qword [rsp + 0x38], rbx
lea r8, [rbp - 0x70]
mov qword [rsp + 0x30], rbx
mov edx, esi
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
inc esi
test eax, eax
jne 0x140007056
mov rcx, qword [rsp + 0x70]
lea rax, [rsp + 0x78]
mov r9d, 0x101
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, [rbp - 0x70]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140006f10
mov rcx, qword [rsp + 0x78]
lea rax, [rsp + 0x68]
mov qword [rsp + 0x28], rax
lea rdx, str.provider
xor r9d, r9d
mov qword [rsp + 0x20], rbx
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140006f10
mov eax, dword [rsp + 0x68]
cmp eax, 0x800
ja 0x140006f10
test rdi, rdi
je 0x140006fd7
mov rcx, rdi
call fcn.14003d000
mov eax, dword [rsp + 0x68]
add eax, 1
mov ecx, eax
cmovb rcx, r12
call fcn.14003d014
mov rdi, rax
test rax, rax
je 0x140007064
mov rcx, qword [rsp + 0x78]
lea rax, [rsp + 0x68]
mov qword [rsp + 0x28], rax
lea rdx, str.provider
xor r9d, r9d
mov qword [rsp + 0x20], rdi
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140007069
mov eax, dword [rsp + 0x68]
lea rdx, [rbp + 0x190]
mov rcx, rdi
mov byte [rax + rdi], bl
mov r8d, dword [rsp + 0x68]
call fcn.14003d480
test eax, eax
jne 0x140006f10
mov rcx, qword [rsp + 0x70]
lea rdx, [rbp - 0x70]
call qword [sym.imp.ADVAPI32.dll_RegDeleteTreeW]
test eax, eax
jne 0x140007069
mov esi, r14d
jmp 0x140006f10
cmp eax, 0x103
mov eax, 1
cmove r15d, eax
test rdi, rdi
je 0x140007071
mov rcx, rdi
call fcn.14003d000
mov rcx, qword [rsp + 0x70]
test rcx, rcx
je 0x140007081
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rsp + 0x78]
test rcx, rcx
je 0x140007091
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov r14d, 1
test r15d, r15d
jne 0x14000709f
mov r14d, ebx
mov rcx, qword [rsp + 0x60]
lea r8, [rsp + 0x70]
mov edx, 1
call fcn.14001f460
mov r15, qword [rsp + 0x82a0]
test eax, eax
jns 0x1400070c4
mov ebx, r12d
jmp 0x140007117
mov rax, qword [rsp + 0x70]
test r14d, r14d
setne cl
add cl, 5
mov byte [rax], cl
jmp 0x140007117
lea rax, str.remove_smartcard_request_is_invalid
xor r9d, r9d
mov qword [rsp + 0x30], rax
lea rdx, str.process_remove_smartcard_key
mov qword [rsp + 0x28], rbx
lea rcx, str.C:__w1_scontribwin32win32compat_ssh_agentkeyagent_request.c
mov r8d, 0x324
mov dword [rsp + 0x20], 2
call fcn.14001ae20
mov r13, qword [rsp + 0x70]
mov rbx, 0xffffffffffffffff
mov r14, qword [rsp + 0x82a8]
mov r12, qword [rsp + 0x82b8]
mov rdi, qword [rsp + 0x82c0]
mov rsi, qword [rsp + 0x82f8]
test r13, r13
je 0x140007144
mov rcx, r13
call fcn.14003d000
mov rcx, qword [rsp + 0x58]
mov r13, qword [rsp + 0x82b0]
test rcx, rcx
je 0x14000715b
call fcn.14003d000
mov rcx, qword [rbp - 0x80]
test rcx, rcx
je 0x14000716a
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, ebx
mov rcx, qword [rbp + 0x8190]
xor rcx, rsp
call fcn.1400313f0
add rsp, 0x82c8
pop rbx
pop rbp
ret