joyce8/EMBER2024-capa huggingface dataset:
Function at 0x51a000
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 0x51a04b
mov edx, dword [ecx]
test edx, edx
je 0x51a04b
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 0x51a05b
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 [0x633f94]
mov dword [esp + 0x18], 0x100
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov edi, eax
jmp 0x51a080
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 0x51a0d4
push edi
push 0
cmp esi, 0x80000005
jne 0x51a0e4
push dword [0x633f94]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
push dword [esp + 0xc]
push 4
push dword [0x633f94]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov edi, eax
sub ebx, 1
jne 0x51a080
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 [0x633f94]
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 0x51a100
Capabilities:
Set registry value

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

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0xc]
sub esp, 8
test ecx, ecx
je 0x51a1a4
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 0x51a1b2
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 0x51b9a0
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 [0x62d040]
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 0x51b9fe
lfence
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x80]
xor ecx, esp
call fcn.0057e94f
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 0x51bb9d
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 0x51bb9d
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 0x51bb9d
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 0x51bb98
mov edi, dword ds:[esp + 0x14]
test edi, edi
je 0x51bb98
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 0x51bb50
lfence
mov eax, dword [esp + 0x24]
test eax, eax
je 0x51bb50
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 0x51bb50
cmp dword [esp + 0x24], 0
je 0x51bb50
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 0x51baf7
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 0x51bb88
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 0x51bb9d
mov ecx, esi
call fcn.00514a00
push esi
call dword [sym.imp.ntdll.dll_NtClose]
jmp 0x51bb9d
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.0057e94f
mov esp, ebp
pop ebp
ret 4
Function at 0x51c100
Capabilities:
Get number of processors

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x64
mov eax, dword [0x62d040]
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.0051f880
mov esi, eax
mov ecx, eax
call dword [0x5a28f0]
call esi
test eax, eax
js 0x51c1d6
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 0x51c232
mov ecx, dword [esp + 0x14]
mov dword [ebx], ecx
mov eax, dword [esp + 0x10]
test eax, eax
je 0x51c24f
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 0x51c265
lea ecx, [ecx]
call fcn.004fbd80
mov ecx, dword [esp + 0x6c]
mov eax, esi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0057e94f
mov esp, ebp
pop ebp
ret 8
Function at 0x51d000
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x62d040]
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 0x51d069
mov edx, dword ds:[ebp - 0x24]
xor eax, eax
shr edx, 2
test edx, edx
je 0x51d064
jmp 0x51d050
mov ecx, dword [ebp + eax*4 - 0x1c]
movzx esi, cx
test ecx, 0x80000
jne 0x51d079
inc eax
cmp eax, edx
jb 0x51d050
mov eax, 0xc0000225
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057e94f
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.0057e94f
mov esp, ebp
pop ebp
ret

Function at 0x51d090
Capabilities:
Get uefi variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x62d040]
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], 0x5cc714
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.0057e94f
mov esp, ebp
pop ebp
ret
Function at 0x51d100
Capabilities:
Get uefi variable

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x34
mov eax, dword [0x62d040]
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 0x51d18c
mov eax, 0x80000005
lfence
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.0057e94f
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 0x51d1bb
lfence
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.0057e94f
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 0x51d1f7
mov eax, 0xc0000001
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.0057e94f
mov esp, ebp
pop ebp
ret 0x14
push dword [esp + 0x10]
push 4
push dword [0x633f94]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
push dword [esp + 0x10]
mov esi, eax
push 0
push esi
call fcn.00580b30
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 0x51d271
mov eax, dword [esp + 0x28]
test eax, eax
je 0x51d249
mov dword [eax], esi
jmp 0x51d25b
push esi
push 0
lfence
push dword [0x633f94]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
test ebx, ebx
je 0x51d265
mov eax, dword [esp + 0x10]
mov dword [ebx], eax
test edi, edi
je 0x51d286
mov eax, dword [esp + 0x14]
mov dword [edi], eax
jmp 0x51d286
push esi
push 0
lfence
push dword [0x633f94]
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.0057e94f
mov esp, ebp
pop ebp
ret 0x14
Function at 0x51d800
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 0x51d846
je 0x51d838
test ecx, ecx
je 0x51d82a
cmp ecx, 3
jne 0x51d84e
mov eax, dword [0x630de4]
mov dword [ebp - 8], 0x630de4
jmp 0x51d865
mov eax, dword [0x630de0]
mov dword [ebp - 8], 0x630de0
jmp 0x51d865
mov eax, dword [0x630de8]
mov dword [ebp - 8], 0x630de8
jmp 0x51d865
cmp ecx, 0xffff
je 0x51d859
mov eax, 0xc0000003
mov esp, ebp
pop ebp
ret 4
mov eax, dword [0x630dec]
mov dword [ebp - 8], 0x630dec
push ebx
push esi
push edi
push eax
push 4
push dword [0x633f94]
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 0x51d8e9
mov edi, edi
cmp esi, 8
jae 0x51d8ed
push ebx
push 0
push dword [0x633f94]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
push dword ds:[ebp - 4]
push 4
push dword [0x633f94]
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 0x51d8a0
test edi, edi
jns 0x51d90a
push ebx
push 0
lfence
push dword [0x633f94]
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 0x51d91d
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 0x51dcc0
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 0x630e24
push ebx
mov dword [ebp - 0xc], 0
mov dword [ebp - 4], edi
call sym.SystemInformer.exe_PhGetProcedureAddressRemote
mov edi, edi
test eax, eax
js 0x51de08
push edi
lea eax, [ebp - 0x10]
push eax
push edi
push str.RtlFlushHeaps
push 0x630e24
push ebx
lfence
call sym.SystemInformer.exe_PhGetProcedureAddressRemote
test eax, eax
js 0x51de08
cmp dword [0x62dbb0], 0x3e
jb 0x51dd52
lea edx, ds:[ebp - 4]
mov ecx, ebx
lfence
call fcn.0051d440
mov edi, dword [ebp - 4]
mov esi, eax
test esi, esi
js 0x51ddd2
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.004fc500
mov ebx, dword [ebp - 0xc]
mov esi, eax
test esi, esi
js 0x51ddc7
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 0x51ddc7
push 0
push ebx
call dword [sym.imp.ntdll.dll_NtResumeThread]
mov esi, eax
test esi, esi
js 0x51ddc7
push dword [ebp - 0x14]
push 0
push ebx
call dword [sym.imp.ntdll.dll_NtWaitForSingleObject]
mov esi, eax
test esi, esi
js 0x51ddc7
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 0x51ddd2
push ebx
call dword [sym.imp.ntdll.dll_NtClose]
test edi, edi
je 0x51de06
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 0x521520
Capabilities:
Enumerate services

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x62dbb0]
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x14], ecx
push ebx
push esi
push edi
cmp eax, 0x66
jb 0x521542
mov edi, 0x3ff
jmp 0x521553
cmp eax, 0x64
sbb edi, edi
and edi, 0xfffffe3c
add edi, 0x1ff
xor ecx, ecx
mov ebx, 0x635f34
xor eax, eax
lock cmpxchg dword [ebx], ecx
mov esi, eax
mov dword [ebp - 8], esi
test esi, esi
jne 0x521598
push 5
push eax
push eax
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edx, eax
test edx, edx
je 0x521598
mov ecx, edx
xor eax, eax
lock cmpxchg dword [ebx], ecx
mov esi, eax
mov dword [ebp - 8], esi
test esi, esi
jne 0x521591
mov esi, edx
mov dword [ebp - 8], esi
jmp 0x521598
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ebx, dword [0x62f298]
push ebx
push 4
push dword [0x633f94]
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 0x521690
cmp dword [0x62dbb0], 0xffffffff
jae 0x5215e6
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
jmp 0x5215ec
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call sym.SystemInformer.exe_PhDosErrorToNtStatus
mov esi, eax
cmp esi, 0x105
jne 0x52166e
mov eax, dword [ebp - 4]
push eax
push 0
push dword [0x633f94]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
add ebx, dword ds:[ebp - 0xc]
push ebx
push 4
push dword [0x633f94]
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 0x521690
cmp dword [0x62dbb0], 0xffffffff
jae 0x52165e
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
jmp 0x521666
mov edi, edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call sym.SystemInformer.exe_PhDosErrorToNtStatus
mov esi, eax
test esi, esi
jns 0x521692
mov eax, dword [ebp - 4]
push eax
push 0
lfence
push dword [0x633f94]
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 0x5216a3
mov dword [0x62f298], 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 0x521980
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 0x5219c7
cmp dword [0x62dbb0], 0xffffffff
jae 0x5219b1
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
jmp 0x5219b7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call sym.SystemInformer.exe_PhDosErrorToNtStatus
lea ecx, [ecx]
test eax, eax
js 0x521a37
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 0x521a07
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 [0x62dbb0], 0xffffffff
jae 0x521a1b
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
jmp 0x521a26
jmp 0x521a20
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 0x521c60
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 0x521cac
xor eax, eax
mov esp, ebp
pop ebp
ret 8
cmp dword [0x62dbb0], 0xffffffff
jae 0x521ccb
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 0x521e00
Capabilities:
Continue service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x62d040]
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 0x521e34
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057e94f
mov esp, ebp
pop ebp
ret
cmp dword [0x62dbb0], 0xffffffff
jae 0x521e5a
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.0057e94f
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.0057e94f
mov esp, ebp
pop ebp
ret