joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140011253
Capabilities:
Terminate process

Disassembly:
jmp 0x140013a00
mov qword [rsp + 8], rcx
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc0000409
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
nop
add rsp, 0x28
ret

Function at 0x1400112ee
Capabilities:
Parse pe header

Disassembly:
jmp 0x140014d50
sub rsp, 0x38
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
jne 0x140014d70
xor al, al
jmp 0x140014df1
mov rax, qword [rsp + 0x20]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x140014d83
xor al, al
jmp 0x140014df1
mov rax, qword [rsp + 0x20]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x20]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
cmp dword [rax], 0x4550
je 0x140014dad
xor al, al
jmp 0x140014df1
mov rax, qword [rsp + 0x28]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
je 0x140014dc1
xor al, al
jmp 0x140014df1
mov rax, qword [rsp + 0x28]
cmp dword [rax + 0x84], 0xe
ja 0x140014dd3
xor al, al
jmp 0x140014df1
mov eax, 8
imul rax, rax, 0xe
mov rcx, qword [rsp + 0x28]
cmp dword [rcx + rax + 0x88], 0
jne 0x140014def
xor al, al
jmp 0x140014df1
mov al, 1
add rsp, 0x38
ret
Function at 0x140012c30
Capabilities:
Terminate process

Disassembly:
sub rsp, 0x68
mov ecx, 1
call fcn.140011424
movzx eax, al
test eax, eax
jne 0x140012c50
mov ecx, 7
call fcn.140011398
nop
mov byte [rsp + 0x20], 0
call fcn.1400113ac
mov byte [rsp + 0x21], al
cmp dword [0x14001e868], 1
jne 0x140012c74
mov ecx, 7
call fcn.140011398
nop
jmp 0x140012ccc
cmp dword [0x14001e868], 0
jne 0x140012cc7
mov dword [0x14001e868], 1
lea rdx, [0x14001a660]
lea rcx, [0x14001a330]
call fcn.1400111f4
test eax, eax
je 0x140012ca8
mov eax, 0xff
jmp 0x140012dd1
lea rdx, [0x14001a220]
lea rcx, [section..rdata]
call fcn.1400113a2
mov dword [0x14001e868], 2
jmp 0x140012ccc
mov byte [rsp + 0x20], 1
movzx ecx, byte [rsp + 0x21]
call fcn.140011384
call fcn.140011311
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
cmp qword [rax], 0
je 0x140012d29
mov rcx, qword [rsp + 0x30]
call fcn.14001119f
movzx eax, al
test eax, eax
je 0x140012d29
mov rax, qword [rsp + 0x30]
mov rax, qword [rax]
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x50], rax
xor r8d, r8d
mov edx, 2
xor ecx, ecx
mov rax, qword [rsp + 0x50]
call qword [0x140025020]
nop
call fcn.140011343
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
cmp qword [rax], 0
je 0x140012d5d
mov rcx, qword [rsp + 0x38]
call fcn.14001119f
movzx eax, al
test eax, eax
je 0x140012d5d
mov rax, qword [rsp + 0x38]
mov rcx, qword [rax]
call fcn.1400113e3
nop
call fcn.140012e80
mov dword [rsp + 0x28], eax
call fcn.1400112ee
movzx eax, al
test eax, eax
jne 0x140012d7c
mov ecx, dword [rsp + 0x28]
call fcn.140011064
nop
movzx eax, byte [rsp + 0x20]
test eax, eax
jne 0x140012d8b
call fcn.1400113ed
nop
xor edx, edx
mov cl, 1
call fcn.14001118b
mov eax, dword [rsp + 0x28]
jmp 0x140012dd1
add rsp, 0x68
ret
Function at 0x140016890
Capabilities:
Allocate or change rwx memory
Create thread
Inject thread
Spawn thread to rwx shellcode

