Function at 0x10008340
Capabilities:
Enumerate services

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10037f48
mov eax, dword fs:[0]
push eax
sub esp, 0x7c
mov eax, dword [0x1004f100]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, ecx
xor esi, esi
push str.CheckTermsrvProcess_..
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x4c], esi
mov dword [ebp - 0x44], esi
call fcn.1001af90
mov ecx, eax
call fcn.1001b3f0
mov dword [ebp - 4], esi
add esp, 4
cmp dword [edi + 0x18], 8
mov dword [ebp - 0x40], esi
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x50], esi
lea esi, [edi + 4]
jb 0x100083a8
mov eax, dword [esi]
jmp 0x100083aa
mov eax, esi
push 2
push eax
call fcn.10006750
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x100083e1
call fcn.1001af90
push ebx
push str.____Failed_to_set_up_TermService_SERVICE_AUTO_START._error:_08x.
mov ecx, eax
call fcn.1001b4f0
add esp, 8
push 0x10049464
lea eax, [ebp - 0x54]
push eax
mov dword [ebp - 0x54], ebx
call fcn.10028c35
cmp dword [edi + 0x18], 8
jb 0x100083e9
mov esi, dword [esi]
push 0x2710
push esi
call fcn.10006900
mov esi, eax
add esp, 8
mov dword [ebp - 0x48], esi
test esi, esi
je 0x10008430
call fcn.1001af90
push esi
push str.____Failed_to_start_or_query_TermService_error:_08x.
mov ecx, eax
call fcn.1001b4f0
add esp, 8
push 0x10049464
lea ecx, [ebp - 0x84]
push ecx
mov dword [ebp - 0x84], 0x32
call fcn.10028c35
push 5
push str.ServicesActive
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, eax
mov dword [ebp - 0x4c], esi
test esi, esi
jne 0x10008476
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
call fcn.1001af90
push esi
push str.____OpenSCManager_error__code__08x_.
mov ecx, eax
call fcn.1001b4f0
add esp, 8
push 0x10049464
lea edx, [ebp - 0x5c]
push edx
mov dword [ebp - 0x5c], esi
call fcn.10028c35
mov ebx, dword [sym.imp.ADVAPI32.dll_EnumServicesStatusExW]
push 0
lea eax, [ebp - 0x50]
push eax
lea ecx, [ebp - 0x3c]
push ecx
lea edx, [ebp - 0x40]
push edx
push 0
push 0
push 3
push 0x30
push 0
push esi
mov dword [ebp - 0x50], 0
call ebx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x38], eax
test edi, edi
jne 0x100084dd
mov edi, eax
cmp edi, 0xea
je 0x100084dd
call fcn.1001af90
push edi
push str.____EnumServicesStatusEx_error__code__08x_.
mov ecx, eax
call fcn.1001b4f0
add esp, 8
push 0x10049464
lea eax, [ebp - 0x60]
push eax
mov dword [ebp - 0x60], edi
call fcn.10028c35
mov ecx, dword [ebp - 0x40]
push ecx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push 0
lea edx, [ebp - 0x50]
push edx
lea ecx, [ebp - 0x3c]
push ecx
mov ecx, dword [ebp - 0x40]
lea edx, [ebp - 0x40]
push edx
push ecx
push eax
push 3
push 0x30
push 0
push esi
mov dword [ebp - 0x44], eax
call ebx
mov ebx, eax
call fcn.1001af90
mov edi, eax
mov eax, dword [ebp - 0x34]
call fcn.10001a50
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp - 0x3c]
push eax
push ebx
push edx
push str.CheckTermsrvProcess_dwServicesReturned:_d_bRlt:_d_Info:_08x_SrvName:_s
mov ecx, edi
call fcn.1001b3f0
xor edi, edi
add esp, 0x14
cmp ebx, edi
jne 0x10008574
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
call fcn.1001af90
mov ecx, dword [ebp - 0x40]
push ecx
push esi
push str.____EnumServicesStatusEx_error__code__08x_.buffer_cache:_d
mov ecx, eax
call fcn.1001b4f0
add esp, 0xc
push 0x10049464
lea edx, [ebp - 0x64]
push edx
mov dword [ebp - 0x64], esi
call fcn.10028c35
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov dword [ebp - 0x4c], edi
mov dword [ebp - 0x38], edi
xor ebx, ebx
cmp ebx, dword [ebp - 0x3c]
jae 0x10008616
mov ecx, dword [ebp - 0x44]
mov eax, ebx
imul eax, eax, 0x2c
cmp dword [eax + ecx], 0
lea esi, [eax + ecx]
je 0x10008610
call fcn.1001af90
mov edx, dword [esi + 0x24]
mov ecx, dword [esi]
push edx
mov edx, dword [ebp - 0x3c]
push ecx
push edx
push ebx
push str.Dbg_services_info:_d___d__s__d
mov ecx, eax
call fcn.1001b3f0
mov eax, dword [ebp - 0x34]
add esp, 0x14
call fcn.10001a50
push eax
mov eax, dword [esi]
push eax
call fcn.10026f4b
add esp, 8
test eax, eax
jne 0x10008610
mov ecx, dword [esi + 0x24]
mov edx, dword [ebp - 0x34]
mov dword [ebp - 0x38], 1
mov dword [edx + 0x20], ecx
call fcn.1001af90
mov edi, eax
mov eax, dword [ebp - 0x34]
call fcn.10001a50
mov ecx, dword [esi]
mov edx, dword [ebp - 0x3c]
push eax
mov eax, dword [esi + 0x24]
push eax
push ecx
push edx
push ebx
push str.services_info:_d___d__s__d_check:_s
mov ecx, edi
call fcn.1001b3f0
add esp, 0x18
inc ebx
jmp 0x10008583
xor edi, edi
call fcn.1001af90
cmp dword [ebp - 0x38], edi
jne 0x10008646
push str.____TermService_not_found.
mov ecx, eax
call fcn.1001b4f0
add esp, 4
push 0x10049464
lea eax, [ebp - 0x58]
push eax
mov dword [ebp - 0x58], 0x424
call fcn.10028c35
mov esi, dword [ebp - 0x34]
mov ecx, dword [esi + 0x20]
push ecx
push str.___TermService_found__pid__d_
mov ecx, eax
call fcn.1001b3f0
xor edx, edx
add esp, 8
mov dword [ebp - 0x18], 7
mov dword [ebp - 0x1c], edi
mov word [ebp - 0x2c], dx
mov byte [ebp - 4], 1
cmp dword [esi + 0x20], edi
je 0x1000882f
mov dword [ebp - 0x38], edi
lea esp, [esp]
mov eax, dword [ebp - 0x38]
cmp eax, dword [ebp - 0x3c]
jae 0x100087c7
mov edx, dword [ebp - 0x44]
mov ecx, eax
imul ecx, ecx, 0x2c
lea edi, [ecx + edx]
mov edx, dword [edi]
test edx, edx
je 0x100087bc
mov eax, dword [edi + 0x24]
mov ecx, dword [ebp - 0x34]
cmp eax, dword [ecx + 0x20]
jne 0x10008748
xor eax, eax
mov word [ebp - 0x7c], ax
mov eax, edx
mov dword [ebp - 0x68], 7
mov dword [ebp - 0x6c], 0
lea esi, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x100086d0
sub eax, esi
sar eax, 1
push eax
push edx
lea ecx, [ebp - 0x80]
call fcn.10001a60
mov ebx, dword [ebp - 0x34]
lea ecx, [ebp - 0x80]
push ecx
add ebx, 0x24
mov byte [ebp - 4], 2
call fcn.1000e610
mov byte [ebp - 4], 1
cmp dword [ebp - 0x68], 8
jb 0x10008712
mov edx, dword [ebp - 0x7c]
push edx
call fcn.100269ba
add esp, 4
mov edx, dword [edi]
mov eax, edx
lea esi, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x10008720
sub eax, esi
sar eax, 1
push eax
push edx
lea eax, [ebp - 0x30]
call fcn.10005480
push 1
push 0x1003fdd0
lea eax, [ebp - 0x30]
call fcn.10005480
cmp dword [edi + 0x24], 0
je 0x100087bc
mov ecx, dword [ebp - 0x34]
lea eax, [edi + 0x24]
push eax
add ecx, 0x3c
call fcn.1000e6c0
mov edx, dword [edi]
mov ebx, eax
xor eax, eax
mov word [ebp - 0x7c], ax
mov eax, edx
mov dword [ebp - 0x68], 7
mov dword [ebp - 0x6c], 0
lea esi, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x10008780
sub eax, esi
sar eax, 1
push eax
push edx
lea ecx, [ebp - 0x80]
call fcn.10001a60
lea ecx, [ebp - 0x80]
push ecx
mov byte [ebp - 4], 3
call fcn.1000e610
mov byte [ebp - 4], 1
cmp dword [ebp - 0x68], 8
jb 0x100087bc
mov edx, dword [ebp - 0x7c]
push edx
call fcn.100269ba
add esp, 4
inc dword [ebp - 0x38]
mov esi, dword [ebp - 0x34]
jmp 0x10008680
mov ecx, dword [esi + 0x34]
sub ecx, dword [esi + 0x30]
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x1000881d
cmp dword [ebp - 0x18], 8
mov edi, dword [ebp - 0x2c]
jae 0x100087ee
lea edi, [ebp - 0x2c]
mov ecx, dword [esi + 0x34]
sub ecx, dword [esi + 0x30]
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov esi, edx
shr esi, 0x1f
add esi, edx
call fcn.1001af90
push edi
push esi
push str.___Shared_services_found:_d___s
mov ecx, eax
call fcn.1001b3f0
add esp, 0xc
cmp dword [ebp - 0x18], 8
jb 0x1000882f
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.100269ba
add esp, 4
xor edx, edx
mov dword [ebp - 0x18], 7
mov dword [ebp - 0x1c], 0
mov word [ebp - 0x2c], dx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x4c]
test eax, eax
je 0x10008858
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [ebp - 0x44]
test eax, eax
je 0x1000886f
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [ebp - 0x34]
mov edx, dword [ecx + 0x20]
mov esi, dword [ebp - 0x48]
push edx
push esi
push str.___CheckTermsrvProcess_Rlt:_08x_TermServicePID:_d
call fcn.1001af90
mov ecx, eax
call fcn.1001b3f0
add esp, 0xc
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.100269c5
mov esp, ebp
pop ebp
ret