Function at 0x140018560
Capabilities:
Create thread
Listen for remote procedure calls
Print debug messages

Disassembly:
mov r11, rsp
push rbp
push rdi
lea rbp, [r11 - 0x48]
sub rsp, 0x138
mov rax, qword [0x14006c038]
xor rax, rsp
mov qword [rbp + 0x20], rax
mov qword [r11 + 8], rbx
lea rcx, [rbp - 0x40]
mov qword [r11 + 0x18], r14
xor edx, edx
mov qword [r11 - 0x18], r15
xor r15d, r15d
mov byte [0x14006ef2a], 0
mov dword [rbp - 0x7c], 0
mov word [rbp - 0x78], 0x100
lea r8d, [r15 + 0x60]
mov qword [rsp + 0x68], r15
mov qword [rsp + 0x60], r15
mov dword [rbp - 0x80], r15d
mov qword [rsp + 0x78], r15
mov dword [rbp - 0x74], r15d
call fcn.14001cd80
xor eax, eax
mov qword [rsp + 0x70], r15
lea rcx, str.before_DeriveCapabilitySidsFromName_r_n
mov qword [rbp - 0x70], rax
mov qword [rbp - 0x68], rax
mov qword [rbp - 0x60], rax
mov qword [rbp - 0x58], rax
mov qword [rbp - 0x50], rax
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea rax, [rbp - 0x80]
lea r9, [rsp + 0x60]
mov qword [rsp + 0x20], rax
lea r8, [rbp - 0x74]
lea rdx, [rsp + 0x78]
lea rcx, str.Fortemedia.audioSettings_4pejv7q2gmsnr
call qword [sym.imp.api_ms_win_security_base_l1_2_2.dll_DeriveCapabilitySidsFromName]
test eax, eax
je 0x140017920
lea rcx, str.After_DeriveCapabilitySidsFromName_r_n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [rbp - 0x80], 1
jne 0x140017926
lea rcx, str.before_AllocateAndInitializeSid_r_n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea rax, [rsp + 0x68]
xor r9d, r9d
mov qword [rsp + 0x50], rax
lea rcx, [rbp - 0x7c]
mov dword [rsp + 0x48], r15d
xor r8d, r8d
mov dword [rsp + 0x40], r15d
mov dl, 1
mov dword [rsp + 0x38], r15d
mov dword [rsp + 0x30], r15d
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], r15d
call qword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x140017920
lea rcx, str.After_AllocateAndInitializeSid_r_n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov rax, qword [rsp + 0x68]
lea r9, [rsp + 0x70]
mov qword [rbp - 0x18], rax
lea ecx, [r15 + 2]
mov rax, qword [rsp + 0x60]
xor r8d, r8d
mov dword [rbp - 0x3c], 2
mov dword [rbp - 0x40], 0x10000000
mov dword [rbp - 0x38], r15d
mov dword [rbp - 0x24], r15d
mov dword [rbp - 0x20], 5
mov dword [rbp - 0xc], 2
mov dword [rbp - 0x10], 0x10000000
mov dword [rbp - 8], r15d
mov qword [rbp + 0xc], r15
mov rdx, qword [rax]
mov qword [rbp + 0x18], rdx
lea rdx, [rbp - 0x40]
call qword [sym.imp.ADVAPI32.dll_SetEntriesInAclW]
lea rcx, str.After_SetEntriesInAcl_r_n
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
test ebx, ebx
jne 0x140017926
lea edx, [rbx + 1]
lea rcx, [rbp - 0x70]
call qword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x140017920
lea rcx, str.before_InitializeSecurityDescriptor_r_n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov r8, qword [rsp + 0x70]
lea edx, [rbx + 1]
xor r9d, r9d
lea rcx, [rbp - 0x70]
call qword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x140017920
lea rcx, str.after_InitializeSecurityDescriptor_r_n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea r9, [rbp - 0x70]
lea r8, str.HsaSampleRpcEndpoint
lea edx, [rbx + 0xa]
lea rcx, str.ncalrpc
call qword [sym.imp.RPCRT4.dll_RpcServerUseProtseqEpW]
test eax, eax
jne 0x140017926
lea rcx, str.after_RpcServerUseProtseq_r_n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea rax, [rbp - 0x70]
xor r8d, r8d
mov qword [rsp + 0x38], rax
lea r9d, [r15 + 0x21]
mov qword [rsp + 0x30], r15
lea rcx, [0x14005aa30]
mov dword [rsp + 0x28], r15d
xor edx, edx
mov dword [rsp + 0x20], 0x4d2
call qword [sym.imp.RPCRT4.dll_RpcServerRegisterIf3]
mov edi, eax
test eax, eax
jne 0x140017929
lea rcx, str.after_RpcServerRegisterIf3_r_n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea rcx, [0x14006f548]
call qword [sym.imp.RPCRT4.dll_RpcServerInqBindings]
mov edi, eax
test eax, eax
jne 0x140017929
lea rcx, str.after_RpcServerInqBindings_r_n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov rdx, qword [0x14006f548]
lea rcx, [0x14005aa30]
xor r9d, r9d
xor r8d, r8d
call qword [sym.imp.RPCRT4.dll_RpcEpRegisterW]
mov edi, eax
test eax, eax
jne 0x140017929
lea rcx, str.after_RpcEpRegister_r_n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
xor r8d, r8d
lea ecx, [rbx + 1]
mov edx, 0x4d2
call qword [sym.imp.RPCRT4.dll_RpcServerListen]
lea rcx, str.after_RpcServerListen_r_n
mov edi, eax
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp edi, 0x6b1
cmove edi, r15d
jmp 0x140017929
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [rbp - 0x80]
mov r14, qword [rsp + 0x78]
mov qword [rsp + 0x158], rsi
test r14, r14
je 0x140017966
mov eax, dword [rbp - 0x74]
test eax, eax
je 0x14001795d
mov esi, eax
mov rbx, r14
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov qword [rbx], r15
lea rbx, [rbx + 8]
sub rsi, 1
jne 0x140017947
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov r14, qword [rsp + 0x60]
test r14, r14
je 0x14001799f
mov eax, dword [rbp - 0x80]
test eax, eax
je 0x140017996
mov esi, eax
mov rbx, r14
nop dword [rax]
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov qword [rbx], r15
lea rbx, [rbx + 8]
sub rsi, 1
jne 0x140017980
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rsp + 0x68]
mov r15, qword [rsp + 0x130]
mov r14, qword [rsp + 0x160]
mov rsi, qword [rsp + 0x158]
mov rbx, qword [rsp + 0x150]
test rcx, rcx
je 0x1400179cf
call qword [sym.imp.ADVAPI32.dll_FreeSid]
mov rcx, qword [rsp + 0x70]
test rcx, rcx
je 0x1400179df
call qword [sym.imp.KERNEL32.dll_LocalFree]
lea rcx, str.Finished_r_n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov eax, edi
mov rcx, qword [rbp + 0x20]
xor rcx, rsp
call fcn.140019840
add rsp, 0x138
pop rdi
pop rbp
ret
push rdi
sub rsp, 0x40
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov qword [rsp + 0x58], rbx
mov rdi, rcx
mov ecx, 0x748
call fcn.14001986c
mov rbx, rax
mov qword [rsp + 0x50], rax
xor edx, edx
mov r8d, 0x748
mov rcx, rax
call fcn.14001cd80
mov rcx, rbx
call fcn.140006ea0
nop
mov qword [rdi + 0x58], rax
lea rcx, [rdi + 8]
mov qword [rax + 0x3e8], rcx
mov rcx, qword [rdi + 0x58]
mov rax, qword [rdi + 0x10]
mov qword [rcx + 0x548], rax
mov rbx, qword [rdi + 0x58]
xor edi, edi
mov qword [rsp + 0x28], rdi
mov dword [rsp + 0x20], edi
mov r9, rbx
lea r8, [0x140007a00]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [rbx + 0x610], rax
mov qword [rsp + 0x28], rdi
mov dword [rsp + 0x20], edi
mov r9, rbx
lea r8, [0x140008100]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [rbx + 0x618], rax
mov qword [rsp + 0x28], rdi
mov dword [rsp + 0x20], edi
mov r9, rbx
lea r8, [0x140008150]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [rbx + 0x620], rax
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
mov qword [rsp + 0x28], rdi
mov dword [rsp + 0x20], edi
mov r9, rbx
lea r8, [0x140008570]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [rbx + 0x628], rax
mov rbx, qword [rsp + 0x58]
add rsp, 0x40
pop rdi
jmp 0x140017640