Function at 0x404250
Capabilities:
Enumerate services
Query service configuration

Disassembly:
push 0xffffffffffffffff
push 0x472220
mov eax, dword fs:[0]
push eax
sub esp, 0x60
mov eax, dword [0x48a348]
xor eax, esp
mov dword [esp + 0x5c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x48a348]
xor eax, esp
push eax
lea eax, [esp + 0x74]
mov dword fs:[0], eax
mov eax, dword [esp + 0x84]
mov dword [esp + 0x34], eax
xor ebx, ebx
mov eax, ecx
mov dword [esp + 0x50], 0xf
mov dword [esp + 0x4c], ebx
mov byte [esp + 0x3c], bl
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x4042a4
sub eax, esi
push eax
push ecx
lea ecx, [esp + 0x40]
call fcn.00404750
lea edi, [esp + 0x38]
mov dword [esp + 0x7c], ebx
call fcn.00404170
push 4
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebp, eax
mov dword [esp + 0x24], ebp
cmp ebp, ebx
jne 0x4042fc
mov dword [esp + 0x7c], 0xffffffff
cmp dword [esp + 0x50], 0x10
jb 0x4042f5
mov ecx, dword [esp + 0x3c]
push ecx
call fcn.0045dc91
add esp, 4
xor al, al
jmp 0x4044d5
mov esi, dword [sym.imp.ADVAPI32.dll_EnumServicesStatusA]
lea edx, [esp + 0x30]
push edx
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x20]
push ecx
push ebx
push ebx
push 3
push 0x30
push ebp
mov dword [esp + 0x38], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x50], ebx
mov byte [esp + 0x37], bl
call esi
cmp eax, ebx
jne 0x4044ae
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x4044ae
mov edx, dword [esp + 0x18]
push edx
call fcn.0045e0f8
mov edi, eax
add esp, 4
mov dword [esp + 0x28], edi
cmp edi, ebx
je 0x4044ae
lea eax, [esp + 0x30]
push eax
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x20]
push edx
push eax
push edi
push 3
push 0x30
push ebp
call esi
cmp eax, ebx
je 0x4044a5
mov dword [esp + 0x2c], ebx
cmp dword [esp + 0x20], ebx
jbe 0x4044a5
mov dword [esp + 0x1c], edi
cmp byte [esp + 0x17], bl
jne 0x4044a5
mov ecx, dword [esp + 0x1c]
mov edx, dword [ecx]
push accept
push edx
push ebp
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
cmp esi, ebx
je 0x4044a5
mov edi, dword [sym.imp.ADVAPI32.dll_QueryServiceConfigA]
lea eax, [esp + 0x18]
push eax
push ebx
push ebx
push esi
call edi
cmp eax, ebx
jne 0x404482
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x404482
mov ecx, dword [esp + 0x18]
push ecx
call fcn.0045e0f8
mov ebp, eax
add esp, 4
cmp ebp, ebx
je 0x40447e
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x18]
push edx
push eax
push ebp
push esi
call edi
cmp eax, ebx
je 0x404475
mov ecx, dword [ebp + 0xc]
push ecx
lea ecx, [esp + 0x58]
call fcn.00404500
lea edi, [esp + 0x54]
mov byte [esp + 0x7c], 1
call fcn.00404170
cmp dword [esp + 0x50], 0x10
mov edx, dword [esp + 0x3c]
jae 0x404435
lea edx, [esp + 0x3c]
lea eax, [esp + 0x54]
push eax
call fcn.00404570
cmp eax, 0xffffffff
je 0x404468
mov ecx, dword [esp + 0x1c]
mov edx, dword [ecx]
mov edi, dword [esp + 0x34]
push pe_nt_image_headers32
push edx
push edi
mov byte [esp + 0x23], 1
call fcn.0045e270
add esp, 0xc
mov byte [edi + 0xff], bl
lea ecx, [esp + 0x54]
mov byte [esp + 0x7c], bl
call fcn.00404540
push ebp
call fcn.0045e501
add esp, 4
mov ebp, dword [esp + 0x24]
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [esp + 0x2c]
add dword [esp + 0x1c], 0x24
mov edi, dword [esp + 0x28]
inc eax
mov dword [esp + 0x2c], eax
cmp eax, dword [esp + 0x20]
jb 0x404394
push edi
call fcn.0045e501
add esp, 4
push ebp
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov dword [esp + 0x7c], 0xffffffff
cmp dword [esp + 0x50], 0x10
jb 0x4044d1
mov eax, dword [esp + 0x3c]
push eax
call fcn.0045dc91
add esp, 4
mov al, byte [esp + 0x17]
mov ecx, dword [esp + 0x74]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x5c]
xor ecx, esp
call fcn.0045dc1f
add esp, 0x6c
ret