Function at 0x1400060d0
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 [0x140052010]
xor rax, rsp
mov qword [rsp + 0x520], rax
mov rbp, rdx
cmp ecx, 2
jne 0x140006399
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 0x140006278
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 0x14000625f
xor edx, edx
lea rcx, [rsp + 0x310]
mov r8d, 0x208
call fcn.14001bd50
xor edx, edx
lea rcx, [rsp + 0xc0]
mov r8d, 0x208
call fcn.14001bd50
mov r8d, 0x102
lea rdx, [rsp + 0xc0]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea r8, [0x140041008]
mov edx, 0x104
lea rcx, [rsp + 0x310]
call fcn.140025408
lea r8, [rsp + 0xc0]
mov edx, 0x104
lea rcx, [rsp + 0x310]
call fcn.140025470
lea r8, [0x140041008]
mov edx, 0x104
lea rcx, [rsp + 0x310]
call fcn.140025470
lea rdx, [rsp + 0x310]
lea rcx, str.The_szFilename_is:__s_n
call fcn.14000db70
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 0x14000633d
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.1400194a0
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.1400194a0
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 0x140006480
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 0x14000631a
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 0x140006388
lea rdx, str.Uninstall_atheros_agent_service_successfully__n
call fcn.1400194a0
jmp 0x140006480
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 0x140006266
lea rdx, str.Fail_to_uninstall_atheros_agent_service__n
call fcn.1400194a0
jmp 0x140006480
lea rcx, str.SetRegInfHwId_Enter___n
call fcn.14000db70
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 0x1400064a5
lea rcx, str.SetRegInfHwId__found_path_n
call fcn.14000db70
cmp rbx, 0xffffffffffffffff
je 0x140006406
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindClose]
lea rcx, str.SetRegInfHwId__close_hFind1_n
call fcn.14000db70
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindClose]
lea rcx, str.SetRegInfHwId__close_hFind2_n
call fcn.14000db70
lea rcx, str.SetRegInfHwId_Leave___n
call fcn.14000db70
call fcn.140001600
lea rax, [0x140005cd0]
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 0x140006480
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.1400194a0
xor eax, eax
mov rcx, qword [rsp + 0x520]
xor rcx, rsp
call fcn.1400198d0
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.14000db70
call fcn.1400010a0
int3