Function at 0x403450
Capabilities:
Get user security identifier
Manipulate user privileges

Disassembly:
mov r11, rsp
sub rsp, 0x1b8
mov rax, qword [0x004131d8]
xor rax, rsp
mov qword [rsp + 0x180], rax
xor eax, eax
mov qword [r11 - 0x18], rdi
mov qword [r11 - 0x20], r12
mov qword [rsp + 0x78], rax
mov qword [r11 - 0x28], r13
mov r13, rdx
mov r12, r8
mov rdi, rcx
lea rdx, [rsp + 0x78]
lea r9, [rsp + 0x48]
mov r8d, 0x810
xor ecx, ecx
mov qword [r11 - 0x138], rax
mov qword [r11 - 0x130], rax
mov qword [r11 - 0x128], rax
mov qword [r11 - 0x120], rax
mov qword [r11 - 0x118], rax
call sub.ADVAPI32.dll_LsaOpenPolicy
test eax, eax
je 0x4034e1
mov ecx, eax
call sub.ADVAPI32.dll_LsaNtStatusToWinError
lea rdx, [0x0040f118]
xor r8d, r8d
mov ecx, eax
call r13
jmp 0x4037ab
lea rax, [rsp + 0x58]
mov qword [rsp + 0x1d8], rbx
xor ebx, ebx
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x50]
lea r9, [rsp + 0x54]
mov qword [rsp + 0x28], rax
xor r8d, r8d
mov rdx, rdi
xor ecx, ecx
mov qword [rsp + 0x1a8], rsi
mov dword [rsp + 0x50], ebx
mov qword [rsp + 0x20], rbx
mov dword [rsp + 0x54], ebx
call qword [sym.imp.ADVAPI32.dll_LookupAccountNameA]
mov edx, dword [rsp + 0x54]
lea ecx, [rbx + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
test rax, rax
mov rsi, rax
jne 0x403562
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rsp + 0x48]
mov edi, eax
call sub.ADVAPI32.dll_LsaClose
lea rdx, str.LocalAlloc_Sid_
xor r8d, r8d
mov ecx, edi
call r13
jmp 0x40379b
mov edx, dword [rsp + 0x50]
mov ecx, 0x40
mov qword [rsp + 0x1b0], rbp
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
test rax, rax
mov rbp, rax
jne 0x4035b0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rsp + 0x48]
mov edi, eax
call sub.ADVAPI32.dll_LsaClose
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
lea rdx, str.LocalAlloc_Domain_
xor r8d, r8d
mov ecx, edi
call r13
jmp 0x403793
lea rax, [rsp + 0x58]
lea r9, [rsp + 0x54]
mov r8, rsi
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x50]
mov rdx, rdi
mov qword [rsp + 0x28], rax
xor ecx, ecx
mov qword [rsp + 0x20], rbp
call qword [sym.imp.ADVAPI32.dll_LookupAccountNameA]
test eax, eax
jne 0x403618
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rsp + 0x48]
mov edi, eax
call sub.ADVAPI32.dll_LsaClose
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_LocalFree]
lea rdx, str.LookupAccountName
xor r8d, r8d
mov ecx, edi
call r13
jmp 0x403793
mov rcx, qword [rsp + 0x48]
lea r9, [rsp + 0x40]
lea r8, [rsp + 0x60]
mov rdx, rsi
mov dword [rsp + 0x40], ebx
call sub.ADVAPI32.dll_LsaEnumerateAccountRights
mov r9d, dword [rsp + 0x40]
mov r10, qword [rsp + 0x60]
cmp eax, 0xc0000034
cmove r9d, ebx
test r9d, r9d
mov dword [rsp + 0x40], r9d
je 0x403693
lea r8, [r10 + 8]
nop
nop
nop
mov rax, qword [r8]
mov rdi, r12
sub rdi, rax
nop
nop
movzx edx, word [rax]
movzx ecx, word [rax + rdi]
sub edx, ecx
jne 0x403683
add rax, 2
test ecx, ecx
jne 0x403670
test edx, edx
je 0x403693
add ebx, 1
add r8, 0x10
cmp ebx, r9d
jb 0x403660
mov rcx, r10
call sub.ADVAPI32.dll_LsaFreeMemory
mov edx, dword [rsp + 0x40]
test edx, edx
je 0x4036cc
cmp ebx, edx
je 0x4036cc
mov rcx, qword [rsp + 0x48]
call sub.ADVAPI32.dll_LsaClose
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov ax, 0x66
jmp 0x403793
lea rcx, [rsp + 0xb0]
mov r8d, 0x63
mov rdx, r12
call qword [sym.imp.MSVCR80.dll_wcsncpy]
lea rax, [rsp + 0xb0]
mov word [rsp + 0x176], 0
mov qword [rsp + 0x70], rax
xor eax, eax
lea rdi, [rsp + 0xb0]
mov rcx, 0xffffffffffffffff
lea r8, [rsp + 0x68]
lea r9d, [rax + 1]
repne scasw ax, word [rdi]
mov rdx, rsi
mov word [rsp + 0x6a], 0xc8
not rcx
sub rcx, 1
add cx, cx
mov word [rsp + 0x68], cx
mov rcx, qword [rsp + 0x48]
call sub.ADVAPI32.dll_LsaAddAccountRights
test eax, eax
mov edi, eax
je 0x403774
mov rcx, qword [rsp + 0x48]
call sub.ADVAPI32.dll_LsaClose
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, edi
call sub.ADVAPI32.dll_LsaNtStatusToWinError
lea rdx, [0x0040f0c0]
xor r8d, r8d
mov ecx, eax
call r13
jmp 0x403793
mov rcx, qword [rsp + 0x48]
call sub.ADVAPI32.dll_LsaClose
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_LocalFree]
xor ax, ax
mov rbp, qword [rsp + 0x1b0]
mov rbx, qword [rsp + 0x1d8]
mov rsi, qword [rsp + 0x1a8]
mov r13, qword [rsp + 0x190]
mov r12, qword [rsp + 0x198]
mov rdi, qword [rsp + 0x1a0]
mov rcx, qword [rsp + 0x180]
xor rcx, rsp
call fcn.0040cd40
add rsp, 0x1b8
ret