Function at 0x1400e6e90
Capabilities:
Encrypt data using rc4 via systemfunction032
Encrypt data using rc4 via systemfunction033
Query or enumerate registry value

Disassembly:
mov qword [rsp + 0x20], r9
push rbp
push rbx
push rsi
push rdi
push r13
lea rbp, [rsp - 0x30]
sub rsp, 0x130
lea rax, [rbp + 0x18]
mov dword [rbp - 0x48], 0x10
mov qword [rbp - 0x40], rax
mov rbx, r8
lea rax, [rbp - 0x50]
mov dword [rbp - 0x44], 0x10
mov qword [rsp + 0x30], rax
lea r8, str.SecretsNL_KMCurrVal
lea rax, [rbp - 0x68]
mov esi, 0x2800
mov qword [rsp + 0x28], rax
mov rdi, r9
mov rax, qword [rbp + 0x80]
mov r13, rcx
mov qword [rsp + 0x20], rax
mov dword [rbp - 0x7c], esi
call fcn.1400e84c0
test eax, eax
je 0x1400e7399
mov qword [rsp + 0x160], r12
mov r12, qword [rbp + 0x88]
mov qword [rsp + 0x168], r14
xor r14d, r14d
test r12, r12
je 0x1400e6f30
mov rax, qword [r12]
neg rax
sbb ecx, ecx
and ecx, 0x20006
jmp 0x1400e6f33
mov ecx, r14d
or ecx, 0x20019
lea rax, [rsp + 0x78]
mov qword [rsp + 0x28], rax
lea r8, str.Cache
mov dword [rsp + 0x20], ecx
mov rdx, rbx
mov rcx, r13
call fcn.14000d810
test eax, eax
je 0x1400e737f
mov qword [rsp + 0x170], r15
mov edx, 0x6b6e
lea r8d, [rdx + 8]
test rdi, rdi
je 0x1400e7173
lea rcx, reloc.Cabinet.dll_FCICreate
call fcn.14000afb0
mov ecx, dword [r13]
test ecx, ecx
je 0x1400e7100
cmp ecx, 1
jne 0x1400e7167
mov r15, qword [rsp + 0x78]
mov rsi, r14
test r15, r15
jne 0x1400e6fb1
mov rax, qword [r13 + 8]
mov r15, qword [rax + 0x18]
cmp word [r15 + 4], dx
jne 0x1400e7097
mov edx, dword [r15 + 0x28]
test edx, edx
je 0x1400e7097
movsxd rcx, dword [r15 + 0x2c]
cmp ecx, 0xffffffff
je 0x1400e7097
mov rax, qword [r13 + 8]
mov r12, rcx
add r12, qword [rax + 0x10]
test edx, edx
je 0x1400e7090
nop dword [rax + rax]
test rsi, rsi
jne 0x1400e708d
mov eax, r14d
movsxd rbx, dword [r12 + rax*4 + 4]
mov rax, qword [r13 + 8]
add rbx, qword [rax + 0x10]
cmp word [rbx + 4], r8w
jne 0x1400e7080
movzx eax, word [rbx + 6]
test ax, ax
je 0x1400e7080
test byte [rbx + 0x14], 1
mov edx, eax
je 0x1400e7034
lea rcx, [rbx + 0x18]
call fcn.140012170
mov rdi, rax
test rax, rax
je 0x1400e707a
jmp 0x1400e705c
add rdx, 2
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rdi, rax
test rax, rax
je 0x1400e707a
movzx r8d, word [rbx + 6]
lea rdx, [rbx + 0x18]
mov rcx, rax
call fcn.14011b4a0
mov rdx, rdi
lea rcx, str.NL_IterationCount
call fcn.14011ebc8
test eax, eax
mov rcx, rdi
cmove rsi, rbx
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov r8d, 0x6b76
inc r14d
cmp r14d, dword [r15 + 0x28]
jb 0x1400e6ff0
xor r14d, r14d
mov r12, qword [rbp + 0x88]
test rsi, rsi
mov edi, r14d
setne dil
test rsi, rsi
je 0x1400e70e5
mov ecx, dword [rsi + 8]
mov edi, r14d
mov ebx, ecx
btr ebx, 0x1f
cmp dword [rbp - 0x70], ebx
setae dil
jb 0x1400e70e2
lea rdx, [rsi + 0xc]
test ecx, ecx
js 0x1400e70d5
mov rax, qword [r13 + 8]
movsxd rdx, dword [rdx]
mov rax, qword [rax + 0x10]
add rax, 4
add rdx, rax
mov r8d, ebx
lea rcx, [rsp + 0x6c]
call fcn.14011b4a0
mov dword [rbp - 0x70], ebx
mov esi, 0x2800
test edi, edi
je 0x1400e7167
mov edx, dword [rsp + 0x6c]
cmp edx, esi
mov esi, edx
jbe 0x1400e7142
and esi, 0xfffffc00
jmp 0x1400e7145
mov rcx, qword [rsp + 0x78]
lea rax, [rbp - 0x70]
mov qword [rsp + 0x28], rax
lea rdx, str.NL_IterationCount
lea rax, [rsp + 0x6c]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
mov edi, r14d
sete dil
test eax, eax
je 0x1400e70ea
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1400e70ea
shl esi, 0xa
mov r8d, esi
mov dword [rbp - 0x7c], esi
lea rcx, str._NL_IterationCount_is__u___u_real_iteration_s__n
call fcn.14000afb0
cmp dword [rsp + 0x6c], 0
jne 0x1400e7173
lea rcx, str._DCC1_mode___n
jmp 0x1400e716e
lea rcx, str._Iteration_is_set_to_default__10240__n
call fcn.14000afb0
mov ecx, dword [r13]
test ecx, ecx
je 0x1400e71be
cmp ecx, 1
jne 0x1400e7359
mov rcx, qword [rsp + 0x78]
test rcx, rcx
jne 0x1400e7196
mov rax, qword [r13 + 8]
mov rcx, qword [rax + 0x18]
mov edi, 0x6b6e
mov ebx, r14d
cmp word [rcx + 4], di
sete bl
jne 0x1400e721f
mov eax, dword [rcx + 0x28]
mov dword [rbp - 0x74], eax
mov eax, dword [rcx + 0x40]
shr eax, 1
mov dword [rsp + 0x70], eax
mov eax, dword [rcx + 0x44]
mov dword [rbp - 0x80], eax
jmp 0x1400e721f
mov rcx, qword [rsp + 0x78]
lea rax, [rbp - 0x80]
mov qword [rsp + 0x58], r14
xor r9d, r9d
mov qword [rsp + 0x50], r14
xor r8d, r8d
mov qword [rsp + 0x48], rax
xor edx, edx
lea rax, [rsp + 0x70]
mov qword [rsp + 0x40], rax
lea rax, [rbp - 0x74]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r14
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], r14
call qword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
test eax, eax
mov ebx, r14d
sete bl
test eax, eax
je 0x1400e721a
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov edi, 0x6b6e
test ebx, ebx
je 0x1400e7359
mov eax, dword [rsp + 0x70]
mov ecx, 0x40
inc eax
mov dword [rsp + 0x70], eax
lea edx, [rax + 1]
add rdx, rdx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rsp + 0x60], rax
mov rbx, rax
test rax, rax
je 0x1400e7359
mov edx, dword [rbp - 0x80]
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r15, rax
test rax, rax
je 0x1400e7350
cmp dword [rbp - 0x74], 0
mov dword [rsp + 0x6c], r14d
jbe 0x1400e7347
mov ecx, r14d
nop
mov eax, dword [rsp + 0x70]
mov edx, dword [r13]
mov dword [rsp + 0x74], eax
mov eax, dword [rbp - 0x80]
mov dword [rsp + 0x68], eax
test edx, edx
je 0x1400e7467
cmp edx, 1
jne 0x1400e7329
mov rax, qword [rsp + 0x78]
test rax, rax
jne 0x1400e72b6
mov rax, qword [r13 + 8]
mov rax, qword [rax + 0x18]
cmp word [rax + 4], di
jne 0x1400e7329
mov edx, dword [rax + 0x28]
test edx, edx
je 0x1400e7329
cmp ecx, edx
jae 0x1400e7329
movsxd r9, dword [rax + 0x2c]
cmp r9d, 0xffffffff
je 0x1400e7329
mov rax, qword [r13 + 8]
mov edx, ecx
mov rcx, r9
add rcx, qword [rax + 0x10]
movsxd rbx, dword [rcx + rdx*4 + 4]
add rbx, qword [rax + 0x10]
mov eax, 0x6b76
cmp word [rbx + 4], ax
jne 0x1400e7324
movzx eax, word [rbx + 6]
test ax, ax
je 0x1400e745d
test byte [rbx + 0x14], 1
mov edi, eax
mov edx, eax
je 0x1400e73ac
lea rcx, [rbx + 0x18]
call fcn.140012170
inc edi
mov rsi, rax
test rax, rax
jne 0x1400e73dc
mov rbx, qword [rsp + 0x60]
mov ecx, dword [rsp + 0x6c]
mov edi, 0x6b6e
inc ecx
mov r14d, 0
mov dword [rsp + 0x6c], ecx
cmp ecx, dword [rbp - 0x74]
jb 0x1400e7280
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [r13], 0
mov r15, qword [rsp + 0x170]
jne 0x1400e737f
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
je 0x1400e737f
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, qword [rbp - 0x68]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov r14, qword [rsp + 0x168]
mov r12, qword [rsp + 0x160]
mov eax, 1
add rsp, 0x130
pop r13
pop rdi
pop rsi
pop rbx
pop rbp
ret
shr edi, 1
add rdx, 2
mov ecx, 0x40
inc edi
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rsi, rax
test rax, rax
je 0x1400e7324
movzx r8d, word [rbx + 6]
lea rdx, [rbx + 0x18]
mov rcx, rax
call fcn.14011b4a0
cmp dword [rsp + 0x74], edi
setae r14b
jb 0x1400e7400
mov rcx, qword [rsp + 0x60]
mov rdx, rsi
mov r8d, edi
add r8, r8
call fcn.14011b4a0
lea eax, [rdi - 1]
mov dword [rsp + 0x74], eax
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
test r14d, r14d
je 0x1400e7324
mov edi, dword [rbx + 8]
xor esi, esi
mov eax, dword [rbx + 0x10]
btr edi, 0x1f
cmp dword [rsp + 0x68], edi
mov dword [rbp - 0x78], eax
setae sil
jb 0x1400e7452
cmp dword [rbx + 8], 0
lea rdx, [rbx + 0xc]
jl 0x1400e7447
mov rax, qword [r13 + 8]
movsxd rdx, dword [rdx]
mov rax, qword [rax + 0x10]
add rax, 4
add rdx, rax
mov r8d, edi
mov rcx, r15
call fcn.14011b4a0
mov rbx, qword [rsp + 0x60]
mov dword [rsp + 0x68], edi
jmp 0x1400e74ae
mov dword [rsp + 0x74], r14d
jmp 0x1400e7324
lea rax, [rsp + 0x68]
mov edx, ecx
mov rcx, qword [rsp + 0x78]
lea r9, [rsp + 0x74]
mov qword [rsp + 0x38], rax
mov r8, rbx
lea rax, [rbp - 0x78]
mov qword [rsp + 0x30], r15
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r14
call qword [sym.imp.ADVAPI32.dll_RegEnumValueW]
test eax, eax
mov esi, r14d
sete sil
test eax, eax
je 0x1400e74ae
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
test esi, esi
je 0x1400e7329
mov r8d, 0xa
lea rdx, str.NL_Control
mov rcx, rbx
call fcn.140129ad0
test eax, eax
je 0x1400e7329
mov r8d, 0x11
lea rdx, str.NL_IterationCount
mov rcx, rbx
call fcn.140129ad0
test eax, eax
je 0x1400e7329
test byte [r15 + 0x30], 1
je 0x1400e7329
mov rdx, rbx
lea rcx, str._n__s__
call fcn.14000afb0
lea rcx, [r15 + 0x20]
call fcn.140012610
mov r8d, dword [r15 + 0x10]
lea rcx, str.__nRID_______:__08x___u__n
mov edx, r8d
call fcn.14000afb0
mov r14d, dword [rsp + 0x68]
lea rsi, [r15 + 0x40]
add r14d, 0xffffffa0
cmp qword [rbp + 0x78], 0
je 0x1400e775e
mov r9, qword [rbp - 0x68]
lea rdx, [r15 + 0x60]
mov dword [rsp + 0x30], 0
mov r8d, r14d
mov qword [rsp + 0x28], rsi
call fcn.140003e90
test eax, eax
je 0x1400e7329
mov dl, 0x32
mov rcx, r15
call fcn.1400e7a40
movzx eax, word [r15]
lea r9, [r15 + 0xa8]
mov r8, qword [r12 + 0x30]
mov word [rbp - 0x5e], ax
mov word [rbp - 0x60], ax
mov qword [rbp - 0x58], r9
test r8, r8
je 0x1400e75b7
mov edx, dword [r15 + 0x84]
test edx, edx
je 0x1400e75b7
mov r9d, dword [r12 + 0x38]
mov ecx, r14d
sub ecx, edx
add rcx, 0x60
add rcx, r15
call fcn.1400e7b00
mov r9, qword [rbp - 0x58]
movzx eax, word [rbp - 0x60]
mov rcx, qword [r12]
test rcx, rcx
je 0x1400e7329
movzx r8d, ax
mov rdx, r9
shr r8, 1
call fcn.140129ad0
test eax, eax
jne 0x1400e7329
lea rcx, str.__User_cache_replace_mode__2___n
call fcn.14000afb0
cmp dword [r12 + 0x18], eax
je 0x1400e7628
mov r9d, dword [rbp - 0x7c]
lea rdx, [r12 + 8]
lea r8, [rbp - 0x60]
lea rcx, [r15 + 0x60]
call fcn.140004490
xor ecx, ecx
test eax, eax
setns cl
test ecx, ecx
jne 0x1400e763b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ERROR_kuhl_m_lsadump_getNLKMSecretAndCache______0x_08x__n
call fcn.14000afb0
jmp 0x1400e7329
cmp dword [r12 + 0x2c], 0
je 0x1400e760f
movups xmm0, xmmword [r12 + 0x1c]
movups xmmword [r15 + 0x60], xmm0
lea rcx, str.__MsCacheV2_:
call fcn.14000afb0
mov rcx, qword [0x140144a58]
lea rax, [r15 + 0x60]
mov r8d, 0x10
movzx edx, byte [rax]
call fcn.14000afb0
lea rax, [rax + 1]
sub r8, 1
jne 0x1400e7658
lea rcx, reloc.Cabinet.dll_FCICreate
call fcn.14000afb0
mov rdx, qword [rbp - 0x68]
lea rbx, [r15 + 0x50]
mov dword [rsp + 0x30], 0x10
lea r9, [r15 + 0x60]
mov qword [rsp + 0x28], rbx
mov r8d, 0x10
mov ecx, 0x8004
mov dword [rsp + 0x20], r14d
call fcn.1400035d0
test eax, eax
je 0x1400e7324
lea rcx, str.__Checksum__:
call fcn.14000afb0
mov rcx, qword [0x140144a58]
mov eax, 0x10
movzx edx, byte [rbx]
call fcn.14000afb0
lea rbx, [rbx + 1]
sub rax, 1
jne 0x1400e76c4
lea rcx, reloc.Cabinet.dll_FCICreate
call fcn.14000afb0
mov r9, qword [rbp - 0x68]
lea rdx, [r15 + 0x60]
mov dword [rsp + 0x30], 1
mov r8d, r14d
mov qword [rsp + 0x28], rsi
call fcn.140003e90
mov rbx, qword [rsp + 0x60]
test eax, eax
je 0x1400e7329
mov eax, dword [rsp + 0x68]
mov r8, rbx
mov rdx, qword [rsp + 0x78]
mov rcx, r13
mov dword [rsp + 0x30], eax
mov eax, dword [rbp - 0x78]
mov qword [rsp + 0x28], r15
mov dword [rsp + 0x20], eax
call fcn.14000dd80
test eax, eax
je 0x1400e7745
lea rcx, str.__OK__n
call fcn.14000afb0
jmp 0x1400e7329
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ERROR_kuhl_m_lsadump_getNLKMSecretAndCache___kull_m_registry_RegSetValueEx__0x_08x__n
call fcn.14000afb0
jmp 0x1400e7329
mov rax, qword [rbp - 0x40]
mov r9, rsi
mov r8d, dword [rbp - 0x50]
mov ecx, 0x8003
mov rdx, qword [rbp - 0x68]
mov dword [rsp + 0x30], 0x10
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0x10
call fcn.1400035d0
test eax, eax
je 0x1400e7a21
lea rdi, [r15 + 0x60]
mov dword [rbp + 0xc], r14d
lea rdx, [rbp - 0x48]
mov qword [rbp + 0x10], rdi
lea rcx, [rbp + 8]
mov dword [rbp + 8], r14d
call qword [sym.imp.ADVAPI32.dll_SystemFunction033]
test eax, eax
js 0x1400e7a0e
mov dl, 0x31
mov rcx, r15
call fcn.1400e7a40
movzx eax, word [r15]
lea rdx, [r15 + 0xa8]
mov word [rbp - 0x5e], ax
mov word [rbp - 0x60], ax
mov qword [rbp - 0x58], rdx
test r12, r12
je 0x1400e7329
mov rcx, qword [r12]
test rcx, rcx
je 0x1400e7329
mov r8d, eax
shr r8, 1
call fcn.140129ad0
test eax, eax
jne 0x1400e7329
lea rcx, str.__User_cache_replace_mode__1___n
call fcn.14000afb0
cmp dword [r12 + 0x18], eax
je 0x1400e789d
mov r8b, 1
lea rdx, [rbp - 0x60]
lea rcx, [rbp - 0x18]
call qword [sym.imp.ntdll.dll_RtlDowncaseUnicodeString]
test eax, eax
js 0x1400e78ae
movzx eax, word [rbp - 0x18]
mov ecx, 0x40
add ax, 0x10
movzx edx, ax
mov word [rbp - 0x36], dx
mov word [rbp - 0x38], dx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rbp - 0x30], rax
test rax, rax
je 0x1400e7891
movups xmm0, xmmword [r12 + 8]
movups xmmword [rax], xmm0
mov rcx, qword [rbp - 0x30]
movzx r8d, word [rbp - 0x18]
add rcx, 0x10
mov rdx, qword [rbp - 0x10]
call fcn.14011b4a0
mov rdx, rdi
lea rcx, [rbp - 0x38]
call qword [sym.imp.ADVAPI32.dll_SystemFunction007]
mov rcx, qword [rbp - 0x30]
call qword [sym.imp.KERNEL32.dll_LocalFree]
lea rcx, [rbp - 0x18]
call qword [sym.imp.ntdll.dll_RtlFreeUnicodeString]
jmp 0x1400e78ae
cmp dword [r12 + 0x2c], 0
je 0x1400e78ae
movups xmm0, xmmword [r12 + 0x1c]
movups xmmword [rdi], xmm0
mov r8b, 1
lea rdx, [rbp - 0x60]
lea rcx, [rbp - 8]
call qword [sym.imp.ntdll.dll_RtlDowncaseUnicodeString]
mov ebx, eax
test eax, eax
js 0x1400e7324
movzx ecx, word [rbp - 8]
add cx, 0x10
movzx edx, cx
mov ecx, 0x40
mov word [rbp - 0x26], dx
mov word [rbp - 0x28], dx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rbp - 0x20], rax
test rax, rax
je 0x1400e7928
movups xmm0, xmmword [r12 + 8]
movups xmmword [rax], xmm0
mov rcx, qword [rbp - 0x20]
movzx r8d, word [rbp - 8]
add rcx, 0x10
mov rdx, qword [rbp]
call fcn.14011b4a0
mov rdx, rdi
lea rcx, [rbp - 0x28]
call qword [sym.imp.ADVAPI32.dll_SystemFunction007]
mov rcx, qword [rbp - 0x20]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_LocalFree]
lea rcx, [rbp - 8]
call qword [sym.imp.ntdll.dll_RtlFreeUnicodeString]
test ebx, ebx
js 0x1400e7324
lea rcx, str.__MsCacheV1_:
call fcn.14000afb0
mov rcx, qword [0x140144a58]
mov rax, rdi
mov r8d, 0x10
movzx edx, byte [rax]
call fcn.14000afb0
lea rax, [rax + 1]
sub r8, 1
jne 0x1400e7956
lea rcx, reloc.Cabinet.dll_FCICreate
call fcn.14000afb0
mov rdx, qword [rbp - 0x40]
lea rbx, [r15 + 0x50]
mov dword [rsp + 0x30], 0x10
mov r9, rdi
mov qword [rsp + 0x28], rbx
mov r8d, 0x10
mov ecx, 0x8003
mov dword [rsp + 0x20], r14d
call fcn.1400035d0
test eax, eax
je 0x1400e7324
lea rcx, str.__Checksum__:
call fcn.14000afb0
mov rcx, qword [0x140144a58]
mov eax, 0x10
movzx edx, byte [rbx]
call fcn.14000afb0
lea rbx, [rbx + 1]
sub rax, 1
jne 0x1400e79c1
lea rcx, reloc.Cabinet.dll_FCICreate
call fcn.14000afb0
lea rdx, [rbp - 0x48]
lea rcx, [rbp + 8]
call qword [sym.imp.ADVAPI32.dll_SystemFunction032]
test eax, eax
js 0x1400e79fb
mov rbx, qword [rsp + 0x60]
jmp 0x1400e770c
mov edx, eax
lea rcx, str.ERROR_kuhl_m_lsadump_getNLKMSecretAndCache___RtlEncryptData2:_0x_08x_n
call fcn.14000afb0
jmp 0x1400e7324
mov edx, eax
lea rcx, str.ERROR_kuhl_m_lsadump_getNLKMSecretAndCache___RtlEncryptDecryptRC4_:_0x_08x_n
call fcn.14000afb0
jmp 0x1400e7329
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ERROR_kuhl_m_lsadump_getNLKMSecretAndCache___kull_m_crypto_hmac__0x_08x__n
call fcn.14000afb0
jmp 0x1400e7329