Function at 0x547cc0
Capabilities:
Modify service
Query service status
Start service
Stop service

Disassembly:
push ebp
sub esp, 0xa8
lea edx, [esp + 0x3c]
mov dword [esp + 0x54], 0x567468
lea eax, [esp + 0xa0]
mov dword [esp], edx
mov dword [esp + 0x58], 0x5c5328
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], 0x548037
mov dword [esp + 0x64], esp
call sub.libgcc_s_sjlj_1.dll__Unwind_SjLj_Register
mov dword [esp + 8], 0xf003f
mov dword [esp + 4], 0
mov dword [esp], 0
mov dword [esp + 0x40], 0xffffffff
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
sub esp, 0xc
test eax, eax
mov dword [esp + 0x38], eax
je 0x548028
lea ecx, [esp + 0x7f]
mov dword [esp + 4], 0
mov dword [esp + 8], ecx
mov dword [esp], 0
mov dword [esp + 0x40], 0xffffffff
call fcn.00567710
mov edx, dword [esp + 0xb0]
mov dword [esp + 4], 0
mov dword [esp + 0x80], eax
lea ecx, [esp + 0x80]
mov eax, dword [edx]
mov eax, dword [eax + 4]
mov dword [esp + 0x40], 2
mov dword [esp], eax
call fcn.00567718
sub esp, 8
mov edx, dword [esp + 0x80]
mov ecx, dword [edx - 4]
test ecx, ecx
js 0x547da8
lea ecx, [esp + 0x80]
call fcn.00567720
mov edx, dword [esp + 0x80]
mov ecx, dword [esp + 0xb0]
mov eax, dword [ecx]
mov ecx, dword [eax + 4]
add eax, dword [eax + 0xc]
mov dword [esp], edx
add ecx, ecx
mov dword [esp + 8], ecx
mov dword [esp + 4], eax
call sub.msvcrt.dll_memcpy
mov edx, dword [esp + 0xb0]
mov dword [esp + 4], 0
lea ecx, [esp + 0x80]
mov eax, dword [edx]
mov eax, dword [eax + 4]
mov dword [esp + 0x40], 2
mov dword [esp], eax
call fcn.00567718
sub esp, 8
mov eax, dword [esp + 0x80]
mov dword [esp + 8], 0xf003f
mov dword [esp + 0x40], 1
mov dword [esp + 4], eax
mov eax, dword [esp + 0x38]
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
sub esp, 0xc
mov ecx, dword [esp + 0x80]
mov dword [esp + 0x30], eax
mov eax, 0xffffffff
lock xadd dword [ecx - 4], eax
test eax, eax
jle 0x548005
mov edx, dword [esp + 0x30]
test edx, edx
je 0x548020
cmp dword [esp + 0xb4], 1
je 0x547fd0
jle 0x547ed0
cmp dword [esp + 0xb4], 2
je 0x547fa1
cmp dword [esp + 0xb4], 3
je 0x547f22
mov eax, dword [esp + 0x88]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x40], 0xffffffff
mov edx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov dword [esp], eax
mov dword [esp + 0x30], edx
call edx
sub esp, 4
mov eax, dword [esp + 0x38]
mov dword [esp], eax
call dword [esp + 0x30]
sub esp, 4
lea eax, [esp + 0x3c]
mov dword [esp], eax
call sub.libgcc_s_sjlj_1.dll__Unwind_SjLj_Unregister
mov eax, dword [esp + 0x34]
add esp, 0xa8
pop ebp
ret
mov eax, dword [esp + 0xb4]
test eax, eax
jne 0x547e77
mov eax, dword [esp + 0x30]
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp + 0x40], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
sub esp, 0xc
test eax, eax
jne 0x547e77
mov dword [esp + 0x40], 0xffffffff
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x34], eax
jmp 0x547e82
mov eax, dword [esp + 0x30]
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], 4
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
mov dword [esp + 0x40], 0xffffffff
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
sub esp, 0x2c
test eax, eax
jne 0x547e77
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x34], eax
jmp 0x547e82
lea eax, [esp + 0x84]
mov dword [esp + 0x40], 0xffffffff
mov dword [esp + 4], eax
mov eax, dword [esp + 0x30]
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
sub esp, 8
test eax, eax
jne 0x547e77
jmp 0x547f92
lea eax, [esp + 0x84]
mov dword [esp + 4], 1
mov dword [esp + 8], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x40], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_ControlService]
sub esp, 0xc
test eax, eax
jne 0x547e77
jmp 0x547f92
lea eax, [esp + 0x7f]
sub ecx, 0xc
mov dword [esp], eax
call fcn.00567728
sub esp, 4
jmp 0x547e3f
mov dword [esp + 0x40], 0xffffffff
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x34], eax
jmp 0x547eae