joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140001ad0
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
lea rax, [rsp + 0x58]
mov rbx, rcx
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call fcn.1400028d0
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
nop
nop dword [rax]

Function at 0x140001b40
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x140007094]
test esi, esi
mov rbx, rcx
jle 0x140001c70
mov rax, qword [0x140007098]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x140001b8b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140001c15
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140001b70
mov rcx, rbx
call fcn.1400025b0
test rax, rax
mov rdi, rax
je 0x140001c92
mov rax, qword [0x140007098]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.1400026f0
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x140007098]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140001c77
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140001c0e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140001c20
add dword [0x140007094], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
cmp eax, 2
mov r8d, 0x40
mov eax, 4
mov rcx, qword [rsp + 0x20]
cmove r8d, eax
mov rdx, qword [rsp + 0x38]
add rbx, qword [0x140007098]
mov r9, rbx
mov qword [rbx + 8], rcx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140001c0e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140001ad0
nop dword [rax]
xor esi, esi
jmp 0x140001b98
mov rax, qword [0x140007098]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [rdi + 8]
mov r8, qword [rax + rbx + 0x18]
call fcn.140001ad0
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call fcn.140001ad0
nop
nop word cs:[rax + rax]
nop dword [rax]
Function at 0x140002200
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x140007100]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400070e0]
test rbx, rbx
je 0x14000225c
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax]
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x140002253
test rsi, rsi
je 0x140002253
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140002238
mov rcx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x140002470
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
call qword [rax]
nop
nop
sub rsp, 0x28
mov rax, qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__exit]
call qword [rax]
nop
nop
nop
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x1400024a8
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x1400024b0
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret

Function at 0x140002480
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
call qword [rax]
nop
nop
sub rsp, 0x28
mov rax, qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__exit]
call qword [rax]
nop
nop
nop
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x1400024a8
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x1400024b0
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret

Function at 0x140002490
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
call qword [rax]
nop
nop
sub rsp, 0x28
mov rax, qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__exit]
call qword [rax]
nop
nop
nop
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x1400024a8
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x1400024b0
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret

Function at 0x1400025b0
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x140004450]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x1400025d0
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x1400025d8
ret
cmp word [r8 + 0x18], 0x20b
jne 0x1400025d0
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x14000262d
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x140002624
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x1400025d0
add rax, 0x28
cmp rax, r9
jne 0x140002610
xor eax, eax
ret

Function at 0x140002630
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x140004450]
xor ecx, ecx
cmp word [rax], 0x5a4d
jne 0x14000264f
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x140002658
mov eax, ecx
ret
cmp word [rax + 0x18], 0x20b
jne 0x14000264f
movzx ecx, word [rax + 6]
mov eax, ecx
ret
Function at 0x1400026f0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x140004450]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x14000270f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x140002718
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret
Function at 0x1800010c0
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x50
mov rax, qword [0x180021008]
xor rax, rsp
mov qword [rsp + 0x40], rax
mov r10, qword [rcx]
xor esi, esi
add r10, 0x3f
mov r14, rcx
shr r10, 6
mov r11d, esi
test r10, r10
je 0x1800011a6
lea r15, [rcx + 0x28]
lea r15, [r15 + r10*4]
lea rbx, [rcx + 0x10]
mov r13d, dword [rbx - 4]
mov ebp, esi
mov r12d, dword [rbx]
mov edi, esi
mov dword [rsp + r11*4 + 0x20], r13d
mov dword [rsp + r11*4 + 0x30], r12d
test edi, edi
mov eax, r12d
mov r12d, 4
cmovne eax, r13d
xor ebp, eax
mov edx, ebp
shr edx, 0x18
mov r9d, edx
movsx ecx, dl
sar ecx, 0x1f
and ecx, 0x4d
lea eax, [rdx + rdx]
and dl, 1
xor ecx, eax
mov eax, r9d
movzx r8d, cl
neg dl
sbb ecx, ecx
shr eax, 1
and ecx, 0xa6
xor ecx, eax
xor ecx, r8d
mov eax, ecx
shl eax, 8
xor eax, r8d
shl eax, 8
xor eax, ecx
xor ebp, eax
shl ebp, 8
xor ebp, r9d
sub r12, 1
jne 0x180001139
mov r12d, dword [rbx]
inc edi
cmp edi, 2
jb 0x180001128
mov dword [r15], ebp
inc r11
sub r15, 4
add rbx, 8
cmp r11, r10
jb 0x180001113
lea r15, [r14 + 0x40]
mov r8, qword [r14]
lea rdx, [rsp + 0x20]
imul ebx, esi, 0x2020202
mov ecx, ebx
call fcn.1800027ac
mov r8, qword [r14]
lea ecx, [rbx + 0x1010101]
lea rdx, [rsp + 0x30]
mov edi, eax
call fcn.1800027ac
rol eax, 8
inc rsi
lea ecx, [rax + rdi]
mov dword [r15 - 4], ecx
lea ecx, [rdi + rax*2]
rol ecx, 9
mov dword [r15], ecx
lea r15, [r15 + 8]
cmp rsi, 0x14
jb 0x1800011aa
mov al, 1
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.180002e60
lea r11, [rsp + 0x50]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
Function at 0x180001810
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x50
mov rax, qword [0x180021008]
xor rax, rsp
mov qword [rsp + 0x48], rax
call fcn.180001314
movdqa xmm0, xmmword [0x18001ea70]
mov r9b, 0xe8
and dword [rsp + 0x30], 0
mov rcx, qword [sym.imp.ntdll.dll_LdrUnlockLoaderLock]
movdqu xmmword [rsp + 0x38], xmm0
cmp byte [rcx], r9b
jne 0x180001856
cmp byte [rcx + 5], 0xeb
je 0x18000185b
inc rcx
jmp 0x18000184b
movsxd rax, dword [rcx + 1]
lea rdx, [rcx + 5]
add rdx, rax
mov eax, 0xd8d
jmp 0x180001870
inc rdx
cmp word [rdx], ax
jne 0x18000186d
movsxd rax, dword [rdx + 2]
lea r8, [rdx + 6]
add r8, rax
je 0x18000192e
mov rcx, qword [sym.imp.ntdll.dll_RtlExitUserProcess]
cmp byte [rcx], r9b
jne 0x180001898
cmp byte [rcx + 5], r9b
je 0x18000189d
inc rcx
jmp 0x18000188d
movsxd rax, dword [rcx + 1]
add rcx, 5
add rcx, rax
mov eax, 0x5c7
cmp word [rcx], ax
jne 0x1800018b8
cmp dword [rcx + 6], 1
je 0x1800018bd
inc rcx
jmp 0x1800018a8
movsxd rax, dword [rcx + 2]
lea rdi, [rcx + 0xa]
add rdi, rax
je 0x18000192e
mov rcx, r8
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ebx, 2
mov rcx, qword [rsp + rbx*8 + 0x30]
dec rbx
call qword [sym.imp.KERNEL32.dll_SetEvent]
test rbx, rbx
jne 0x1800018d8
lock dec qword [rdi]
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea r8, [0x18000128c]
and dword [rsp + 0x20], ebx
xor r9d, r9d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rbx, rax
test rax, rax
je 0x18000192e
or edx, 0xffffffff
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.180002e60
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rdi
ret
Function at 0x180001a88
Capabilities:
Enumerate pe sections

Disassembly:
mov qword [rsp + 0x20], rbx
mov qword [rsp + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x40
xorps xmm0, xmm0
xor ebx, ebx
mov rsi, rdx
movups xmmword [rbp - 0x20], xmm0
movups xmmword [rbp - 0x10], xmm0
test rdx, rdx
je 0x180001c07
mov r8, qword [rdx]
movzx eax, word [r8 + 0x14]
lea r9, [r8 + 0x18]
add r9, rax
je 0x180001c07
mov r11d, dword [rdx + 0x50]
movabs rax, 0xffffffff00000000
mov r15, qword [r8 + 0x30]
neg r11d
mov r10d, dword [r9 + 8]
and r15, rax
mov edx, dword [r9 + 0x10]
or r10, r15
mov ecx, dword [r9 + 0x24]
and r11, r10
mov qword [rbp + 0x50], r15
mov qword [rbp - 0x20], r10
mov qword [rbp - 0x18], r11
test edx, edx
jne 0x180001b1f
test cl, 0x40
je 0x180001b17
mov edx, dword [r8 + 0x20]
jmp 0x180001b1f
test cl, cl
jns 0x180001b1f
mov edx, dword [r8 + 0x24]
mov edi, 1
mov dword [rbp - 0x10], edx
mov dword [rbp - 0xc], ecx
mov dword [rbp - 8], ebx
mov dword [rbp + 0x48], edi
cmp di, word [r8 + 6]
jae 0x180001bf2
lea r14, [r9 + 0x4c]
mov r9d, edi
mov r13d, dword [r14 - 0x1c]
mov r12d, dword [r14 - 0x14]
or r13, r15
mov r15d, dword [rsi + 0x50]
neg r15d
and r15, r13
test r12d, r12d
jne 0x180001b72
test byte [r14], 0x40
je 0x180001b68
mov r12d, dword [r8 + 0x20]
jmp 0x180001b72
test byte [r14], 0x80
je 0x180001b72
mov r12d, dword [r8 + 0x24]
cmp r11, r15
je 0x180001bb2
mov eax, edx
add rax, r10
cmp rax, r15
ja 0x180001bb2
mov rcx, qword [rbp + 0x40]
lea r8, [rbp - 0x20]
mov rdx, rsi
call fcn.180001990
test eax, eax
je 0x180001c07
mov ecx, dword [r14]
mov r10, r13
mov r8, qword [rsi]
mov r11, r15
mov r9d, dword [rbp + 0x48]
mov edx, r12d
mov qword [rbp - 0x20], r13
mov qword [rbp - 0x18], r15
jmp 0x180001bce
mov edx, dword [r14]
mov eax, edx
and eax, ecx
or ecx, edx
bt eax, 0x19
jb 0x180001bc5
btr ecx, 0x19
mov edx, r12d
sub edx, dword [rbp - 0x20]
add edx, r13d
movzx eax, word [r8 + 6]
add r9d, edi
add r14, 0x28
mov dword [rbp - 0xc], ecx
mov dword [rbp - 0x10], edx
mov dword [rbp + 0x48], r9d
cmp r9d, eax
jge 0x180001bf2
mov r15, qword [rbp + 0x50]
jmp 0x180001b42
mov rcx, qword [rbp + 0x40]
lea r8, [rbp - 0x20]
mov rdx, rsi
mov dword [rbp - 8], edi
call fcn.180001990
mov ebx, edi
mov eax, ebx
mov rbx, qword [rsp + 0x98]
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x180002d5c
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r14
push r15
sub rsp, 0x40
mov rax, qword [0x180021008]
xor rax, rsp
mov qword [rsp + 0x30], rax
mov r14, qword [rsp + 0x80]
mov rbx, r9
mov rdi, r8
mov rbp, rdx
mov r9, r14
mov r8, rbx
mov rdx, rdi
mov rcx, rbp
call fcn.180002b2c
lea rsi, [rbx*8]
xorps xmm0, xmm0
movups xmmword [rsp + 0x20], xmm0
test rsi, rsi
je 0x180002e29
lea rax, [rsp + 0x20]
mov r15, rbp
sub r15, rax
lea rbx, [rsp + 0x20]
sub rbx, rdi
dec rsi
shr rsi, 7
inc rsi
mov edx, 4
lea rax, [rbx + r15]
mov ecx, dword [rax + rdi + 0x4c]
xor ecx, dword [rdi]
mov dword [rbx + rdi], ecx
add rdi, 4
sub rdx, 1
jne 0x180002ddc
lea rdx, [rsp + 0x20]
mov rcx, rbp
call fcn.180002c74
xor ecx, ecx
mov eax, dword [rbp + rcx*4 + 0x3c]
xor dword [rsp + rcx*4 + 0x20], eax
mov eax, dword [rsp + rcx*4 + 0x20]
mov dword [r14 + rcx*4], eax
inc rcx
cmp rcx, 4
jb 0x180002e02
sub rbx, 0x10
add r14, 0x10
sub rsi, 1
jne 0x180002dd7
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.180002e60
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x78]
add rsp, 0x40
pop r15
pop r14
pop rdi
ret
Function at 0x18000ef18
Capabilities:
Query environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r14
sub rsp, 0x40
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor esi, esi
mov rbx, rax
test rax, rax
jne 0x18000ef48
xor eax, eax
jmp 0x18000f00b
mov rbp, rbx
cmp word [rax], si
je 0x18000ef6d
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x18000ef54
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x18000ef50
mov qword [rsp + 0x38], rsi
sub rbp, rbx
mov qword [rsp + 0x30], rsi
add rbp, 2
sar rbp, 1
mov r8, rbx
mov r9d, ebp
mov dword [rsp + 0x28], esi
xor edx, edx
mov qword [rsp + 0x20], rsi
xor ecx, ecx
call fcn.18000ee68
movsxd r14, eax
test eax, eax
jne 0x18000efab
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x18000ef41
mov rcx, r14
call fcn.18000adcc
mov rdi, rax
test rax, rax
jne 0x18000efc4
xor ecx, ecx
call fcn.18000ad90
jmp 0x18000efa0
mov qword [rsp + 0x38], rsi
mov r9d, ebp
mov qword [rsp + 0x30], rsi
mov r8, rbx
mov dword [rsp + 0x28], r14d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rdi
call fcn.18000ee68
test eax, eax
jne 0x18000eff5
mov rcx, rdi
call fcn.18000ad90
jmp 0x18000efff
xor ecx, ecx
call fcn.18000ad90
mov rsi, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rsi
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop r14
ret
Function at 0x140001af8
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_GetModuleHandleW]
test rax, rax
je 0x140001b42
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140001b42
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140001b42
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140001b42
cmp dword [rcx + 0x84], 0xe
jbe 0x140001b42
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140001b44
xor al, al
add rsp, 0x28
ret

Function at 0x14000307c
Capabilities:
Block operations on executable memory pages using arbitrary code guard

Disassembly:
push rdi
sub rsp, 0x20
mov edi, 4
mov dword [rsp + 0x30], 1
mov r8d, edi
lea rdx, [rsp + 0x30]
lea ecx, [rdi + 4]
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_1.dll_SetProcessMitigationPolicy]
nop dword [rax + rax]
mov r8d, edi
mov dword [rsp + 0x38], 1
lea rdx, [rsp + 0x38]
lea ecx, [rdi - 2]
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_1.dll_SetProcessMitigationPolicy]
nop dword [rax + rax]
mov r8d, edi
mov dword [rsp + 0x40], 1
lea rdx, [rsp + 0x40]
lea ecx, [rdi + 5]
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_1.dll_SetProcessMitigationPolicy]
nop dword [rax + rax]
mov r8d, edi
mov dword [rsp + 0x48], 3
lea rdx, [rsp + 0x48]
lea ecx, [rdi + 6]
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_1.dll_SetProcessMitigationPolicy]
nop dword [rax + rax]
add rsp, 0x20
pop rdi
ret

Function at 0x1400038cc
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov edi, r8d
mov rsi, rdx
mov rbp, rcx
call qword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_LoadResource]
nop dword [rax + rax]
test rax, rax
je 0x140003955
mov rcx, rax
call qword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_LockResource]
nop dword [rax + rax]
mov rbx, rax
test rax, rax
je 0x140003955
mov rdx, rsi
mov rcx, rbp
call qword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_SizeofResource]
nop dword [rax + rax]
mov ecx, eax
add rcx, rbx
and edi, 0xf
jbe 0x140003942
cmp rbx, rcx
jae 0x140003955
movzx eax, word [rbx]
lea rbx, [rbx + rax*2]
add rbx, 2
add edi, 0xffffffff
jne 0x14000392d
cmp rbx, rcx
jae 0x140003955
movzx eax, word [rbx]
neg ax
sbb rax, rax
and rax, rbx
jmp 0x140003957
xor eax, eax
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x14000422c
Capabilities:
Query service status
Start service

Disassembly:
push rbx
sub rsp, 0x60
mov rax, qword [0x140017150]
xor rax, rsp
mov qword [rsp + 0x50], rax
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 1]
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_OpenSCManagerW]
nop dword [rax + rax]
mov qword [rsp + 0x20], rax
test rax, rax
jne 0x140004283
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
jle 0x140004321
movzx ebx, ax
or ebx, 0x80070000
jmp 0x140004321
mov r8d, 0x14
lea rdx, str.DiagnosticsHub.StandardCollector.Service
mov rcx, rax
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_OpenServiceW]
nop dword [rax + rax]
mov qword [rsp + 0x28], rax
mov rbx, rax
test rax, rax
je 0x1400042e3
lea rdx, [rsp + 0x30]
mov rcx, rax
call qword [sym.imp.api_ms_win_service_winsvc_l1_1_0.dll_QueryServiceStatus]
nop dword [rax + rax]
test eax, eax
je 0x1400042e3
cmp dword [rsp + 0x34], 1
jne 0x140004309
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_StartServiceW]
nop dword [rax + rax]
test eax, eax
jne 0x140004300
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
jle 0x140004317
movzx ebx, ax
or ebx, 0x80070000
jmp 0x140004317
lea rcx, str.SUCCESS:_The_service_was_started_successfully_n
jmp 0x140004310
lea rcx, str.WARNING:_The_service_is_already_started_n
call fcn.14000225c
xor ebx, ebx
lea rcx, [rsp + 0x28]
call fcn.140004208
lea rcx, [rsp + 0x20]
call fcn.140004208
mov eax, ebx
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.140001510
add rsp, 0x60
pop rbx
ret
Function at 0x140004348
Capabilities:
Query service status
Stop service

Disassembly:
mov qword [rsp + 8], rbx
push rbp
mov rbp, rsp
sub rsp, 0x60
mov rax, qword [0x140017150]
xor rax, rsp
mov qword [rbp - 0x10], rax
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 1]
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_OpenSCManagerW]
nop dword [rax + rax]
mov qword [rbp - 0x40], rax
test rax, rax
jne 0x1400043a4
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
jle 0x140004442
movzx ebx, ax
or ebx, 0x80070000
jmp 0x140004442
mov r8d, 0x24
lea rdx, str.DiagnosticsHub.StandardCollector.Service
mov rcx, rax
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_OpenServiceW]
nop dword [rax + rax]
mov qword [rbp - 0x38], rax
mov rbx, rax
test rax, rax
je 0x140004405
lea rdx, [rbp - 0x30]
mov rcx, rax
call qword [sym.imp.api_ms_win_service_winsvc_l1_1_0.dll_QueryServiceStatus]
nop dword [rax + rax]
test eax, eax
je 0x140004405
cmp dword [rbp - 0x2c], 1
je 0x14000442b
lea r8, [rbp - 0x30]
mov edx, 1
mov rcx, rbx
call qword [sym.imp.api_ms_win_service_winsvc_l1_1_0.dll_ControlService]
nop dword [rax + rax]
test eax, eax
jne 0x140004422
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
jle 0x140004439
movzx ebx, ax
or ebx, 0x80070000
jmp 0x140004439
lea rcx, str.SUCCESS:_The_service_was_stopped_successfully_n
jmp 0x140004432
lea rcx, str.WARNING:_The_service_is_already_stopped_n
call fcn.14000225c
xor ebx, ebx
lea rcx, [rbp - 0x38]
call fcn.140004208
lea rcx, [rbp - 0x40]
call fcn.140004208
mov eax, ebx
mov rcx, qword [rbp - 0x10]
xor rcx, rsp
call fcn.140001510
mov rbx, qword [rsp + 0x70]
add rsp, 0x60
pop rbp
ret
sub rsp, 0x48
mov r9d, dword [rdx]
mov r8d, r9d
sub r8d, 1
je 0x14000574c
sub r8d, 1
je 0x14000574c
sub r8d, 1
je 0x14000574c
sub r8d, 1
je 0x14000574c
sub r8d, 1
je 0x1400056db
sub r8d, 1
je 0x1400056db
sub r8d, 1
je 0x14000574c
cmp r8d, 1
je 0x14000574c
or eax, 0xffffffff
add rsp, 0x48
ret
cmp r9d, 5
jne 0x14000573f
and qword [rsp + 0x30], 0
lea rax, str.DiagnosticsHub.StandardCollector.Service
and qword [rsp + 0x38], 0
lea rcx, [rsp + 0x20]
mov qword [rsp + 0x20], rax
lea rax, [0x140005d00]
mov qword [rsp + 0x28], rax
call qword [sym.imp.api_ms_win_service_core_l1_1_0.dll_StartServiceCtrlDispatcherW]
nop dword [rax + rax]
test eax, eax
jne 0x140005744
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
cmp eax, 0x420
je 0x140005744
test eax, eax
jle 0x140005771
movzx eax, ax
or eax, 0x80070000
add rsp, 0x48
ret
call fcn.140005b68
xor eax, eax
add rsp, 0x48
ret
sub r9d, 3
je 0x14000576c
cmp r9d, 1
je 0x140005763
mov eax, 0x8000ffff
add rsp, 0x48
ret
add rsp, 0x48
jmp 0x140004348
call fcn.14000422c
add rsp, 0x48
ret