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

Disassembly:
push rbp
push rdi
push r12
push r13
lea rbp, [rsp - 0x5e8]
sub rsp, 0x6e8
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x5c0], rax
mov r12, r8
mov qword [rsp + 0x78], rdx
mov r8, rcx
mov dword [rsp + 0x44], 8
mov r13, rcx
mov dword [rsp + 0x40], 0x104
xor edi, edi
lea rcx, [rbp + 0x1c0]
mov r9, rdx
mov qword [rsp + 0x60], rdi
lea rdx, str._s_s
mov dword [rsp + 0x48], edi
call qword [sym.imp.USER32.dll_wsprintfA]
lea rax, [rsp + 0x58]
xor r8d, r8d
mov qword [rsp + 0x30], rax
lea r9, [rsp + 0x44]
lea rax, [rsp + 0x40]
xor ecx, ecx
mov qword [rsp + 0x28], rax
lea rdx, [rbp + 0x1c0]
lea rax, [rbp + 0xb0]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_LookupAccountNameA]
test eax, eax
je 0x1400016e1
mov r9d, 0x3ff
lea r8, str.The_account_name_specified_could_not_be_found._n
mov edx, r9d
mov rcx, r12
call fcn.1400010d0
xor al, al
jmp 0x140001a9d
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x14000170f
call fcn.140001130
mov r9, rax
lea r8, str.Internal_account_lookup_failure:__s_n
mov edx, 0x3ff
mov rcx, r12
call fcn.1400010d0
xor al, al
jmp 0x140001a9d
mov ecx, dword [rsp + 0x44]
mov qword [rsp + 0x6d0], r15
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov dword [rsp + 0x40], 0x104
mov r15, rax
test rax, rax
jne 0x140001750
mov r9d, 0x3ff
lea r8, str.Failed_to_allocate_memory_to_hold_a_SID._n
mov edx, r9d
mov rcx, r12
call fcn.1400010d0
xor al, al
jmp 0x140001a95
lea rax, [rsp + 0x58]
mov r8, r15
mov qword [rsp + 0x30], rax
lea r9, [rsp + 0x44]
lea rax, [rsp + 0x40]
xor ecx, ecx
mov qword [rsp + 0x28], rax
lea rdx, [rbp + 0x1c0]
lea rax, [rbp + 0xb0]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_LookupAccountNameA]
test eax, eax
jne 0x1400017b7
call fcn.140001130
mov r9, rax
lea r8, str.Failed_to_lookup_account_SID:__s_n
mov edx, 0x3ff
mov rcx, r12
call fcn.1400010d0
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
xor al, al
jmp 0x140001a95
xorps xmm0, xmm0
lea r9, [rsp + 0x50]
mov r8d, 0x20ff9
lea rdx, [rbp - 0x80]
xor ecx, ecx
movups xmmword [rbp - 0x80], xmm0
movups xmmword [rbp - 0x70], xmm0
movups xmmword [rbp - 0x60], xmm0
call qword [sym.imp.ADVAPI32.dll_LsaOpenPolicy]
test eax, eax
je 0x140001810
mov ecx, eax
call qword [sym.imp.ADVAPI32.dll_LsaNtStatusToWinError]
lea r8, str.Failed_to_open_local_computer_policy._Unable_to_determine_user_account_rights:__i_n
mov edx, 0x3ff
mov r9d, eax
mov rcx, r12
call fcn.1400010d0
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov al, 1
jmp 0x140001a95
mov rcx, qword [rsp + 0x50]
lea r9, [rsp + 0x48]
lea r8, [rsp + 0x60]
mov qword [rsp + 0x728], rbx
mov rdx, r15
call qword [sym.imp.ADVAPI32.dll_LsaEnumerateAccountRights]
mov ebx, eax
test eax, eax
je 0x140001881
mov ecx, eax
call qword [sym.imp.ADVAPI32.dll_LsaNtStatusToWinError]
cmp eax, 2
je 0x14000194d
mov ecx, ebx
call qword [sym.imp.ADVAPI32.dll_LsaNtStatusToWinError]
lea r8, str.Failed_to_enumerate_account_rights._Unable_to_determine_user_account_rights:__i_n
mov edx, 0x3ff
mov r9d, eax
mov rcx, r12
call fcn.1400010d0
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_LsaClose]
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov al, 1
jmp 0x140001a8d
mov ebx, edi
cmp dword [rsp + 0x48], edi
jbe 0x14000194d
nop dword [rax]
mov r8, qword [rsp + 0x60]
lea rdx, [0x140003714]
mov eax, ebx
lea rcx, [rbp - 0x50]
add rax, rax
mov r8, qword [r8 + rax*8 + 8]
call qword [sym.imp.USER32.dll_wsprintfA]
mov r8, qword [str.SeServiceLogonRight]
lea rax, [rbp - 0x50]
sub r8, rax
nop
movzx edx, byte [rax]
movzx ecx, byte [rax + r8]
sub edx, ecx
jne 0x1400018d3
inc rax
test ecx, ecx
jne 0x1400018c0
test edx, edx
jne 0x1400018e1
mov dword [0x140005090], 1
mov r8, qword [str.SeNetworkLogonRight]
lea rax, [rbp - 0x50]
sub r8, rax
nop
movzx edx, byte [rax]
movzx ecx, byte [rax + r8]
sub edx, ecx
jne 0x140001903
inc rax
test ecx, ecx
jne 0x1400018f0
test edx, edx
jne 0x140001911
mov dword [0x1400050a8], 1
mov r8, qword [str.SeInteractiveLogonRight]
lea rax, [rbp - 0x50]
sub r8, rax
nop
movzx edx, byte [rax]
movzx ecx, byte [rax + r8]
sub edx, ecx
jne 0x140001933
inc rax
test ecx, ecx
jne 0x140001920
test edx, edx
jne 0x140001941
mov dword [0x1400050c0], 1
inc ebx
cmp ebx, dword [rsp + 0x48]
jb 0x140001890
mov rcx, qword [rsp + 0x60]
mov qword [rsp + 0x6e0], rsi
mov qword [rsp + 0x6d8], r14
call qword [sym.imp.ADVAPI32.dll_LsaFreeMemory]
mov rcx, qword [rsp + 0x50]
call fcn.1400011b0
lea rdx, str.SeServiceLogonRight
mov esi, edi
nop dword [rax + rax]
mov eax, esi
lea rcx, [rax + rax*2]
lea r14, [rcx*8]
cmp dword [r14 + rdx + 0x10], 0
jne 0x140001a5c
mov rdi, qword [r14 + rdx]
test rdi, rdi
jne 0x1400019ae
mov qword [rsp + 0x70], rdi
mov dword [rsp + 0x68], edi
jmp 0x140001a01
mov rbx, 0xffffffffffffffff
inc rbx
cmp byte [rdi + rbx], 0
jne 0x1400019b5
lea rcx, [rbx*2 + 2]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
lea rdx, [rbx + 1]
mov qword [rsp + 0x20], rdi
mov rcx, rax
mov qword [rsp + 0x70], rax
lea r9, [0x1400035a8]
mov r8, 0xffffffffffffffff
call fcn.140001010
add bx, bx
mov word [rsp + 0x68], bx
add bx, 2
mov word [rsp + 0x6a], bx
mov rcx, qword [rsp + 0x50]
lea r8, [rsp + 0x68]
mov r9d, 1
mov rdx, r15
call qword [sym.imp.ADVAPI32.dll_LsaAddAccountRights]
lea rbx, str.SeServiceLogonRight
test eax, eax
jne 0x140001aba
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, qword [rbx + r14 + 8]
lea rdx, str.Granted_the__S_right_to__s_s_n
mov rcx, rax
mov r9, r13
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x20], rax
call fcn.140001080
lea rdx, str.SeServiceLogonRight
inc esi
cmp esi, 3
jb 0x140001980
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_LsaClose]
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov al, 1
mov r14, qword [rsp + 0x6d8]
mov rsi, qword [rsp + 0x6e0]
mov rbx, qword [rsp + 0x728]
mov r15, qword [rsp + 0x6d0]
mov rcx, qword [rbp + 0x5c0]
xor rcx, rsp
call fcn.140001fd0
add rsp, 0x6e8
pop r13
pop r12
pop rdi
pop rbp
ret
mov ecx, eax
call qword [sym.imp.ADVAPI32.dll_LsaNtStatusToWinError]
mov r9, qword [rbx + r14 + 8]
lea r8, str.Failed_to_grant_the__S_right_to__s_s:__i_n
mov dword [rsp + 0x30], eax
mov edx, 0x3ff
mov rax, qword [rsp + 0x78]
mov rcx, r12
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r13
call fcn.1400010d0
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_LsaClose]
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
xor al, al
jmp 0x140001a7d