Disassembly:
mov dword [rsp + 8], ecx
push rbp
push rsi
push rdi
sub rsp, 0x460
lea rbp, [rsp + 0x40]
lea rdi, [rsp + 0x40]
mov ecx, 0xa8
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov ecx, dword [rsp + 0x488]
mov rax, qword [section..data]
xor rax, rbp
mov qword [rbp + 0x418], rax
lea rcx, [0x1400240f5]
call fcn.1400113fc
nop
lea rax, [rbp + 0x10]
lea rcx, [0x14001acb0]
mov rdi, rax
mov rsi, rcx
mov ecx, 0x1b2
rep movsb byte [rdi], byte [rsi]
lea rdx, str.cock
mov rcx, qword [sym.imp.MSVCP140D.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140011087
nop
mov r8d, dword [rbp + 0x440]
xor edx, edx
mov ecx, 0x1fffff
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov qword [rbp + 0x1e8], rax
mov dword [rsp + 0x20], 0x40
mov r9d, 0x3000
mov r8d, 0x1b2
xor edx, edx
mov rcx, qword [rbp + 0x1e8]
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov qword [rbp + 0x268], rax
mov qword [rsp + 0x20], 0
mov r9d, 0x1b2
lea r8, [rbp + 0x10]
mov rdx, qword [rbp + 0x268]
mov rcx, qword [rbp + 0x1e8]
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
nop
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9, qword [rbp + 0x268]
xor r8d, r8d
xor edx, edx
mov rcx, qword [rbp + 0x1e8]
call qword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov qword [rbp + 0x248], rax
mov rcx, qword [rbp + 0x1e8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
lea rcx, [rbp - 0x40]
lea rdx, [0x14001ac00]
call fcn.14001138e
mov rcx, qword [rbp + 0x418]
xor rcx, rbp
call fcn.140011208
lea rsp, [rbp + 0x420]
pop rdi
pop rsi
pop rbp
ret
Function at 0x140001490
Capabilities:
Query or enumerate registry value

Disassembly:
push rbx
sub rsp, 0x30
xor ebx, ebx
mov dword [rsp + 0x40], 4
lea rax, [rsp + 0x50]
mov qword [rsp + 0x50], rbx
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, [0x1400210a0]
mov rcx, 0xffffffff80000002
lea r9d, [rbx + 1]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140001513
mov rcx, qword [rsp + 0x50]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rdx, str.Log_Enable
lea rax, [rsp + 0x48]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp dword [rsp + 0x48], 1
mov rcx, qword [rsp + 0x50]
sete bl
mov dword [0x140027dd0], ebx
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
add rsp, 0x30
pop rbx
ret
Function at 0x140001580
Capabilities:
Create directory
Query environment variable
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r14
push r15
sub rsp, 0x270
mov rax, qword [0x140026008]
xor rax, rsp
mov qword [rsp + 0x260], rax
mov rbp, r8
mov edi, edx
mov esi, ecx
xor edx, edx
mov r8d, 0x208
lea rcx, [rsp + 0x50]
call fcn.140005a70
xor r15d, r15d
mov ecx, 0x104
mov dword [rsp + 0x40], r15d
xor bl, bl
call fcn.14000976c
mov r14, rax
test rax, rax
jne 0x1400015f3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Memory_Allocation_failed__error_code___d
call fcn.1400013f0
jmp 0x14000173a
xor edx, edx
mov r8d, 0x104
mov rcx, rax
call fcn.140005a70
mov r8d, 0x104
lea rcx, str._programdata_BroadcomHostStorage_
mov rdx, r14
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea rcx, str.Host_Storage_location_set_successfully.
call fcn.1400013f0
xor edx, edx
mov rcx, r14
call fcn.140009774
cmp eax, 0xffffffff
jne 0x140001647
xor edx, edx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x140001732
mov r9, r14
mov dword [rsp + 0x20], esi
lea r8, str._s_d.bcm
mov edx, 0x104
lea rcx, [rsp + 0x50]
call fcn.140001520
mov qword [rsp + 0x30], r15
lea rcx, [rsp + 0x50]
mov dword [rsp + 0x28], 2
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 2
mov edx, 0xc0000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x1400016b1
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.CreateFile_failed__error_code___d
call fcn.1400013f0
jmp 0x140001729
lea r9, [rsp + 0x40]
mov qword [rsp + 0x20], r15
mov r8d, edi
mov rdx, rbp
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1400016e4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.WriteFile_failed___error_code___d
call fcn.1400013f0
jmp 0x140001724
mov ebx, dword [rsp + 0x40]
cmp ebx, edi
jae 0x140001716
nop dword [rax]
mov r8d, edi
mov edx, ebx
sub r8d, ebx
mov qword [rsp + 0x20], r15
add rdx, rbp
lea r9, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
add ebx, dword [rsp + 0x40]
cmp ebx, edi
jb 0x1400016f0
lea rcx, str.Writing_into_Hard_drive_successfully_completed
mov bl, 1
call fcn.1400013f0
test rsi, rsi
je 0x140001732
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, r14
call fcn.140009758
movzx eax, bl
mov rcx, qword [rsp + 0x260]
xor rcx, rsp
call fcn.1400047a0
mov rbx, qword [rsp + 0x2b8]
add rsp, 0x270
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
Function at 0x140001770
Capabilities:
Get file size
Query environment variable
Read file on windows

Disassembly:
push rbx
push rbp
push rdi
push r12
push r13
push r14
sub rsp, 0x278
mov rax, qword [0x140026008]
xor rax, rsp
mov qword [rsp + 0x260], rax
mov edi, ecx
xor r13d, r13d
mov ecx, 0x104
mov dword [rsp + 0x40], r13d
mov r12, r8
mov r14, rdx
xor bl, bl
call fcn.14000976c
mov rbp, rax
test rax, rax
jne 0x1400017d0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Memory_Allocation_failed__error_code___d
call fcn.1400013f0
jmp 0x14000195e
xor edx, edx
mov qword [rsp + 0x2c8], rsi
mov r8d, 0x104
mov rcx, rax
call fcn.140005a70
mov r8d, 0x104
lea rcx, str._programdata_BroadcomHostStorage_
mov rdx, rbp
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea rcx, str.Host_Storage_location_set_successfully.
call fcn.1400013f0
mov r9, rbp
mov dword [rsp + 0x20], edi
lea r8, str._s_d.bcm
mov edx, 0x104
lea rcx, [rsp + 0x50]
call fcn.140001520
mov qword [rsp + 0x30], r13
lea rcx, [rsp + 0x50]
mov dword [rsp + 0x28], 0x80
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 4
mov edx, 0x80000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x140001874
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.CreateFile_failed__error_code___d
call fcn.1400013f0
jmp 0x140001945
xor edx, edx
mov qword [rsp + 0x270], r15
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
lea ecx, [rax + 1]
mov r15d, ecx
call fcn.14000976c
mov qword [r14], rax
test rax, rax
jne 0x1400018b5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Memeory_Allocation_failed__error_code___d
call fcn.1400013f0
jmp 0x140001938
mov r8, r15
xor edx, edx
mov rcx, rax
call fcn.140005a70
mov rdx, qword [r14]
lea r9, [rsp + 0x40]
mov r8d, edi
mov qword [rsp + 0x20], r13
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1400018f5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ReadFile_failed__error_code___d
call fcn.1400013f0
jmp 0x140001938
mov ebx, dword [rsp + 0x40]
cmp ebx, edi
jae 0x140001926
nop dword [rax]
mov r8d, edi
mov edx, ebx
add rdx, qword [r14]
lea r9, [rsp + 0x40]
sub r8d, ebx
mov qword [rsp + 0x20], r13
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
add ebx, dword [rsp + 0x40]
cmp ebx, edi
jb 0x140001900
lea rcx, str.Objects_Retrieved_Successfully
mov dword [r12], edi
mov bl, 1
call fcn.1400013f0
mov r15, qword [rsp + 0x270]
test rsi, rsi
je 0x14000194e
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rbp
call fcn.140009758
mov rsi, qword [rsp + 0x2c8]
movzx eax, bl
mov rcx, qword [rsp + 0x260]
xor rcx, rsp
call fcn.1400047a0
add rsp, 0x278
pop r14
pop r13
pop r12
pop rdi
pop rbp
pop rbx
ret
Function at 0x140001990
Capabilities:
Delete file
Query environment variable

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x250
mov rax, qword [0x140026008]
xor rax, rsp
mov qword [rsp + 0x240], rax
mov esi, ecx
xor bl, bl
mov ecx, 0x104
call fcn.14000976c
mov rdi, rax
test rax, rax
jne 0x1400019e0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Memory_Allocation_failed__error_code___d
call fcn.1400013f0
jmp 0x140001a54
xor edx, edx
mov r8d, 0x104
mov rcx, rax
call fcn.140005a70
mov r8d, 0x104
lea rcx, str._programdata_BroadcomHostStorage_
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea rcx, str.Host_Storage_location_set_successfully.
call fcn.1400013f0
mov r9, rdi
mov dword [rsp + 0x20], esi
lea r8, str._s_d.bcm
mov edx, 0x104
lea rcx, [rsp + 0x30]
call fcn.140001520
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x140001a4c
lea rcx, str.Objects_Deleted_Successfully
mov bl, 1
call fcn.1400013f0
mov rcx, rdi
call fcn.140009758
movzx eax, bl
mov rcx, qword [rsp + 0x240]
xor rcx, rsp
call fcn.1400047a0
lea r11, [rsp + 0x250]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret
Function at 0x140001a80
Capabilities:
Delete file
Enumerate files on windows
Query environment variable

Disassembly:
mov qword [rsp + 0x18], rbp
push rdi
sub rsp, 0x6b0
mov rax, qword [0x140026008]
xor rax, rsp
mov qword [rsp + 0x6a0], rax
mov ecx, 0x104
xor bpl, bpl
call fcn.14000976c
mov rdi, rax
test rax, rax
jne 0x140001acd
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Memory_Allocation_failed__error_code___d
call fcn.1400013f0
jmp 0x140001c15
xor edx, edx
mov qword [rsp + 0x6c8], rsi
mov r8d, 0x104
mov rcx, rax
call fcn.140005a70
mov r8d, 0x104
lea rcx, str._programdata_BroadcomHostStorage_
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea rcx, str.Host_Storage_location_set_successfully.
call fcn.1400013f0
or r9, 0xffffffffffffffff
nop dword [rax + rax]
inc r9
cmp word [rdi + r9*2], 0
jne 0x140001b10
inc r9
lea rcx, [rsp + 0x280]
mov r8, rdi
mov edx, 0x104
call fcn.140009934
mov r9d, 3
lea r8, [0x140021230]
mov edx, 0x104
lea rcx, [rsp + 0x280]
call fcn.140009834
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x280]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x140001c05
lea rdx, [rsp + 0x30]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x140001bd5
test byte [rsp + 0x30], 0x10
jne 0x140001bc3
lea rax, [rsp + 0x5c]
mov r9, rdi
lea r8, str._s_s
mov qword [rsp + 0x20], rax
mov edx, 0x104
lea rcx, [rsp + 0x490]
call fcn.140001520
lea rcx, [rsp + 0x490]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x140001c3a
lea rdx, [rsp + 0x30]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x140001b84
mov qword [rsp + 0x6c0], rbx
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rsi
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_FindClose]
cmp ebx, 0x12
movzx ebp, bpl
mov rbx, qword [rsp + 0x6c0]
mov eax, 1
cmove ebp, eax
mov rcx, rdi
call fcn.140009758
mov rsi, qword [rsp + 0x6c8]
movzx eax, bpl
mov rcx, qword [rsp + 0x6a0]
xor rcx, rsp
call fcn.1400047a0
mov rbp, qword [rsp + 0x6d0]
add rsp, 0x6b0
pop rdi
ret
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x140001c05

