Function at 0x1000363f
Capabilities:
Enumerate services

Disassembly:
sub esp, 0x30
push ebx
push edi
push 5
push str.ServicesActive
xor ebx, ebx
mov dword [esp + 0x18], edx
push ebx
mov dword [esp + 0x2c], ecx
mov edi, 0x424
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x10003674
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x10003861
push ebp
push esi
push ebx
push ebx
lea ecx, [esp + 0x18]
mov dword [esp + 0x1c], ebx
push ecx
lea ecx, [esp + 0x20]
mov dword [esp + 0x1c], ebx
push ecx
push ebx
push ebx
push 3
push 0x30
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_EnumServicesStatusExW]
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
call ebp
test esi, esi
jne 0x10003851
cmp eax, 0xea
jne 0x10003851
push dword [esp + 0x14]
mov eax, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov dword [esp + 0x24], eax
call eax
push 8
pop edx
mov ecx, eax
call fcn.10007d5c
mov ebx, eax
mov dword [esp + 0x3c], ebx
test ebx, ebx
je 0x1000384f
push esi
push esi
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x20]
push eax
push dword [esp + 0x24]
push ebx
push 3
push 0x30
push esi
push dword [esp + 0x48]
call dword [sym.imp.ADVAPI32.dll_EnumServicesStatusExW]
test eax, eax
je 0x1000383d
cmp dword [esp + 0x10], esi
jbe 0x10003841
mov eax, dword [sym.imp.KERNEL32.dll_lstrcmpiW]
mov ebp, ebx
mov dword [esp + 0x1c], eax
push str.TermService
push dword [ebp]
call eax
test eax, eax
je 0x1000373a
mov eax, dword [esp + 0x1c]
inc esi
add ebp, 0x2c
cmp esi, dword [esp + 0x10]
jb 0x10003719
jmp 0x10003841
imul eax, esi, 0x2c
mov ebp, dword [eax + ebx + 0x24]
test ebp, ebp
jne 0x1000374f
mov edi, 0x426
jmp 0x10003841
mov eax, dword [esp + 0x28]
xor edi, edi
and dword [esp + 0x28], edi
mov dword [esp + 0x38], edi
mov dword [eax], ebp
cmp dword [esp + 0x10], edi
jbe 0x10003841
mov eax, dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, ebx
mov ebx, dword [esp + 0x20]
mov edi, dword [esp + 0x28]
mov dword [esp + 0x2c], eax
mov eax, dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov dword [esp + 0x30], eax
mov eax, dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov dword [esp + 0x34], eax
push str.TermService
push dword [esi]
call dword [esp + 0x24]
test eax, eax
je 0x10003825
cmp dword [esi + 0x24], ebp
jne 0x10003825
push dword [esi]
call dword [esp + 0x30]
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x28], eax
cmp dword [ecx], 0
jne 0x100037d3
mov ecx, dword [esp + 0x44]
push 4
mov dword [ecx], 1
call ebx
push 8
pop edx
mov ecx, eax
call fcn.10007d5c
jmp 0x100037ee
mov eax, dword [esp + 0x44]
inc dword [eax]
mov eax, dword [eax]
shl eax, 2
push eax
push dword [ecx]
push 0
call ebx
push eax
call dword [esp + 0x40]
test eax, eax
je 0x10003825
mov ecx, dword [esp + 0x18]
mov dword [ecx], eax
mov eax, dword [esp + 0x28]
lea eax, [eax*2 + 2]
push eax
call ebx
push 8
pop edx
mov ecx, eax
call fcn.10007d5c
mov edx, eax
mov eax, dword [esp + 0x44]
mov ecx, dword [eax]
mov eax, dword [esp + 0x18]
mov eax, dword [eax]
mov dword [eax + ecx*4 - 4], edx
push dword [esi]
push edx
call dword [esp + 0x3c]
inc edi
add esi, 0x2c
cmp edi, dword [esp + 0x10]
jb 0x1000378e
mov edi, dword [esp + 0x38]
mov ebx, dword [esp + 0x3c]
jmp 0x10003841
call ebp
mov edi, eax
push ebx
call dword [esp + 0x24]
mov ecx, eax
call fcn.1000350d
jmp 0x10003853
call ebp
mov edi, eax
push dword [esp + 0x24]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop esi
mov eax, edi
pop ebp
pop edi
pop ebx
add esp, 0x30
ret