Function at 0x50cddc
Capabilities:
Query service configuration
Query service status

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 0x13
push 0
push 0
dec ecx
jne 0x50cde5
push ecx
xchg dword [ebp - 4], ecx
push ebx
push esi
mov dword [ebp - 8], ecx
mov ebx, edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x50d447
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 8]
call fcn.00404a2c
mov eax, dword [ebp - 4]
add eax, 0x50
mov edx, ebx
call fcn.00404a80
lea ecx, [ebp - 0x60]
mov edx, 0x50d464
mov eax, 0x50d474
call fcn.00510c34
mov edx, dword [ebp - 0x60]
mov eax, dword [ebp - 4]
add eax, 0x54
call fcn.00404a80
push 0xf003f
push 0
mov eax, ebx
call fcn.00404eec
push eax
call sub.advapi32.dll_OpenSCManagerA
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
jne 0x50ce90
call sub.kernel32.dll_GetLastError_1
mov ebx, eax
mov eax, dword [ebp - 4]
mov dword [eax + 0x5c], ebx
mov dword [ebp - 0xc], ebx
mov eax, dword [ebp - 4]
push eax
push 0x5193f0
mov eax, dword [ebp - 4]
call fcn.00424b98
mov eax, dword [ebp - 4]
add eax, 0x50
call fcn.004d53a0
jmp 0x50d40f
xor eax, eax
push ebp
push 0x50d408
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 0x10], eax
jmp 0x50d3e0
lea eax, [ebp - 0x64]
push eax
lea ecx, [ebp - 0x10]
mov dl, 0xd
mov eax, dword [ebp - 8]
call fcn.004c34b0
mov eax, dword [ebp - 0x64]
lea edx, [ebp - 0x14]
call fcn.00409114
cmp dword [ebp - 0x14], 0
je 0x50d3e0
lea eax, [ebp - 0x1c]
call fcn.00404a2c
lea eax, [ebp - 0x20]
call fcn.00404a2c
lea eax, [ebp - 0x24]
call fcn.00404a2c
lea eax, [ebp - 0x28]
call fcn.00404a2c
lea eax, [ebp - 0x2c]
call fcn.00404a2c
lea eax, [ebp - 0x30]
call fcn.00404a2c
lea eax, [ebp - 0x34]
call fcn.00404a2c
push 0xf01ff
mov eax, dword [ebp - 0x14]
call fcn.00404eec
push eax
mov eax, dword [ebp - 0x38]
push eax
call sub.advapi32.dll_OpenServiceA
mov dword [ebp - 0x3c], eax
xor eax, eax
push ebp
push 0x50d301
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [ebp - 0x3c], 0
jne 0x50cf99
call sub.kernel32.dll_GetLastError_1
mov edx, dword [ebp - 4]
mov dword [edx + 0x5c], eax
lea eax, [ebp - 0x68]
push eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x70], eax
mov byte [ebp - 0x6c], 0xb
lea edx, [ebp - 0x70]
xor ecx, ecx
mov eax, 0x50d484
call fcn.0040a674
mov edx, dword [ebp - 0x68]
mov eax, dword [ebp - 4]
add eax, 0x58
call fcn.00404a80
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x5c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 4]
push eax
push 0x5193f0
mov eax, dword [ebp - 4]
call fcn.00424b98
mov eax, dword [ebp - 4]
add eax, 0x50
call fcn.004d53a0
call fcn.00404490
jmp 0x50d3e0
xor eax, eax
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x40]
push eax
push 0
push 0
mov eax, dword [ebp - 0x3c]
push eax
call sub.advapi32.dll_QueryServiceConfigA
mov eax, dword [ebp - 0x40]
call fcn.004027e0
mov ebx, eax
lea eax, [ebp - 0x40]
push eax
mov eax, dword [ebp - 0x40]
push eax
push ebx
mov eax, dword [ebp - 0x3c]
push eax
call sub.advapi32.dll_QueryServiceConfigA
test eax, eax
je 0x50d0bf
lea eax, [ebp - 0x30]
mov edx, dword [ebx + 0x20]
call fcn.00404c24
lea eax, [ebp - 0x74]
mov edx, dword [ebx + 0xc]
call fcn.00404c24
mov eax, dword [ebp - 0x74]
lea edx, [ebp - 0x28]
call fcn.00409114
mov esi, dword [ebx + 0x1c]
test esi, esi
jne 0x50d016
mov eax, dword [ebx]
sub eax, 0x10
je 0x50d007
sub eax, 0x10
jne 0x50d02b
lea eax, [ebp - 0x24]
mov edx, 0x50d494
call fcn.00404ac4
jmp 0x50d02b
lea eax, [ebp - 0x78]
mov edx, esi
call fcn.00404c24
mov eax, dword [ebp - 0x78]
lea edx, [ebp - 0x24]
call fcn.00409114
mov eax, dword [ebx + 4]
cmp eax, 4
ja case.default.0x50d037
jmp dword [eax*4 + 0x50d03e]
lea ecx, [ebp - 0x20]
mov edx, 0x50d4a8
mov eax, 0x50d474
call fcn.00510c34
jmp case.default.0x50d037
lea ecx, [ebp - 0x20]
mov edx, 0x50d4b8
mov eax, 0x50d474
call fcn.00510c34
jmp case.default.0x50d037
lea ecx, [ebp - 0x20]
mov edx, 0x50d4c8
mov eax, 0x50d474
call fcn.00510c34
jmp case.default.0x50d037
lea ecx, [ebp - 0x20]
mov edx, 0x50d4d8
mov eax, 0x50d474
call fcn.00510c34
jmp case.default.0x50d037
lea ecx, [ebp - 0x20]
mov edx, 0x50d4e8
mov eax, 0x50d474
call fcn.00510c34
jmp case.default.0x50d037
call sub.kernel32.dll_GetLastError_1
mov edx, dword [ebp - 4]
mov dword [edx + 0x5c], eax
lea eax, [ebp - 0x7c]
push eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x70], eax
mov byte [ebp - 0x6c], 0xb
lea edx, [ebp - 0x70]
xor ecx, ecx
mov eax, 0x50d484
call fcn.0040a674
mov edx, dword [ebp - 0x7c]
mov eax, dword [ebp - 4]
add eax, 0x58
call fcn.00404a80
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x5c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 4]
push eax
push 0x5193f0
mov eax, dword [ebp - 4]
call fcn.00424b98
mov eax, dword [ebp - 4]
add eax, 0x50
call fcn.004d53a0
call fcn.00404490
jmp 0x50d3e0
lea eax, [ebp - 0x5c]
push eax
mov eax, dword [ebp - 0x3c]
push eax
call sub.advapi32.dll_QueryServiceStatus
test eax, eax
je 0x50d207
mov eax, dword [ebp - 0x58]
cmp eax, 7
ja case.0x50d145.0
jmp dword [eax*4 + 0x50d14c]
lea ecx, [ebp - 0x2c]
mov edx, 0x50d4f8
mov eax, 0x50d474
call fcn.00510c34
jmp case.0x50d145.0
lea ecx, [ebp - 0x2c]
mov edx, 0x50d508
mov eax, 0x50d474
call fcn.00510c34
jmp case.0x50d145.0
lea ecx, [ebp - 0x2c]
mov edx, 0x50d518
mov eax, 0x50d474
call fcn.00510c34
jmp case.0x50d145.0
lea ecx, [ebp - 0x2c]
mov edx, 0x50d528
mov eax, 0x50d474
call fcn.00510c34
jmp case.0x50d145.0
lea ecx, [ebp - 0x2c]
mov edx, 0x50d538
mov eax, 0x50d474
call fcn.00510c34
jmp case.0x50d145.0
lea ecx, [ebp - 0x2c]
mov edx, 0x50d548
mov eax, 0x50d474
call fcn.00510c34
jmp case.0x50d145.0
lea ecx, [ebp - 0x2c]
mov edx, 0x50d558
mov eax, 0x50d474
call fcn.00510c34
jmp case.0x50d145.0
call sub.kernel32.dll_GetLastError_1
mov edx, dword [ebp - 4]
mov dword [edx + 0x5c], eax
lea eax, [ebp - 0x80]
push eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x70], eax
mov byte [ebp - 0x6c], 0xb
lea edx, [ebp - 0x70]
xor ecx, ecx
mov eax, 0x50d484
call fcn.0040a674
mov edx, dword [ebp - 0x80]
mov eax, dword [ebp - 4]
add eax, 0x58
call fcn.00404a80
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x5c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 4]
push eax
push 0x5193f0
mov eax, dword [ebp - 4]
call fcn.00424b98
mov eax, dword [ebp - 4]
add eax, 0x50
call fcn.004d53a0
call fcn.00404490
jmp 0x50d3e0
xor eax, eax
mov dword [ebp - 0x40], eax
mov eax, dword [0x544298]
cmp dword [eax], 0
je 0x50d2e4
lea eax, [ebp - 0x40]
push eax
push 0
push 0
push 1
mov eax, dword [ebp - 0x3c]
push eax
mov eax, dword [0x544298]
mov eax, dword [eax]
call eax
mov eax, dword [ebp - 0x40]
call fcn.004027e0
mov ebx, eax
lea eax, [ebp - 0x40]
push eax
mov eax, dword [ebp - 0x40]
push eax
push ebx
push 1
mov eax, dword [ebp - 0x3c]
push eax
mov eax, dword [0x544298]
mov eax, dword [eax]
call eax
test eax, eax
je 0x50d2d5
lea eax, [ebp - 0x84]
mov edx, dword [ebx]
call fcn.00404c24
mov eax, dword [ebp - 0x84]
lea edx, [ebp - 0x1c]
call fcn.00409114
jmp 0x50d2dd
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 0xc], eax
mov eax, ebx
call fcn.00402800
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x50d308
cmp dword [ebp - 0x3c], 0
je 0x50d300
mov eax, dword [ebp - 0x3c]
push eax
call sub.advapi32.dll_CloseServiceHandle
ret
mov eax, dword [ebp - 8]
call fcn.00404cec
cmp eax, dword [ebp - 0x10]
jg 0x50cea8
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x50d40f
mov eax, dword [ebp - 0x38]
push eax
call sub.advapi32.dll_CloseServiceHandle
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x50d44e
lea eax, [ebp - 0xa0]
mov edx, 0xc
call fcn.00404a50
lea eax, [ebp - 0x68]
mov edx, 3
call fcn.00404a50
lea eax, [ebp - 0x34]
mov edx, 9
call fcn.00404a50
ret