Function at 0x140002660
Capabilities:
Check os version

Disassembly:
sub rsp, 0x158
mov rax, qword [0x140026008]
xor rax, rsp
mov qword [rsp + 0x140], rax
xor edx, edx
lea rcx, [rsp + 0x24]
mov r8d, pe_nt_image_headers64
call fcn.140005a70
lea rcx, [rsp + 0x20]
mov dword [rsp + 0x20], 0x114
call qword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
jne 0x1400026d0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.IsWin8OrGreater_GetVersionEx_failed_gle_d_n
call fcn.1400013f0
xor al, al
mov rcx, qword [rsp + 0x140]
xor rcx, rsp
call fcn.1400047a0
add rsp, 0x158
ret
mov eax, dword [rsp + 0x24]
cmp eax, 6
jb 0x1400026b6
jne 0x1400026e2
cmp dword [rsp + 0x28], 1
jbe 0x1400026b6
mov al, 1
mov rcx, qword [rsp + 0x140]
xor rcx, rsp
call fcn.1400047a0
add rsp, 0x158
ret
Function at 0x140002f80
Capabilities:
Create thread
Terminate thread

Disassembly:
sub rsp, 0x38
mov rax, qword [0x140027dd8]
mov word [0x140027dd4], cx
test rax, rax
je 0x140002fd6
mov rax, qword [0x140027dd8]
test rax, rax
je 0x140002fd6
lea rcx, str.Destroy_host_control_thread_n
call fcn.1400013f0
mov rcx, qword [0x140027dd8]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TerminateThread]
mov rcx, qword [0x140027dd8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [0x140027dd8], 0
mov qword [rsp + 0x28], 0
lea r9, [0x140027dd4]
lea r8, [0x1400032f0]
mov dword [rsp + 0x20], 0
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [0x140027dd8], rax
mov rax, qword [0x140027dd8]
test rax, rax
jne 0x140003025
lea rcx, str.Host_storage_thread_creation_failed_n
call fcn.1400013f0
xor al, al
add rsp, 0x38
ret
lea rcx, str.Created_host_storage_thread_n
call fcn.1400013f0
mov al, 1
add rsp, 0x38
ret

Function at 0x140004070
Capabilities:
Create service
Modify service
Persist via windows service

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rdx
push rdi
sub rsp, 0x70
mov rbx, rcx
lea rcx, str.Entering_InstallService...._n
call fcn.1400013f0
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 2]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rdi, rax
test rax, rax
jne 0x1400040c5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.OpenSCManager_failed__error_code___d_n
mov rbx, qword [rsp + 0x80]
add rsp, 0x70
pop rdi
jmp fcn.1400013f0
xor eax, eax
lea r8, str.Credential_Vault_Host_Storage
mov qword [rsp + 0x60], rax
lea rdx, str.Credential_Vault_Host_Storage
mov qword [rsp + 0x58], rax
mov r9d, 0xf01ff
mov qword [rsp + 0x50], rax
mov rcx, rdi
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], rbx
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], 2
mov dword [rsp + 0x20], pe_nt_image_headers64
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov rbx, rax
test rax, rax
jne 0x140004140
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.Credential_Vault_Host_Storage
lea rcx, str.Failed_to_create_service__s__error_code___d_n
call fcn.1400013f0
jmp 0x1400041a0
lea rcx, str.Changing_the_Service_Description_n
call fcn.1400013f0
lea rax, str.Host_Storage_Service_for_Persisting_CV_Objects_into_Hard_drive
mov edx, 1
lea r8, [rsp + 0x88]
mov qword [rsp + 0x88], rax
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
jne 0x14000418b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Failed_to_change_the_service_desc__error_code___d_n
call fcn.1400013f0
jmp 0x140004197
lea rcx, str.Service_description_is_set_n
call fcn.1400013f0
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea rcx, str.Service_Installed_Successfully...._n
mov rbx, qword [rsp + 0x80]
add rsp, 0x70
pop rdi
jmp fcn.1400013f0
Function at 0x1400041d0
Capabilities:
Delete service
Query service status
Stop service

Disassembly:
push rdi
sub rsp, 0x90
mov rax, qword [0x140026008]
xor rax, rsp
mov qword [rsp + 0x80], rax
lea rcx, str.Entering_Unistall_Service...._n
call fcn.1400013f0
xor edx, edx
mov dword [rsp + 0x30], 0
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rdi, rax
test rax, rax
jne 0x140004230
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.OpenSCManager_failed__error_code___d_n
call fcn.1400013f0
jmp 0x14000430e
mov r8d, 0xf01ff
mov qword [rsp + 0xa0], rbx
lea rdx, str.Credential_Vault_Host_Storage
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
test rax, rax
jne 0x14000426f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.OpenService_failed__error_code___d_n
call fcn.1400013f0
jmp 0x1400042f1
lea rax, [rsp + 0x30]
mov r9d, 0x24
lea r8, [rsp + 0x38]
mov qword [rsp + 0x20], rax
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
cmp dword [rsp + 0x3c], 1
je 0x1400042c1
lea r8, [rsp + 0x60]
mov edx, 1
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x1400042c1
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ControlService_failed__error_code___d_n
call fcn.1400013f0
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_DeleteService]
lea rdx, str.Credential_Vault_Host_Storage
lea rcx, str.Failed_to_delete_service__s_n
test eax, eax
je 0x1400042e3
lea rcx, str.Service__S_removed_successfully_n
call fcn.1400013f0
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea rcx, str.Exiting_Unistal_service_n
call fcn.1400013f0
mov rbx, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.1400047a0
add rsp, 0x90
pop rdi
ret
Function at 0x140004330
Capabilities:
Start service

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov rbx, rcx
mov rsi, r8
lea rcx, str.Entering_RunService_...._n
mov ebp, edx
call fcn.1400013f0
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rdi, rax
test rax, rax
jne 0x140004386
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.OpenSCManager_failed__error_code___d_n
call fcn.1400013f0
jmp 0x140004404
mov r8d, 0xf01ff
mov rdx, rbx
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
test rax, rax
jne 0x1400043b6
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.OpenService_failed__error_code___d_n
call fcn.1400013f0
jmp 0x1400043fb
mov r8, rsi
mov edx, ebp
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
je 0x1400043de
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov al, 1
jmp 0x140004412
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.StartService_failed__error_code___d_n
call fcn.1400013f0
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea rcx, str.Exiting_Runservice_service_n
call fcn.1400013f0
xor al, al
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret

Function at 0x140004430
Capabilities:
Stop service

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x50
mov rax, qword [0x140026008]
xor rax, rsp
mov qword [rsp + 0x40], rax
mov rdi, rcx
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rbx, rax
test rax, rax
jne 0x14000447d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.OpenSCManager_failed__error_code___d_n
call fcn.1400013f0
jmp 0x140004500
mov r8d, 0xf01ff
mov rdx, rdi
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rdi, rax
test rax, rax
jne 0x1400044ad
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.OpenService_failed__error_code___d_n
call fcn.1400013f0
jmp 0x1400044f7
lea r8, [rsp + 0x20]
mov edx, 1
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x1400044da
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov al, 1
jmp 0x140004502
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ControlService_failed__error_code___d_n
call fcn.1400013f0
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor al, al
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.1400047a0
mov rbx, qword [rsp + 0x68]
add rsp, 0x50
pop rdi
ret
Function at 0x140004bb4
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
sub rsp, 0x18
mov r8, rcx
mov eax, 0x5a4d
cmp word [0x140000000], ax
jne 0x140004c45
movsxd rax, dword [0x14000003c]
lea rdx, [0x140000000]
lea rcx, [rax + rdx]
cmp dword [rcx], 0x4550
jne 0x140004c45
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140004c45
sub r8, rdx
movzx eax, word [rcx + 0x14]
lea rdx, [rcx + 0x18]
add rdx, rax
movzx eax, word [rcx + 6]
lea rcx, [rax + rax*4]
lea r9, [rdx + rcx*8]
mov qword [rsp], rdx
cmp rdx, r9
je 0x140004c29
mov ecx, dword [rdx + 0xc]
cmp r8, rcx
jb 0x140004c23
mov eax, dword [rdx + 8]
add eax, ecx
cmp r8, rax
jb 0x140004c2b
add rdx, 0x28
jmp 0x140004c08
xor edx, edx
test rdx, rdx
jne 0x140004c34
xor al, al
jmp 0x140004c4b
test dword [rdx + 0x24], 0x80000000
je 0x140004c41
xor al, al
jmp 0x140004c4b
mov al, 1
jmp 0x140004c4b
xor al, al
jmp 0x140004c4b
add rsp, 0x18
ret