Function at 0x12ff62f0
Capabilities:
Query service configuration

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x13072808
push eax
mov dword fs:[0], esp
sub esp, 0x20
call fcn.12f9c530
test eax, eax
je 0x12ff632c
mov dword [0x131ca6b8], 0x32
xor eax, eax
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
add esp, 0x2c
ret
mov eax, dword [esp + 0x30]
push ebx
push ebp
push esi
xor esi, esi
push edi
mov dword [esp + 0x10], esi
mov dword [0x131ca6b8], esi
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], SysStringLen
mov dword [esp + 0x2c], 1
mov ebx, dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
push SysReAllocStringLen
push esi
push esi
mov dword [esp + 0x44], esi
call ebx
mov edi, dword [sym.imp.ADVAPI32.dll_LockServiceDatabase]
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, esi
mov dword [esp + 0x1c], eax
jne 0x12ff6399
call ebp
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x1c]
cmp eax, esi
je 0x12ff63b1
test byte [esp + 0x28], 8
je 0x12ff63b1
push eax
call edi
cmp eax, esi
mov dword [esp + 0x18], eax
jne 0x12ff63b1
call ebp
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x1c]
cmp eax, esi
je 0x12ff63d8
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x24]
push ecx
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
cmp eax, esi
mov dword [esp + 0x20], eax
jne 0x12ff63d8
call ebp
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x20]
cmp eax, esi
je 0x12ff64e3
mov dword [esp + 0x40], esi
jne 0x12ff644e
cmp dword [esp + 0x1c], esi
jne 0x12ff6427
mov eax, dword [esp + 0x28]
push eax
push esi
push esi
call ebx
cmp eax, esi
mov dword [esp + 0x1c], eax
jne 0x12ff640f
call ebp
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x1c]
cmp eax, esi
je 0x12ff6427
test byte [esp + 0x28], 8
je 0x12ff6427
push eax
call edi
cmp eax, esi
mov dword [esp + 0x18], eax
jne 0x12ff6427
call ebp
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x1c]
cmp eax, esi
je 0x12ff644e
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x24]
push ecx
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
cmp eax, esi
mov dword [esp + 0x20], eax
jne 0x12ff644e
call ebp
mov dword [esp + 0x14], eax
mov ecx, dword [esp + 0x20]
mov ebx, dword [sym.imp.ADVAPI32.dll_QueryServiceConfigA]
lea eax, [esp + 0x40]
push eax
push esi
push esi
push ecx
call ebx
mov eax, dword [esp + 0x40]
cmp eax, esi
jbe 0x12ff64e3
push eax
call fcn.12f5c05b
add esp, 4
cmp eax, esi
mov dword [esp + 0x10], eax
je 0x12ff64e3
mov ecx, dword [esp + 0x40]
mov edi, dword [esp + 0x10]
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
cmp dword [esp + 0x20], esi
jne 0x12ff64c9
lea ecx, [esp + 0x14]
call fcn.12ff5350
test eax, eax
je 0x12ff64c9
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x1c]
push eax
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
cmp eax, esi
mov dword [esp + 0x20], eax
jne 0x12ff64c9
call ebp
mov dword [esp + 0x14], eax
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x40]
push eax
mov eax, dword [esp + 0x24]
push ecx
push edx
push eax
call ebx
cmp eax, esi
jne 0x12ff6507
mov eax, dword [esp + 0x14]
cmp eax, esi
jne 0x12ff64ed
call ebp
mov dword [0x131ca6b8], eax
mov eax, dword [esp + 0x10]
cmp eax, esi
je 0x12ff6507
push eax
call fcn.12f5c050
add esp, 4
mov dword [esp + 0x10], esi
mov eax, dword [esp + 0x20]
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp eax, esi
je 0x12ff651c
push eax
call edi
mov dword [esp + 0x20], esi
mov eax, dword [esp + 0x18]
cmp eax, esi
je 0x12ff652f
push eax
call dword [sym.imp.ADVAPI32.dll_UnlockServiceDatabase]
mov dword [esp + 0x18], esi
mov eax, dword [esp + 0x1c]
cmp eax, esi
je 0x12ff653a
push eax
call edi
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x2c
ret