joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4d7560
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov ecx, dword [ebp + 8]
mov eax, 0x5a4d
cmp word [ecx], ax
jne 0x4d75b6
mov eax, dword [ecx + 0x3c]
test eax, eax
je 0x4d75b6
lea ebx, [ebx]
cmp eax, 0x7fffffff
jae 0x4d75b6
cmp dword [eax + ecx], 0x4550
jne 0x4d75b6
lea edx, [ecx + 0x78]
add edx, eax
mov eax, dword [edx]
test eax, eax
je 0x4d75b6
cmp dword ds:[edx + 4], 0
je 0x4d75b6
push dword [ebp + 0x10]
add eax, ecx
push dword [ebp + 0xc]
push eax
call fcn.004c0900
mov esp, ebp
pop ebp
ret 0xc
xor eax, eax
mov esp, ebp
pop ebp
ret 0xc

Function at 0x4d77e0
Capabilities:
Get system information on windows
Make suspicious ntquerysysteminformation call

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push 0x800
push 4
push dword [0x5cd55c]
mov dword [ebp - 4], 0x800
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov esi, eax
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push esi
push 0xb
call dword [sym.imp.ntdll.dll_NtQuerySystemInformation]
mov ecx, eax
cmp ecx, 0xc0000004
jne 0x4d784f
push esi
push 0
push dword [0x5cd55c]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
push dword [ebp - 4]
push 4
push dword [0x5cd55c]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov esi, eax
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push esi
push 0xb
call dword [sym.imp.ntdll.dll_NtQuerySystemInformation]
mov ecx, eax
lfence
test ecx, ecx
js 0x4d785b
mov eax, dword [ebp + 8]
mov dword [eax], esi
mov eax, ecx
pop esi
mov esp, ebp
pop ebp
ret 4

Function at 0x4d7c20
Capabilities:
Get system information on windows
Make suspicious ntquerysysteminformation call

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, dword [0x5cb610]
push edi
push esi
push 4
push dword [0x5cd55c]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
push 0
push esi
mov edi, eax
push edi
push 0x10
call dword [sym.imp.ntdll.dll_NtQuerySystemInformation]
mov ebx, eax
cmp ebx, 0xc0000004
jne 0x4d7c9e
push edi
push 0
push dword [0x5cd55c]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
add esi, esi
cmp esi, 0x10000000
ja 0x4d7cbd
push esi
push 4
lfence
push dword [0x5cd55c]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
push 0
push esi
mov edi, eax
push edi
push 0x10
call dword [sym.imp.ntdll.dll_NtQuerySystemInformation]
mov ebx, eax
cmp ebx, 0xc0000004
je 0x4d7c53
lfence
test ebx, ebx
jns 0x4d7cc9
push edi
push 0
push dword [0x5cd55c]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
pop edi
pop esi
mov eax, ebx
pop ebx
pop ebp
ret 4
pop edi
pop esi
mov eax, 0xc000009a
pop ebx
pop ebp
ret 4
mov eax, dword [0x5cb610]
cmp esi, 0x100000
cmovbe eax, esi
mov dword [0x5cb610], eax
mov eax, dword [ebp + 8]
mov dword [eax], edi
mov eax, ebx
pop edi
pop esi
pop ebx
pop ebp
ret 4
Function at 0x4d7d00
Capabilities:
Get system information on windows
Make suspicious ntquerysysteminformation call

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
mov esi, dword [0x5cb51c]
push edi
push esi
push 4
push dword [0x5cd55c]
mov dword [ebp - 4], 0
mov dword [ebp - 8], 0
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov edi, eax
lea eax, [ebp - 4]
push eax
push esi
push edi
push 0x40
call dword [sym.imp.ntdll.dll_NtQuerySystemInformation]
mov ebx, eax
cmp ebx, 0xc0000004
jne 0x4d7d99
xor eax, eax
lea ebx, [ebx]
cmp eax, 0xa
jae 0x4d7da8
push edi
push 0
push dword [0x5cd55c]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
mov esi, dword [ebp - 4]
push esi
push 4
push dword [0x5cd55c]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov edi, eax
lea eax, [ebp - 4]
push eax
push esi
push edi
push 0x40
call dword [sym.imp.ntdll.dll_NtQuerySystemInformation]
mov ebx, eax
mov eax, dword [ebp - 8]
inc eax
mov dword [ebp - 8], eax
cmp ebx, 0xc0000004
je 0x4d7d50
lea esp, [esp]
test ebx, ebx
jns 0x4d7e51
mov esi, dword [0x5cb51c]
push esi
push 4
push dword [0x5cd55c]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
push 0
push esi
mov edi, eax
push edi
push 0x40
call dword [sym.imp.ntdll.dll_NtQuerySystemInformation]
mov ebx, eax
cmp ebx, 0xc0000004
jne 0x4d7e1e
push edi
push 0
push dword [0x5cd55c]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
add esi, esi
cmp esi, 0x10000000
ja 0x4d7e43
push esi
push 4
lfence
push dword [0x5cd55c]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
push 0
push esi
mov edi, eax
push edi
push 0x40
call dword [sym.imp.ntdll.dll_NtQuerySystemInformation]
mov ebx, eax
cmp ebx, 0xc0000004
je 0x4d7dd5
mov edi, edi
test ebx, ebx
jns 0x4d7e51
push edi
push 0
lfence
push dword [0x5cd55c]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret 4
pop edi
pop esi
mov eax, 0xc000009a
pop ebx
mov esp, ebp
pop ebp
ret 4
lfence
mov eax, dword [0x5cb51c]
cmp esi, 0x200000
cmovbe eax, esi
mov dword [0x5cb51c], eax
mov eax, dword [ebp + 8]
mov dword [eax], edi
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x4d7fa0
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov esi, 0x200
push esi
push 4
push dword [0x5cd55c]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
push 0
push esi
mov edi, eax
push edi
push 0x12
call dword [sym.imp.ntdll.dll_NtQuerySystemInformation]
mov ebx, eax
cmp ebx, 0xc0000004
jne 0x4d801e
push edi
push 0
push dword [0x5cd55c]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
add esi, esi
cmp esi, 0x10000000
ja 0x4d803d
push esi
push 4
lfence
push dword [0x5cd55c]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
push 0
push esi
mov edi, eax
push edi
push 0x12
call dword [sym.imp.ntdll.dll_NtQuerySystemInformation]
mov ebx, eax
cmp ebx, 0xc0000004
je 0x4d7fd2
lfence
test ebx, ebx
jns 0x4d8049
push edi
push 0
push dword [0x5cd55c]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
pop edi
pop esi
mov eax, ebx
pop ebx
pop ebp
ret 4
pop edi
pop esi
mov eax, 0xc000009a
pop ebx
pop ebp
ret 4
mov eax, dword [ebp + 8]
mov dword [eax], edi
mov eax, ebx
pop edi
pop esi
pop ebx
pop ebp
ret 4
Function at 0x4d8060
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov esi, 0x200
mov dword [ebp - 4], ecx
push esi
push 4
push dword [0x5cd55c]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
push 0
push esi
mov edi, eax
push edi
push 0x90
call dword [sym.imp.ntdll.dll_NtQuerySystemInformation]
mov ebx, eax
cmp ebx, 0xc0000004
jne 0x4d80e8
lea esp, [esp]
push edi
push 0
push dword [0x5cd55c]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
add esi, esi
cmp esi, 0x10000000
ja 0x4d8107
push esi
push 4
lfence
push dword [0x5cd55c]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
push 0
push esi
mov edi, eax
push edi
push 0x90
call dword [sym.imp.ntdll.dll_NtQuerySystemInformation]
mov ebx, eax
cmp ebx, 0xc0000004
je 0x4d80a0
lfence
test ebx, ebx
jns 0x4d8113
push edi
push 0
push dword [0x5cd55c]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 0xc000009a
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 4]
mov dword [eax], edi
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4d8140
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push esi
push edi
push 0x100
push 4
push dword [0x5cd55c]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov ecx, dword [ebp + 8]
mov edi, eax
push 0
push 0xc
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], ecx
push eax
push 0x58
mov dword [ebp - 0x10], 0x1000000
mov dword [ebp - 0xc], edi
call dword [sym.imp.ntdll.dll_NtQuerySystemInformation]
mov esi, eax
cmp esi, 0xc0000004
jne 0x4d81c1
push edi
push 0
push dword [0x5cd55c]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
movzx eax, word [ebp - 0xe]
push eax
push 4
push dword [0x5cd55c]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
push 0
mov edi, eax
lea eax, [ebp - 0x14]
push 0xc
push eax
push 0x58
mov dword [ebp - 0xc], edi
call dword [sym.imp.ntdll.dll_NtQuerySystemInformation]
mov esi, eax
lfence
test esi, esi
jns 0x4d81e3
push edi
push 0
push dword [0x5cd55c]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
pop edi
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret 8
mov ax, word [ebp - 0x10]
push ebx
test ax, ax
jne 0x4d81f6
call sym.ProcessHacker.exe_PhReferenceEmptyString
mov ebx, eax
jmp 0x4d8238
push dword [0x5cd4f8]
mov ecx, dword [ebp - 0xc]
movzx eax, ax
mov dword [ebp - 4], eax
add eax, 0xa
push eax
mov dword [ebp - 8], ecx
call sym.ProcessHacker.exe_PhCreateObject
mov ecx, dword [ebp - 4]
mov ebx, eax
lea eax, [ebx + 8]
xor edx, edx
mov dword [ebx + 4], eax
mov dword [ebx], ecx
mov word [eax + ecx], dx
mov eax, dword [ebp - 8]
test eax, eax
je 0x4d8238
push ecx
push eax
push dword [ebx + 4]
call fcn.00537fe0
add esp, 0xc
mov eax, dword [ebp + 0xc]
push edi
push 0
push dword [0x5cd55c]
mov dword [eax], ebx
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
pop ebx
pop edi
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret 8
Function at 0x4d8be0
Capabilities:
Get file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
push ebx
push esi
push edi
mov ebx, 0x400
mov dword [esp + 0x1c], edx
push ebx
push 4
push dword [0x5cd55c]
mov esi, ecx
mov byte [esp + 0x20], 1
mov dword [esp + 0x18], esi
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov edi, eax
push dword [esp + 0x14]
lea eax, [esp + 0x24]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [esp + 0x28]
push ebx
push edi
push eax
push 0
push 0
push 0
push esi
call dword [sym.imp.ntdll.dll_NtQueryDirectoryFile]
mov esi, eax
cmp esi, 0x103
jne 0x4d8c54
push 0
push 0
push dword [esp + 0x14]
call dword [sym.imp.ntdll.dll_NtWaitForSingleObject]
mov esi, eax
test esi, esi
cmovns esi, dword [esp + 0x20]
cmp esi, 0x80000005
je 0x4d8c68
lea esp, [esp]
cmp esi, 0xc0000004
jne 0x4d8c8e
push edi
push 0
push dword [0x5cd55c]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
add ebx, ebx
push ebx
push 4
push dword [0x5cd55c]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov esi, dword [esp + 0xc]
jmp 0x4d8c0f
mov dword [esp + 0x18], ebx
cmp esi, 0x80000006
je 0x4d8d05
test esi, esi
js 0x4d8d07
push dword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
mov ebx, edi
push edi
mov dword [esp + 0x18], 0
call dword [0x55890c]
call dword [ebp + 0x10]
test al, al
je 0x4d8d07
lea esp, [esp]
mov eax, dword [ebx]
test eax, eax
je 0x4d8cef
mov ecx, dword ds:[esp + 0x10]
push dword [ebp + 0x14]
add ecx, eax
mov dword [esp + 0x14], ecx
lea ebx, [ecx + edi]
mov ecx, dword [ebp + 0x10]
push ebx
call dword [0x55890c]
call dword [ebp + 0x10]
test al, al
jne 0x4d8cc0
jmp 0x4d8d07
mov ebx, dword ds:[esp + 0x18]
mov esi, dword [esp + 0xc]
mov byte [esp + 0x14], 0
jmp 0x4d8c11
xor esi, esi
push edi
push 0
push dword [0x5cd55c]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
Function at 0x4da760
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov ecx, dword [ebp + 0xc]
sub esp, 0xc
push ebx
mov ebx, 0x10
push esi
push edi
test ecx, ecx
je 0x4da7b6
mov edx, dword ds:[ecx]
movzx eax, dx
test edx, edx
je 0x4da7b6
mov word ds:[esp + 0x10], ax
add eax, 2
mov word [esp + 0x12], ax
mov eax, dword [ecx + 4]
mov dword [esp + 0x14], eax
cmp edx, 0xfffe
jbe 0x4da7c6
mov eax, 0xc0000106
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], 0
push 0x100
push 4
push dword [0x5cd55c]
mov dword [esp + 0x18], 0x100
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov edi, eax
jmp 0x4da7f0
lea eax, [esp + 0xc]
push eax
push dword [esp + 0x10]
lea eax, [esp + 0x18]
push edi
push dword [ebp + 0x10]
push eax
push dword [ebp + 8]
call dword [sym.imp.ntdll.dll_NtQueryValueKey]
mov esi, eax
test esi, esi
jns 0x4da845
push edi
push 0
cmp esi, 0x80000005
jne 0x4da855
push dword [0x5cd55c]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
push dword [esp + 0xc]
push 4
push dword [0x5cd55c]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov edi, eax
sub ebx, 1
jne 0x4da7f0
mov eax, dword [ebp + 0x14]
mov dword [eax], edi
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
lfence
push dword [0x5cd55c]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10

Function at 0x4da880
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0xc]
sub esp, 0xc
test ecx, ecx
je 0x4da8b4
movzx eax, word [ecx]
mov word [ebp - 0xc], ax
add eax, 2
cmp dword [ecx], 0xfffe
mov word [ebp - 0xa], ax
mov eax, dword [ecx + 4]
mov dword [ebp - 8], eax
jbe 0x4da8c2
mov eax, 0xc0000106
mov esp, ebp
pop ebp
ret 0x14
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0
push dword [ebp + 0x18]
lea eax, [ebp - 0xc]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push 0
push eax
push dword [ebp + 8]
call dword [sym.imp.ntdll.dll_NtSetValueKey]
mov esp, ebp
pop ebp
ret 0x14

Function at 0x4da8f0
Capabilities:
Delete registry value

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0xc]
sub esp, 8
test ecx, ecx
je 0x4da924
movzx eax, word [ecx]
mov word [ebp - 8], ax
add eax, 2
cmp dword [ecx], 0xfffe
mov word [ebp - 6], ax
mov eax, dword [ecx + 4]
mov dword [ebp - 4], eax
jbe 0x4da932
mov eax, 0xc0000106
mov esp, ebp
pop ebp
ret 8
mov dword [ebp - 8], 0
mov dword [ebp - 4], 0
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
call dword [sym.imp.ntdll.dll_NtDeleteValueKey]
mov esp, ebp
pop ebp
ret 8
Function at 0x4db9a0
Capabilities:
Get number of processors

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x64
mov eax, dword [0x5c7004]
xor eax, esp
mov dword [esp + 0x60], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push eax
push str.DeviceNamedPipe_
mov dword [esp + 0x18], 0
mov dword [esp + 0x68], 0xc
mov dword [esp + 0x6c], 0
mov word [esp + 0x70], 0
call sym.ProcessHacker.exe_PhConcatStrings2
mov edi, eax
lea eax, [esp + 0x18]
movzx ecx, word [edi]
mov word [esp + 0x18], cx
movzx ecx, word [edi]
add cx, 2
mov word [esp + 0x1a], cx
mov ecx, dword [edi + 4]
mov dword [esp + 0x30], eax
lea eax, [esp + 0x60]
mov dword [esp + 0x3c], eax
lea eax, [esp + 0x10]
push eax
mov dword [esp + 0x20], ecx
mov dword [esp + 0x2c], 0x18
mov dword [esp + 0x30], 0
mov dword [esp + 0x38], 0x40
mov dword [esp + 0x3c], 0
call fcn.004df040
mov esi, eax
mov ecx, eax
call dword [0x55890c]
call esi
test eax, eax
js 0x4dba76
push 1
lea eax, [esp + 0x48]
push eax
call dword [sym.imp.ntdll.dll_RtlCreateSecurityDescriptor]
push 0
push dword [esp + 0x14]
lea eax, [esp + 0x4c]
push 1
push eax
call dword [sym.imp.ntdll.dll_RtlSetDaclSecurityDescriptor]
lea eax, [esp + 0x44]
mov dword [esp + 0x38], eax
lea eax, ds:[esp + 0x20]
mov dword [esp + 0x20], 0xff676980
push eax
push 0x1000
push 0x1000
push 0xffffffffffffffff
push 0
push 1
push 3
push 0x22
push 3
push 3
lea eax, [esp + 0x80]
mov dword [esp + 0x4c], 0xffffffff
push eax
lea eax, [esp + 0x54]
push eax
push 0x12019f
lea eax, [esp + 0x48]
push eax
call dword [sym.imp.ntdll.dll_NtCreateNamedPipeFile]
mov esi, eax
test esi, esi
js 0x4dbad2
mov ecx, dword [esp + 0x14]
mov dword [ebx], ecx
cmp dword [esp + 0x10], 0
je 0x4dbaf1
mov eax, dword fs:[0x18]
push dword [esp + 0x10]
push 0
mov eax, dword [eax + 0x30]
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
lea ecx, [edi - 8]
or eax, 0xffffffff
lock xadd dword [ecx + 4], eax
dec eax
jne 0x4dbb05
nop
call fcn.004c1f60
mov ecx, dword [esp + 0x6c]
mov eax, esi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00534c91
mov esp, ebp
pop ebp
ret 8
Function at 0x4dc940
Capabilities:
Create service
Delete service
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
test ecx, ecx
mov byte [ebp - 8], 0
mov ebx, str.KProcessHacker3
mov byte [ebp - 1], 0
push edi
cmovne ebx, ecx
call fcn.004dc7a0
mov esi, eax
test esi, esi
jns 0x4dcaf6
cmp esi, 0xc000020a
je 0x4dcaf6
jmp 0x4dc980
cmp esi, 0xc000000e
je 0x4dc9b4
cmp esi, 0xc000000f
je 0x4dc9b4
cmp esi, 0xc0000034
je 0x4dc9b4
jmp 0x4dc9a0
cmp esi, 0xc000003a
je 0x4dc9b4
lfence
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push 1
push 0
push 0
lfence
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0xc], eax
test eax, eax
je 0x4dca19
push 0x10
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
test edi, edi
je 0x4dca06
push 0
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
mov ecx, dword ds:[ebp - 8]
test eax, eax
movzx ecx, cl
mov edx, 1
cmovne ecx, edx
push edi
mov dword [ebp - 8], ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp byte [ebp - 8], 0
jne 0x4dcad3
mov edi, dword ds:[ebp + 8]
push edi
call sym.ProcessHacker.exe_PhDoesFileExistsWin32
test al, al
je 0x4dcaf4
push 2
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword ds:[ebp - 0xc], eax
test eax, eax
je 0x4dcaf4
push 0x5621e4
push 0
push 0
push 0
push 0
push edi
push 0
push 3
push 1
push 0xf01ff
push ebx
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov edi, eax
test edi, edi
je 0x4dcaaf
mov ecx, edi
mov byte [ebp - 1], 1
call fcn.004dcd60
mov edx, dword ds:[ebp + 0xc]
test edx, edx
je 0x4dca91
mov ecx, ebx
call fcn.004dcb00
mov esi, eax
test esi, esi
js 0x4dcae6
push 0
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
lea esp, [esp]
test eax, eax
je 0x4dcaaf
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x4dcad3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x4dcac4
movzx esi, si
or esi, 0xc0070000
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp byte [ebp - 8], 0
je 0x4dcada
call fcn.004dc7a0
mov esi, eax
cmp byte ds:[ebp - 1], 0
je 0x4dcaf4
test edi, edi
je 0x4dcaf4
push edi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x4dcb00
Capabilities:
Delete registry key
Persist via windows service
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x298
mov eax, dword [0x5c7004]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
mov edi, edx
mov dword [ebp - 0x288], 0
test ecx, ecx
mov dword [ebp - 0x258], 1
mov edx, str.KProcessHacker3
mov dword [ebp - 0x248], 0x44
cmovne edx, ecx
mov dword [ebp - 0x244], str.SystemCurrentControlSetServices_
mov ecx, edx
mov dword [ebp - 0x240], 1
lea esi, [ecx + 2]
jmp 0x4dcb60
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4dcb60
sub ecx, esi
mov dword [ebp - 0x22c], edx
sar ecx, 1
mov dword [ebp - 0x228], 1
mov dword [ebp - 0x218], 0x16
mov dword [ebp - 0x214], str.Parameters
lea eax, [ecx + ecx]
mov dword [ebp - 0x230], eax
lea eax, [ebp - 0x294]
push eax
push 0x208
lea eax, [ebp - 0x210]
push eax
push 3
lea eax, [ebp - 0x258]
push eax
call sym.ProcessHacker.exe_PhFormatToBuffer
lea ecx, [ecx]
test al, al
jne 0x4dcbd9
mov eax, 0xc0000001
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00534c91
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x210]
mov dword [ebp - 0x28c], eax
mov eax, dword [ebp - 0x294]
add eax, 0xfffffffe
mov dword [ebp - 0x290], eax
lea eax, [ebp - 0x298]
push eax
push 0
push 0
lea eax, [ebp - 0x290]
push eax
push 0xfffffffffffffffd
push 0x30006
lea eax, [ebp - 0x288]
push eax
call sym.ProcessHacker.exe_PhCreateKey
test eax, eax
jns 0x4dcc30
lfence
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00534c91
mov esp, ebp
pop ebp
ret
push str.SecurityLevel
call sym.ProcessHacker.exe_PhCountStringZ
add eax, eax
mov dword [ebp - 0x28c], str.SecurityLevel
mov word [ebp - 0x290], ax
lea ecx, [eax + 2]
mov word [ebp - 0x28e], cx
cmp eax, 0xfffe
jbe 0x4dcc68
mov esi, 0xc0000106
jmp 0x4dcd18
push 4
push edi
push 4
push 0
lea eax, [ebp - 0x290]
push eax
push dword [ebp - 0x288]
call dword [sym.imp.ntdll.dll_NtSetValueKey]
mov esi, eax
test esi, esi
js 0x4dcd18
cmp byte [edi + 4], 0
je 0x4dcd2e
lea ecx, [ebp - 0x27c]
mov dword [ebp - 0x284], 3
mov dword [ebp - 0x280], 1
call fcn.00525d20
test eax, eax
js 0x4dcd2e
push str.DynamicConfiguration
call sym.ProcessHacker.exe_PhCountStringZ
add eax, eax
mov dword [ebp - 0x28c], str.DynamicConfiguration
mov word [ebp - 0x290], ax
lea ecx, [eax + 2]
mov word [ebp - 0x28e], cx
cmp eax, 0xfffe
jbe 0x4dccf2
mov esi, 0xc0000106
jmp 0x4dcd18
push 0x2c
lea eax, [ebp - 0x284]
push eax
push 3
push 0
lea eax, [ebp - 0x290]
push eax
push dword [ebp - 0x288]
call dword [sym.imp.ntdll.dll_NtSetValueKey]
mov esi, eax
test esi, esi
jns 0x4dcd2e
cmp dword ds:[ebp - 0x298], 1
jne 0x4dcd2e
push dword [ebp - 0x288]
call dword [sym.imp.ntdll.dll_NtDeleteKey]
push dword [ebp - 0x288]
call dword [sym.imp.ntdll.dll_NtClose]
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
xor ecx, ebp
pop esi
call fcn.00534c91
mov esp, ebp
pop ebp
ret
Function at 0x4dce80
Capabilities:
Create service
Delete service
Start service

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
push 2
xor esi, esi
mov edi, edx
push esi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebx, eax
test ebx, ebx
jne 0x4dcebd
lea ebx, [ebx]
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x4dcf96
movzx eax, ax
or eax, 0xc0070000
pop edi
pop esi
pop ebx
pop ebp
ret 4
push 0x5621e4
push 0
push 0
push 0
push 0
push edi
push 0
push 1
push 1
push 0xf01ff
push str.KProcessHacker3
push str.KProcessHacker3
push ebx
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov edi, eax
test edi, edi
je 0x4dcf76
mov ecx, edi
call fcn.004dcd60
mov edx, dword [ebp + 8]
test edx, edx
je 0x4dcf36
mov ecx, str.KProcessHacker3
call fcn.004dcb00
mov esi, eax
test esi, esi
jns 0x4dcf36
push edi
lfence
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, esi
pop edi
pop esi
pop ebx
pop ebp
ret 4
push 0
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x4dcf5f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x4dcf5f
movzx esi, si
or esi, 0xc0070000
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, esi
pop edi
pop esi
pop ebx
pop ebp
ret 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x4dcf8d
movzx esi, si
or esi, 0xc0070000
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, esi
pop edi
pop esi
pop ebx
pop ebp
ret 4

Function at 0x4dcfa0
Capabilities:
Delete service
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x5c7004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 1
xor esi, esi
mov edi, ecx
push esi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebx, eax
test ebx, ebx
jne 0x4dcff3
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x4dd068
pop edi
movzx eax, ax
pop esi
or eax, 0xc0070000
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00534c91
mov esp, ebp
pop ebp
ret
test edi, edi
mov eax, str.KProcessHacker3
push 0x10020
cmovne eax, edi
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
test edi, edi
je 0x4dd048
lea eax, [ebp - 0x20]
push eax
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ControlService]
push edi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x4dd03f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x4dd03f
movzx esi, si
or esi, 0xc0070000
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x4dd05d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x4dd05d
movzx esi, si
or esi, 0xc0070000
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00534c91
mov esp, ebp
pop ebp
ret