Function at 0x4172b0
Capabilities:
Enumerate services

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x564a60
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push ebx
push esi
push edi
mov eax, dword [0x5c0490]
xor eax, esp
push eax
lea eax, [esp + 0x40]
mov dword fs:[0], eax
xor ebx, ebx
push ebx
lea eax, [esp + 0x38]
push str.EnumSpoolerRelatedService
push eax
call fcn.00401190
add esp, 0xc
mov dword [esp + 0x48], ebx
xor ecx, ecx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
mov word [esp + 0x14], cx
call fcn.0044b52d
mov edx, dword [eax + 4]
push 0x800f003f
push ebx
push ebx
mov dword [esp + 0x38], edx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, eax
mov dword [esp + 0x20], esi
cmp esi, ebx
je 0x41749c
push 0xf01ff
push str.SPOOLER
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
cmp edi, ebx
je 0x417495
mov esi, dword [sym.imp.ADVAPI32.dll_EnumDependentServicesW]
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x1c]
push ecx
push 1
lea edx, [esp + 0x20]
push edx
push 1
push edi
mov dword [esp + 0x30], ebx
call esi
cmp eax, ebx
jne 0x417377
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x4173e0
mov eax, dword [esp + 0x18]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [esp + 0x24], eax
cmp eax, ebx
jne 0x4173bc
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call esi
mov ecx, dword [esp + 0x20]
push ecx
call esi
push str._t_t_tGlobalAlloc
lea edx, [esp + 0x38]
push edx
call fcn.00414780
push 0x5988ec
push 2
lea eax, [esp + 0x3c]
push eax
jmp 0x4174a8
lea ecx, [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x1c]
push edx
push ecx
push eax
push 1
push edi
call esi
cmp eax, ebx
jne 0x417404
mov edx, dword [esp + 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call esi
mov eax, dword [esp + 0x20]
push eax
call esi
push str._t_t_tEnumDependentServices
lea ecx, [esp + 0x38]
push ecx
call fcn.00414780
jmp 0x41749c
mov dword [esp + 0x28], ebx
cmp dword [esp + 0x1c], ebx
jbe 0x41747f
mov esi, dword [esp + 0x24]
mov eax, dword [esi + 0xc]
cmp eax, 4
je 0x417424
cmp eax, 2
je 0x417424
cmp eax, 5
jne 0x41746d
mov eax, dword [esi]
push eax
lea ecx, [esp + 0x34]
call fcn.00404f00
mov ecx, dword [esp + 0x2c]
add ecx, 0x14c
mov byte [esp + 0x48], 1
mov edx, dword [ecx + 8]
push eax
push edx
call fcn.0044ab55
mov byte [esp + 0x48], bl
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41746d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x28]
inc eax
add esi, 0x24
mov dword [esp + 0x28], eax
cmp eax, dword [esp + 0x1c]
jb 0x417412
mov ecx, dword [esp + 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov esi, dword [esp + 0x20]
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 0x5988ec
push 2
lea edx, [esp + 0x3c]
push edx
call fcn.00401410
add esp, 0xc
lea ecx, [esp + 0x34]
mov dword [esp + 0x48], 0xffffffff
call fcn.00401370
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret