joyce8/EMBER2024-capa huggingface dataset:
Function at 0x51b480
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 0x51b4cb
mov edx, dword [ecx]
test edx, edx
je 0x51b4cb
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 0x51b4db
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 [0x636044]
mov dword [esp + 0x18], 0x100
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov edi, eax
jmp 0x51b500
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 0x51b554
push edi
push 0
cmp esi, 0x80000005
jne 0x51b564
push dword [0x636044]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
push dword [esp + 0xc]
push 4
push dword [0x636044]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov edi, eax
sub ebx, 1
jne 0x51b500
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 [0x636044]
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 0x51b580
Capabilities:
Set registry value

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

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0xc]
sub esp, 8
test ecx, ecx
je 0x51b624
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 0x51b632
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 0x51ce20
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 [0x62f040]
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 0x51ce7e
lfence
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x80]
xor ecx, esp
call fcn.0058078f
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 0x51d01d
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 0x51d01d
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 0x51d01d
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 0x51d018
mov edi, dword ds:[esp + 0x14]
test edi, edi
je 0x51d018
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 0x51cfd0
lfence
mov eax, dword [esp + 0x24]
test eax, eax
je 0x51cfd0
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 0x51cfd0
cmp dword [esp + 0x24], 0
je 0x51cfd0
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 0x51cf77
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 0x51d008
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 0x51d01d
mov ecx, esi
call fcn.00515e60
push esi
call dword [sym.imp.ntdll.dll_NtClose]
jmp 0x51d01d
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.0058078f
mov esp, ebp
pop ebp
ret 4
Function at 0x51d580
Capabilities:
Get number of processors

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x64
mov eax, dword [0x62f040]
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.00520d80
mov esi, eax
mov ecx, eax
call dword [0x5a48f4]
call esi
test eax, eax
js 0x51d656
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 0x51d6b2
mov ecx, dword [esp + 0x14]
mov dword [ebx], ecx
mov eax, dword [esp + 0x10]
test eax, eax
je 0x51d6cf
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 0x51d6e5
lea ecx, [ecx]
call fcn.004fc420
mov ecx, dword [esp + 0x6c]
mov eax, esi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0058078f
mov esp, ebp
pop ebp
ret 8
Function at 0x51e480
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x62f040]
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 0x51e4e9
mov edx, dword ds:[ebp - 0x24]
xor eax, eax
shr edx, 2
test edx, edx
je 0x51e4e4
jmp 0x51e4d0
mov ecx, dword [ebp + eax*4 - 0x1c]
movzx esi, cx
test ecx, 0x80000
jne 0x51e4f9
inc eax
cmp eax, edx
jb 0x51e4d0
mov eax, 0xc0000225
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058078f
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.0058078f
mov esp, ebp
pop ebp
ret

Function at 0x51e510
Capabilities:
Get uefi variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x62f040]
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], 0x5ce84c
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.0058078f
mov esp, ebp
pop ebp
ret
Function at 0x51e580
Capabilities:
Get uefi variable

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x34
mov eax, dword [0x62f040]
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 0x51e60c
mov eax, 0x80000005
lfence
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.0058078f
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 0x51e63b
lfence
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.0058078f
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 0x51e677
mov eax, 0xc0000001
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.0058078f
mov esp, ebp
pop ebp
ret 0x14
push dword [esp + 0x10]
push 4
push dword [0x636044]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
push dword [esp + 0x10]
mov esi, eax
push 0
push esi
call fcn.005826f0
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 0x51e6f1
mov eax, dword [esp + 0x28]
test eax, eax
je 0x51e6c9
mov dword [eax], esi
jmp 0x51e6db
push esi
push 0
lfence
push dword [0x636044]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
test ebx, ebx
je 0x51e6e5
mov eax, dword [esp + 0x10]
mov dword [ebx], eax
test edi, edi
je 0x51e706
mov eax, dword [esp + 0x14]
mov dword [edi], eax
jmp 0x51e706
push esi
push 0
lfence
push dword [0x636044]
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.0058078f
mov esp, ebp
pop ebp
ret 0x14
Function at 0x51ec80
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 0x51ecc6
je 0x51ecb8
test ecx, ecx
je 0x51ecaa
cmp ecx, 3
jne 0x51ecce
mov eax, dword [0x632d94]
mov dword [ebp - 8], 0x632d94
jmp 0x51ece5
mov eax, dword [0x632d90]
mov dword [ebp - 8], 0x632d90
jmp 0x51ece5
mov eax, dword [0x632d98]
mov dword [ebp - 8], 0x632d98
jmp 0x51ece5
cmp ecx, 0xffff
je 0x51ecd9
mov eax, 0xc0000003
mov esp, ebp
pop ebp
ret 4
mov eax, dword [0x632d9c]
mov dword [ebp - 8], 0x632d9c
push ebx
push esi
push edi
push eax
push 4
push dword [0x636044]
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 0x51ed69
mov edi, edi
cmp esi, 8
jae 0x51ed6d
push ebx
push 0
push dword [0x636044]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
push dword ds:[ebp - 4]
push 4
push dword [0x636044]
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 0x51ed20
test edi, edi
jns 0x51ed8a
push ebx
push 0
lfence
push dword [0x636044]
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 0x51ed9d
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 0x51f1a0
Capabilities:
Resume thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
push ebx
push esi
push edi
xor edi, edi
mov dword [ebp - 0x14], edx
push edi
lea eax, [ebp - 8]
mov dword [ebp - 8], 0
push eax
push edi
push str.RtlExitUserThread
mov ebx, ecx
mov dword [ebp - 0x10], 0
push 0x632dd4
push ebx
mov dword [ebp - 0xc], 0
mov dword [ebp - 4], edi
call sym.SystemInformer.exe_PhGetProcedureAddressRemote
mov edi, edi
test eax, eax
js 0x51f2e8
push edi
lea eax, [ebp - 0x10]
push eax
push edi
push str.RtlFlushHeaps
push 0x632dd4
push ebx
lfence
call sym.SystemInformer.exe_PhGetProcedureAddressRemote
test eax, eax
js 0x51f2e8
cmp dword [0x62fbb0], 0x3e
jb 0x51f232
lea edx, ds:[ebp - 4]
mov ecx, ebx
lfence
call fcn.0051e8c0
mov edi, dword [ebp - 4]
mov esi, eax
test esi, esi
js 0x51f2b2
push 0
lea eax, [ebp - 0xc]
push eax
push 0
lfence
push dword [ebp - 8]
push 0
push 0
push ecx
push 1
mov ecx, ebx
call fcn.004fcba0
mov ebx, dword [ebp - 0xc]
mov esi, eax
test esi, esi
js 0x51f2a7
push 0
push 0
push 0
push dword [ebp - 0x10]
push ebx
call dword [sym.imp.ntdll.dll_NtQueueApcThread]
mov esi, eax
test esi, esi
js 0x51f2a7
push 0
push ebx
call dword [sym.imp.ntdll.dll_NtResumeThread]
mov esi, eax
test esi, esi
js 0x51f2a7
push dword [ebp - 0x14]
push 0
push ebx
call dword [sym.imp.ntdll.dll_NtWaitForSingleObject]
mov esi, eax
test esi, esi
js 0x51f2a7
push 0
push 0x1c
lea eax, [ebp - 0x40]
push eax
push 0
push ebx
call dword [sym.imp.ntdll.dll_NtQueryInformationThread]
mov esi, eax
test esi, esi
cmovns esi, dword [ebp - 0x40]
test ebx, ebx
je 0x51f2b2
push ebx
call dword [sym.imp.ntdll.dll_NtClose]
test edi, edi
je 0x51f2e6
xor eax, eax
mov dword [ebp - 0x24], edi
push eax
push eax
mov dword [ebp - 0x1c], eax
mov byte [ebp - 0x1c], al
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x24]
push 0x10
push eax
push 0x2c
mov dword [ebp - 0x20], 3
call dword [sym.imp.ntdll.dll_NtPowerInformation]
push edi
call dword [sym.imp.ntdll.dll_NtClose]
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x522a20
Capabilities:
Enumerate services

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x62fbb0]
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x14], ecx
push ebx
push esi
push edi
cmp eax, 0x66
jb 0x522a42
mov edi, 0x3ff
jmp 0x522a53
cmp eax, 0x64
sbb edi, edi
and edi, 0xfffffe3c
add edi, 0x1ff
xor ecx, ecx
mov ebx, 0x637e6c
xor eax, eax
lock cmpxchg dword [ebx], ecx
mov esi, eax
mov dword [ebp - 8], esi
test esi, esi
jne 0x522a98
push 5
push eax
push eax
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edx, eax
test edx, edx
je 0x522a98
mov ecx, edx
xor eax, eax
lock cmpxchg dword [ebx], ecx
mov esi, eax
mov dword [ebp - 8], esi
test esi, esi
jne 0x522a91
mov esi, edx
mov dword [ebp - 8], esi
jmp 0x522a98
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ebx, dword [0x631288]
push ebx
push 4
push dword [0x636044]
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 0x522b90
cmp dword [0x62fbb0], 0xffffffff
jae 0x522ae6
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
jmp 0x522aec
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call sym.SystemInformer.exe_PhDosErrorToNtStatus
mov esi, eax
cmp esi, 0x105
jne 0x522b6e
mov eax, dword [ebp - 4]
push eax
push 0
push dword [0x636044]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
add ebx, dword ds:[ebp - 0xc]
push ebx
push 4
push dword [0x636044]
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 0x522b90
cmp dword [0x62fbb0], 0xffffffff
jae 0x522b5e
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
jmp 0x522b66
mov edi, edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call sym.SystemInformer.exe_PhDosErrorToNtStatus
mov esi, eax
test esi, esi
jns 0x522b92
mov eax, dword [ebp - 4]
push eax
push 0
lfence
push dword [0x636044]
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 0x522ba3
mov dword [0x631288], 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 0x522e80
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 0x522ec7
cmp dword [0x62fbb0], 0xffffffff
jae 0x522eb1
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
jmp 0x522eb7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call sym.SystemInformer.exe_PhDosErrorToNtStatus
lea ecx, [ecx]
test eax, eax
js 0x522f37
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 0x522f07
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
cmp dword [0x62fbb0], 0xffffffff
jae 0x522f1b
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
jmp 0x522f26
jmp 0x522f20
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 0x523160
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 0x5231ac
xor eax, eax
mov esp, ebp
pop ebp
ret 8
cmp dword [0x62fbb0], 0xffffffff
jae 0x5231cb
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
push eax
call sym.SystemInformer.exe_PhDosErrorToNtStatus
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 0x523300
Capabilities:
Continue service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x62f040]
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 0x523334
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058078f
mov esp, ebp
pop ebp
ret
cmp dword [0x62fbb0], 0xffffffff
jae 0x52335a
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
push eax
call sym.SystemInformer.exe_PhDosErrorToNtStatus
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058078f
mov esp, ebp
pop ebp
ret
lea ebx, [ebx]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call sym.SystemInformer.exe_PhDosErrorToNtStatus
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058078f
mov esp, ebp
pop ebp
ret