Function at 0x505fe0
Capabilities:
Enumerate services
Query service configuration
Query service status

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x548ba0
mov eax, dword fs:[0]
push eax
sub esp, 0x68
mov eax, dword [0x58a710]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x64], edi
xor ebx, ebx
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x74], ebx
mov dword [ebp - 0x70], ebx
mov dword [ebp - 0x6c], ebx
mov dword [ebp - 4], ebx
call fcn.00404730
mov ecx, eax
test ecx, ecx
jne 0x506056
push 0x80004005
call fcn.004049a0
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x40], esi
push 0
push 0
push 0x1009
push dword [edi + 4]
mov byte [ebp - 4], 1
call dword [sym.imp.USER32.dll_SendMessageA]
push Ordinal_2
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov dword [ebp - 0x5c], eax
test eax, eax
jne 0x506094
xor edi, edi
jmp 0x506512
mov edi, dword [sym.imp.ADVAPI32.dll_EnumServicesStatusA]
lea ecx, [ebp - 0x60]
push ecx
lea ecx, [ebp - 0x50]
push ecx
lea ecx, [ebp - 0x38]
push ecx
push dword [ebp - 0x38]
push 0
push 3
push 0x30
push eax
call edi
push dword [ebp - 0x38]
call fcn.00524eb3
push dword [ebp - 0x38]
mov dword [ebp - 0x58], eax
push 0
push eax
call fcn.0051d400
add esp, 0x10
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 0x38]
push dword [ebp - 0x58]
push 3
push 0x30
push dword [ebp - 0x5c]
call edi
test eax, eax
je 0x5064f9
cmp dword [ebp - 0x50], 0
mov dword [ebp - 0x68], 0
jbe 0x5064f9
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x4c], eax
push 5
push dword [eax]
push dword [ebp - 0x5c]
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov dword [ebp - 0x54], eax
test eax, eax
je 0x5064dd
push 0x34
call fcn.00519368
add esp, 4
test eax, eax
je 0x506139
mov ecx, eax
call fcn.00504ac0
mov edi, eax
mov dword [ebp - 0x3c], eax
jmp 0x50613e
xor edi, edi
mov dword [ebp - 0x3c], edi
mov edx, dword [ebp - 0x4c]
lea ebx, [edi + 0x1c]
mov edx, dword [edx]
test edx, edx
jne 0x50614e
xor ecx, ecx
jmp 0x50615f
mov ecx, edx
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x506153
sub ecx, edi
mov edi, dword [ebp - 0x3c]
push ecx
push edx
mov ecx, ebx
call fcn.00405640
mov eax, dword [ebp - 0x4c]
lea ebx, [edi + 0x20]
mov edx, dword [eax + 4]
test edx, edx
jne 0x506179
xor ecx, ecx
jmp 0x50618c
mov ecx, edx
lea edi, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x506180
sub ecx, edi
mov edi, dword [ebp - 0x3c]
push ecx
push edx
mov ecx, ebx
call fcn.00405640
mov ebx, dword [ebp - 0x54]
lea eax, [ebp - 0x38]
push eax
push 0x24
lea eax, [ebp - 0x34]
push eax
push 0
push ebx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x5061c0
mov eax, dword [ebp - 0x18]
mov dword [edi], eax
mov eax, dword [ebp - 0x34]
mov dword [edi + 8], eax
mov eax, dword [ebp - 0x30]
mov dword [edi + 0xc], eax
lea eax, [ebp - 0x38]
push eax
push 0
push dword [ebp - 0x44]
push ebx
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigA]
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x5062a3
push eax
call fcn.00524eb3
push dword [ebp - 0x38]
mov dword [ebp - 0x44], eax
push 0
push eax
call fcn.0051d400
add esp, 0x10
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 0x38]
push dword [ebp - 0x44]
push ebx
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigA]
test eax, eax
je 0x506298
mov ecx, dword [ebp - 0x44]
lea ebx, [edi + 0x2c]
mov eax, dword [ecx + 4]
mov dword [edi + 0x10], eax
mov edx, dword [ecx + 0xc]
test edx, edx
jne 0x506222
xor ecx, ecx
jmp 0x506233
mov ecx, edx
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x506227
sub ecx, edi
mov edi, dword [ebp - 0x3c]
push ecx
push edx
mov ecx, ebx
call fcn.00405640
mov eax, dword [ebp - 0x44]
lea ebx, [edi + 0x30]
mov edx, dword [eax + 0xc]
test edx, edx
jne 0x50624d
xor ecx, ecx
jmp 0x50625e
mov ecx, edx
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x506252
sub ecx, edi
mov edi, dword [ebp - 0x3c]
push ecx
push edx
mov ecx, ebx
call fcn.00405640
mov eax, dword [ebp - 0x44]
lea ebx, [edi + 0x28]
mov edx, dword [eax + 0x10]
test edx, edx
jne 0x506278
xor ecx, ecx
jmp 0x50628c
mov ecx, edx
lea edi, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x506280
sub ecx, edi
mov edi, dword [ebp - 0x3c]
push ecx
push edx
mov ecx, ebx
call fcn.00405640
mov ebx, dword [ebp - 0x54]
push dword [ebp - 0x44]
call fcn.00524eae
add esp, 4
lea eax, [ebp - 0x38]
push eax
push 0
push dword [ebp - 0x48]
push 1
push ebx
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfig2A]
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x506323
push eax
call fcn.00524eb3
push dword [ebp - 0x38]
mov dword [ebp - 0x48], eax
push 0
push eax
call fcn.0051d400
add esp, 0x10
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 0x38]
push dword [ebp - 0x48]
push 1
push ebx
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfig2A]
test eax, eax
je 0x506318
mov eax, dword [ebp - 0x48]
lea ebx, [edi + 0x24]
mov edx, dword [eax]
test edx, edx
jne 0x5062fa
xor ecx, ecx
jmp 0x50630c
mov ecx, edx
lea edi, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x506300
sub ecx, edi
mov edi, dword [ebp - 0x3c]
push ecx
push edx
mov ecx, ebx
call fcn.00405640
mov ebx, dword [ebp - 0x54]
push dword [ebp - 0x48]
call fcn.00524eae
add esp, 4
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [edi + 0x1c]
cmp dword [eax - 0xc], 0
jne 0x50634a
mov ecx, edi
call fcn.00504c70
push 0x34
push edi
call fcn.005198af
add esp, 8
jmp 0x5064dd
push eax
lea eax, [edi + 0x18]
push str.HKEY_LOCAL_MACHINESYSTEMCurrentControlSet_services_s
push eax
call fcn.00404f50
push dword [edi + 0x1c]
lea eax, [ebp - 0x40]
push str.SYSTEMCurrentControlSet_services_sParameters
push eax
call fcn.00404f50
mov esi, dword [ebp - 0x40]
lea ecx, [ebp - 0x74]
add esp, 0x18
push 0x20019
push esi
push reloc.uactmon.dll_Ordinal_2
call fcn.0040ea30
test eax, eax
jne 0x506416
mov dword [ebp - 0x38], 0x200
mov ecx, 1
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x200
or eax, ecx
jge 0x5063b6
push 0x200
lea ecx, [ebp - 0x40]
call fcn.004053d0
mov esi, dword [ebp - 0x40]
lea eax, [ebp - 0x38]
push eax
push esi
push str.ServiceDll
lea ecx, [ebp - 0x74]
call fcn.004b9c90
test eax, eax
jne 0x5063fc
push dword [esi - 8]
push esi
call fcn.0052644e
add esp, 8
test eax, eax
js 0x506557
cmp eax, dword [esi - 8]
jg 0x506557
mov dword [esi - 0xc], eax
lea ecx, [edi + 0x2c]
mov byte [eax + esi], 0
lea eax, [ebp - 0x40]
push eax
call fcn.00414200
mov eax, dword [ebp - 0x74]
test eax, eax
je 0x50640f
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x38], 0x200
mov ecx, 1
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x200
or eax, ecx
jge 0x506441
push 0x200
lea ecx, [ebp - 0x40]
call fcn.004053d0
mov esi, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x64]
lea eax, [ebp - 0x38]
push eax
push esi
push dword [edi + 0x2c]
call fcn.00442ea0
test eax, eax
je 0x506485
push dword [esi - 8]
push esi
call fcn.0052644e
add esp, 8
test eax, eax
js 0x506557
cmp eax, dword [esi - 8]
jg 0x506557
mov dword [esi - 0xc], eax
lea ecx, [edi + 0x2c]
mov byte [eax + esi], 0
lea eax, [ebp - 0x40]
push eax
call fcn.00414200
push dword [edi + 0x2c]
call dword [sym.imp.SHLWAPI.dll_PathGetDriveNumberA]
test eax, eax
jns 0x50649a
mov edi, dword [ebp - 0x3c]
jmp 0x506333
push dword [edi + 0x2c]
mov ecx, 0x5944ac
call fcn.00502a30
mov edi, dword [ebp - 0x3c]
mov ebx, dword [ebp - 0x64]
push 0
push 0
push 0x1004
mov dword [edi + 4], eax
mov dword [edi + 0x14], 0xffffffff
push dword [ebx + 4]
call dword [sym.imp.USER32.dll_SendMessageA]
push edi
push 0xffffffffffffffff
push 0
push 0
push 0xffffffffffffffff
push eax
push 7
lea ecx, [ebx + 4]
call fcn.00442370
mov ecx, dword [ebp - 0x68]
mov eax, dword [ebp - 0x4c]
inc ecx
add eax, 0x24
mov dword [ebp - 0x68], ecx
mov dword [ebp - 0x4c], eax
cmp ecx, dword [ebp - 0x50]
jb 0x506105
mov ebx, dword [ebp - 0x74]
push dword [ebp - 0x58]
call fcn.00524eae
add esp, 4
push dword [ebp - 0x5c]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, 1
mov byte [ebp - 4], 0
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x50652e
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
test ebx, ebx
je 0x506539
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005193a0
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.004049a0
int3