Function at 0x140003160
Capabilities:
Copy file
Create service
Get common file path

Disassembly:
sub rsp, 0x728
mov dword [rsp + 0x5e0], 0
mov qword [rsp + 0x70], 0
mov qword [rsp + 0x190], 0
mov r8d, 0x10000000
xor edx, edx
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov qword [rsp + 0x70], rax
cmp qword [rsp + 0x70], 0
jne 0x140003216
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x5e0], eax
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
lea rax, [rsp + 0x700]
mov qword [rsp + 0x20], rax
mov r9d, 0x400
mov r8d, dword [rsp + 0x5e0]
xor edx, edx
mov ecx, 0x1300
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
mov rdx, qword [rsp + 0x700]
lea rcx, str.Failed_to_install_LC_Agent._n_s
call fcn.140005008
mov rcx, qword [rsp + 0x700]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, 0xffffffff
jmp 0x14000357d
mov r8d, 0x10000000
lea rdx, [0x140011b08]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov qword [rsp + 0x190], rax
cmp qword [rsp + 0x190], 0
je 0x140003271
mov rcx, qword [rsp + 0x190]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call fcn.140004270
mov dword [rsp + 0x708], eax
cmp dword [rsp + 0x708], 0
je 0x140003271
mov eax, dword [rsp + 0x708]
jmp 0x14000357d
mov r8d, 0x105
lea rdx, [rsp + 0x5f0]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x1400032a1
lea rcx, str._nFailed_to_install_LC_Agent._Could_not_get_agent_exe_file_name._n
call fcn.140005008
mov eax, 0xffffffff
jmp 0x14000357d
lea r8, [rsp + 0x5f0]
mov edx, 0x105
lea rcx, [rsp + 0x80]
call fcn.140005ab0
mov edx, 0x5c
lea rcx, [rsp + 0x80]
call fcn.140004b20
mov byte [rax], 0
mov edx, 0x105
lea rcx, [rsp + 0x2b0]
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea r8, [rsp + 0x5f0]
mov edx, 0x105
lea rcx, [rsp + 0x4d0]
call fcn.140005ab0
mov edx, 0x5c
lea rcx, [rsp + 0x4d0]
call fcn.140004b20
mov byte [rax], 0
lea r8, str.lc7dump64.dll
mov edx, 0x105
lea rcx, [rsp + 0x4d0]
call fcn.140005b24
mov edx, 0x105
lea rcx, [rsp + 0x1a0]
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea r8, str.lc7agent.exe
mov edx, 0x105
lea rcx, [rsp + 0x1a0]
call fcn.140005b24
mov edx, 0x105
lea rcx, [rsp + 0x3c0]
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea r8, str.lc7dump.dll
mov edx, 0x105
lea rcx, [rsp + 0x3c0]
call fcn.140005b24
lea rdx, [rsp + 0x2b0]
lea rcx, [rsp + 0x80]
call fcn.140005760
test eax, eax
je 0x140003426
xor r8d, r8d
lea rdx, [rsp + 0x1a0]
lea rcx, [rsp + 0x5f0]
call qword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x1400033e3
lea r8, [rsp + 0x1a0]
lea rdx, [rsp + 0x5f0]
lea rcx, str._nFailed_to_install_LC_Agent._Could_not_copy_agent_exefile.__s_____s_n
call fcn.140005008
mov eax, 0xffffffff
jmp 0x14000357d
xor r8d, r8d
lea rdx, [rsp + 0x3c0]
lea rcx, [rsp + 0x4d0]
call qword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x140003426
lea r8, [rsp + 0x3c0]
lea rdx, [rsp + 0x4d0]
lea rcx, str._nFailed_to_install_LC_Agent._Could_not_copy_agent_dll_file.__s_____s_n
call fcn.140005008
mov eax, 0xffffffff
jmp 0x14000357d
lea rax, [0x1400118bf]
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x58], 0
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x48], 0
mov qword [rsp + 0x40], 0
lea rax, [rsp + 0x1a0]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x28], 3
mov dword [rsp + 0x20], 0x10
mov r9d, 0x10000000
lea r8, str.LC7_Remote_Agent
lea rdx, [0x140011c50]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov qword [rsp + 0x190], rax
cmp qword [rsp + 0x190], 0
jne 0x140003556
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x5e0], eax
cmp dword [rsp + 0x5e0], 0x431
jne 0x1400034e9
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea rcx, str._nLC_Agent_has_already_been_installed_n
call fcn.140005008
xor eax, eax
jmp 0x14000357d
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
lea rax, [rsp + 0x710]
mov qword [rsp + 0x20], rax
mov r9d, 0x400
mov r8d, dword [rsp + 0x5e0]
xor edx, edx
mov ecx, 0x1300
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
mov rdx, qword [rsp + 0x710]
lea rcx, str._nFailed_to_install_LC_Agent._n_s
call fcn.140005008
mov rcx, qword [rsp + 0x710]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, 0xffffffff
jmp 0x14000357d
mov rcx, qword [rsp + 0x190]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea rcx, str._nLC_Agent_has_been_installed_n
call fcn.140005008
xor eax, eax
add rsp, 0x728
ret