Function at 0x140017050
Capabilities:
Get user security identifier

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x770]
sub rsp, 0x870
mov rax, qword [0x14012a210]
xor rax, rsp
mov qword [rbp + 0x760], rax
mov r15, rdx
mov rbx, rcx
test rcx, rcx
jne 0x14001708e
xor eax, eax
jmp 0x1400172ea
xor edi, edi
mov qword [rsp + 0x58], rdi
mov dword [rsp + 0x44], edi
mov dword [rsp + 0x54], 0x800
xor edx, edx
mov r8d, 0x800
lea rcx, [rsp + 0x60]
call fcn.1400a83f0
mov dword [rsp + 0x50], 7
lea rax, [rsp + 0x50]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x54]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x44]
xor r8d, r8d
mov rdx, rbx
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
test eax, eax
jne 0x1400172e8
mov ecx, dword [rsp + 0x44]
call fcn.1400a5c74
mov rsi, rax
lea rax, [rsp + 0x50]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x54]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x44]
mov r8, rsi
mov rdx, rbx
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
mov rcx, rsi
test eax, eax
jne 0x140017144
xor edx, edx
call fcn.1400a59a4
jmp 0x1400172e8
call qword [sym.imp.ADVAPI32.dll_IsValidSid]
test eax, eax
je 0x1400172e8
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_GetSidIdentifierAuthority]
mov rbx, rax
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_GetSidSubAuthorityCount]
movzx r14d, byte [rax]
mov qword [rsp + 0x48], rdi
mov r8d, 1
lea rdx, str.S__lu_
lea rcx, [rsp + 0x48]
call fcn.140016f60
movzx r8d, byte [rbx]
test r8b, r8b
jne 0x1400171cd
cmp byte [rbx + 1], r8b
jne 0x1400171cd
movzx r8d, byte [rbx + 2]
shl r8d, 0x18
movzx eax, byte [rbx + 3]
shl eax, 0x10
add r8d, eax
movzx eax, byte [rbx + 4]
shl eax, 8
add r8d, eax
movzx eax, byte [rbx + 5]
add r8d, eax
lea rdx, [0x1401003f8]
lea rcx, [rsp + 0x48]
call fcn.140016f90
jmp 0x140017205
movzx eax, byte [rbx + 5]
movzx ecx, byte [rbx + 4]
movzx edx, byte [rbx + 3]
movzx r10d, byte [rbx + 2]
movzx r9d, byte [rbx + 1]
mov dword [rsp + 0x38], eax
mov dword [rsp + 0x30], ecx
mov dword [rsp + 0x28], edx
mov dword [rsp + 0x20], r10d
lea rdx, str.0x_02hx_02hx_02hx_02hx_02hx_02hx
lea rcx, [rsp + 0x48]
call fcn.140016f90
mov ebx, edi
test r14d, r14d
je 0x140017236
nop dword [rax]
mov edx, ebx
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_GetSidSubAuthority]
mov r8d, dword [rax]
lea rdx, str.__lu
lea rcx, [rsp + 0x48]
call fcn.140016f90
inc ebx
cmp ebx, r14d
jb 0x140017210
lea rax, [rsp + 0x48]
mov esi, 0xffffffff
cmp r15, rax
je 0x14001729a
mov rbx, qword [r15]
test rbx, rbx
je 0x140017289
mov eax, esi
lock xadd dword [rbx + 0x10], eax
cmp eax, 1
jne 0x140017289
mov rcx, qword [rbx]
test rcx, rcx
je 0x14001726a
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov qword [rbx], rdi
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x14001727c
call fcn.1400a59a4
mov qword [rbx + 8], rdi
mov edx, 0x18
mov rcx, rbx
call fcn.1400a59a4
mov rax, qword [rsp + 0x48]
mov qword [r15], rax
test rax, rax
je 0x14001729f
lock inc dword [rax + 0x10]
mov rax, qword [rsp + 0x48]
test rax, rax
je 0x1400172e3
lock xadd dword [rax + 0x10], esi
cmp esi, 1
jne 0x1400172e3
mov rbx, qword [rsp + 0x48]
mov rcx, qword [rbx]
test rcx, rcx
je 0x1400172c4
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov qword [rbx], rdi
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x1400172d6
call fcn.1400a59a4
mov qword [rbx + 8], rdi
mov edx, 0x18
mov rcx, rbx
call fcn.1400a59a4
mov edi, 1
mov eax, edi
mov rcx, qword [rbp + 0x760]
xor rcx, rsp
call fcn.1400a5460
mov rbx, qword [rsp + 0x8b0]
add rsp, 0x870
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret