Function at 0x14005f520
Capabilities:
Listen for remote procedure calls

Disassembly:
mov rax, rsp
push rbp
lea rbp, [rax - 0x48]
sub rsp, 0x140
mov qword [rsp + 0x68], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x1400d8010]
xor rax, rsp
mov qword [rbp + 0x30], rax
mov edi, ecx
mov byte [0x1400dc76c], 0
mov dword [rbp - 0x6c], 0
mov word [rbp - 0x68], 0x100
xor esi, esi
mov qword [rsp + 0x70], rsi
mov qword [rsp + 0x78], rsi
mov dword [rbp - 0x70], esi
mov qword [rbp - 0x78], rsi
mov dword [rbp - 0x64], esi
xor edx, edx
lea r8d, [rsi + 0x60]
lea rcx, [rbp - 0x30]
call fcn.1400825c0
mov qword [rbp - 0x80], rsi
xor eax, eax
mov qword [rbp - 0x60], rax
mov qword [rbp - 0x58], rax
mov qword [rbp - 0x50], rax
mov qword [rbp - 0x48], rax
mov qword [rbp - 0x40], rax
lea rax, [rbp - 0x70]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x78]
lea r8, [rbp - 0x64]
lea rdx, [rbp - 0x78]
lea rcx, str.RealtekSemiconductorCorp.hdUSBAudio_dt26b99r8h8gj
call qword [sym.imp.api_ms_win_security_base_l1_2_2.dll_DeriveCapabilitySidsFromName]
test eax, eax
je 0x14005f7c0
cmp dword [rbp - 0x70], 1
jne 0x14005f7c6
lea rax, [rsp + 0x70]
mov qword [rsp + 0x50], rax
mov dword [rsp + 0x48], esi
mov dword [rsp + 0x40], esi
mov dword [rsp + 0x38], esi
mov dword [rsp + 0x30], esi
mov dword [rsp + 0x28], esi
mov dword [rsp + 0x20], esi
xor r9d, r9d
xor r8d, r8d
mov dl, 1
lea rcx, [rbp - 0x6c]
call qword [sym.imp.api_ms_win_security_base_l1_1_0.dll_AllocateAndInitializeSid]
test eax, eax
je 0x14005f7c0
mov dword [rbp - 0x2c], 2
mov dword [rbp - 0x30], 0x10000000
mov dword [rbp - 0x28], esi
mov dword [rbp - 0x14], esi
mov dword [rbp - 0x10], 5
mov rax, qword [rsp + 0x70]
mov qword [rbp - 8], rax
mov dword [rbp + 4], 2
mov dword [rbp], 0x10000000
mov dword [rbp + 8], esi
mov qword [rbp + 0x1c], rsi
mov rax, qword [rsp + 0x78]
mov rcx, qword [rax]
mov qword [rbp + 0x28], rcx
lea r9, [rbp - 0x80]
xor r8d, r8d
lea rdx, [rbp - 0x30]
lea ecx, [rsi + 2]
call qword [sym.imp.api_ms_win_security_provider_l1_1_0.dll_SetEntriesInAclW]
test eax, eax
jne 0x14005f7c6
lea edx, [rsi + 1]
lea rcx, [rbp - 0x60]
call qword [sym.imp.api_ms_win_security_base_l1_1_0.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x14005f7c0
xor r9d, r9d
mov r8, qword [rbp - 0x80]
lea edx, [rsi + 1]
lea rcx, [rbp - 0x60]
call qword [sym.imp.api_ms_win_security_base_l1_1_0.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x14005f7c0
lea r9, [rbp - 0x60]
lea r8, str.RealtekAudioRpcEndpoint
lea edx, [rsi + 0xa]
lea rcx, str.ncalrpc
call qword [sym.imp.RPCRT4.dll_RpcServerUseProtseqEpW]
test eax, eax
jne 0x14005f7c6
lea rax, [rbp - 0x60]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], esi
mov dword [rsp + 0x20], 0x4d2
lea r9d, [rsi + 0x21]
xor r8d, r8d
xor edx, edx
lea rcx, [0x140091c90]
call qword [sym.imp.RPCRT4.dll_RpcServerRegisterIf3]
mov ebx, eax
test eax, eax
jne 0x14005f7c9
lea rcx, [0x1400dc818]
call qword [sym.imp.RPCRT4.dll_RpcServerInqBindings]
mov ebx, eax
test eax, eax
jne 0x14005f7c9
xor r9d, r9d
xor r8d, r8d
mov rdx, qword [0x1400dc818]
lea rcx, [0x140091c90]
call qword [sym.imp.RPCRT4.dll_RpcEpRegisterW]
mov ebx, eax
test eax, eax
jne 0x14005f7c9
mov r8d, 0x107
lea rdx, str.RpcServerConnect
lea rcx, [0x140094818]
call fcn.140033040
lea rdx, str.RpcServerConnect
test edi, edi
je 0x14005f77c
mov r8d, edi
lea rcx, str._s_bAdmin_d
call fcn.140033040
xor eax, eax
jmp 0x14005f82c
xor r8d, r8d
lea rcx, str._s_bAdmin_d__NOT_admin__try_to_RpcServerListen
call fcn.140033040
xor r8d, r8d
mov edx, 0x4d2
lea ecx, [r8 + 1]
call qword [sym.imp.RPCRT4.dll_RpcServerListen]
mov ebx, eax
mov r8d, eax
lea rdx, str.RpcServerConnect
lea rcx, str._s_status_d
call fcn.140033040
cmp ebx, 0x6b1
cmove ebx, esi
jmp 0x14005f7c9
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ebx, dword [rbp - 0x70]
mov r8d, ebx
lea rdx, str.RpcServerConnect
lea rcx, str._s_status_d
call fcn.140033040
lea r8, str.Others
lea rdx, [rsp + 0x60]
call fcn.1400045b0
nop
mov r9d, ebx
lea r8, str.End_RpcServerConnect
mov rdx, qword [rax]
mov rcx, qword [0x1400dd2a8]
call fcn.14004e670
nop
mov rdx, qword [rsp + 0x60]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x14005f82a
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, ebx
mov rcx, qword [rbp + 0x30]
xor rcx, rsp
call fcn.140079e30
lea r11, [rsp + 0x140]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret