Function at 0x405617
Capabilities:
Enumerate services
Query service configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
push ebx
push esi
push edi
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 8], 0x9999
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 4], 0
mov eax, dword [ebp + 8]
mov dword [eax], 0
push 0x460a74
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [0xb61490], eax
cmp dword [0xb61490], 0xffffffff
jne 0x40568d
mov dword [0xb61490], 0
jmp 0x4056c6
push str.QueryServiceConfig2A
mov eax, dword [0xb61490]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x45e058], eax
cmp dword [0x45e058], 0
jne 0x4056c6
mov eax, dword [0xb61490]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [0xb61490], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x40], 0
push bind
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0
jne 0x4056fc
jmp 0x405865
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x34]
push eax
push 0
push 0
push 3
push 0x30
mov eax, dword [ebp - 0x44]
push eax
call dword [sym.imp.ADVAPI32.dll_EnumServicesStatusA]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x34]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x40], 0
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x34]
push eax
mov eax, dword [ebp - 0x34]
push eax
mov eax, dword [ebp - 0x3c]
push eax
push 3
push 0x30
mov eax, dword [ebp - 0x44]
push eax
call dword [sym.imp.ADVAPI32.dll_EnumServicesStatusA]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x38], 0
jmp 0x405767
inc dword [ebp - 0x38]
mov eax, dword [ebp - 0x48]
cmp dword [ebp - 0x38], eax
jae 0x405851
push str.DHCP
mov eax, dword [ebp - 0x38]
shl eax, 2
lea eax, [eax + eax*8]
mov ecx, dword [ebp - 0x3c]
mov eax, dword [eax + ecx]
push eax
call fcn.00452540
add esp, 8
test eax, eax
jne 0x40584c
mov eax, dword [ebp - 0x38]
shl eax, 2
lea eax, [eax + eax*8]
mov ecx, dword [ebp - 0x3c]
cmp dword [eax + ecx + 0xc], 4
jne 0x4057bb
mov dword [ebp - 4], 1
jmp 0x40584c
mov dword [ebp - 0x20], 0xb615a0
cmp dword [ebp - 0x20], 0
je 0x40584c
push 1
mov eax, dword [ebp - 0x38]
shl eax, 2
lea eax, [eax + eax*8]
mov ecx, dword [ebp - 0x3c]
mov eax, dword [eax + ecx]
push eax
mov eax, dword [ebp - 0x44]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x40584c
mov dword [ebp - 0x10], 0x1e78
lea eax, [ebp - 0x10]
push eax
push 0x1e78
mov eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigA]
test eax, eax
je 0x40584c
mov eax, dword [ebp - 0x20]
cmp dword [eax + 4], 3
jne 0x405836
mov eax, dword [ebp + 8]
mov dword [eax], 1
jmp 0x40584c
mov eax, dword [ebp - 0x20]
cmp dword [eax + 4], 4
jne 0x40584c
mov eax, dword [ebp + 8]
mov dword [eax], 2
jmp 0x405764
mov eax, dword [ebp - 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x44]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [ebp - 4]
jmp 0x405875
pop edi
pop esi
pop ebx
leave
ret