Function at 0x5fca10
Capabilities:
Create service
Query service status
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x448
mov eax, dword [0x7f325c]
xor eax, ebp
mov dword [ebp - 4], eax
mov byte [ebp - 0x431], 0
mov dword [ebp - 0x440], 0
mov dword [ebp - 0x438], 0
mov dword [ebp - 0x448], 0
mov dword [ebp - 0x43c], 0
mov eax, dword [ebp + 8]
push eax
push 0x7b35b4
push 0x104
lea ecx, [ebp - 0x414]
push ecx
call fcn.005fd070
add esp, 0x10
cmp dword [ebp + 0xc], 0
je 0x5fca98
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp + 0xc]
push eax
push str._S_S.sys
push 0x104
lea ecx, [ebp - 0x20c]
push ecx
call fcn.005fd070
add esp, 0x14
jmp 0x5fcab5
mov edx, dword [ebp + 8]
push edx
push str.system32drivers_S.sys
push 0x104
lea eax, [ebp - 0x20c]
push eax
call fcn.005fd070
add esp, 0x10
push 0xf003f
push 0
push 0
call dword [sym.imp.advapi32.dll_OpenSCManagerA]
mov dword [ebp - 0x440], eax
cmp dword [ebp - 0x440], 0
jne 0x5fcadb
or eax, 0xffffffff
jmp 0x5fccb3
push 0
push 0
push 0
lea ecx, [ebp - 0x448]
push ecx
push 0x7b3600
lea edx, [ebp - 0x20c]
push edx
push 1
push 1
push 1
push 0xf01ff
lea eax, [ebp - 0x414]
push eax
lea ecx, [ebp - 0x414]
push ecx
mov edx, dword [ebp - 0x440]
push edx
call dword [sym.imp.advapi32.dll_CreateServiceW]
mov dword [ebp - 0x438], eax
mov eax, dword [0x7f50e8]
and eax, 8
je 0x5fcb6d
cmp dword [ebp - 0x438], 0
je 0x5fcb49
mov ecx, dword [ebp - 0x438]
push ecx
call dword [sym.imp.advapi32.dll_CloseServiceHandle]
mov byte [ebp - 0x431], 1
jmp 0x5fcb68
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x43c], eax
cmp dword [ebp - 0x43c], 0x431
jne 0x5fcb68
mov byte [ebp - 0x431], 1
jmp 0x5fcc64
cmp dword [ebp - 0x438], 0
je 0x5fcbb0
push 0
push 0
mov edx, dword [ebp - 0x438]
push edx
call dword [sym.imp.advapi32.dll_StartServiceA]
test eax, eax
je 0x5fcb92
mov byte [ebp - 0x431], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x43c], eax
mov eax, dword [ebp - 0x438]
push eax
call dword [sym.imp.advapi32.dll_CloseServiceHandle]
jmp 0x5fcc64
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x43c], eax
cmp dword [ebp - 0x43c], 0x431
jne 0x5fcc64
push 0x14
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 0x440]
push edx
call dword [sym.imp.advapi32.dll_OpenServiceA]
mov dword [ebp - 0x438], eax
cmp dword [ebp - 0x438], 0
je 0x5fcc58
lea eax, [ebp - 0x430]
push eax
mov ecx, dword [ebp - 0x438]
push ecx
call dword [sym.imp.advapi32.dll_QueryServiceStatus]
test eax, eax
je 0x5fcc16
cmp dword [ebp - 0x42c], 4
jne 0x5fcc16
mov byte [ebp - 0x431], 1
movzx edx, byte [ebp - 0x431]
test edx, edx
jne 0x5fcc3d
push 0
push 0
mov eax, dword [ebp - 0x438]
push eax
call dword [sym.imp.advapi32.dll_StartServiceA]
test eax, eax
je 0x5fcc3d
mov byte [ebp - 0x431], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x43c], eax
mov ecx, dword [ebp - 0x438]
push ecx
call dword [sym.imp.advapi32.dll_CloseServiceHandle]
jmp 0x5fcc64
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x43c], eax
mov edx, dword [ebp - 0x440]
push edx
call dword [sym.imp.advapi32.dll_CloseServiceHandle]
push 0
mov eax, dword [ebp + 8]
push eax
call fcn.005fc4b0
add esp, 8
mov ecx, dword [ebp - 0x43c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetLastError]
movzx edx, byte [ebp - 0x431]
test edx, edx
je 0x5fcca3
mov dword [ebp - 0x444], 0
jmp 0x5fccad
mov dword [ebp - 0x444], 0xffffffff
mov eax, dword [ebp - 0x444]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00615a5d
mov esp, ebp
pop ebp
ret