Function at 0x1400060e0
Capabilities:
Create service
Delete service
Modify service
Persist via windows service
Start service
Stop service

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
sub rsp, 0x530
mov rax, qword [0x14004d010]
xor rax, rsp
mov qword [rsp + 0x520], rax
mov rbp, rdx
cmp ecx, 2
jne 0x1400063a9
mov rcx, qword [rbp + 8]
lea rdx, str.install
call qword [sym.imp.SHLWAPI.dll_StrCmpW]
xor ebx, ebx
lea rdi, str.AtherosSvc
test eax, eax
jne 0x140006288
xor edx, edx
mov qword [rsp + 0x550], r14
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rsi, rax
test rax, rax
je 0x14000626f
xor edx, edx
lea rcx, [rsp + 0x310]
mov r8d, 0x208
call fcn.14001b960
xor edx, edx
lea rcx, [rsp + 0xc0]
mov r8d, 0x208
call fcn.14001b960
mov r8d, 0x102
lea rdx, [rsp + 0xc0]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea r8, [0x14003bb98]
mov edx, 0x104
lea rcx, [rsp + 0x310]
call fcn.14002168c
lea r8, [rsp + 0xc0]
mov edx, 0x104
lea rcx, [rsp + 0x310]
call fcn.1400216f4
lea r8, [0x14003bb98]
mov edx, 0x104
lea rcx, [rsp + 0x310]
call fcn.1400216f4
lea rdx, [rsp + 0x310]
lea rcx, str.The_szFilename_is:__s_n
call fcn.14000db40
mov qword [rsp + 0x60], rbx
lea rax, [rsp + 0x310]
mov qword [rsp + 0x58], rbx
mov r9d, 0xf01ff
mov qword [rsp + 0x50], rbx
mov r8, rdi
mov qword [rsp + 0x48], rbx
mov rdx, rdi
mov qword [rsp + 0x40], rbx
mov rcx, rsi
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], ebx
mov dword [rsp + 0x28], 2
mov dword [rsp + 0x20], 0x10
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov r14, rax
test rax, rax
jne 0x14000634d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.Install_service_failed_error_code___d_n
lea ecx, [rbx + 1]
call fcn.140019630
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea rdx, str.Fail_to_nstall_atheros_agent_service__n
mov ecx, 2
call fcn.140019630
mov r14, qword [rsp + 0x550]
mov rcx, qword [rbp + 8]
lea rdx, str.uninstall
call qword [sym.imp.SHLWAPI.dll_StrCmpW]
test eax, eax
jne 0x140006490
xor eax, eax
xorps xmm0, xmm0
xor edx, edx
mov qword [rsp + 0xa8], rax
xor ecx, ecx
mov dword [rsp + 0xb0], eax
mov r8d, 0xf003f
movups xmmword [rsp + 0x98], xmm0
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov r8d, 0x104
lea rdx, [rsp + 0xc0]
xor ecx, ecx
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov r8d, 0xf01ff
mov rdx, rdi
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rdi, rax
test rax, rax
je 0x14000632a
lea r8, [rsp + 0x98]
mov edx, 1
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_ControlService]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_DeleteService]
mov rcx, rdi
mov ebx, eax
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, 2
test ebx, ebx
je 0x140006398
lea rdx, str.Uninstall_atheros_agent_service_successfully__n
call fcn.140019630
jmp 0x140006490
lea rax, str.Atheros_BT_Stack_Service_Agent
mov edx, 1
lea r8, [rsp + 0x70]
mov qword [rsp + 0x70], rax
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
xor r8d, r8d
xor edx, edx
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea rdx, str.Install_atheros_agent_service_successfully__n
jmp 0x140006276
lea rdx, str.Fail_to_uninstall_atheros_agent_service__n
call fcn.140019630
jmp 0x140006490
lea rcx, str.SetRegInfHwId_Enter___n
call fcn.14000db40
lea rdx, [rsp + 0xc0]
lea rcx, str.C:WindowsSystem32DriverStoreFileRepository_btfilter.inf_
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
lea rdx, [rsp + 0xc0]
mov rbx, rax
lea rcx, str.C:WindowsSystem32DriverStoreFileRepository_atheros_bth.inf_
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x1400064b5
lea rcx, str.SetRegInfHwId__found_path_n
call fcn.14000db40
cmp rbx, 0xffffffffffffffff
je 0x140006416
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindClose]
lea rcx, str.SetRegInfHwId__close_hFind1_n
call fcn.14000db40
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindClose]
lea rcx, str.SetRegInfHwId__close_hFind2_n
call fcn.14000db40
lea rcx, str.SetRegInfHwId_Leave___n
call fcn.14000db40
call fcn.140001600
lea rax, [0x140005ce0]
xor ebx, ebx
lea rdi, str.AtherosSvc
mov qword [rsp + 0x80], rax
lea rcx, [rsp + 0x78]
mov qword [rsp + 0x78], rdi
mov qword [rsp + 0x88], rbx
mov qword [rsp + 0x90], rbx
call qword [sym.imp.ADVAPI32.dll_StartServiceCtrlDispatcherW]
test eax, eax
jne 0x140006490
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.Fail_to_bind_atheros_service_agent_with_SCM__error___d_n
lea ecx, [rbx + 1]
call fcn.140019630
xor eax, eax
mov rcx, qword [rsp + 0x520]
xor rcx, rsp
call fcn.140019b40
mov rbx, qword [rsp + 0x560]
add rsp, 0x530
pop rdi
pop rsi
pop rbp
ret
lea rcx, str.SetRegInfHwId__didnt_find_path_n
call fcn.14000db40
call fcn.1400010a0
int3