joyce8/EMBER2024-capa huggingface dataset:
Function at 0x18002dd6c
Capabilities:
Set registry value

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x2b0]
sub rsp, 0x3b0
mov rax, qword [0x180093630]
xor rax, rsp
mov qword [rbp + 0x2a0], rax
mov edi, edx
mov r12d, r9d
lea rdx, [rsp + 0x38]
mov rsi, r8
call fcn.18002b608
xor r13d, r13d
mov ebx, eax
test eax, eax
js 0x18002dfc8
xor edx, edx
lea r8d, [r13 + 0x70]
lea rcx, [rsp + 0x60]
call sub.msvcrt.dll_memset
mov rax, qword [rsp + 0x38]
lea rdx, [rsp + 0x60]
mov ecx, dword [rax + 8]
mov dword [rsp + 0x60], ecx
lea rcx, [0x180096180]
call qword [sym.imp.ntdll.dll_RtlLookupElementGenericTable]
mov r14, rax
test rax, rax
jne 0x18002ddfb
mov ebx, 0xc0000008
jmp 0x18002dfc8
mov rax, qword [rsp + 0x38]
mov r15d, dword [rax + 0xc]
test edi, edi
jle 0x18002dfc3
cmp edi, 2
jle 0x18002dfc3
cmp edi, 4
jle 0x18002de3c
cmp edi, 5
je 0x18002dfc3
cmp edi, 0xe
je 0x18002dfc3
cmp edi, 0xf
jne 0x18002dfc3
mov qword [rsp + 0x30], r13
jmp 0x18002deb6
cmp byte [r14 + 4], r13b
je 0x18002de4c
mov ebx, 0xc0000022
jmp 0x18002dfc8
lea rax, [rbp + 0x90]
mov dword [rsp + 0x40], 0x2080000
mov qword [rsp + 0x48], rax
lea rdx, [rsp + 0x40]
mov ecx, dword [r14]
call fcn.18002f0e4
mov ebx, eax
test eax, eax
js 0x18002dfc8
mov rdx, qword [0x1800960e8]
lea r8, [rbp + 0x90]
mov rax, rdx
mov r9d, 0x20006
neg rax
lea rax, [rsp + 0x30]
sbb ecx, ecx
mov qword [rsp + 0x28], rax
and ecx, 2
mov byte [rsp + 0x20], 1
inc ecx
call fcn.18000a400
mov ebx, eax
test eax, eax
js 0x18002dfc8
sub edi, 3
je 0x18002df7a
sub edi, 1
je 0x18002df71
cmp edi, 0xb
je 0x18002ded7
mov ebx, 0xc0000003
jmp 0x18002dfb1
test rsi, rsi
jne 0x18002dee6
mov ebx, 0xc0000005
jmp 0x18002dfb1
cmp r12d, 0x20
jb 0x18002df6a
cmp r12d, dword [rsi + 4]
jb 0x18002df6a
movups xmm0, xmmword [rsi + 8]
lea rdx, [rbp - 0x30]
lea rcx, [0x1800960a0]
movdqu xmmword [rbp - 0x30], xmm0
call qword [sym.imp.ntdll.dll_RtlLookupElementGenericTable]
test rax, rax
jne 0x18002df24
mov r8, rsi
mov rdx, r14
mov ecx, r15d
call fcn.18002e09c
jmp 0x18002dfaf
mov ecx, dword [r14]
cmp dword [rsi], r13d
jne 0x18002df4b
cmp dword [rax + 0x14], ecx
jne 0x18002df44
cmp dword [rax + 0x18], r15d
jne 0x18002df44
mov rdx, rax
mov rcx, r14
call fcn.18002e2b8
jmp 0x18002dfaf
mov ebx, 0xc0000225
jmp 0x18002dfb1
cmp dword [rax + 0x14], ecx
jne 0x18002df63
cmp dword [rax + 0x18], r15d
jne 0x18002df63
mov rdx, rsi
mov rcx, rax
call fcn.18002e3e8
jmp 0x18002dfaf
mov ebx, 0xc0000035
jmp 0x18002dfb1
mov ebx, 0xc0000004
jmp 0x18002dfb1
lea rdx, str.Description
jmp 0x18002df81
lea rdx, str.FriendlyName
lea rcx, [rsp + 0x50]
call qword [sym.imp.ntdll.dll_RtlInitUnicodeString]
mov rcx, qword [rsp + 0x30]
lea rdx, [rsp + 0x50]
mov r9d, 1
mov dword [rsp + 0x28], r12d
xor r8d, r8d
mov qword [rsp + 0x20], rsi
call qword [sym.imp.ntdll.dll_NtSetValueKey]
mov ebx, eax
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x18002dfc8
call qword [sym.imp.ntdll.dll_NtClose]
jmp 0x18002dfc8
mov ebx, 0xc0000003
mov eax, ebx
mov rcx, qword [rbp + 0x2a0]
xor rcx, rsp
call fcn.180017170
mov rbx, qword [rsp + 0x3f8]
add rsp, 0x3b0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x18002e3e8
Capabilities:
Delete registry key
Set registry value

Disassembly:
mov r8d, dword [rdx]
sub r8d, 1
je 0x18002e43b
sub r8d, 1
je 0x18002e41c
cmp r8d, 1
je 0x18002e403
mov eax, 0xc0000003
ret
cmp dword [rdx + 4], 0x28
jne 0x18002e416
mov r8, rdx
mov rdx, rcx
xor ecx, ecx
jmp fcn.18002eb7c
mov eax, 0xc0000004
ret
cmp dword [rdx + 4], 0x478
je 0x18002e42e
cmp dword [rdx + 4], 0x4c0
jne 0x18002e416
mov r8, rdx
mov rdx, rcx
xor ecx, ecx
jmp fcn.18002e450
mov r8, rdx
mov r9d, 1
mov rdx, rcx
xor ecx, ecx
jmp fcn.18002e914
Function at 0x18002e914
Capabilities:
Set registry value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x20], rsi
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x1a0]
sub rsp, 0x2a0
mov rax, qword [0x180093630]
xor rax, rsp
mov qword [rbp + 0x190], rax
xor r12d, r12d
mov r15d, r9d
cmp dword [rdx + 0x10], 1
mov rsi, r8
mov rdi, rdx
mov qword [rsp + 0x30], r12
mov r14b, cl
jne 0x18002eb4a
mov rdx, qword [r8 + 0x220]
lea rcx, [rsp + 0x40]
call qword [sym.imp.ntdll.dll_RtlInitUnicodeString]
lea rdx, [rsi + 0x20]
lea rcx, [rsp + 0x68]
call qword [sym.imp.ntdll.dll_RtlInitUnicodeString]
mov eax, 0x200
cmp word [rsp + 0x68], ax
jae 0x18002eb4a
cmp word [rsp + 0x40], r12w
je 0x18002eb4a
mov ecx, dword [rdi + 0x14]
lea rax, [rbp - 0x80]
lea r9, [rsp + 0x58]
mov qword [rsp + 0x60], rax
mov r8, rdi
mov dword [rsp + 0x58], 0x2080000
lea rdx, str.Paths
call fcn.18002efb4
mov ebx, eax
test eax, eax
js 0x18002eb4f
mov rdx, qword [0x1800960e8]
lea rax, [rsp + 0x30]
mov ecx, dword [rdi + 0x18]
lea r8, [rbp - 0x80]
mov qword [rsp + 0x28], rax
mov r9d, 0x2001f
mov byte [rsp + 0x20], r14b
call fcn.18000a400
mov ebx, eax
test eax, eax
js 0x18002eb4f
lea rcx, [rsp + 0x50]
call qword [sym.imp.api_ms_win_core_sysinfo_l1_1_0.dll_GetSystemTimeAsFileTime]
mov rcx, qword [rsp + 0x30]
lea rax, [rsp + 0x50]
mov dword [rsp + 0x28], 8
lea r9d, [r12 + 0xb]
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, [0x18006cc08]
call qword [sym.imp.ntdll.dll_NtSetValueKey]
mov ebx, eax
test eax, eax
js 0x18002eb3d
movzx eax, word [rsp + 0x6a]
lea r9d, [r12 + 1]
mov rcx, qword [rsp + 0x30]
lea rdx, [0x18006cbf8]
mov dword [rsp + 0x28], eax
xor r8d, r8d
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ntdll.dll_NtSetValueKey]
mov ebx, eax
test eax, eax
js 0x18002eb3d
mov eax, dword [rsi + 0x228]
lea r9d, [r12 + 4]
mov rcx, qword [rsp + 0x30]
lea rdx, [0x18006cbe8]
mov dword [rsp + 0x38], eax
xor r8d, r8d
lea rax, [rsp + 0x38]
mov dword [rsp + 0x28], r9d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ntdll.dll_NtSetValueKey]
mov ebx, eax
test eax, eax
js 0x18002eb3d
mov rcx, qword [rsi + 0x220]
mov dx, 0x25
call qword [sym.imp.msvcrt.dll_wcschr]
mov rcx, qword [rsp + 0x30]
lea rdx, [0x18006cbd8]
test rax, rax
mov esi, r12d
movzx eax, word [rsp + 0x42]
setne sil
mov dword [rsp + 0x28], eax
mov rax, qword [rsp + 0x48]
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea r9d, [rsi + 1]
call qword [sym.imp.ntdll.dll_NtSetValueKey]
mov ebx, eax
test eax, eax
js 0x18002eb3d
test r15d, r15d
je 0x18002eb3a
lea rcx, [rdi + 0x28]
call qword [sym.imp.ntdll.dll_RtlFreeUnicodeString]
lea r8, [rdi + 0x28]
lea rdx, [rsp + 0x40]
lea ecx, [r12 + 1]
call qword [sym.imp.ntdll.dll_RtlDuplicateUnicodeString]
mov ebx, eax
test eax, eax
js 0x18002eb3d
mov eax, dword [rsp + 0x38]
mov dword [rdi + 0x38], eax
mov dword [rdi + 0x20], esi
mov ebx, r12d
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ntdll.dll_NtClose]
jmp 0x18002eb4f
mov ebx, 0xc000000d
mov eax, ebx
mov rcx, qword [rbp + 0x190]
xor rcx, rsp
call fcn.180017170
lea r11, [rsp + 0x2a0]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret
Function at 0x18002eb7c
Capabilities:
Set registry value

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x180]
sub rsp, 0x280
mov rax, qword [0x180093630]
xor rax, rsp
mov qword [rbp + 0x170], rax
xor r15d, r15d
mov rsi, r8
cmp dword [rdx + 0x10], 3
mov rdi, rdx
mov r14b, cl
mov qword [rsp + 0x38], r15
je 0x18002ebc9
mov ebx, 0xc000000d
jmp 0x18002eced
mov ecx, dword [rdi + 0x14]
lea rax, [rsp + 0x60]
lea r9, [rsp + 0x48]
mov qword [rsp + 0x50], rax
mov r8, rdi
mov dword [rsp + 0x48], 0x2080000
lea rdx, str.UrlZones
call fcn.18002efb4
mov ebx, eax
test eax, eax
js 0x18002eced
mov rdx, qword [0x1800960e8]
lea rax, [rsp + 0x38]
mov ecx, dword [rdi + 0x18]
lea r8, [rsp + 0x60]
mov qword [rsp + 0x28], rax
mov r9d, 0x2001f
mov byte [rsp + 0x20], r14b
call fcn.18000a400
mov ebx, eax
test eax, eax
js 0x18002eced
lea rcx, [rsp + 0x40]
call qword [sym.imp.api_ms_win_core_sysinfo_l1_1_0.dll_GetSystemTimeAsFileTime]
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x40]
mov dword [rsp + 0x28], 8
lea rdx, [0x18006cb58]
mov r9d, 0xb
mov qword [rsp + 0x20], rax
xor r8d, r8d
call qword [sym.imp.ntdll.dll_NtSetValueKey]
mov ebx, eax
test eax, eax
js 0x18002ece2
mov eax, dword [rsi + 0x24]
lea rdx, [0x18006cb48]
mov rcx, qword [rsp + 0x38]
mov r14d, 4
mov dword [rsp + 0x30], eax
mov r9d, r14d
lea rax, [rsp + 0x30]
mov dword [rsp + 0x28], r14d
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ntdll.dll_NtSetValueKey]
mov ebx, eax
test eax, eax
js 0x18002ece2
mov eax, dword [rsp + 0x30]
lea rdx, [0x18006cb38]
mov rcx, qword [rsp + 0x38]
add rsi, 0x20
mov dword [rsp + 0x28], r14d
mov r9d, r14d
xor r8d, r8d
mov qword [rsp + 0x20], rsi
mov dword [rdi + 0x24], eax
call qword [sym.imp.ntdll.dll_NtSetValueKey]
mov ebx, eax
test eax, eax
js 0x18002ece2
mov eax, dword [rsi]
mov ebx, r15d
mov dword [rdi + 0x20], eax
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ntdll.dll_NtClose]
mov eax, ebx
mov rcx, qword [rbp + 0x170]
xor rcx, rsp
call fcn.180017170
mov rbx, qword [rsp + 0x2b0]
add rsp, 0x280
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
Function at 0x18002ee14
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
mov rbp, rsp
sub rsp, 0x70
and dword [rbp + 0x28], 0
test rdx, rdx
je 0x18002ee71
cmp qword [rdx + 8], 0
je 0x18002ee71
mov qword [rbp - 0x28], rcx
lea r8, [rbp - 0x30]
mov qword [rbp - 0x20], rdx
lea rcx, [rbp + 0x30]
xorps xmm0, xmm0
mov dword [rbp - 0x30], 0x30
mov edx, 0x30019
mov dword [rbp - 0x18], 0x40
movdqu xmmword [rbp - 0x10], xmm0
call qword [sym.imp.ntdll.dll_NtOpenKey]
test eax, eax
js 0x18002efa1
mov sil, 1
jmp 0x18002ee78
mov qword [rbp + 0x30], rcx
xor sil, sil
mov rcx, qword gs:[0x60]
mov edi, 0x100
mov r8d, edi
xor edx, edx
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov rbx, rax
mov rcx, qword [rbp + 0x30]
lea rax, [rbp + 0x28]
mov qword [rsp + 0x28], rax
mov r9, rbx
xor r8d, r8d
mov dword [rsp + 0x20], edi
xor edx, edx
call qword [sym.imp.ntdll.dll_NtEnumerateKey]
cmp eax, 0xc0000023
je 0x18002eec5
cmp eax, 0x80000005
jne 0x18002ef31
mov eax, dword [rbp + 0x28]
cmp eax, edi
jbe 0x18002ef67
test rbx, rbx
je 0x18002eef0
mov rcx, qword gs:[0x60]
mov r8, rbx
xor edx, edx
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlFreeHeap]
mov eax, dword [rbp + 0x28]
mov rcx, qword gs:[0x60]
xor edx, edx
mov r8d, eax
mov edi, eax
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov rbx, rax
test rax, rax
je 0x18002ef84
mov rcx, qword [rbp + 0x30]
lea rax, [rbp + 0x28]
mov qword [rsp + 0x28], rax
mov r9, rbx
xor r8d, r8d
mov dword [rsp + 0x20], edi
xor edx, edx
call qword [sym.imp.ntdll.dll_NtEnumerateKey]
test eax, eax
js 0x18002ef67
test rbx, rbx
je 0x18002ef84
mov rcx, qword [rbp + 0x30]
lea rax, [rbx + 0x10]
mov qword [rbp - 0x38], rax
lea rdx, [rbp - 0x40]
movzx eax, word [rbx + 0xc]
mov word [rbp - 0x3e], ax
movzx eax, word [rbx + 0xc]
mov word [rbp - 0x40], ax
call fcn.18002ee14
test eax, eax
jns 0x18002ee98
test rbx, rbx
je 0x18002ef84
mov rcx, qword gs:[0x60]
mov r8, rbx
xor edx, edx
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlFreeHeap]
mov rcx, qword [rbp + 0x30]
call qword [sym.imp.ntdll.dll_NtDeleteKey]
mov ebx, eax
test sil, sil
je 0x18002ef9f
mov rcx, qword [rbp + 0x30]
call qword [sym.imp.ntdll.dll_NtClose]
mov eax, ebx
mov rbx, qword [rsp + 0x90]
add rsp, 0x70
pop rdi
pop rsi
pop rbp
ret
Function at 0x180030218
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov rax, qword gs:[0x60]
mov rbx, rcx
mov rcx, qword [rcx + 0x18]
xor edi, edi
mov rbp, qword [rax + 0x30]
test rcx, rcx
je 0x18003024d
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov r8, qword [rbx + 0x30]
test r8, r8
je 0x180030286
mov esi, edi
cmp dword [rbx + 0x2c], edi
jbe 0x18003027b
mov rcx, qword [rbx + 0x30]
mov eax, esi
add rax, rax
mov rcx, qword [rcx + rax*8]
call qword [sym.imp.KERNEL32.dll_LocalFree]
inc esi
cmp esi, dword [rbx + 0x2c]
jb 0x18003025d
mov r8, qword [rbx + 0x30]
xor edx, edx
mov rcx, rbp
call qword [sym.imp.ntdll.dll_RtlFreeHeap]
mov r8, qword [rbx + 0x48]
test r8, r8
je 0x18003029a
xor edx, edx
mov rcx, rbp
call qword [sym.imp.ntdll.dll_RtlFreeHeap]
mov r8, qword [rbx + 0x68]
test r8, r8
je 0x1800302d3
mov esi, edi
cmp dword [rbx + 0x64], edi
jbe 0x1800302c8
mov rcx, qword [rbx + 0x68]
mov eax, esi
add rax, rax
mov rcx, qword [rcx + rax*8]
call qword [sym.imp.KERNEL32.dll_LocalFree]
inc esi
cmp esi, dword [rbx + 0x64]
jb 0x1800302aa
mov r8, qword [rbx + 0x68]
xor edx, edx
mov rcx, rbp
call qword [sym.imp.ntdll.dll_RtlFreeHeap]
mov r8, qword [rbx + 0x58]
test r8, r8
je 0x18003030a
cmp dword [rbx + 0x54], edi
jbe 0x1800302ff
mov rcx, qword [rbx + 0x58]
mov eax, edi
add rax, rax
mov rcx, qword [rcx + rax*8]
call qword [sym.imp.KERNEL32.dll_LocalFree]
inc edi
cmp edi, dword [rbx + 0x54]
jb 0x1800302e1
mov r8, qword [rbx + 0x58]
xor edx, edx
mov rcx, rbp
call qword [sym.imp.ntdll.dll_RtlFreeHeap]
xor edx, edx
mov rcx, rbx
lea r8d, [rdx + 0x70]
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
jmp sub.msvcrt.dll_memset

Function at 0x18003032c
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x30
mov rdi, qword [0x180096990]
mov rsi, r8
movzx r8d, dx
xor r9d, r9d
shr r8d, 4
mov ebx, edx
inc r8d
mov rcx, rdi
lea edx, [r9 + 6]
call qword [sym.imp.KERNEL32.dll_FindResourceExW]
test rax, rax
je 0x1800303c9
mov rdx, rax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rcx, rax
test rax, rax
je 0x1800303c9
movzx eax, word [rax]
lea rcx, [rcx + 2]
and ebx, 0xf
je 0x180030399
cdqe
lea rcx, [rcx + rax*2]
movzx eax, word [rcx]
add rcx, 2
add ebx, 0xffffffff
jne 0x180030387
add ax, ax
mov qword [rsp + 0x28], rcx
mov ecx, 1
mov word [rsp + 0x22], ax
mov r8, rsi
mov word [rsp + 0x20], ax
lea rdx, [rsp + 0x20]
call qword [sym.imp.ntdll.dll_RtlDuplicateUnicodeString]
test eax, eax
js 0x1800303c9
mov eax, 1
jmp 0x1800303cb
xor eax, eax
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret
Function at 0x1800305b4
Capabilities:
Query or enumerate registry value

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x2f]
sub rsp, 0xb8
mov rax, qword [0x180093630]
xor rax, rsp
mov qword [rbp + 0x17], rax
mov r15, rdx
mov r14, rcx
lea rdx, str.ItemData
mov rsi, r9
lea rcx, [rbp - 0x51]
mov rdi, r8
call qword [sym.imp.ntdll.dll_RtlInitUnicodeString]
lea rax, [rbp - 0x59]
mov r8d, 4
mov qword [rsp + 0x28], rax
lea r9, [rbp - 0x39]
lea rdx, [rbp - 0x51]
mov dword [rsp + 0x20], 0x4b
mov rcx, r14
call qword [sym.imp.ntdll.dll_NtQueryValueKey]
mov ecx, eax
test eax, eax
jns 0x18003064c
cmp eax, 0x80000005
jne 0x18003062e
mov ecx, 0xc0000001
mov eax, ecx
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.180017170
add rsp, 0xb8
pop r15
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret
cmp dword [rbp - 0x39], 3
jne 0x180030629
mov rbx, qword [rbp - 0x35]
lea eax, [rbx - 1]
cmp eax, 0x3f
ja 0x180030629
cmp ebx, dword [rdi]
jbe 0x180030669
mov ecx, 0x80000005
jmp 0x18003062e
mov r8d, ebx
lea rdx, [rbp - 0x31]
mov rcx, r15
call sub.msvcrt.dll_memcpy
lea rdx, str.HashAlg
mov dword [rdi], ebx
lea rcx, [rbp - 0x51]
call qword [sym.imp.ntdll.dll_RtlInitUnicodeString]
lea rax, [rbp - 0x59]
mov r8d, 4
mov qword [rsp + 0x28], rax
lea r9, [rbp - 0x39]
lea rdx, [rbp - 0x51]
mov dword [rsp + 0x20], 0x4b
mov rcx, r14
call qword [sym.imp.ntdll.dll_NtQueryValueKey]
mov ecx, eax
test eax, eax
js 0x18003062e
cmp dword [rbp - 0x39], 4
jne 0x180030629
cmp dword [rbp - 0x35], 4
jne 0x180030629
mov rax, qword [rbp - 0x31]
mov ecx, 0xc0000001
mov dword [rsi], eax
and eax, 0xe000
sub eax, 0x8000
neg eax
sbb eax, eax
and ecx, eax
jmp 0x18003062e
Function at 0x180030ce4
Capabilities:
Set registry value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x50
cmp byte [0x1800962f8], 0
mov rsi, r8
mov edi, ecx
jne 0x180030d0b
mov ebx, 0xc0000001
jmp 0x180030e4f
cmp edx, 4
jb 0x180030e4a
test rsi, rsi
je 0x180030e4a
test dword [r8], 0xffffcfff
jne 0x180030e4a
cmp dword [r8], 0x3000
je 0x180030e4a
lea rcx, [0x180096140]
call qword [sym.imp.ntdll.dll_RtlEnterCriticalSection]
mov rdx, qword [0x1800960e8]
test rdx, rdx
je 0x180030d5f
cmp edi, 3
je 0x180030d67
mov ebx, 0xc0000030
jmp 0x180030e3b
lea eax, [rdi - 1]
cmp eax, 1
ja 0x180030d55
cmp byte [0x1800961c8], 0
je 0x180030d86
call fcn.1800063f0
mov ebx, eax
test eax, eax
js 0x180030e3b
mov rdx, qword [0x1800960e8]
lea rax, [rsp + 0x30]
mov r9d, 0x2001b
mov qword [rsp + 0x28], rax
lea r8, [0x180070210]
mov ecx, edi
mov byte [rsp + 0x20], 1
call fcn.18000a400
mov ebx, eax
test eax, eax
js 0x180030e3b
lea rcx, [0x180096180]
call qword [sym.imp.ntdll.dll_RtlIsGenericTableEmpty]
test al, al
je 0x180030dcb
mov ebx, 0xc0000225
jmp 0x180030e30
lea rdx, str.SaferFlags
lea rcx, [rsp + 0x38]
call qword [sym.imp.ntdll.dll_RtlInitUnicodeString]
mov eax, dword [rsi]
lea rdx, [rsp + 0x38]
mov rcx, qword [rsp + 0x30]
mov r9d, 4
mov dword [rsp + 0x78], eax
xor r8d, r8d
lea rax, [rsp + 0x78]
mov dword [rsp + 0x28], 4
mov qword [rsp + 0x20], rax
call qword [sym.imp.ntdll.dll_NtSetValueKey]
mov ebx, eax
test eax, eax
js 0x180030e30
mov eax, dword [rsp + 0x78]
cmp edi, 2
jne 0x180030e25
mov dword [0x180095ee8], eax
jmp 0x180030e2b
mov dword [0x180095eec], eax
call fcn.180004f84
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ntdll.dll_NtClose]
lea rcx, [0x180096140]
call qword [sym.imp.ntdll.dll_RtlLeaveCriticalSection]
jmp 0x180030e4f
mov ebx, 0xc00000f1
mov rsi, qword [rsp + 0x68]
mov eax, ebx
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rdi
ret
Function at 0x180038738
Capabilities:
Get hostname

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x20
xor ebx, ebx
mov rdi, rcx
test rcx, rcx
je 0x1800387eb
cmp word [rcx], bx
je 0x1800387eb
cmp byte [0x18009699c], bl
jne 0x18003879a
xor edx, edx
mov dword [rsp + 0x30], 0x105
mov r8d, 0x20a
lea rcx, [0x1800971c0]
call sub.msvcrt.dll_memset
lea rdx, [rsp + 0x30]
lea rcx, [0x1800971c0]
call qword [sym.imp.KERNEL32.dll_GetComputerNameW]
test eax, eax
je 0x1800387f8
mov byte [0x18009699c], 1
lea rdx, [0x1800971c0]
mov rcx, rdi
call qword [sym.imp.KERNELBASE.dll_lstrcmpiW]
test eax, eax
je 0x1800387eb
or rax, 0xffffffffffffffff
inc rax
cmp word [rdi + rax*2], bx
jne 0x1800387b2
mov dword [rsp + 0x30], eax
cmp eax, 2
jbe 0x1800387e6
cmp word [rdi], 0x5c
jne 0x1800387e6
cmp word [rdi + 2], 0x5c
jne 0x1800387e6
lea rcx, [rdi + 4]
lea rdx, [0x1800971c0]
call qword [sym.imp.KERNELBASE.dll_lstrcmpiW]
test eax, eax
je 0x1800387eb
mov ebx, 0xd
mov eax, ebx
mov rbx, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
mov byte [0x18009699c], bl
jmp 0x1800387eb
Function at 0x180039550
Capabilities:
Query environment variable
Query or enumerate registry value

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rsi
mov qword [rax + 0x20], r9
mov qword [rax + 0x18], r8
mov qword [rax + 8], rcx
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x60
mov rsi, r9
mov r15, r8
mov r14, rdx
and dword [rax - 0x58], 0
and qword [rax - 0x38], 0
and qword [rax - 0x40], 0
cmp rcx, 0xffffffff80000004
jne 0x18003959a
mov eax, 6
jmp 0x180039773
lea r9, [rsp + 0x48]
lea r8, [rsp + 0x50]
lea rdx, [rsp + 0x90]
call qword [sym.imp.KERNELBASE.dll_MapPredefinedHandleInternal]
mov edi, eax
test eax, eax
jne 0x180039761
test r14, r14
je 0x1800395f4
cmp byte [r14], al
je 0x1800395f4
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
lea r9d, [rdi + 1]
xor r8d, r8d
mov rdx, r14
mov rcx, qword [rsp + 0x90]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExA]
mov edi, eax
test eax, eax
jne 0x180039761
jmp 0x180039601
mov rax, qword [rsp + 0x90]
mov qword [rsp + 0x40], rax
test rsi, rsi
je 0x18003960b
mov r14d, dword [rsi]
jmp 0x18003960e
xor r14d, r14d
mov dword [rsp + 0x34], r14d
mov r12d, r14d
mov dword [rsp + 0x3c], r14d
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x30]
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExA]
mov edi, eax
mov dword [rsp + 0x38], eax
mov rax, qword [rsp + 0x40]
cmp rax, qword [rsp + 0x90]
je 0x1800396a6
test al, 1
jne 0x18003965f
lea rcx, [rsp + 0x40]
call fcn.1800582f8
jmp 0x1800396a6
and rax, 0xfffffffffffffffe
mov qword [rsp + 0x40], rax
lea r9, [rsp + 0x40]
xor r8d, r8d
lea edx, [r8 + 5]
lea rcx, [0x18005e438]
call qword [sym.imp.RPCRT4.dll_NdrClientCall3]
mov qword [rsp + 0x58], rax
jmp 0x1800396a6
mov ecx, 0xd
test edi, edi
jne 0x1800396bb
mov eax, dword [rsp + 0x30]
dec eax
cmp eax, 1
cmova edi, ecx
cmp edi, 2
jne 0x1800396d6
test rsi, rsi
je 0x1800396cb
mov dword [rsi], 1
test r15, r15
je 0x1800396d4
mov byte [r15], 0
xor edi, edi
test edi, edi
jne 0x180039761
cmp dword [rsp + 0x30], 2
jne 0x180039761
test rsi, rsi
je 0x18003975f
test r15, r15
je 0x18003975f
cmp r14d, dword [rsi]
cmovle r12d, dword [rsi]
movsxd r8, r12d
mov rcx, qword gs:[0x60]
xor edx, edx
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov r13, rax
test rax, rax
jne 0x18003971b
lea edi, [rax + 8]
jmp 0x180039761
movsxd r8, dword [rsi]
mov rdx, r15
mov rcx, r13
call sub.msvcrt.dll_memcpy
mov r8d, r12d
mov rdx, r15
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
mov ecx, 0xea
cmp eax, r14d
cmovg edi, ecx
mov dword [rsi], eax
mov rcx, qword gs:[0x60]
mov r8, r13
xor edx, edx
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlFreeHeap]
jmp 0x180039761
mov edi, ecx
mov rdx, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNELBASE.dll_CLOSE_LOCAL_HANDLE_INTERNAL]
mov eax, edi
mov rsi, qword [rsp + 0x98]
add rsp, 0x60
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
Function at 0x180039d80
Capabilities:
Set registry value

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 8], rcx
push rbp
push rdi
push r14
mov rbp, rsp
sub rsp, 0x70
and qword [rbp - 0x10], 0
mov rsi, r9
and qword [rbp - 0x18], 0
mov rdi, rdx
cmp rcx, 0xffffffff80000004
jne 0x180039dbd
mov eax, 6
jmp 0x180039eab
cmp r8d, 1
jne 0x180039ea6
test rsi, rsi
je 0x180039ea6
lea r9, [rbp - 0x18]
lea r8, [rbp - 0x10]
lea rdx, [rbp + 0x20]
call qword [sym.imp.KERNELBASE.dll_MapPredefinedHandleInternal]
mov ebx, eax
test eax, eax
jne 0x180039e94
or rax, 0xffffffffffffffff
inc rax
cmp byte [rsi + rax], 0
jne 0x180039df0
mov ecx, 0xffffffff
cmp rax, rcx
jae 0x180039e8f
lea r14d, [rax + 1]
test rdi, rdi
je 0x180039e56
cmp byte [rdi], 0
je 0x180039e56
and qword [rsp + 0x40], 0
lea rax, [rbp - 0x20]
mov rcx, qword [rbp + 0x20]
xor r9d, r9d
mov qword [rsp + 0x38], rax
xor r8d, r8d
and qword [rsp + 0x30], 0
mov rdx, rdi
mov dword [rsp + 0x28], 2
and dword [rsp + 0x20], 0
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCreateKeyExA]
mov ebx, eax
test eax, eax
jne 0x180039e94
mov rcx, qword [rbp - 0x20]
jmp 0x180039e5e
mov rcx, qword [rbp + 0x20]
mov qword [rbp - 0x20], rcx
mov dword [rsp + 0x28], r14d
mov r9d, 1
xor r8d, r8d
mov qword [rsp + 0x20], rsi
xor edx, edx
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetValueExA]
mov rcx, qword [rbp - 0x20]
mov ebx, eax
cmp rcx, qword [rbp + 0x20]
je 0x180039e94
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
mov ebx, eax
jmp 0x180039e94
mov ebx, 0x57
mov rdx, qword [rbp - 0x18]
mov rcx, qword [rbp - 0x10]
call qword [sym.imp.KERNELBASE.dll_CLOSE_LOCAL_HANDLE_INTERNAL]
mov eax, ebx
jmp 0x180039eab
mov eax, 0x57
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret