joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14000f6e0
Capabilities:
Persist via windows service
Set registry value

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x270
mov rax, qword [0x14002dda0]
xor rax, rsp
mov qword [rsp + 0x260], rax
lea rax, str.NSSM
lea r9, str.SYSTEMCurrentControlSetServicesEventLogApplication_s
lea rcx, [rsp + 0x60]
or r8, 0xffffffffffffffff
mov edx, 0xff
mov qword [rsp + 0x20], rax
call fcn.140019e88
xor edi, edi
test eax, eax
jns 0x14000f755
lea ebx, [rdi + 1]
lea r9, str.create_messages__
lea r8, str.eventlog_registry
mov edx, 0xc00003eb
movzx ecx, bx
mov qword [rsp + 0x20], rdi
call fcn.140007190
mov eax, ebx
jmp 0x14000f835
mov qword [rsp + 0x40], rdi
lea rax, [rsp + 0x58]
lea rdx, [rsp + 0x60]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rdi
xor r9d, r9d
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x28], 0x20006
mov dword [rsp + 0x20], edi
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x14000f7c2
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov ecx, eax
call fcn.140006fd0
mov ebx, 1
lea r8, [rsp + 0x60]
mov edx, 0xc00003f9
movzx ecx, bx
mov r9, rax
mov qword [rsp + 0x20], rdi
call fcn.140007190
lea eax, [rbx + 1]
jmp 0x14000f835
call fcn.14000e3e0
or rcx, 0xffffffffffffffff
xor r8d, r8d
mov r11, rax
xor eax, eax
mov rdi, r11
lea r9d, [rax + 1]
repne scasw ax, word [rdi]
not rcx
lea edx, [rcx + rcx]
mov rcx, qword [rsp + 0x58]
mov dword [rsp + 0x28], edx
lea rdx, str.EventMessageFile
mov qword [rsp + 0x20], r11
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rsp + 0x58]
lea rax, [rsp + 0x50]
lea rdx, str.TypesSupported
mov r9d, 4
xor r8d, r8d
mov dword [rsp + 0x28], 4
mov dword [rsp + 0x50], 7
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
xor eax, eax
mov rcx, qword [rsp + 0x260]
xor rcx, rsp
call fcn.14001a490
mov rbx, qword [rsp + 0x280]
add rsp, 0x270
pop rdi
ret
Function at 0x14000f860
Capabilities:
Set registry value

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x270
mov rax, qword [0x14002dda0]
xor rax, rsp
mov qword [rsp + 0x260], rax
movzx edi, r8b
mov rsi, rdx
lea r9, [rsp + 0x60]
lea r8, str.AppExit
mov dl, 1
mov dword [rsp + 0x20], 0xff
call fcn.14000f580
xor ebx, ebx
test eax, eax
jns 0x14000f8d6
lea edi, [rbx + 1]
lea r9, str.create_exit_action__
lea r8, str.NSSM_REG_EXIT
mov edx, 0xc00003eb
movzx ecx, di
mov qword [rsp + 0x20], rbx
call fcn.140007190
mov eax, edi
jmp 0x14000f9d4
lea rax, [rsp + 0x58]
lea rdx, [rsp + 0x60]
xor r9d, r9d
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x50]
xor r8d, r8d
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rbx
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x28], 0x20006
mov dword [rsp + 0x20], ebx
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x14000f94b
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov ecx, eax
call fcn.140006fd0
mov edi, 1
lea r8, [rsp + 0x60]
mov edx, 0xc00003f9
movzx ecx, di
mov r9, rax
mov qword [rsp + 0x20], rbx
call fcn.140007190
lea eax, [rdi + 1]
jmp 0x14000f9d4
cmp dword [rsp + 0x58], 2
jne 0x14000f957
test dil, dil
je 0x14000f9c7
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, rsi
repne scasw ax, word [rdi]
mov edi, 1
xor r8d, r8d
not rcx
mov r9d, edi
xor edx, edx
lea eax, [rcx + rcx]
mov rcx, qword [rsp + 0x50]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rsi
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x14000f9c7
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov ecx, eax
call fcn.140006fd0
lea r8, str.AppExit
mov edx, 0xc00003fb
movzx ecx, di
mov r9, rax
mov qword [rsp + 0x20], rbx
call fcn.140007190
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [rdi + 2]
jmp 0x14000f9d4
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
mov rcx, qword [rsp + 0x260]
xor rcx, rsp
call fcn.14001a490
lea r11, [rsp + 0x270]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret
Function at 0x14000fa00
Capabilities:
Query or enumerate registry value

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
push rdi
push r12
push r13
sub rsp, 0x40
mov rdi, qword [rsp + 0x80]
mov rbp, r8
mov r12, rdx
mov rsi, r9
mov rbx, rcx
mov qword [rax - 0x30], rdi
lea r9, [rax - 0x28]
xor r13d, r13d
xor r8d, r8d
mov rdx, rbp
mov rcx, r12
mov dword [rax - 0x28], 7
mov qword [rax - 0x38], r13
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x14000fa95
mov qword [rsi], r13
mov dword [rdi], r13d
cmp eax, 2
je 0x14000fb9b
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov ecx, eax
call fcn.140006fd0
mov ebx, 1
mov r8, rbp
mov edx, 0xc00003fa
mov r9, rax
movzx ecx, bx
mov qword [rsp + 0x20], r13
call fcn.140007190
mov eax, ebx
jmp 0x14000fb9d
cmp dword [rsp + 0x30], 7
je 0x14000fac6
mov qword [rsi], r13
mov dword [rdi], r13d
mov edi, 2
mov r9, rbx
mov r8, rbp
mov edx, 0x8000040f
movzx ecx, di
mov qword [rsp + 0x20], r13
call fcn.140007190
mov eax, edi
jmp 0x14000fb9d
cmp dword [rdi], r13d
je 0x14000fb9b
mov rbx, qword [rsi]
test rbx, rbx
je 0x14000faeb
call qword [sym.imp.KERNEL32.DLL_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.DLL_HeapFree]
mov ebx, dword [rdi]
call qword [sym.imp.KERNEL32.DLL_GetProcessHeap]
mov r8, rbx
mov rcx, rax
xor edx, edx
call qword [sym.imp.KERNEL32.DLL_HeapAlloc]
mov qword [rsi], rax
test rax, rax
jne 0x14000fb30
lea ebx, [rax + 1]
lea r9, str.get_environment__
mov r8, rbp
mov edx, 0xc00003eb
movzx ecx, bx
mov dword [rdi], r13d
mov qword [rsp + 0x20], r13
call fcn.140007190
lea eax, [rbx + 2]
jmp 0x14000fb9d
lea r9, [rsp + 0x30]
xor r8d, r8d
mov rdx, rbp
mov rcx, r12
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x14000fb9b
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov ecx, eax
call fcn.140006fd0
mov ebx, 1
mov r8, rbp
mov edx, 0xc00003fa
mov r9, rax
movzx ecx, bx
mov qword [rsp + 0x20], r13
call fcn.140007190
call qword [sym.imp.KERNEL32.DLL_GetProcessHeap]
mov r8, qword [rsi]
mov rcx, rax
xor edx, edx
call qword [sym.imp.KERNEL32.DLL_HeapFree]
mov qword [rsi], r13
mov dword [rdi], r13d
lea eax, [rbx + 3]
jmp 0x14000fb9d
xor eax, eax
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
add rsp, 0x40
pop r13
pop r12
pop rdi
ret
Function at 0x14000fbc0
Capabilities:
Check if file exists
Query environment variable
Query or enumerate registry value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
sub rsp, 0x40
mov ebx, r9d
mov rsi, r8
mov rbp, rdx
mov r13, rcx
call qword [sym.imp.KERNEL32.DLL_GetProcessHeap]
mov r8, rbx
mov rcx, rax
xor edx, edx
call qword [sym.imp.KERNEL32.DLL_HeapAlloc]
mov rdi, rax
test rax, rax
jne 0x14000fc26
lea ebx, [rax + 1]
lea r9, str.get_string__
mov r8, rbp
mov edx, 0xc00003eb
movzx ecx, bx
mov qword [rsp + 0x20], rax
call fcn.140007190
mov eax, ebx
jmp 0x14000fd83
mov r8, rbx
xor edx, edx
mov rcx, rsi
call fcn.14001a4c0
lea rax, [rsp + 0x30]
lea r9, [rsp + 0x78]
mov qword [rsp + 0x28], rax
xor r8d, r8d
mov rdx, rbp
mov rcx, r13
mov dword [rsp + 0x78], 2
mov dword [rsp + 0x30], ebx
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov r12d, eax
test eax, eax
je 0x14000fcc9
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov ebx, eax
call qword [sym.imp.KERNEL32.DLL_GetProcessHeap]
mov r8, rdi
mov rcx, rax
xor edx, edx
call qword [sym.imp.KERNEL32.DLL_HeapFree]
cmp r12d, 2
jne 0x14000fc99
cmp byte [rsp + 0x90], 0
je 0x14000fd23
mov ecx, ebx
call fcn.140006fd0
mov ebx, 1
mov r8, rbp
mov edx, 0xc00003fa
mov r9, rax
movzx ecx, bx
mov qword [rsp + 0x20], 0
call fcn.140007190
lea eax, [rbx + 1]
jmp 0x14000fd83
cmp byte [rsp + 0x88], 0
je 0x14000fcdc
mov rcx, rdi
call qword [sym.imp.SHLWAPI.dll_PathUnquoteSpacesW]
cmp byte [rsp + 0x80], 0
jne 0x14000fcf8
cmp dword [rsp + 0x78], 2
jne 0x14000fcff
mov ebx, 1
mov dword [rsp + 0x78], ebx
jmp 0x14000fcff
cmp dword [rsp + 0x78], 2
je 0x14000fd27
mov r8d, dword [rsp + 0x30]
mov rdx, rdi
mov rcx, rsi
call fcn.140019ec0
call qword [sym.imp.KERNEL32.DLL_GetProcessHeap]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.DLL_HeapFree]
xor eax, eax
jmp 0x14000fd83
mov r8d, ebx
mov rdx, rsi
mov rcx, rdi
call qword [sym.imp.KERNEL32.DLL_ExpandEnvironmentStringsW]
test eax, eax
je 0x14000fd3e
cmp eax, ebx
jbe 0x14000fd0f
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov ecx, eax
call fcn.140006fd0
mov ebx, 1
mov r8, rdi
mov edx, 0xc00003fe
mov r9, rax
movzx ecx, bx
mov qword [rsp + 0x20], 0
call fcn.140007190
call qword [sym.imp.KERNEL32.DLL_GetProcessHeap]
mov rcx, rax
mov r8, rdi
xor edx, edx
call qword [sym.imp.KERNEL32.DLL_HeapFree]
lea eax, [rbx + 2]
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
add rsp, 0x40
pop r13
pop r12
pop rdi
ret
Function at 0x14000fdd0
Capabilities:
Set registry value

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x30
mov r11, rcx
or rcx, 0xffffffffffffffff
movzx r10d, r9b
xor eax, eax
xor r9d, r9d
mov rdi, r8
repne scasw ax, word [rdi]
test r10b, r10b
mov rbx, rdx
not rcx
setne r9b
lea eax, [rcx + rcx]
inc r9d
mov rcx, r11
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], r8
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x14000fe27
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov ecx, eax
call fcn.140006fd0
mov edi, 1
mov r8, rbx
mov edx, 0xc00003fb
mov r9, rax
movzx ecx, di
mov qword [rsp + 0x20], 0
call fcn.140007190
mov rbx, qword [rsp + 0x40]
mov eax, edi
add rsp, 0x30
pop rdi
ret

Function at 0x14000fe80
Capabilities:
Set registry value

Disassembly:
mov dword [rsp + 0x18], r8d
push rbx
sub rsp, 0x30
lea rax, [rsp + 0x50]
mov r9d, 4
xor r8d, r8d
mov dword [rsp + 0x28], 4
mov rbx, rdx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x14000feb8
add rsp, 0x30
pop rbx
ret
mov qword [rsp + 0x40], rdi
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov ecx, eax
call fcn.140006fd0
mov edi, 1
mov r8, rbx
mov edx, 0xc00003fb
mov r9, rax
movzx ecx, di
mov qword [rsp + 0x20], 0
call fcn.140007190
mov eax, edi
mov rdi, qword [rsp + 0x40]
add rsp, 0x30
pop rbx
ret

Function at 0x14000ff00
Capabilities:
Check if file exists
Query or enumerate registry value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x40
lea rax, [rsp + 0x30]
movzx ebx, r9b
lea r9, [rsp + 0x34]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r8
xor r8d, r8d
mov rsi, rdx
mov dword [rsp + 0x34], 4
mov dword [rsp + 0x30], 4
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edi, eax
test eax, eax
jne 0x14000ff5c
lea eax, [rdi + 1]
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x40
pop rdi
ret
cmp eax, 2
jne 0x14000ff77
test bl, bl
jne 0x14000ff77
xor eax, eax
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x40
pop rdi
ret
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov ecx, eax
call fcn.140006fd0
xor ebx, ebx
mov r8, rsi
mov r9, rax
mov eax, 1
mov edx, 0xc00003fa
movzx ecx, ax
mov qword [rsp + 0x20], rbx
call fcn.140007190
mov rsi, qword [rsp + 0x58]
cmp edi, 2
sete bl
lea eax, [rbx - 2]
mov rbx, qword [rsp + 0x50]
add rsp, 0x40
pop rdi
ret
Function at 0x140010290
Capabilities:
Query or enumerate registry value

Disassembly:
push rbp
push rsi
push rdi
sub rsp, 0x70
mov rax, qword [0x14002dda0]
xor rax, rsp
mov qword [rsp + 0x58], rax
mov rbp, rcx
mov rsi, r8
mov rax, rdx
lea rcx, [rsp + 0x34]
mov rdi, r9
xor r8d, r8d
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], r9
lea r9, [rsp + 0x30]
mov rdx, rsi
mov rcx, rax
mov dword [rsp + 0x30], 4
mov dword [rsp + 0x34], 4
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x14001038d
mov qword [rsp + 0x68], rbx
mov ebx, dword [rsp + 0xb0]
cmp eax, 2
je 0x140010386
cmp dword [rsp + 0x30], 4
je 0x140010358
or r8, 0xffffffffffffffff
lea r9, [0x140026188]
lea rcx, [rsp + 0x38]
lea edx, [r8 + 0x11]
mov dword [rsp + 0x20], ebx
call fcn.140019e88
mov edx, dword [rsp + 0xb8]
mov r11d, 2
lea rax, [rsp + 0x38]
movzx ecx, r11w
mov r9, rsi
mov r8, rbp
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], rax
call fcn.140007190
jmp 0x140010386
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov ecx, eax
call fcn.140006fd0
mov r8, rsi
mov edx, 0xc00003fa
mov r9, rax
mov eax, 1
mov qword [rsp + 0x20], 0
movzx ecx, ax
call fcn.140007190
mov dword [rdi], ebx
mov rbx, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.14001a490
add rsp, 0x70
pop rdi
pop rsi
pop rbp
ret

Function at 0x140010700
Capabilities:
Query or enumerate registry value

Disassembly:
push rbx
push rbp
push rsi
push rdi
sub rsp, 0x78
mov rax, qword [0x14002dda0]
xor rax, rsp
mov qword [rsp + 0x60], rax
test rdx, rdx
mov rdi, rdx
mov rsi, r8
sete al
lea rdx, str.AppExit
mov r8d, 0x20019
mov qword [rsp + 0x38], r9
mov rbp, rcx
mov byte [r9], al
call fcn.140010510
mov rbx, rax
test rax, rax
jne 0x140010751
lea eax, [rbx + 1]
jmp 0x1400107ee
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x34], 0x10
test rdi, rdi
jne 0x1400107a6
xor eax, eax
mov word [rsp + 0x40], ax
lea rax, [rsp + 0x34]
lea r9, [rsp + 0x30]
lea rdx, [rsp + 0x40]
mov qword [rsp + 0x28], rax
xor r8d, r8d
mov rcx, rbx
mov qword [rsp + 0x20], rsi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov rcx, rbx
test eax, eax
je 0x1400107e6
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test rdi, rdi
je 0x1400107ec
jmp 0x1400107d2
mov eax, dword [rdi]
or r8, 0xffffffffffffffff
lea r9, [0x140026188]
lea edx, [r8 + 0x11]
lea rcx, [rsp + 0x40]
mov dword [rsp + 0x20], eax
call fcn.140019e88
test eax, eax
jns 0x14001076d
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov r9, qword [rsp + 0x38]
mov r8, rsi
xor edx, edx
mov rcx, rbp
call fcn.140010700
jmp 0x1400107ee
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.14001a490
add rsp, 0x78
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x140010810
Capabilities:
Delete registry value
Query or enumerate registry value

Disassembly:
push rbx
push rbp
push r12
push r13
sub rsp, 0x248
mov rax, qword [0x14002dda0]
xor rax, rsp
mov qword [rsp + 0x230], rax
mov qword [rsp + 0x28], rdx
mov r12, r9
mov rbp, rcx
lea rax, str.AppEvents
mov r13, r8
lea r9, [0x1400257e0]
lea rcx, [rsp + 0x30]
or r8, 0xffffffffffffffff
mov edx, 0xff
mov qword [rsp + 0x20], rax
call fcn.140019e88
test eax, eax
jns 0x140010898
mov ebx, 1
lea r9, str.set_hook__
lea r8, str.hook_registry
mov edx, 0xc00003eb
movzx ecx, bx
mov qword [rsp + 0x20], 0
call fcn.140007190
mov eax, ebx
jmp 0x140010984
or rcx, 0xffffffffffffffff
mov qword [rsp + 0x240], rdi
xor eax, eax
mov rdi, r12
repne scasw ax, word [rdi]
not rcx
cmp rcx, 1
jne 0x14001090b
lea rdx, [rsp + 0x30]
xor r9d, r9d
mov r8d, 0x20019
mov rcx, rbp
call fcn.1400104f0
mov rbx, rax
test rax, rax
je 0x140010907
xor r9d, r9d
xor r8d, r8d
mov rdx, r13
mov rcx, rax
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov rcx, rbx
mov edi, eax
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp edi, 2
jne 0x14001090b
xor eax, eax
jmp 0x14001097c
lea rdx, [rsp + 0x30]
mov r8d, 0x20006
mov rcx, rbp
call fcn.140010510
mov rbp, rax
test rax, rax
jne 0x14001092b
lea eax, [rbp + 1]
jmp 0x14001097c
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, r12
repne scasw ax, word [rdi]
mov ebx, 1
not rcx
cmp rcx, rbx
je 0x14001095a
movzx r9d, bl
mov r8, r12
mov rdx, r13
mov rcx, rbp
call fcn.14000fdd0
mov ebx, eax
jmp 0x140010971
mov rdx, r13
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
test eax, eax
je 0x14001096f
cmp eax, 2
jne 0x140010971
xor ebx, ebx
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, ebx
mov rdi, qword [rsp + 0x240]
mov rcx, qword [rsp + 0x230]
xor rcx, rsp
call fcn.14001a490
add rsp, 0x248
pop r13
pop r12
pop rbp
pop rbx
ret
Function at 0x140011df0
Capabilities:
Query service status

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x20
mov r14, rdx
mov r13d, ecx
mov rdx, r8
mov rcx, r14
mov r12d, r9d
mov rbx, r8
xor edi, edi
xor esi, esi
xor ebp, ebp
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x140011e91
lea r15d, [rdi + 0xa]
nop word [rax + rax]
mov r9d, dword [rbx + 4]
mov ecx, r13d
mov edx, r9d
call fcn.140011ce0
test eax, eax
je 0x140011eb1
jg 0x140011e5a
cmp r9d, r12d
jne 0x140011e94
mov eax, dword [rbx + 0x14]
cmp eax, esi
jne 0x140011e66
cmp dword [rbx + 0x18], ebp
je 0x140011e68
xor edi, edi
mov ebp, dword [rbx + 0x18]
inc edi
mov esi, eax
cmp edi, r15d
cmovg edi, r15d
mov ecx, edi
imul ecx, ecx, 0x32
call qword [sym.imp.KERNEL32.DLL_Sleep]
mov rdx, rbx
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x140011e40
or eax, 0xffffffff
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
add rsp, 0x20
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
xor eax, eax
jmp 0x140011e94
Function at 0x140012fe0
Capabilities:
Modify service

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x30
mov rax, rdx
mov rbx, rcx
test r8, r8
je 0x140013003
cmp word [r8], 0
je 0x140013003
mov qword [rsp + 0x50], r8
jmp 0x14001300f
lea rcx, [0x140025cbc]
mov qword [rsp + 0x50], rcx
mov edi, 1
lea r8, [rsp + 0x50]
mov rcx, rax
mov edx, edi
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
je 0x140013035
xor eax, eax
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov ecx, eax
call fcn.140006fd0
mov r8, rbx
mov edx, 0x40000428
movzx ecx, di
mov r9, rax
mov qword [rsp + 0x20], 0
call fcn.140007190
mov rbx, qword [rsp + 0x40]
mov eax, edi
add rsp, 0x30
pop rdi
ret

Function at 0x140014170
Capabilities:
Delete service

Disassembly:
push rsi
sub rsp, 0x30
mov rsi, rcx
test rcx, rcx
jne 0x140014187
lea eax, [rcx + 1]
add rsp, 0x30
pop rsi
ret
mov ecx, 5
mov qword [rsp + 0x58], rdi
call fcn.140012420
mov rdi, rax
test rax, rax
jne 0x1400141bf
call fcn.140019be0
mov edx, 0x400001fb
lea rcx, [rax + 0x60]
call fcn.140007250
lea eax, [rdi + 2]
mov rdi, qword [rsp + 0x58]
add rsp, 0x30
pop rsi
ret
lea r9, [rsi + 2]
lea rdx, [rsi + 2]
mov r8d, 0x10000
mov rcx, rax
mov qword [rsp + 0x50], rbp
mov dword [rsp + 0x20], 0x100
call fcn.140012460
mov qword [rsi + 0x704d0], rax
test rax, rax
jne 0x14001420c
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rbp, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x58]
mov eax, 3
add rsp, 0x30
pop rsi
ret
lea r9, [rsp + 0x40]
lea r8, [rsi + 0x202]
lea rdx, [rsi + 2]
mov rcx, rdi
mov qword [rsp + 0x48], rbx
mov dword [rsp + 0x40], 0x100
call qword [sym.imp.ADVAPI32.dll_GetServiceDisplayNameW]
lea r9, [rsp + 0x40]
lea r8, [rsi + 2]
lea rdx, [rsi + 0x202]
mov rcx, rdi
mov dword [rsp + 0x40], 0x100
call qword [sym.imp.ADVAPI32.dll_GetServiceKeyNameW]
mov rcx, qword [rsi + 0x704d0]
call qword [sym.imp.ADVAPI32.dll_DeleteService]
mov rbx, qword [rsp + 0x48]
test eax, eax
jne 0x14001429a
call fcn.140019be0
mov edx, 0x40000221
lea rcx, [rax + 0x60]
call fcn.140007250
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rbp, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x58]
mov eax, 4
add rsp, 0x30
pop rsi
ret
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call fcn.140019be0
lea r8, [rsi + 2]
lea rcx, [rax + 0x30]
mov edx, 0x40000222
call fcn.140007250
mov rbp, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x58]
xor eax, eax
add rsp, 0x30
pop rsi
ret

Function at 0x1400142d0
Capabilities:
Modify service

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x30
mov edi, 1
mov rbx, rcx
mov rcx, qword [rcx + 0x704d0]
lea edx, [rdi + 3]
lea r8, [rsp + 0x40]
mov dword [rsp + 0x40], edi
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
jne 0x14001432e
call qword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 0x7c
je 0x14001432e
mov ecx, eax
call fcn.140006fd0
lea r8, [rbx + 2]
mov edx, 0x40000413
movzx ecx, di
mov r9, rax
mov qword [rsp + 0x20], 0
call fcn.140007190
mov rbx, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret
Function at 0x140016110
Capabilities:
Create service
Delete service
Persist via windows service

Disassembly:
push rdi
sub rsp, 0x70
mov rdi, rcx
test rcx, rcx
jne 0x140016127
lea eax, [rcx + 1]
add rsp, 0x70
pop rdi
ret
mov ecx, 3
mov qword [rsp + 0x90], rsi
call fcn.140012420
mov rsi, rax
test rax, rax
jne 0x14001616d
call fcn.140019be0
mov edx, 0x400001fb
lea rcx, [rax + 0x60]
call fcn.140007250
mov rcx, rdi
call fcn.1400135f0
lea eax, [rsi + 2]
mov rsi, qword [rsp + 0x90]
add rsp, 0x70
pop rdi
ret
mov qword [rsp + 0x80], rbx
mov qword [rsp + 0x88], rbp
lea rbx, [rdi + 0x842c]
call fcn.14000e3f0
lea r9, [0x140025890]
or r8, 0xffffffffffffffff
mov edx, 0x7fff
mov rcx, rbx
mov qword [rsp + 0x20], rax
call fcn.140019e88
xor eax, eax
lea r8, [rdi + 2]
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], rbx
mov dword [rsp + 0x30], 1
lea rdx, [rdi + 2]
mov r9d, 0xf01ff
mov rcx, rsi
mov dword [rsp + 0x28], 2
mov dword [rsp + 0x20], 0x10
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov qword [rdi + 0x704d0], rax
test rax, rax
jne 0x140016237
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov ecx, eax
call fcn.140006fd0
mov rbx, rax
call fcn.140019be0
mov r8, rbx
lea rcx, [rax + 0x60]
mov edx, 0x40000203
call fcn.140007250
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, 5
jmp 0x140016284
xor edx, edx
mov rcx, rdi
call fcn.140015000
test eax, eax
je 0x140016262
mov rcx, qword [rdi + 0x704d0]
call qword [sym.imp.ADVAPI32.dll_DeleteService]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, 6
jmp 0x140016284
call fcn.140019be0
lea r8, [rdi + 2]
mov edx, 0x4000021e
lea rcx, [rax + 0x30]
call fcn.140007250
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
mov rbp, qword [rsp + 0x88]
mov rbx, qword [rsp + 0x80]
mov rsi, qword [rsp + 0x90]
add rsp, 0x70
pop rdi
ret