Function at 0x10003420
Capabilities:
Enumerate services

Disassembly:
sub esp, 0x20
push ebx
push ebp
push 5
push str.ServicesActive
xor ebp, ebp
push ebp
mov dword [esp + 0x18], 0x424
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebx, eax
mov dword [esp + 0x14], ebx
cmp ebx, ebp
jne 0x10003453
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop ebp
pop ebx
add esp, 0x20
ret
push esi
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_EnumServicesStatusExW]
push ebp
push ebp
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x24]
push ecx
push ebp
push ebp
push 3
push 0x30
push ebp
push ebx
mov dword [esp + 0x40], ebp
mov dword [esp + 0x38], ebp
call edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, ebp
jne 0x10003685
cmp eax, 0xea
jne 0x10003685
mov edx, dword [esp + 0x18]
mov ebp, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push edx
push 8
call ebp
push eax
call fcn.100052e0
mov ebx, eax
mov dword [esp + 0x2c], ebx
test ebx, ebx
je 0x1000367b
mov edx, dword [esp + 0x18]
push 0
push 0
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x24]
push ecx
push edx
push ebx
push 3
push 0x30
push 0
push eax
call edi
test eax, eax
je 0x1000364f
xor esi, esi
cmp dword [esp + 0x10], esi
jbe 0x10003659
mov edi, ebx
mov edi, edi
mov ecx, dword [edi]
push str.TermService
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x1000352e
inc esi
add edi, 0x2c
cmp esi, dword [esp + 0x10]
jb 0x100034f0
push ebx
push 0
call ebp
push eax
call fcn.100088d0
mov ebx, dword [esp + 0x1c]
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
imul esi, esi, 0x2c
mov esi, dword [esi + ebx + 0x24]
xor eax, eax
mov dword [esp + 0x24], esi
cmp esi, eax
jne 0x10003568
push ebx
push eax
mov dword [esp + 0x1c], 0x426
call ebp
push eax
call fcn.100088d0
mov ebx, dword [esp + 0x1c]
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
mov edx, dword [esp + 0x34]
mov dword [esp + 0x14], eax
mov dword [edx], esi
mov dword [esp + 0x20], eax
cmp dword [esp + 0x10], eax
jbe 0x10003659
mov esi, dword [esp + 0x3c]
mov edi, dword [esp + 0x38]
mov eax, dword [ebx]
push str.TermService
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x10003613
mov ecx, dword [esp + 0x24]
cmp dword [ebx + 0x24], ecx
jne 0x10003613
mov edx, dword [ebx]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp dword [edi], 0
mov dword [esp + 0x28], eax
jne 0x100035c9
push 4
push 8
mov dword [esi], 1
call ebp
push eax
call fcn.100052e0
jmp 0x100035e4
inc dword [esi]
mov eax, dword [esi]
mov ecx, dword [edi]
add eax, eax
add eax, eax
push eax
push ecx
push 0
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
test eax, eax
je 0x10003613
mov edx, dword [esp + 0x28]
mov dword [edi], eax
lea eax, [edx + edx + 2]
push eax
push 8
call ebp
push eax
call fcn.100052e0
mov ecx, dword [esi]
mov edx, dword [edi]
mov dword [edx + ecx*4 - 4], eax
mov eax, dword [ebx]
mov ecx, dword [esi]
mov edx, dword [edi]
push eax
mov eax, dword [edx + ecx*4 - 4]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov eax, dword [esp + 0x20]
inc eax
add ebx, 0x2c
mov dword [esp + 0x20], eax
cmp eax, dword [esp + 0x10]
jb 0x10003588
mov ebx, dword [esp + 0x2c]
push ebx
push 0
call ebp
push eax
call fcn.100088d0
mov ebx, dword [esp + 0x1c]
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x14], eax
push ebx
push 0
call ebp
push eax
call fcn.100088d0
mov ebx, dword [esp + 0x1c]
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, dword [esp + 0x1c]
push ebx
mov dword [esp + 0x18], eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret