Function at 0x470780
Capabilities:
Check for time delay via gettickcount
Create process on windows
Create process suspended
Get common file path
Modify service
Query service status
Set current directory
Start service
Stop service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5659b7
mov eax, dword fs:[0]
push eax
sub esp, 0x18c
mov eax, dword [0x5b3680]
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 eax, dword [0x5ba1b0]
mov dword [ebp - 0xe4], eax
mov dword [ebp - 4], 0
mov dword [ebp - 0xe8], 0
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, eax
mov dword [ebp - 0xe0], esi
test esi, esi
jne 0x470825
lea ecx, [ebp - 0xe4]
call fcn.00402b10
mov byte [ebp - 4], 1
push 0x1c8b
push esi
push str.OpenSCManager___returned_ERROR__0x_X____u._n
lea eax, [ebp - 0xe4]
push eax
call fcn.00415d20
add esp, 0x10
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xe4]
call fcn.00402750
jmp 0x4710bb
push 0x17
push str.LTVSrv
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
test edi, edi
jne 0x470af2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp edi, 0x424
je 0x470891
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea ecx, [ebp - 0xe0]
call fcn.00402b10
mov byte [ebp - 4], 2
push 0x1c99
push edi
push str.OpenService___returned_ERROR__0x_X____u._n
lea eax, [ebp - 0xe0]
push eax
call fcn.00415d20
add esp, 0x10
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xe0]
call fcn.00402750
jmp 0x4710bb
push 0x44
push 0
lea eax, [ebp - 0x198]
push eax
call fcn.00531bd0
add esp, 0xc
mov dword [ebp - 0x198], 0x44
xorps xmm0, xmm0
movdqu xmmword [ebp - 0x150], xmm0
call fcn.00477ac0
push eax
mov edx, str.cmd.exe__C
lea ecx, [ebp - 0x140]
call fcn.00435a70
add esp, 4
mov byte [ebp - 4], 3
push 0x58af04
mov edx, eax
lea ecx, [ebp - 0x134]
call fcn.00415f60
add esp, 4
mov byte [ebp - 4], 4
mov ecx, str.Ltprxinstall64.cmd
mov esi, str.Ltprxinstall.cmd
mov edx, dword [ebp - 0xe4]
cmp dword [edx + 0xd8], 0
cmove ecx, esi
push ecx
mov edx, eax
lea ecx, [ebp - 0x104]
call fcn.00415f60
add esp, 4
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x134]
call fcn.00402750
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x140]
call fcn.00402750
lea ecx, [ebp - 0xf8]
call fcn.00402b10
mov byte [ebp - 4], 8
push 0x58af04
push ecx
call fcn.00477ac0
add esp, 4
mov edx, eax
lea ecx, [ebp - 0xfc]
call fcn.00415f60
add esp, 4
mov byte [ebp - 4], 9
push str.Ltprx
mov edx, eax
lea ecx, [ebp - 0x12c]
call fcn.00415f60
add esp, 4
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0xfc]
call fcn.00402750
push 0x104
lea ecx, [ebp - 0xf8]
call fcn.00402410
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push 0xffffffffffffffff
lea ecx, [ebp - 0xf8]
call fcn.004023c0
push dword [ebp - 0x12c]
mov edi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
call edi
lea eax, [ebp - 0x150]
push eax
lea eax, [ebp - 0x198]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
lea ecx, [ebp - 0x104]
call fcn.004023a0
push eax
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov esi, eax
push dword [ebp - 0xf8]
call edi
test esi, esi
je 0x470a62
mov byte [ebp - 4], 0xc
push 0x7530
push dword [ebp - 0x150]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov dword [ebp - 4], 0xb
push dword [ebp - 0x150]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x14c]
call esi
push 0x20
push str.LTVSrv
mov edi, dword [ebp - 0xe0]
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
test eax, eax
je 0x470aa8
lea ecx, [ebp - 0xdc]
push ecx
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_ControlService]
jmp 0x470aa8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
lea ecx, [ebp - 0x118]
call fcn.00402b10
mov byte [ebp - 4], 0xe
push 0x1cbd
push esi
push str.CreateProcess___returned_ERROR__0x_X____u._n
lea eax, [ebp - 0x118]
push eax
call fcn.00415d20
add esp, 0x10
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0x118]
call fcn.00402750
mov edi, dword [ebp - 0xe0]
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call fcn.0045cbf0
mov ecx, dword [ebp - 0xe4]
mov dword [ecx + 0x246c], eax
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x12c]
call fcn.00402750
mov byte [ebp - 4], 7
lea ecx, [ebp - 0xf8]
call fcn.00402750
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x104]
call fcn.00402750
jmp 0x4710bb
lea eax, [ebp - 0xe8]
push eax
push 0
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
jne 0x4710d7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 0x7a
je 0x470b68
lea ecx, [ebp - 0x120]
call fcn.00402b10
mov byte [ebp - 4], 0xf
push 0x1cce
push esi
push str.QueryServiceConfig___returned_ERROR__0x_X____u._n
lea eax, [ebp - 0x120]
push eax
call fcn.00415d20
add esp, 0x10
push edi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
mov edi, dword [ebp - 0xe0]
push edi
call esi
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x120]
call fcn.00402750
jmp 0x4710bb
mov esi, dword [ebp - 0xe8]
push esi
lea ecx, [ebp - 0xc0]
call fcn.00441720
mov byte [ebp - 4], 0x10
mov eax, dword [ebp - 0xc0]
mov dword [ebp - 0xfc], eax
lea ecx, [ebp - 0xe8]
push ecx
push esi
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
jne 0x470c0f
lea ecx, [ebp - 0x128]
call fcn.00402b10
mov byte [ebp - 4], 0x11
push 0x1cdd
push 0x7a
push str.AgentGuard:_QueryServiceConfig___returned_ERROR__0x_X____u._n
lea eax, [ebp - 0x128]
push eax
call fcn.00415d20
add esp, 0x10
push edi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
mov edi, dword [ebp - 0xe0]
push edi
call esi
mov byte [ebp - 4], 0x10
lea ecx, [ebp - 0x128]
call fcn.00402750
mov byte [ebp - 4], 0
lea eax, [ebp - 0xbc]
cmp dword [ebp - 0xc0], eax
je 0x4710bb
lea ecx, [ebp - 0xc0]
call fcn.0041b750
jmp 0x4710bb
mov eax, dword [ebp - 0xfc]
cmp dword [eax + 4], 2
je 0x470c85
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push 2
push 0xffffffffffffffff
push edi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
test eax, eax
jne 0x470c85
lea ecx, [ebp - 0x130]
call fcn.00402b10
mov byte [ebp - 4], 0x12
push 0x1cf5
push 0x7a
push str.ChangeServiceConfig___returned_ERROR__0x_X____u._n
lea eax, [ebp - 0x130]
push eax
call fcn.00415d20
add esp, 0x10
push edi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
mov edi, dword [ebp - 0xe0]
push edi
call esi
mov byte [ebp - 4], 0x10
lea ecx, [ebp - 0x130]
jmp 0x470be4
mov byte [ebp - 4], 0
lea eax, [ebp - 0xbc]
cmp dword [ebp - 0xc0], eax
je 0x470ca2
lea ecx, [ebp - 0xc0]
call fcn.0041b750
lea eax, [ebp - 0xe8]
push eax
push 0x24
lea eax, [ebp - 0x38]
push eax
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x470d14
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov esi, eax
lea ecx, [ebp - 0x11c]
call fcn.00402b10
mov byte [ebp - 4], 0x14
push 0x1d10
push esi
push str.QueryServiceStatusEx___returned_ERROR__0x_X____u._n
lea eax, [ebp - 0x11c]
push eax
call fcn.00415d20
add esp, 0x10
push edi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
mov edi, dword [ebp - 0xe0]
push edi
call esi
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x11c]
call fcn.00402750
jmp 0x4710bb
mov eax, dword [ebp - 0x34]
cmp eax, 1
je 0x470d25
cmp eax, 3
jne 0x471091
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
mov dword [ebp - 0x10c], eax
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x138], eax
mov dword [ebp - 0xf0], eax
mov ecx, 0x2710
cmp dword [ebp - 0x34], 3
jne 0x470e56
mov eax, 0xcccccccd
mul dword [ebp - 0x20]
shr edx, 3
cmp edx, 0x3e8
jae 0x470d6b
mov edx, 0x3e8
jmp 0x470d74
cmp edx, 0x2710
cmova edx, ecx
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0xe8]
push eax
push 0x24
lea eax, [ebp - 0x38]
push eax
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x470ded
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov esi, eax
lea ecx, [ebp - 0xf0]
call fcn.00402b10
mov byte [ebp - 4], 0x15
push 0x1d34
push esi
push str.QueryServiceStatusEx___returned_ERROR__0x_X____u._n
lea eax, [ebp - 0xf0]
push eax
call fcn.00415d20
add esp, 0x10
push edi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
mov edi, dword [ebp - 0xe0]
push edi
call esi
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xf0]
call fcn.00402750
jmp 0x4710bb
mov eax, dword [ebp - 0xf0]
cmp dword [ebp - 0x24], eax
ja 0x470d2b
call esi
sub eax, dword [ebp - 0x10c]
cmp eax, dword [ebp - 0x20]
jbe 0x470d42
lea ecx, [ebp - 0x100]
call fcn.00402b10
mov byte [ebp - 4], 0x16
push str.Timeout_waiting_for_service_to_stop._n
lea eax, [ebp - 0x100]
push eax
call fcn.00415d20
add esp, 8
push edi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
mov edi, dword [ebp - 0xe0]
push edi
call esi
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x100]
call fcn.00402750
jmp 0x4710bb
push 0
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x470ebd
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov esi, eax
lea ecx, [ebp - 0x114]
call fcn.00402b10
mov byte [ebp - 4], 0x17
push 0x1d54
push esi
push str.StartService___returned_ERROR__0x_X____u._n
lea eax, [ebp - 0x114]
push eax
call fcn.00415d20
add esp, 0x10
push edi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
mov edi, dword [ebp - 0xe0]
push edi
call esi
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x114]
call fcn.00402750
jmp 0x4710bb
lea eax, [ebp - 0xe8]
push eax
push 0x24
lea eax, [ebp - 0x38]
push eax
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x470f2f
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov esi, eax
lea ecx, [ebp - 0x124]
call fcn.00402b10
mov byte [ebp - 4], 0x18
push 0x1d62
push esi
push str.AgentGuard:_QueryServiceStatusEx___returned_ERROR__0x_X____u._n
lea eax, [ebp - 0x124]
push eax
call fcn.00415d20
add esp, 0x10
push edi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
mov edi, dword [ebp - 0xe0]
push edi
call esi
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x124]
call fcn.00402750
jmp 0x4710bb
call esi
mov dword [ebp - 0x108], eax
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x13c], eax
mov dword [ebp - 0xf4], eax
cmp dword [ebp - 0x34], 2
jne 0x470ffc
mov eax, 0xcccccccd
mul dword [ebp - 0x20]
shr edx, 3
cmp edx, 0x3e8
jae 0x470f6a
mov edx, 0x3e8
jmp 0x470f78
cmp edx, 0x2710
mov eax, 0x2710
cmova edx, eax
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0xe8]
push eax
push 0x24
lea eax, [ebp - 0x38]
push eax
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x470fdc
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov esi, eax
lea ecx, [ebp - 0xf4]
call fcn.00402b10
mov byte [ebp - 4], 0x19
push 0x1d81
push esi
push str.QueryServiceStatusEx___returned_ERROR__0x_X____u._n
lea eax, [ebp - 0xf4]
push eax
call fcn.00415d20
add esp, 0x10
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xf4]
call fcn.00402750
jmp 0x470ffc
mov eax, dword [ebp - 0xf4]
cmp dword [ebp - 0x24], eax
ja 0x470f2f
call esi
sub eax, dword [ebp - 0x108]
cmp eax, dword [ebp - 0x20]
jbe 0x470f46
cmp dword [ebp - 0x34], 4
je 0x471091
lea ecx, [ebp - 0xec]
call fcn.00402b10
mov byte [ebp - 4], 0x1a
push str.AgentGuard:_Service_not_started._n
lea eax, [ebp - 0xec]
push eax
call fcn.00415d20
push dword [ebp - 0x34]
push str._Current_State:__d_n
lea eax, [ebp - 0xec]
push eax
call fcn.00415d20
add esp, 0x14
push dword [ebp - 0x2c]
push str._Exit_Code:__d_n
lea eax, [ebp - 0xec]
push eax
call fcn.00415d20
add esp, 0xc
push dword [ebp - 0x24]
push str._Check_Point:__d_n
lea eax, [ebp - 0xec]
push eax
call fcn.00415d20
add esp, 0xc
push dword [ebp - 0x20]
push str._Wait_Hint:__d_n
lea eax, [ebp - 0xec]
push eax
call fcn.00415d20
add esp, 0xc
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xec]
call fcn.00402750
push edi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
mov edi, dword [ebp - 0xe0]
push edi
call esi
call fcn.0045cbf0
mov ecx, dword [ebp - 0xe4]
mov dword [ecx + 0x246c], eax
mov dword [ebp - 4], 0xffffffff
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.005295e2
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
lea ecx, [ebp - 0x110]
call fcn.00402b10
mov byte [ebp - 4], 0x13
push 0x1d01
push esi
push str.QueryServiceConfig___returned_ERROR__0x_X___cannot_be_there___u._n
lea eax, [ebp - 0x110]
push eax
call fcn.00415d20
add esp, 0x10
push edi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
mov edi, dword [ebp - 0xe0]
push edi
call esi
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x110]
call fcn.00402750
jmp 0x4710bb