Function at 0x83978
Capabilities:
Query service configuration

Disassembly:
push ebp
mov ebp, esp
mov ecx, 9
push 0
push 0
dec ecx
jne 0x83980
push ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x83c6d
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [ebp - 8], 0
jne 0x839bc
lea edx, [ebp - 0x24]
mov eax, 0x83c7c
call fcn.00078120
mov eax, dword [ebp - 0x24]
call fcn.00082db4
jmp 0x83c52
lea edx, [ebp - 0x28]
mov eax, 0x83c8c
call fcn.00078120
lea eax, [ebp - 0x28]
push eax
lea edx, [ebp - 0x2c]
mov eax, dword [ebp - 8]
call fcn.000790a4
mov edx, dword [ebp - 0x2c]
pop eax
call fcn.00013eec
mov eax, dword [ebp - 0x28]
call fcn.00082d8c
xor eax, eax
mov dword [ebp - 0x18], eax
push 0
call sub.kernel32.dll_SetLastError
xor eax, eax
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x10]
mov edx, 0x5000
call fcn.000744bc
xor eax, eax
push ebp
push 0x83c29
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 0x14], eax
xor eax, eax
push ebp
push 0x83b9b
push dword fs:[eax]
mov dword fs:[eax], esp
push 0xf003f
push 0
push 0
call sub.advapi32.dll_OpenSCManagerA
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x83a46
push 0
call sub.kernel32.dll_SetLastError
call fcn.00082d24
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x14], 0
je 0x83b6e
lea edx, [ebp - 0x30]
mov eax, 0x83cb0
call fcn.00078120
mov eax, dword [ebp - 0x30]
call fcn.00082d8c
xor eax, eax
mov dword [ebp - 0x20], eax
xor eax, eax
push ebp
push 0x83b59
push dword fs:[eax]
mov dword fs:[eax], esp
push 0xf01ff
mov eax, dword [ebp - 4]
call fcn.000140a8
push eax
mov eax, dword [ebp - 0x14]
push eax
call sub.advapi32.dll_OpenServiceA
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x83aa7
push 0
call sub.kernel32.dll_SetLastError
cmp dword [ebp - 0x1c], 0
jne 0x83ab5
call fcn.00082d24
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x20], 0
je 0x83b2c
lea eax, [ebp - 0x18]
push eax
push 0xa
mov eax, dword [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x20]
push eax
call sub.advapi32.dll_QueryServiceConfigA
test eax, eax
jne 0x83b1e
call sub.kernel32.dll_GetLastError_1
cmp eax, 0x7a
jne 0x83b1e
lea edx, [ebp - 0x34]
mov eax, 0x83cc8
call fcn.00078120
mov eax, dword [ebp - 0x34]
call fcn.00082d8c
add dword [ebp - 0x18], 0x64
cmp dword [ebp - 0x18], 0x5000
ja 0x83b1e
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x20]
push eax
call sub.advapi32.dll_QueryServiceConfigA
test eax, eax
je 0x83b1e
push 0
call sub.kernel32.dll_SetLastError
cmp dword [ebp - 0x1c], 0
jne 0x83b2c
call fcn.00082d24
mov dword [ebp - 0x1c], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x83b60
cmp dword [ebp - 0x20], 0
je 0x83b53
mov eax, dword [ebp - 0x20]
push eax
call sub.advapi32.dll_CloseServiceHandle
test eax, eax
je 0x83b53
push 0
call sub.kernel32.dll_SetLastError
xor eax, eax
mov dword [ebp - 0x20], eax
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x83ba2
cmp dword [ebp - 0x14], 0
je 0x83b95
mov eax, dword [ebp - 0x14]
push eax
call sub.advapi32.dll_CloseServiceHandle
test eax, eax
je 0x83b95
push 0
call sub.kernel32.dll_SetLastError
xor eax, eax
mov dword [ebp - 0x14], eax
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x83c74
lea eax, [ebp - 0x4c]
mov edx, 0xb
call fcn.00013c88
ret