Function at 0x413af0
Capabilities:
Enumerate services

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5868d0
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push ebx
push esi
push edi
mov eax, dword [0x5eb770]
xor eax, esp
push eax
lea eax, [esp + 0x40]
mov dword fs:[0], eax
xor ebx, ebx
push ebx
push str.EnumSpoolerRelatedService
push ebx
lea ecx, [esp + 0x40]
call fcn.0044ca70
add esp, 0xc
mov dword [esp + 0x48], ebx
xor eax, eax
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
mov word [esp + 0x14], ax
call fcn.0046d2d8
mov ecx, dword [eax + 4]
push 0x800f003f
push ebx
push ebx
mov dword [esp + 0x38], ecx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, eax
mov dword [esp + 0x20], esi
cmp esi, ebx
je 0x413d00
push 0xf01ff
push str.SPOOLER
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
cmp edi, ebx
je 0x413cf9
mov esi, dword [sym.imp.ADVAPI32.dll_EnumDependentServicesW]
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x1c]
push eax
push 1
lea ecx, [esp + 0x20]
push ecx
push 1
push edi
mov dword [esp + 0x30], ebx
call esi
cmp eax, ebx
jne 0x413be7
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
je 0x413be7
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call esi
mov edx, dword [esp + 0x20]
push edx
call esi
push str._t_t_tEnumDependentServices
lea eax, [esp + 0x38]
push eax
call fcn.0044ce30
push 0x5b69a4
push 2
lea ecx, [esp + 0x3c]
push ecx
jmp 0x413d0c
mov edx, dword [esp + 0x18]
push edx
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [esp + 0x24], eax
cmp eax, ebx
jne 0x413c20
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_tGlobalAlloc
lea ecx, [esp + 0x38]
push ecx
call fcn.0044ce30
jmp 0x413d00
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 0x413c68
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.0044ce30
jmp 0x413d00
mov dword [esp + 0x28], ebx
cmp dword [esp + 0x1c], ebx
jbe 0x413ce3
mov esi, dword [esp + 0x24]
mov eax, dword [esi + 0xc]
cmp eax, 4
je 0x413c88
cmp eax, 2
je 0x413c88
cmp eax, 5
jne 0x413cd1
mov eax, dword [esi]
push eax
lea ecx, [esp + 0x34]
call fcn.00403340
mov ecx, dword [esp + 0x2c]
add ecx, 0x140
mov byte [esp + 0x48], 1
mov edx, dword [ecx + 8]
push eax
push edx
call fcn.0046c900
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 0x413cd1
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 0x413c76
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 0x5b69a4
push 2
lea edx, [esp + 0x3c]
push edx
call fcn.0044cd10
add esp, 0xc
lea ecx, [esp + 0x34]
mov dword [esp + 0x48], 0xffffffff
call fcn.0044cc70
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret