joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140025bb8
Capabilities:
Query environment variable

Disassembly:
mov rax, rsp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x190
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov rax, qword [0x140122f00]
xor rax, rsp
mov qword [rsp + 0x180], rax
mov r12, rdx
mov rdi, rcx
cmp qword [rcx + 0x18], 8
jb 0x140025bf9
mov rcx, qword [rcx]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov r15d, eax
xor esi, esi
test eax, eax
je 0x140025cbe
lea eax, [rsi + 2]
mul r15
lea r14, [rsi - 1]
cmovo rax, r14
mov rcx, rax
call fcn.140097b58
mov rbx, rax
mov qword [rsp + 0x28], rax
cmp qword [rdi + 0x18], 8
jb 0x140025c39
mov rdi, qword [rdi]
mov r8d, r15d
mov rdx, rax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x140025c7c
cmp word [rbx], si
je 0x140025c5e
inc r14
cmp word [rbx + r14*2], si
jne 0x140025c51
mov rsi, r14
mov r8, rsi
mov rdx, rbx
mov rcx, r12
call fcn.140005c18
nop
mov rcx, rbx
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete___void____ptr64_]
nop
jmp 0x140025d00
lea rdx, str.Cannot_expand_environment_strings
lea rcx, [rsp + 0x38]
call fcn.140005a2c
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0xa0]
call fcn.140005114
lea rdx, [0x1401183e8]
lea rcx, [rsp + 0xa0]
call sub.msvcrt.dll__CxxThrowException
nop
lea rdx, str.Cannot_expand_environment_strings
lea rcx, [rsp + 0x38]
call fcn.140005a2c
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0x110]
call fcn.140005114
lea rdx, [0x1401183e8]
lea rcx, [rsp + 0x110]
call sub.msvcrt.dll__CxxThrowException
nop
mov rcx, qword [rsp + 0x180]
xor rcx, rsp
call fcn.1400b3bf0
mov rbx, qword [rsp + 0x1d0]
add rsp, 0x190
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret
Function at 0x140025fa0
Capabilities:
Get file size
Read file on windows

Disassembly:
mov rax, rsp
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x48]
sub rsp, 0x110
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov rax, qword [0x140122f00]
xor rax, rsp
mov qword [rbp], rax
mov r13, rdx
cmp qword [rcx + 0x18], 8
jb 0x140025fe1
mov rcx, qword [rcx]
xor esi, esi
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [rsi + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
mov qword [rsp + 0x40], rax
inc rax
test rax, 0xfffffffffffffffe
jne 0x140026057
lea rdx, str.File_open_error
lea rcx, [rsp + 0x68]
call fcn.140005a2c
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [rsp + 0x68]
lea rcx, [rbp - 0x70]
call fcn.140005114
lea rdx, [0x1401183e8]
lea rcx, [rbp - 0x70]
call sub.msvcrt.dll__CxxThrowException
nop
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov r15d, eax
cmp eax, 0xffffffff
jne 0x1400260a4
lea rdx, str.Unable_to_get_file_size
lea rcx, [rsp + 0x68]
call fcn.140005a2c
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [rsp + 0x68]
lea rcx, [rbp - 0x70]
call fcn.140005114
lea rdx, [0x1401183e8]
lea rcx, [rbp - 0x70]
call sub.msvcrt.dll__CxxThrowException
nop
mov rcx, r15
call fcn.140097b58
mov r14, rax
mov rdi, rax
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x20], rsi
lea r9, [rsp + 0x48]
mov r8d, r15d
mov rdx, rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x14002610e
lea rdx, str.File_read_error
lea rcx, [rsp + 0x68]
call fcn.140005a2c
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [rsp + 0x68]
lea rcx, [rbp - 0x70]
call fcn.140005114
lea rdx, [0x1401183e8]
lea rcx, [rbp - 0x70]
call sub.msvcrt.dll__CxxThrowException
nop
lea rcx, [rsp + 0x40]
call fcn.14000c9f0
cmp byte [r14], 0xef
jne 0x140026134
cmp byte [r14 + 1], 0xbb
jne 0x140026134
cmp byte [r14 + 2], 0xbf
jne 0x140026134
add r14, 3
add r15d, 0xfffffffd
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x20], rsi
mov r9d, r15d
mov r8, r14
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
movsxd r12, eax
test eax, eax
jle 0x1400261b1
mov eax, 2
mul r12
mov rdx, 0xffffffffffffffff
cmovo rax, rdx
mov rcx, rax
call fcn.140097b58
mov rbx, rax
mov qword [rsp + 0x60], rax
mov dword [rsp + 0x28], r12d
mov qword [rsp + 0x20], rax
mov r9d, r15d
mov r8, r14
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov r8, r12
mov rdx, rbx
mov rcx, r13
call fcn.140005c18
nop
mov rcx, rbx
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete___void____ptr64_]
jmp 0x1400261c4
xor r8d, r8d
lea rdx, [0x1400d2100]
mov rcx, r13
call fcn.140005c18
nop
mov rcx, rdi
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete___void____ptr64_]
nop
lea rcx, [rsp + 0x40]
call fcn.14000a8c8
mov rcx, qword [rbp]
xor rcx, rsp
call fcn.1400b3bf0
mov rbx, qword [rsp + 0x160]
add rsp, 0x110
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x14003838c
Capabilities:
Get common file path

Disassembly:
push rbx
sub rsp, 0x30
mov rax, qword [0x140122f00]
xor rax, rsp
mov qword [rsp + 0x28], rax
xor ebx, ebx
cmp qword [0x14011c298], rbx
jne 0x140038417
lea r9, [rsp + 0x20]
xor r8d, r8d
mov edx, 0x8000
lea rcx, [0x1400e06c0]
call qword [sym.imp.SHELL32.dll_SHGetKnownFolderPath]
test eax, eax
js 0x14003840c
mov rdx, qword [rsp + 0x20]
cmp word [rdx], bx
je 0x1400383e4
or rax, 0xffffffffffffffff
inc rax
cmp word [rdx + rax*2], bx
jne 0x1400383d8
mov rbx, rax
mov r8, rbx
lea rcx, [0x14011c288]
call fcn.140005c18
mov r8d, 0x18
lea rdx, str.MicrosoftUEVTemplates
lea rcx, [0x14011c288]
call fcn.140005d3c
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.ole32.dll_CoTaskMemFree]
lea rax, [0x14011c288]
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.1400b3bf0
add rsp, 0x30
pop rbx
ret
Function at 0x14003e1f8
Capabilities:
Encode data using xor
Hash data using fnv

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x28
cmp qword [rdx + 0x18], 8
mov r9, qword [rdx + 0x10]
jb 0x14003e20f
mov rdx, qword [rdx]
xor ecx, ecx
movabs r8, 0xcbf29ce484222325
add r9, r9
je 0x14003e23d
movzx eax, byte [rdx + rcx]
movabs r10, 0x100000001b3
xor r8, rax
inc rcx
imul r8, r10
cmp rcx, r9
jb 0x14003e220
mov rcx, r8
mov edx, 0x1f31d
shr rcx, 0x20
xor ecx, r8d
btr ecx, 0x1f
call qword [sym.imp.msvcrt.dll_ldiv]
mov qword [rsp + 0x30], rax
shr rax, 0x20
imul ecx, eax, 0x41a7
imul eax, dword [rsp + 0x30], 0xb14
sub ecx, eax
jns 0x14003e277
add ecx, 0x7fffffff
movsxd rax, ecx
add rsp, 0x28
ret
Function at 0x140045ba0
Capabilities:
Query or enumerate registry key

Disassembly:
mov rax, rsp
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0x100
mov qword [rbp - 0x51], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov rax, qword [0x140122f00]
xor rax, rsp
mov qword [rbp + 0x17], rax
mov r15, r8
mov r14, rdx
xor r13d, r13d
mov dword [rbp - 0x59], r13d
lea ecx, [r13 + 0x18]
call fcn.140096a20
mov rdi, rax
mov qword [rbp + 7], rax
test rax, rax
je 0x140045c02
mov qword [rax], r13
mov qword [rax + 8], r13
mov qword [rax + 0x10], r13
jmp 0x140045c05
mov rdi, r13
mov qword [rbp - 0x49], rdi
mov qword [rsp + 0x58], r13
mov qword [rsp + 0x50], r13
mov qword [rsp + 0x48], r13
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x38], r13
mov qword [rsp + 0x30], r13
lea rax, [rbp + 0x13]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0xf]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
test eax, eax
je 0x140045c95
test byte [0x140124700], 2
je 0x140045c66
mov r8d, eax
lea rdx, [0x1400d16a0]
call fcn.1400075f0
lea rdx, str.Unable_to_query_template_index.
lea rcx, [rbp - 0x79]
call fcn.140005a2c
nop
lea rdx, [rbp - 0x79]
lea rcx, [rbp - 0x39]
call fcn.1400457a0
lea rdx, [0x140119518]
lea rcx, [rbp - 0x39]
call sub.msvcrt.dll__CxxThrowException
nop
mov r12d, dword [rbp + 0x13]
inc r12d
mov ecx, r12d
mov eax, 2
mul rcx
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
mov rcx, rax
call fcn.140097b58
mov rbx, rax
mov qword [rbp - 0x41], rax
mov esi, r13d
cmp dword [rbp + 0xf], r13d
jbe 0x140045d8c
mov dword [rbp + 7], r12d
mov qword [rsp + 0x38], r13
mov qword [rsp + 0x30], r13
mov qword [rsp + 0x28], r13
mov qword [rsp + 0x20], r13
lea r9, [rbp + 7]
mov r8, rbx
mov edx, esi
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x140045d45
mov r8d, dword [rbp + 7]
mov qword [rbp - 0x61], 7
mov qword [rbp - 0x69], r13
mov word [rbp - 0x79], r13w
mov rdx, rbx
lea rcx, [rbp - 0x79]
call fcn.140005c18
nop
lea rdx, [rbp - 0x79]
mov rcx, rdi
call fcn.14003d300
nop
cmp qword [rbp - 0x61], 8
jb 0x140045d3c
mov rcx, qword [rbp - 0x79]
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
inc esi
cmp esi, dword [rbp + 0xf]
jb 0x140045cce
jmp 0x140045d8c
test byte [0x140124700], 2
je 0x140045d5d
mov r8d, eax
lea rdx, [0x1400d17c8]
call fcn.1400075f0
lea rdx, str.Unable_to_enumerate_template_index_subkeys.
lea rcx, [rbp - 0x79]
call fcn.140005a2c
nop
lea rdx, [rbp - 0x79]
lea rcx, [rbp - 0x39]
call fcn.1400457a0
lea rdx, [0x140119518]
lea rcx, [rbp - 0x39]
call sub.msvcrt.dll__CxxThrowException
nop
mov rcx, rbx
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete___void____ptr64_]
mov qword [r14], rdi
mov rax, r14
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.1400b3bf0
mov rbx, qword [rsp + 0x140]
add rsp, 0x100
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x1400467c8
Capabilities:
Hash data using fnv

Disassembly:
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x30
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x68], rbx
mov qword [rsp + 0x70], rbp
mov rsi, rdx
mov r15, rcx
xor ebp, ebp
mov r12d, 0x811c9dc5
mov r14, qword [rdx + 0x10]
movabs rax, 0xcccccccccccccccd
mul r14
mov rdi, rdx
shr rdi, 3
inc rdi
test r14, r14
je 0x1400468a5
mov cl, 1
call fcn.140097260
mov qword [rsp + 0x60], rax
cmp qword [rsi + 0x18], 8
jb 0x140046832
mov rax, qword [rsi]
jmp 0x140046835
mov rax, rsi
movzx ebx, word [rax + rbp*2]
lea rcx, [rsp + 0x60]
call fcn.1400062b4
mov r8, rax
mov rcx, qword [rax]
mov rax, qword [rcx + 0x40]
movzx edx, bx
mov rcx, r8
call qword [str._F_v_]
movzx ecx, ax
imul r12, r12, 0x1000193
xor r12, rcx
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x140046899
mov rax, qword [rcx]
mov rax, qword [rax + 0x10]
call qword [str._F_v_]
mov r8, rax
test rax, rax
je 0x140046899
mov rcx, qword [rax]
mov rax, qword [rcx]
mov edx, 1
mov rcx, r8
call qword [str._F_v_]
add rbp, rdi
cmp rbp, r14
jb 0x14004681a
mov rdx, qword [r15 + 0x28]
mov rax, rdx
and rax, r12
cmp qword [r15 + 0x30], rax
ja 0x1400468c2
shr rdx, 1
or rcx, 0xffffffffffffffff
sub rcx, rdx
add rax, rcx
mov rbx, qword [rsp + 0x68]
mov rbp, qword [rsp + 0x70]
add rsp, 0x30
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret
Function at 0x1400468e0
Capabilities:
Encode data using xor
Hash data using fnv

Disassembly:
mov byte [rsp + 0x20], r9b
push rbx
push rsi
push rdi
push r13
push r14
push r15
sub rsp, 0x68
mov qword [rsp + 0x40], 0xfffffffffffffffe
mov rax, qword [0x140122f00]
xor rax, rsp
mov qword [rsp + 0x50], rax
mov rdi, r8
mov r15, rdx
mov r14, rcx
mov qword [rsp + 0x30], rcx
mov r9, qword [r8 + 0x10]
cmp qword [r8 + 0x18], 8
jb 0x140046926
mov r8, qword [r8]
movabs rcx, 0xcbf29ce484222325
xor edx, edx
add r9, r9
je 0x140046955
movzx eax, byte [rdx + r8]
xor rcx, rax
movabs r10, 0x100000001b3
imul rcx, r10
inc rdx
cmp rdx, r9
jb 0x140046937
mov rax, rcx
shr rax, 0x20
xor rcx, rax
mov rdx, qword [r14 + 0x28]
mov rsi, rdx
and rsi, rcx
cmp qword [r14 + 0x30], rsi
ja 0x14004697c
shr rdx, 1
or rax, 0xffffffffffffffff
sub rax, rdx
add rsi, rax
mov rbx, qword [r14]
add rsi, rsi
mov rax, qword [r14 + 0x10]
cmp rbx, qword [rax + rsi*8]
je 0x1400469df
mov rbx, qword [rax + rsi*8 + 8]
mov rbx, qword [rbx]
cmp rbx, qword [rax + rsi*8]
je 0x1400469df
mov rbx, qword [rbx + 8]
lea rdx, [rbx + 0x10]
mov rcx, rdi
call fcn.140034d48
test al, al
jne 0x1400469ba
mov rax, qword [r14 + 0x10]
cmp rbx, qword [rax + rsi*8]
jne 0x14004699a
jmp 0x1400469df
lea rcx, [rbx + 0x10]
mov rdx, rdi
call fcn.140034d48
test al, al
jne 0x1400469cf
mov rbx, qword [rbx]
jmp 0x1400469df
mov qword [r15], rbx
mov byte [r15 + 8], 0
mov rax, r15
jmp 0x140046acc
mov rax, qword [r14]
mov r13, qword [rax]
mov r9, rdi
mov r8, qword [r13 + 8]
mov rdx, r13
call fcn.14004734c
mov rdx, rax
mov rax, qword [r14 + 8]
movabs rcx, 0x492492492492491
sub rcx, rax
cmp rcx, 1
jae 0x140046a1b
lea rcx, str.list_T__too_long
call fcn.140096d3c
int3
inc rax
mov qword [r14 + 8], rax
mov qword [r13 + 8], rdx
mov rax, qword [rdx + 8]
mov qword [rax], rdx
mov rdi, qword [r14]
mov rdi, qword [rdi]
mov qword [rsp + 0x20], rdi
mov rax, qword [rdi]
cmp rbx, rax
je 0x140046a6d
mov rcx, qword [rdi + 8]
mov qword [rcx], rax
mov rcx, qword [rax + 8]
mov qword [rcx], rbx
mov rcx, qword [rbx + 8]
mov qword [rcx], rdi
mov rdx, qword [rbx + 8]
mov rcx, qword [rax + 8]
mov qword [rbx + 8], rcx
mov rcx, qword [rdi + 8]
mov qword [rax + 8], rcx
mov qword [rdi + 8], rdx
mov rcx, qword [r14 + 0x10]
mov rax, qword [rcx + rsi*8]
cmp rax, qword [r14]
jne 0x140046a89
mov qword [rcx + rsi*8], rdi
mov rax, qword [r14 + 0x10]
mov qword [rax + rsi*8 + 8], rdi
jmp 0x140046ab8
cmp rax, rbx
jne 0x140046a94
mov qword [rcx + rsi*8], rdi
jmp 0x140046ab8
mov rax, qword [rcx + rsi*8 + 8]
mov rdx, qword [rax]
mov qword [rcx + rsi*8 + 8], rdx
cmp rdx, rdi
je 0x140046ab8
mov r8, qword [r14 + 0x10]
mov rax, qword [r8 + rsi*8 + 8]
mov rdx, qword [rax + 8]
mov qword [r8 + rsi*8 + 8], rdx
mov rcx, r14
call fcn.140046af0
nop
mov qword [r15], rdi
mov byte [r15 + 8], 1
mov rax, r15
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.1400b3bf0
add rsp, 0x68
pop r15
pop r14
pop r13
pop rdi
pop rsi
pop rbx
ret
Function at 0x140046ba8
Capabilities:
Encode data using xor
Hash data using fnv

Disassembly:
mov qword [rsp + 0x18], r8
push rbx
push rbp
push rsi
push rdi
push r14
sub rsp, 0x30
mov rax, qword [0x140122f00]
xor rax, rsp
mov qword [rsp + 0x20], rax
mov rsi, rcx
mov rdi, r8
lea rcx, [r8 + 0x10]
mov r14, rdx
cmp qword [rcx + 0x18], 8
mov r9, qword [rcx + 0x10]
jb 0x140046be1
mov rcx, qword [rcx]
xor ebp, ebp
movabs r8, 0xcbf29ce484222325
mov edx, ebp
add r9, r9
je 0x140046c11
movzx eax, byte [rcx + rdx]
movabs r10, 0x100000001b3
xor r8, rax
inc rdx
imul r8, r10
cmp rdx, r9
jb 0x140046bf4
mov rcx, qword [rsi + 0x28]
mov rdx, r8
shr rdx, 0x20
xor rdx, r8
and rdx, rcx
cmp qword [rsi + 0x30], rdx
ja 0x140046c35
shr rcx, 1
or rax, 0xffffffffffffffff
sub rax, rcx
add rdx, rax
mov rcx, qword [rsi + 0x10]
add rdx, rdx
cmp qword [rcx + rdx*8 + 8], rdi
jne 0x140046c64
cmp qword [rcx + rdx*8], rdi
jne 0x140046c5e
mov rax, qword [rsi]
mov qword [rcx + rdx*8], rax
mov rcx, qword [rsi + 0x10]
mov rax, qword [rsi]
mov qword [rcx + rdx*8 + 8], rax
jmp 0x140046c71
mov rax, qword [rdi + 8]
jmp 0x140046c57
cmp qword [rcx + rdx*8], rdi
jne 0x140046c76
mov rax, qword [rdi]
mov qword [rcx + rdx*8], rax
mov rdi, qword [rsp + 0x70]
mov rbx, qword [rdi]
cmp rdi, qword [rsi]
je 0x140046cbe
mov rax, qword [rdi + 8]
mov qword [rax], rbx
mov rdx, qword [rdi]
mov rax, qword [rdi + 8]
mov qword [rdx + 8], rax
cmp qword [rdi + 0x28], 8
jb 0x140046ca1
mov rcx, qword [rdi + 0x10]
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
mov qword [rdi + 0x28], 7
mov rcx, rdi
mov qword [rdi + 0x20], rbp
mov word [rdi + 0x10], bp
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
dec qword [rsi + 8]
mov qword [r14], rbx
mov rax, r14
mov rcx, qword [rsp + 0x20]
xor rcx, rsp
call fcn.1400b3bf0
add rsp, 0x30
pop r14
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x140046e8c
Capabilities:
Encode data using xor
Hash data using fnv

Disassembly:
mov qword [rsp + 0x20], r9
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x50
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov rax, qword [0x140122f00]
xor rax, rsp
mov qword [rsp + 0x40], rax
mov rdi, r9
mov r12, r8
mov r15, rdx
mov r14, rcx
mov qword [rsp + 0x20], rcx
mov r8, qword [r8 + 0x10]
cmp qword [r12 + 0x18], 8
jb 0x140046edb
mov rdx, qword [r12]
jmp 0x140046ede
mov rdx, r12
movabs rsi, 0xcbf29ce484222325
xor r13d, r13d
mov ecx, r13d
add r8, r8
je 0x140046f10
movzx eax, byte [rcx + rdx]
xor rsi, rax
movabs r9, 0x100000001b3
imul rsi, r9
inc rcx
cmp rcx, r8
jb 0x140046ef3
mov rax, rsi
shr rax, 0x20
xor rsi, rax
mov rcx, qword [r14 + 0x28]
and rsi, rcx
cmp qword [r14 + 0x30], rsi
ja 0x140046f34
shr rcx, 1
or rax, 0xffffffffffffffff
sub rax, rcx
add rsi, rax
mov rbx, qword [r14]
add rsi, rsi
mov rax, qword [r14 + 0x10]
cmp rbx, qword [rax + rsi*8]
je 0x140046ff7
mov rbx, qword [rax + rsi*8 + 8]
mov rbx, qword [rbx]
cmp rbx, qword [rax + rsi*8]
je 0x140046ff7
mov rbx, qword [rbx + 8]
lea rdx, [rbx + 0x10]
mov rcx, r12
call fcn.140034d48
test al, al
jne 0x140046f82
mov rax, qword [r14 + 0x10]
cmp rbx, qword [rax + rsi*8]
jne 0x140046f5a
mov rdi, qword [rsp + 0xa8]
jmp 0x140046ff7
lea rcx, [rbx + 0x10]
mov rdx, r12
call fcn.140034d48
mov rdi, qword [rsp + 0xa8]
test al, al
jne 0x140046f9f
mov rbx, qword [rbx]
jmp 0x140046ff7
cmp rdi, qword [r14]
je 0x140046fe8
mov rcx, qword [rdi + 8]
mov rax, qword [rdi]
mov qword [rcx], rax
mov rcx, qword [rdi]
mov rax, qword [rdi + 8]
mov qword [rcx + 8], rax
cmp qword [rdi + 0x28], 8
jb 0x140046fca
mov rcx, qword [rdi + 0x10]
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
mov qword [rdi + 0x28], 7
mov qword [rdi + 0x20], r13
mov word [rdi + 0x10], r13w
mov rcx, rdi
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
dec qword [r14 + 8]
mov qword [r15], rbx
mov byte [r15 + 8], r13b
mov rax, r15
jmp 0x140047090
mov qword [rsp + 0x28], rdi
mov rax, qword [rdi]
cmp rbx, rax
je 0x140047031
mov rcx, qword [rdi + 8]
mov qword [rcx], rax
mov rcx, qword [rax + 8]
mov qword [rcx], rbx
mov rcx, qword [rbx + 8]
mov qword [rcx], rdi
mov rdx, qword [rbx + 8]
mov rcx, qword [rax + 8]
mov qword [rbx + 8], rcx
mov rcx, qword [rdi + 8]
mov qword [rax + 8], rcx
mov qword [rdi + 8], rdx
mov rcx, qword [r14 + 0x10]
mov rax, qword [rcx + rsi*8]
cmp rax, qword [r14]
jne 0x14004704d
mov qword [rcx + rsi*8], rdi
mov rax, qword [r14 + 0x10]
mov qword [rax + rsi*8 + 8], rdi
jmp 0x14004707c
cmp rax, rbx
jne 0x140047058
mov qword [rcx + rsi*8], rdi
jmp 0x14004707c
mov rax, qword [rcx + rsi*8 + 8]
mov rdx, qword [rax]
mov qword [rcx + rsi*8 + 8], rdx
cmp rdx, rdi
je 0x14004707c
mov r8, qword [r14 + 0x10]
mov rax, qword [r8 + rsi*8 + 8]
mov rdx, qword [rax + 8]
mov qword [r8 + rsi*8 + 8], rdx
mov rcx, r14
call fcn.140046af0
nop
mov qword [r15], rdi
mov byte [r15 + 8], 1
mov rax, r15
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.1400b3bf0
add rsp, 0x50
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
Function at 0x140066b40
Capabilities:
Query or enumerate registry key

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0xd0
mov qword [rbp - 0x59], 0xfffffffffffffffe
mov rax, qword [0x140122f00]
xor rax, rsp
mov qword [rbp + 0x17], rax
mov r14, r9
mov rdi, r8
mov r15d, edx
mov rsi, rcx
xor r12d, r12d
mov qword [rbp - 0x69], r12
mov rcx, r9
call fcn.140049108
mov ecx, 0x200
call fcn.140097b58
mov rbx, rax
mov qword [rbp - 0x51], rax
test rax, rax
jne 0x140066ba6
lea edi, [rax + 0xe]
jmp 0x140066d4d
cmp qword [rbp - 0x69], r12
je 0x140066bdb
lea rdx, str.Attempting_to_assign_an_already_valid_handle.
lea rcx, [rbp - 9]
call fcn.140005a2c
nop
lea rdx, [rbp - 9]
lea rcx, [rbp - 0x49]
call fcn.140005278
lea rdx, [0x140118428]
lea rcx, [rbp - 0x49]
call sub.msvcrt.dll__CxxThrowException
nop
cmp qword [rdi + 0x18], 8
jb 0x140066be5
mov rdi, qword [rdi]
mov edx, r15d
mov rcx, rsi
call fcn.140066aac
mov rcx, rax
lea rax, [rbp - 0x69]
mov qword [rsp + 0x20], rax
mov r9d, 0x20119
xor r8d, r8d
mov rdx, rdi
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov edi, eax
test eax, eax
jne 0x140066d4d
mov esi, r12d
mov dword [rbp - 0x61], 0x100
mov rcx, qword [rbp - 0x69]
test rcx, rcx
je 0x140066d1e
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], r12
lea r9, [rbp - 0x61]
mov r8, rbx
mov edx, esi
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
mov edi, eax
test eax, eax
jne 0x140066cfe
mov qword [rbp + 0xf], 7
mov qword [rbp + 7], r12
mov word [rbp - 9], r12w
cmp word [rbx], r12w
jne 0x140066c78
mov r8, r12
jmp 0x140066c86
or r8, 0xffffffffffffffff
inc r8
cmp word [rbx + r8*2], r12w
jne 0x140066c7c
mov rdx, rbx
lea rcx, [rbp - 9]
call fcn.140005c18
nop
mov r15, qword [r14]
lea r9, [rbp - 9]
mov r8, qword [r15 + 8]
mov rdx, r15
call fcn.14006ccdc
mov rdx, qword [r14 + 8]
movabs rcx, 0x555555555555554
sub rcx, rdx
cmp rcx, 1
jb 0x140066cf1
lea rcx, [rdx + 1]
mov qword [r14 + 8], rcx
mov qword [r15 + 8], rax
mov rcx, qword [rax + 8]
mov qword [rcx], rax
cmp qword [rbp + 0xf], 8
jb 0x140066ce1
mov rcx, qword [rbp - 9]
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
inc esi
cmp esi, 0x1000
jb 0x140066c1b
jmp 0x140066d4d
lea rcx, str.list_T__too_long
call fcn.140096d3c
nop
cmp eax, 0x103
jne 0x140066d14
mov edi, 2
cmp qword [r14 + 8], r12
cmova edi, r12d
jmp 0x140066d4d
mov rcx, r14
call fcn.140049108
jmp 0x140066d4d
lea rdx, str.Attempting_to_use_an_invalid_handle.
lea rcx, [rbp - 9]
call fcn.140005a2c
nop
lea rdx, [rbp - 9]
lea rcx, [rbp - 0x49]
call fcn.140005278
lea rdx, [0x140118428]
lea rcx, [rbp - 0x49]
call sub.msvcrt.dll__CxxThrowException
nop
mov rcx, rbx
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete___void____ptr64_]
nop
lea rcx, [rbp - 0x69]
call fcn.140005984
mov eax, edi
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.1400b3bf0
add rsp, 0xd0
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret