Function at 0x421180
Capabilities:
Enumerate services
Get common file path
Query service configuration

Disassembly:
push 0xffffffffffffffff
push 0x578cd6
mov eax, dword fs:[0]
push eax
sub esp, 0x4ec
mov eax, dword [0x60bd28]
xor eax, esp
mov dword [esp + 0x4e8], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x60bd28]
xor eax, esp
push eax
lea eax, [esp + 0x500]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x510]
push 4
xor ebx, ebx
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
cmp esi, ebx
mov dword [esp + 0x18], esi
mov dword [ebp], ebx
je 0x421580
mov edi, dword [sym.imp.ADVAPI32.dll_EnumServicesStatusA]
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x38]
push edx
push 0x24
lea eax, [esp + 0x58]
push eax
push 3
push 0xb
push esi
mov dword [esp + 0x44], ebx
call edi
cmp eax, ebx
jne 0x421579
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x421579
mov esi, dword [esp + 0x30]
add esi, 0x24
xor ecx, ecx
mov eax, esi
mov edx, 0x24
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00506f67
add esp, 4
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x24]
push edx
mov edx, dword [esp + 0x20]
lea ecx, [esp + 0x38]
push ecx
push esi
push eax
push 3
push 0xb
push edx
mov dword [esp + 0x54], eax
call edi
cmp dword [esp + 0x20], ebx
mov dword [esp + 0x2c], ebx
jbe 0x421568
mov eax, dword [esp + 0x34]
mov dword [esp + 0x14], eax
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx]
mov eax, dword [esp + 0x18]
push 0x20035
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
mov dword [esp + 0x28], edi
xor esi, esi
mov dword [esp + 0x38], ebx
call fcn.00512f10
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
je 0x4215d7
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
cmp edi, ebx
mov dword [esp + 0x508], ebx
je 0x421348
push 0x1000
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
cmp esi, ebx
jne 0x421348
lea ecx, [esp + 0x38]
push ecx
push 0x1000
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigA]
test eax, eax
je 0x421348
mov edx, dword [esi + 0xc]
push ecx
mov ecx, esp
mov dword [esp + 0x44], esp
push edx
call fcn.00402a30
lea eax, [esp + 0x48]
push eax
call fcn.004209e0
add esp, 8
push eax
lea ecx, [esp + 0x20]
mov byte [esp + 0x50c], 1
call fcn.004025f0
mov eax, dword [esp + 0x44]
add eax, 0xfffffff0
mov byte [esp + 0x508], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x421348
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp esi, ebx
mov dword [esp + 0x3c], 0x104
je 0x42136b
mov esi, dword [esi + 0x20]
cmp esi, ebx
je 0x42136b
push 0x104
push esi
lea ecx, [esp + 0x2f8]
push ecx
jmp 0x42137d
push 0x104
push 0x596192
lea edx, [esp + 0x2f8]
push edx
call fcn.005405c0
mov esi, dword [esp + 0x20]
mov edx, dword [esi]
add esp, 0xc
lea eax, [esp + 0x3c]
push eax
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x2f4]
push ecx
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_GetServiceDisplayNameA]
push 0x104
lea ecx, [esp + 0x3fc]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov ecx, dword [esi]
mov eax, ecx
lea esi, [eax + 1]
mov edi, edi
mov dl, byte [eax]
add eax, 1
cmp dl, bl
jne 0x4213c0
sub eax, esi
je 0x4213ed
push ecx
lea edx, [esp + 0x3fc]
push edx
lea eax, [esp + 0x1f4]
push str._sdrivers_s.sys
push eax
call fcn.00540420
add esp, 0x10
jmp 0x421407
mov ecx, dword [esp + 0x1c]
push 0x104
push ecx
lea edx, [esp + 0x1f4]
push edx
call fcn.005405c0
add esp, 0xc
mov esi, dword [ebp]
cmp esi, 0x800
jge 0x421518
mov eax, dword [esp + 0x14]
mov edi, dword [eax]
push edi
call fcn.00420280
add esp, 4
test al, al
jne 0x421514
shl esi, 9
mov ecx, edi
lea edx, [esi + ebp + 4]
mov al, byte [ecx]
mov byte [edx], al
add ecx, 1
add edx, 1
cmp al, bl
jne 0x421436
cmp dword [ebp], 0x800
jge 0x421514
lea ecx, [esp + 0x16c]
push ecx
lea edx, [esp + 0x70]
push edx
lea eax, [esp + 0xf4]
push eax
lea ecx, [esp + 0x1f8]
push ecx
call fcn.0042a300
add esp, 0x10
test al, al
je 0x4214e4
mov edx, dword [ebp]
shl edx, 9
lea ecx, [esp + 0x6c]
lea edx, [edx + ebp + 0x84]
jmp 0x421490
mov al, byte [ecx]
mov byte [edx], al
add ecx, 1
add edx, 1
cmp al, bl
jne 0x421490
mov eax, dword [ebp]
shl eax, 9
lea ecx, [esp + 0xec]
lea edx, [eax + ebp + 0x104]
mov al, byte [ecx]
mov byte [edx], al
add ecx, 1
add edx, 1
cmp al, bl
jne 0x4214b2
mov edx, dword [ebp]
shl edx, 9
lea ecx, [esp + 0x16c]
lea edx, [edx + ebp + 0x184]
mov al, byte [ecx]
mov byte [edx], al
add ecx, 1
add edx, 1
cmp al, bl
jne 0x4214d4
jmp 0x421510
mov ecx, dword [ebp]
shl ecx, 9
mov eax, 0x612f6e
mov dword [ecx + ebp + 0x84], eax
mov edx, dword [ebp]
shl edx, 9
mov dword [edx + ebp + 0x104], eax
mov ecx, dword [ebp]
shl ecx, 9
mov dword [ecx + ebp + 0x184], eax
add dword [ebp], 1
mov edi, dword [esp + 0x28]
cmp edi, ebx
je 0x421523
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov dword [esp + 0x508], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x42154e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x2c]
add dword [esp + 0x14], 0x24
add eax, 1
cmp eax, dword [esp + 0x20]
mov dword [esp + 0x2c], eax
jb 0x421277
mov ecx, dword [esp + 0x34]
push ecx
call fcn.00506f6c
mov esi, dword [esp + 0x1c]
add esp, 4
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push str.InCDfs
push ebp
call fcn.004207e0
push str.InCDPass
push ebp
call fcn.004207e0
push str.InCDrec
push ebp
call fcn.004207e0
push str.InCDRm
push ebp
call fcn.004207e0
add esp, 0x20
mov ecx, dword [esp + 0x500]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x4e8]
xor ecx, esp
call fcn.0053fab2
add esp, 0x4f8
ret
push 0x80004005
call fcn.00401010
int3
call fcn.0042ac20
test eax, eax
je 0x421616
push esi
mov esi, dword [esp + 8]
push esi
call fcn.00420d00
add esp, 4
test al, al
jne 0x421614
push esi
call 0x421180
add esp, 4
pop esi
ret
jmp 0x421180