joyce8/EMBER2024-capa huggingface dataset:
Function at 0x518280
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 0x5182cb
mov edx, dword [ecx]
test edx, edx
je 0x5182cb
movzx eax, dx
mov word [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 0x5182db
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 [0x631034]
mov dword [esp + 0x18], 0x100
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov edi, eax
jmp 0x518300
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 0x518354
push edi
push 0
cmp esi, 0x80000005
jne 0x518364
push dword [0x631034]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
push dword [esp + 0xc]
push 4
push dword [0x631034]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov edi, eax
sub ebx, 1
jne 0x518300
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 [0x631034]
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 0x518380
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0xc]
sub esp, 0xc
test ecx, ecx
je 0x5183b4
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 0x5183c2
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 0x5183f0
Capabilities:
Delete registry value

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0xc]
sub esp, 8
test ecx, ecx
je 0x518424
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 0x518432
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 0x519b60
Capabilities:
Get file attributes
Read file on windows
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x84
mov eax, dword [0x62a040]
xor eax, esp
mov dword [esp + 0x80], eax
push ebx
push esi
push edi
push 0
push 0x64
push 1
push 7
push 0x80
push 0
push 0x100081
push ecx
lea eax, [esp + 0x34]
mov esi, edx
push eax
call sym.SystemInformer.exe_PhCreateFileWin32Ex
mov edi, edi
test eax, eax
jns 0x519bbe
lfence
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x80]
xor ecx, esp
call fcn.0057c26f
mov esp, ebp
pop ebp
ret 4
mov ebx, dword [esp + 0x14]
lea eax, [esp + 0x60]
push 4
push 0x28
push eax
lea eax, [esp + 0x24]
push eax
push ebx
call dword [sym.imp.ntdll.dll_NtQueryInformationFile]
mov edi, eax
test edi, edi
js 0x519d5d
push 5
push 0x18
lea eax, [esp + 0x50]
push eax
lea eax, [esp + 0x24]
push eax
push ebx
call dword [sym.imp.ntdll.dll_NtQueryInformationFile]
mov edi, eax
test edi, edi
js 0x519d5d
mov edx, dword [esp + 0x50]
lea eax, [esp + 0x28]
mov ecx, dword [esp + 0x54]
push 0
push 0x64
push 2
push 1
push 0x80
push eax
push 0x120116
push esi
lea eax, [esp + 0x30]
mov dword [esp + 0x48], edx
push eax
mov dword [esp + 0x50], ecx
call sym.SystemInformer.exe_PhCreateFileWin32Ex
mov edi, eax
test edi, edi
js 0x519d5d
push 4
push 0x1000
lea eax, [esp + 0x20]
mov dword [esp + 0x20], 0x2000
push eax
push 0
lea eax, [esp + 0x24]
mov dword [esp + 0x24], 0
push eax
push 0xffffffffffffffff
call dword [sym.imp.ntdll.dll_NtAllocateVirtualMemory]
test eax, eax
js 0x519d58
mov edi, dword ds:[esp + 0x14]
test edi, edi
je 0x519d58
push 0
push 0
push 0x2000
push edi
lea eax, [esp + 0x30]
push eax
push 0
push 0
push 0
push ebx
call dword [sym.imp.ntdll.dll_NtReadFile]
mov ecx, dword [esp + 0x10]
mov esi, eax
mov dword [esp + 0x10], ecx
test esi, esi
js 0x519d10
lfence
mov eax, dword [esp + 0x24]
test eax, eax
je 0x519d10
push 0
push 0
push eax
push edi
lea eax, [esp + 0x30]
push eax
push 0
push 0
push 0
push ecx
call dword [sym.imp.ntdll.dll_NtWriteFile]
mov esi, eax
test esi, esi
js 0x519d10
cmp dword [esp + 0x24], 0
je 0x519d10
push 0
push 0
push 0x2000
push edi
lea eax, [esp + 0x30]
push eax
push 0
push 0
push 0
push ebx
lfence
call dword [sym.imp.ntdll.dll_NtReadFile]
mov ecx, dword [esp + 0x10]
mov esi, eax
test esi, esi
jns 0x519cb7
push edi
call sym.SystemInformer.exe_PhFreePage
xor edi, edi
cmp esi, 0xc0000011
cmovne edi, esi
mov esi, dword [esp + 0x10]
test edi, edi
js 0x519d48
push 4
push 0x28
lea eax, [esp + 0x68]
push eax
lea eax, [esp + 0x24]
push eax
push esi
call dword [sym.imp.ntdll.dll_NtSetInformationFile]
push esi
call dword [sym.imp.ntdll.dll_NtClose]
jmp 0x519d5d
mov ecx, esi
call fcn.005130c0
push esi
call dword [sym.imp.ntdll.dll_NtClose]
jmp 0x519d5d
mov edi, 0xc0000017
push ebx
call dword [sym.imp.ntdll.dll_NtClose]
mov ecx, dword [esp + 0x8c]
mov eax, edi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0057c26f
mov esp, ebp
pop ebp
ret 4
Function at 0x51a2c0
Capabilities:
Get number of processors

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x64
mov eax, dword [0x62a040]
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.SystemInformer.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.0051d360
mov esi, eax
mov ecx, eax
call dword [0x5a08ec]
call esi
test eax, eax
js 0x51a396
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 0x51a3f2
mov ecx, dword [esp + 0x14]
mov dword [ebx], ecx
mov eax, dword [esp + 0x10]
test eax, eax
je 0x51a40f
push eax
mov eax, dword fs:[0x18]
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 0x51a425
lea ecx, [ecx]
call fcn.004f9e40
mov ecx, dword [esp + 0x6c]
mov eax, esi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0057c26f
mov esp, ebp
pop ebp
ret 8
Function at 0x51b1c0
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x62a040]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
lea eax, [ebp - 0x24]
mov dword [ebp - 0x20], ecx
push eax
push 0x18
lea eax, [ebp - 0x1c]
mov edi, edx
push eax
push 4
lea eax, [ebp - 0x20]
push eax
push 0xe6
call dword [sym.imp.ntdll.dll_NtQuerySystemInformationEx]
test eax, eax
js 0x51b229
mov edx, dword ds:[ebp - 0x24]
xor eax, eax
shr edx, 2
test edx, edx
je 0x51b224
jmp 0x51b210
mov ecx, dword [ebp + eax*4 - 0x1c]
movzx esi, cx
test ecx, 0x80000
jne 0x51b239
inc eax
cmp eax, edx
jb 0x51b210
mov eax, 0xc0000225
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057c26f
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
mov word [edi], si
xor ecx, ebp
pop edi
pop esi
call fcn.0057c26f
mov esp, ebp
pop ebp
ret

Function at 0x51b250
Capabilities:
Get uefi variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x62a040]
xor eax, ebp
mov dword [ebp - 4], eax
xor eax, eax
mov dword [ebp - 0x20], 0x40002
push eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
lea eax, [ebp - 0x18]
push eax
push 0
lea eax, [ebp - 0x14]
mov dword [ebp - 0x1c], 0x5cd47c
push eax
lea eax, [ebp - 0x20]
mov dword [ebp - 0x18], 0
push eax
call dword [sym.imp.ntdll.dll_NtQuerySystemEnvironmentValueEx]
mov ecx, dword [ebp - 4]
cmp eax, 0xc0000100
sete al
xor ecx, ebp
call fcn.0057c26f
mov esp, ebp
pop ebp
ret
Function at 0x51b2c0
Capabilities:
Get uefi variable

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x34
mov eax, dword [0x62a040]
xor eax, esp
mov dword [esp + 0x30], eax
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x1c], eax
push ebx
movzx eax, word [ecx]
mov ebx, dword [ebp + 0x14]
mov word [esp + 0x18], ax
add eax, 2
mov word [esp + 0x1a], ax
mov eax, dword [ecx + 4]
mov ecx, dword [ebp + 0xc]
mov dword [esp + 0x1c], eax
push esi
push edi
movzx eax, word [ecx]
mov edi, dword [ebp + 0x18]
mov word [esp + 0x18], ax
add eax, 2
cmp dword [ecx], 0xfffe
mov word [esp + 0x1a], ax
mov eax, dword [ecx + 4]
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x1c], eax
jbe 0x51b34c
mov eax, 0x80000005
lfence
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.0057c26f
mov esp, ebp
pop ebp
ret 0x14
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.ntdll.dll_RtlGUIDFromString]
lea esp, [esp]
test eax, eax
jns 0x51b37b
lfence
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.0057c26f
mov esp, ebp
pop ebp
ret 0x14
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x14]
push eax
push 0
lea eax, [esp + 0x38]
push eax
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.ntdll.dll_NtQuerySystemEnvironmentValueEx]
cmp eax, 0xc0000023
je 0x51b3b7
mov eax, 0xc0000001
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.0057c26f
mov esp, ebp
pop ebp
ret 0x14
push dword [esp + 0x10]
push 4
push dword [0x631034]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
push dword [esp + 0x10]
mov esi, eax
push 0
push esi
call fcn.0057e450
add esp, 0xc
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x14]
push eax
push esi
lea eax, [esp + 0x38]
push eax
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.ntdll.dll_NtQuerySystemEnvironmentValueEx]
mov dword [esp + 0x18], eax
test eax, eax
js 0x51b431
mov eax, dword [esp + 0x28]
test eax, eax
je 0x51b409
mov dword [eax], esi
jmp 0x51b41b
push esi
push 0
lfence
push dword [0x631034]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
test ebx, ebx
je 0x51b425
mov eax, dword [esp + 0x10]
mov dword [ebx], eax
test edi, edi
je 0x51b446
mov eax, dword [esp + 0x14]
mov dword [edi], eax
jmp 0x51b446
push esi
push 0
lfence
push dword [0x631034]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0057c26f
mov esp, ebp
pop ebp
ret 0x14
Function at 0x51b960
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov dword [ebp - 0x10], edx
mov dword [ebp - 0xc], ecx
cmp ecx, 4
jg 0x51b9a6
je 0x51b998
test ecx, ecx
je 0x51b98a
cmp ecx, 3
jne 0x51b9ae
mov eax, dword [0x62dd4c]
mov dword [ebp - 8], 0x62dd4c
jmp 0x51b9c5
mov eax, dword [0x62dd48]
mov dword [ebp - 8], 0x62dd48
jmp 0x51b9c5
mov eax, dword [0x62dd50]
mov dword [ebp - 8], 0x62dd50
jmp 0x51b9c5
cmp ecx, 0xffff
je 0x51b9b9
mov eax, 0xc0000003
mov esp, ebp
pop ebp
ret 4
mov eax, dword [0x62dd54]
mov dword [ebp - 8], 0x62dd54
push ebx
push esi
push edi
push eax
push 4
push dword [0x631034]
mov dword [ebp - 4], eax
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov ebx, eax
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
lea eax, [ebp - 0xc]
push ebx
push 4
push eax
push 0x6b
call dword [sym.imp.ntdll.dll_NtQuerySystemInformationEx]
mov edi, eax
xor esi, esi
cmp edi, 0xc0000004
jne 0x51ba49
mov edi, edi
cmp esi, 8
jae 0x51ba4d
push ebx
push 0
push dword [0x631034]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
push dword ds:[ebp - 4]
push 4
push dword [0x631034]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov ebx, eax
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
lea eax, [ebp - 0xc]
push ebx
push 4
push eax
push 0x6b
call dword [sym.imp.ntdll.dll_NtQuerySystemInformationEx]
mov edi, eax
inc esi
cmp edi, 0xc0000004
je 0x51ba00
test edi, edi
jns 0x51ba6a
push ebx
push 0
lfence
push dword [0x631034]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
lfence
mov ecx, dword [ebp - 4]
cmp ecx, 0x100000
ja 0x51ba7d
mov eax, dword [ebp - 8]
mov dword [eax], ecx
mov eax, dword [ebp - 0x10]
mov dword [eax], ebx
mov eax, dword [ebp + 8]
mov dword [eax], ecx
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x51f000
Capabilities:
Enumerate services

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x62abb0]
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x14], ecx
push ebx
push esi
push edi
cmp eax, 0x66
jb 0x51f022
mov edi, 0x3ff
jmp 0x51f033
cmp eax, 0x64
sbb edi, edi
and edi, 0xfffffe3c
add edi, 0x1ff
xor ecx, ecx
mov ebx, 0x632e34
xor eax, eax
lock cmpxchg dword [ebx], ecx
mov esi, eax
mov dword [ebp - 8], esi
test esi, esi
jne 0x51f078
push 5
push eax
push eax
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edx, eax
test edx, edx
je 0x51f078
mov ecx, edx
xor eax, eax
lock cmpxchg dword [ebx], ecx
mov esi, eax
mov dword [ebp - 8], esi
test esi, esi
jne 0x51f071
mov esi, edx
mov dword [ebp - 8], esi
jmp 0x51f078
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ebx, dword [0x62d978]
push ebx
push 4
push dword [0x631034]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
push 0
push 0
lea ecx, [ebp - 0x10]
mov dword [ebp - 4], eax
push ecx
lea ecx, [ebp - 0xc]
push ecx
push ebx
push eax
push 3
push edi
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_EnumServicesStatusExW]
test eax, eax
jne 0x51f142
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call sym.SystemInformer.exe_PhDosErrorToNtStatus
mov esi, eax
cmp esi, 0x105
jne 0x51f11d
mov eax, dword [ebp - 4]
push eax
push 0
push dword [0x631034]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
add ebx, dword [ebp - 0xc]
push ebx
push 4
push dword [0x631034]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
push 0
push 0
lea ecx, [ebp - 0x10]
mov dword [ebp - 4], eax
push ecx
lea ecx, [ebp - 0xc]
push ecx
push ebx
push eax
push 3
push edi
push 0
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_EnumServicesStatusExW]
test eax, eax
jne 0x51f142
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call sym.SystemInformer.exe_PhDosErrorToNtStatus
mov esi, eax
lea ecx, [ecx]
test esi, esi
jns 0x51f144
mov eax, dword [ebp - 4]
push eax
push 0
lfence
push dword [0x631034]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor esi, esi
lfence
cmp ebx, 0x20000
ja 0x51f155
mov dword [0x62d978], ebx
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 4]
pop edi
mov dword [ecx], eax
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x10]
mov dword [ecx], eax
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x51f400
Capabilities:
Create service

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
push 2
push 0
push 0
mov ebx, edx
mov edi, ecx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, eax
test esi, esi
jne 0x51f433
lea ecx, [ecx]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call sym.SystemInformer.exe_PhDosErrorToNtStatus
test eax, eax
js 0x51f48a
mov esi, dword [ebp - 4]
push dword [ebp + 0x24]
push dword [ebp + 0x20]
push 0
push 0
push 0
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
push esi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
test eax, eax
je 0x51f473
mov dword [edi], eax
xor edi, edi
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x20
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call sym.SystemInformer.exe_PhDosErrorToNtStatus
push esi
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x20

Function at 0x51f600
Capabilities:
Query service status

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 0xc]
xor ecx, ecx
mov dword [ebp - 4], 0
mov dword [eax], ecx
mov dword [eax + 4], ecx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], ecx
mov dword [eax + 0x14], ecx
mov dword [eax + 0x18], ecx
mov dword [eax + 0x1c], ecx
mov dword [eax + 0x20], ecx
lea ecx, [ebp - 4]
push ecx
push 0x24
push eax
push 0
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
lea esp, [esp]
test eax, eax
je 0x51f64c
xor eax, eax
mov esp, ebp
pop ebp
ret 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call sym.SystemInformer.exe_PhDosErrorToNtStatus
mov esp, ebp
pop ebp
ret 8

Function at 0x51f740
Capabilities:
Continue service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x62a040]
xor eax, ebp
mov dword [ebp - 4], eax
lea eax, [ebp - 0x20]
push eax
push 3
push ecx
call dword [sym.imp.ADVAPI32.dll_ControlService]
lea ecx, [ecx]
test eax, eax
je 0x51f774
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057c26f
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call sym.SystemInformer.exe_PhDosErrorToNtStatus
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057c26f
mov esp, ebp
pop ebp
ret

Function at 0x51f7a0
Capabilities:
Pause service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x62a040]
xor eax, ebp
mov dword [ebp - 4], eax
lea eax, [ebp - 0x20]
push eax
push 2
push ecx
call dword [sym.imp.ADVAPI32.dll_ControlService]
lea ecx, [ecx]
test eax, eax
je 0x51f7d4
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057c26f
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call sym.SystemInformer.exe_PhDosErrorToNtStatus
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057c26f
mov esp, ebp
pop ebp
ret
Function at 0x51f860
Capabilities:
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x62a040]
xor eax, ebp
mov dword [ebp - 4], eax
lea eax, [ebp - 0x20]
push eax
push 1
push ecx
call dword [sym.imp.ADVAPI32.dll_ControlService]
lea ecx, [ecx]
test eax, eax
je 0x51f894
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057c26f
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call sym.SystemInformer.exe_PhDosErrorToNtStatus
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057c26f
mov esp, ebp
pop ebp
ret

Function at 0x521ec0
Capabilities:
Access peb ldr_data
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x24
mov eax, dword fs:[0x18]
mov dword [esp + 8], ecx
push ebx
push esi
mov eax, dword [eax + 0x30]
mov ebx, edx
push edi
mov ecx, dword [eax + 0xc]
add ecx, 0xc
mov dword [esp + 0x10], ecx
mov esi, dword [ecx]
cmp esi, ecx
je 0x521f7e
nop
cmp dword [esp + 0x14], 0
movzx edi, word [esi + 0x2c]
movzx edx, word [esi + 0x24]
mov eax, dword [esi + 0x28]
mov dword [esp + 0x1c], edi
mov edi, dword [esi + 0x30]
mov dword [esp + 0x18], edi
mov edi, dword [ebp + 8]
je 0x521f1d
mov ecx, dword [esp + 0x14]
cmp dword [esi + 0x18], ecx
mov ecx, dword [esp + 0x10]
jne 0x521f74
lea ecx, [ecx]
test ebx, ebx
je 0x521f47
mov dword [esp + 0x24], eax
mov eax, dword [ebx]
mov dword [esp + 0x20], eax
cmp edx, eax
jb 0x521f74
push 1
push ebx
lea eax, [esp + 0x28]
push eax
call sym.SystemInformer.exe_PhEqualStringRef
mov ecx, dword [esp + 0x10]
test al, al
je 0x521f74
test edi, edi
je 0x521f89
mov eax, dword [esp + 0x18]
mov dword [esp + 0x2c], eax
mov eax, dword [edi]
mov dword [esp + 0x28], eax
cmp dword [esp + 0x1c], eax
jb 0x521f74
push 1
push edi
lea eax, [esp + 0x30]
push eax
call sym.SystemInformer.exe_PhEqualStringRef
test al, al
jne 0x521f89
mov ecx, dword [esp + 0x10]
mov esi, dword [esi]
cmp esi, ecx
jne 0x521ef0
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x522020
Capabilities:
Map section object

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
cmp byte [ebp + 0xc], 0
push esi
je 0x52204b
push 0x60
push 1
push 5
push 0x80
push 0x100081
push dword [ebp + 8]
lea eax, [ebp - 4]
push eax
call sym.SystemInformer.exe_PhCreateFile
jmp 0x52206e
mov eax, dword [ebp + 8]
push 0
push 0x60
push 1
push 5
push 0x80
push 0
push 0x100081
push dword [eax + 4]
lea eax, [ebp - 4]
push eax
call sym.SystemInformer.exe_PhCreateFileWin32Ex
test eax, eax
jns 0x52207c
lfence
pop esi
mov esp, ebp
pop ebp
ret 0xc
cmp dword [0x62abb0], 0x3e
push dword ds:[ebp - 4]
sbb eax, eax
and eax, 0xf0000000
add eax, 0x11000000
push eax
push 2
push 0
push 0
push 5
lea eax, [ebp - 8]
push eax
call dword [sym.imp.ntdll.dll_NtCreateSection]
mov esi, eax
test esi, esi
js 0x522113
cmp dword [0x62abb0], 0x67
push 2
sbb eax, eax
mov dword [ebp - 0xc], 0
and eax, 0xfffc0000
mov dword [ebp - 0x10], 0
add eax, 0x40000
push eax
push 2
lea eax, [ebp - 0x10]
push eax
push 0
push 0
push 0
lea eax, [ebp - 0xc]
push eax
push 0xffffffffffffffff
push dword [ebp - 8]
call dword [sym.imp.ntdll.dll_NtMapViewOfSection]
push dword [ebp - 8]
xor esi, esi
cmp eax, 0x40000003
cmovne esi, eax
call dword [sym.imp.ntdll.dll_NtClose]
mov edi, edi
test esi, esi
js 0x522113
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x522113
mov ecx, dword [ebp - 0xc]
or ecx, 2
mov dword [eax], ecx
push dword [ebp - 4]
call dword [sym.imp.ntdll.dll_NtClose]
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret 0xc

Function at 0x5221e0
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 0x522236
mov eax, dword [ecx + 0x3c]
test eax, eax
je 0x522236
lea ebx, [ebx]
cmp eax, 0x7fffffff
jae 0x522236
cmp dword [eax + ecx], 0x4550
jne 0x522236
lea edx, [ecx + 0x78]
add edx, eax
mov eax, dword [edx]
test eax, eax
je 0x522236
cmp dword ds:[edx + 4], 0
je 0x522236
push dword [ebp + 0x10]
add eax, ecx
push dword [ebp + 0xc]
push eax
call fcn.00522ae0
mov esp, ebp
pop ebp
ret 0xc
xor eax, eax
mov esp, ebp
pop ebp
ret 0xc