Function at 0x1000a4a20
Capabilities:
Get user security identifier

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x890
mov rax, qword [0x100165138]
xor rax, rsp
mov qword [rsp + 0x880], rax
mov rbx, qword [rsp + 0x8f0]
xor edi, edi
mov r12, r9
mov r14b, r8b
mov rsi, rdx
mov rbp, rcx
mov qword [rsp + 0x78], rbx
cmp rcx, rdi
jne 0x1000a4a7f
lea r8, [0x100009b70]
lea edx, [rdi + 0x59]
lea rcx, [0x10000a830]
call fcn.10009a050
cmp rsi, rdi
jne 0x1000a4a9c
lea r8, [0x10000a040]
lea rcx, [0x10000a830]
mov edx, 0x5a
call fcn.10009a050
lea rdx, [rsp + 0x70]
mov rcx, rbp
mov qword [rsp + 0x60], rdi
mov qword [rsp + 0x50], rdi
mov qword [rsp + 0x70], rdi
mov qword [rsp + 0x68], rdi
mov dword [rsp + 0x44], edi
mov r15, rdi
mov dword [rsp + 0x48], edi
mov byte [rsp + 0x40], dil
mov dword [rbx], edi
call fcn.10009a5b8
cmp eax, edi
mov r13, qword [rsp + 0x70]
mov ebx, eax
jge 0x1000a4b26
mov rcx, qword [0x1001653b8]
lea rdi, [0x1001653b8]
cmp rcx, rdi
je 0x1000a4e91
test byte [rcx + 0x1c], 1
je 0x1000a4e91
cmp byte [rcx + 0x19], 2
jb 0x1000a4e91
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003988]
mov edx, 0xa
mov r9, rbp
mov dword [rsp + 0x20], eax
call fcn.10001ddb0
jmp 0x1000a4e91
lea rax, [rsp + 0x5c]
lea r9, [rsp + 0x48]
xor r8d, r8d
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x44]
mov rdx, rsi
mov qword [rsp + 0x28], rax
mov rcx, r13
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
cmp eax, edi
jne 0x1000a4bab
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x1000a4bab
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
cmp eax, edi
cmovle ebx, eax
mov rcx, qword [0x1001653b8]
lea rdi, [0x1001653b8]
cmp rcx, rdi
je 0x1000a4c87
test byte [rcx + 0x1c], 1
je 0x1000a4c87
cmp byte [rcx + 0x19], 2
jb 0x1000a4c87
mov edx, 0xb
jmp 0x1000a4c6b
mov ecx, dword [rsp + 0x48]
call qword [sym.imp.ole32.dll_CoTaskMemAlloc]
mov r15, rax
cmp rax, rdi
je 0x1000a4be6
mov r8d, dword [rsp + 0x48]
xor edx, edx
mov rcx, rax
call sub.msvcrt.dll_memset
mov ecx, dword [rsp + 0x44]
add rcx, rcx
call qword [sym.imp.ole32.dll_CoTaskMemAlloc]
mov rbx, rax
mov qword [rsp + 0x68], rax
cmp rax, rdi
jne 0x1000a4bf0
mov ebx, 0x8007000e
jmp 0x1000a4e91
mov r8d, dword [rsp + 0x44]
xor edx, edx
mov rcx, rax
add r8, r8
call sub.msvcrt.dll_memset
lea r11, [rsp + 0x5c]
lea rax, [rsp + 0x44]
mov qword [rsp + 0x30], r11
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x48]
mov r8, r15
mov rdx, rsi
mov rcx, r13
mov qword [rsp + 0x20], rbx
call qword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
cmp eax, edi
jne 0x1000a4c98
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
cmp eax, edi
cmovle ebx, eax
mov rcx, qword [0x1001653b8]
lea rdi, [0x1001653b8]
cmp rcx, rdi
je 0x1000a4c87
test byte [rcx + 0x1c], 1
je 0x1000a4c87
cmp byte [rcx + 0x19], 2
jb 0x1000a4c87
mov edx, 0xc
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003988]
mov r9, r13
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], rsi
call fcn.10001e39c
cmp ebx, 0x80070534
jne 0x1000a4e91
jmp 0x1000a4d2a
mov rcx, qword [0x1001653b8]
lea rdi, [0x1001653b8]
cmp rcx, rdi
je 0x1000a4cd4
test byte [rcx + 0x1c], 1
je 0x1000a4cd4
cmp byte [rcx + 0x19], 4
jb 0x1000a4cd4
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003988]
mov edx, 0xd
mov r9, rsi
mov qword [rsp + 0x20], rbx
call fcn.10001df74
test r14b, r14b
jne 0x1000a4d34
lea r8, [rsp + 0x40]
mov rdx, r13
mov rcx, rsi
call fcn.1000a4eec
mov ebx, eax
test eax, eax
js 0x1000a4e91
cmp byte [rsp + 0x40], r14b
je 0x1000a4d34
mov rcx, qword [0x1001653b8]
cmp rcx, rdi
je 0x1000a4d2a
test byte [rcx + 0x1c], 1
je 0x1000a4d2a
cmp byte [rcx + 0x19], 2
jb 0x1000a4d2a
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003988]
mov edx, 0xe
mov r9, rsi
call fcn.10001db08
mov ebx, 0x8078008b
jmp 0x1000a4e91
lea rdx, [rsp + 0x50]
mov rcx, r15
call sub.ADVAPI32.dll_ConvertSidToStringSidW
test eax, eax
jne 0x1000a4d87
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
mov rcx, qword [0x1001653b8]
cmp rcx, rdi
je 0x1000a4e91
test byte [rcx + 0x1c], 1
je 0x1000a4e91
cmp byte [rcx + 0x19], 2
jb 0x1000a4e91
mov edx, 0xf
jmp 0x1000a4e59
mov rcx, qword [0x1001653b8]
cmp rcx, rdi
je 0x1000a4dc6
test byte [rcx + 0x1c], 1
je 0x1000a4dc6
cmp byte [rcx + 0x19], 4
jb 0x1000a4dc6
mov rax, qword [rsp + 0x50]
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003988]
mov qword [rsp + 0x28], rax
mov edx, 0x10
mov r9, rsi
mov qword [rsp + 0x20], r13
call fcn.10001e074
lea rcx, [rsp + 0x80]
xor edx, edx
mov r8d, 0x800
call sub.msvcrt.dll_memset
mov r9, qword [rsp + 0x50]
lea r8, [0x10000a860]
lea rcx, [rsp + 0x80]
mov edx, 0x400
mov qword [rsp + 0x20], r9
call fcn.100043f10
mov ebx, eax
test eax, eax
js 0x1000a4e91
lea r9, [rsp + 0x58]
lea r8, [rsp + 0x60]
lea rcx, [rsp + 0x80]
mov edx, 1
call sub.ADVAPI32.dll_ConvertStringSecurityDescriptorToSecurityDescriptorW
test eax, eax
jne 0x1000a4e6e
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
mov rcx, qword [0x1001653b8]
cmp rcx, rdi
je 0x1000a4e91
test byte [rcx + 0x1c], 1
je 0x1000a4e91
cmp byte [rcx + 0x19], 2
jb 0x1000a4e91
mov edx, 0x11
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003988]
mov r9d, ebx
call fcn.10001c878
jmp 0x1000a4e91
mov eax, dword [rsp + 0x58]
mov rcx, qword [rsp + 0x78]
mov dword [rcx], eax
mov rax, qword [rsp + 0x60]
and dword [r12 + 0x10], 0
mov qword [r12 + 8], rax
mov dword [r12], 0x18
mov rcx, r13
call qword [sym.imp.ole32.dll_CoTaskMemFree]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ole32.dll_CoTaskMemFree]
mov rcx, r15
call qword [sym.imp.ole32.dll_CoTaskMemFree]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, ebx
mov rcx, qword [rsp + 0x880]
xor rcx, rsp
call fcn.10014e600
mov rbx, qword [rsp + 0x8e0]
add rsp, 0x890
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret