Function at 0x14005cd20
Capabilities:
Get session user name

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
lea rbp, [rsp - 0x5e0]
sub rsp, 0x6e0
mov rax, qword [0x1401c1050]
xor rax, rsp
mov qword [rbp + 0x5d0], rax
mov rdi, rcx
lea rdx, [rsp + 0x40]
lea rcx, str.S_1_5_18
call qword [sym.imp.ADVAPI32.dll_ConvertStringSidToSidW]
mov dword [rsp + 0x48], 0x101
lea rax, [rsp + 0x74]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x48]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x3c0]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x48]
lea r8, [rbp - 0x60]
mov rdx, qword [rsp + 0x40]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupAccountSidW]
test eax, eax
jne 0x14005ce7a
test rdi, rdi
je 0x14005cdbe
mov rbx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rdi
jmp 0x14005ce3b
cmp qword [0x1401cde08], 0
je 0x14005ce1f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x30], eax
lea rax, str.IsSystemProcess:_LookupAccountSid_Error__u_n
mov qword [rsp + 0x28], rax
lea r8, [0x14018bd54]
mov qword [rsp + 0x20], r8
mov r9, r8
lea r8, str.ProcessUtils
lea rdx, str.OOBEUtils
mov ecx, 0x32
mov rax, qword [0x1401cde08]
call qword [case.0x14004792d.0]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalFree]
xor al, al
jmp 0x14005d164
mov rbx, qword [0x1401cde10]
test rbx, rbx
je 0x14005ce68
mov rbx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [0x1401cde10]
mov dword [rsp + 0x28], eax
lea rax, str.IsSystemProcess:_LookupAccountSid_Error__u_n
mov qword [rsp + 0x20], rax
lea r9, str.ProcessUtils
lea r8, [0x14018bd54]
mov edx, 0x32
mov rax, qword [rbx + 0x68]
call qword [case.0x14004792d.0]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalFree]
xor al, al
jmp 0x14005d164
mov dword [rsp + 0x70], 0x101
lea rdx, [rsp + 0x70]
lea rcx, [rbp + 0x1b0]
call qword [sym.imp.ADVAPI32.dll_GetUserNameW]
test eax, eax
jne 0x14005cf4b
test rdi, rdi
je 0x14005ceba
mov rbx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rdi
mov dword [rsp + 0x28], eax
lea rax, str.IsSystemProcess:_GetUserName_Error__u_n
jmp 0x14005ce46
cmp qword [0x1401cde08], 0
je 0x14005cf1b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x30], eax
lea rax, str.IsSystemProcess:_GetUserName_Error__u_n
mov qword [rsp + 0x28], rax
lea r8, [0x14018bd54]
mov qword [rsp + 0x20], r8
mov r9, r8
lea r8, str.ProcessUtils
lea rdx, str.OOBEUtils
mov ecx, 0x32
mov rax, qword [0x1401cde08]
call qword [case.0x14004792d.0]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalFree]
xor al, al
jmp 0x14005d164
mov rbx, qword [0x1401cde10]
test rbx, rbx
je 0x14005ce68
mov rbx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [0x1401cde10]
mov dword [rsp + 0x28], eax
lea rax, str.IsSystemProcess:_GetUserName_Error__u_n
jmp 0x14005ce46
xor esi, esi
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x60], rsi
mov qword [rsp + 0x68], rsi
lea rax, [rbp - 0x60]
mov rbx, 0xffffffffffffffff
mov r8, rbx
nop word [rax + rax]
inc r8
cmp word [rax + r8*2], si
jne 0x14005cf70
lea rdx, [rbp - 0x60]
lea rcx, [rsp + 0x50]
call fcn.140006890
nop
mov qword [rsp + 0x78], rsi
mov qword [rbp - 0x78], rsi
mov qword [rbp - 0x70], rsi
lea rax, [rbp + 0x1b0]
nop dword [rax]
inc rbx
cmp word [rax + rbx*2], 0
jne 0x14005cfa0
mov r8, rbx
lea rdx, [rbp + 0x1b0]
lea rcx, [rsp + 0x78]
call fcn.140006890
nop
test rdi, rdi
je 0x14005cfe2
lea rcx, [rsp + 0x50]
cmp qword [rsp + 0x68], 8
cmovae rcx, qword [rsp + 0x50]
mov rax, qword [rdi]
mov qword [rsp + 0x28], rcx
mov rcx, rdi
jmp 0x14005d05f
mov rax, qword [0x1401cde08]
test rax, rax
je 0x14005d03a
lea rcx, [rsp + 0x50]
cmp qword [rsp + 0x68], 8
cmovae rcx, qword [rsp + 0x50]
mov qword [rsp + 0x30], rcx
lea rdx, str.IsSystemProcess:_got_user_name_from_SYSTEM_sid___s
mov qword [rsp + 0x28], rdx
lea r8, [0x14018bd54]
mov qword [rsp + 0x20], r8
mov r9, r8
lea r8, str.ProcessUtils
lea rdx, str.OOBEUtils
mov ecx, 0xa
call qword [case.0x14004792d.0]
jmp 0x14005d088
mov rcx, qword [0x1401cde10]
test rcx, rcx
je 0x14005d088
lea rdx, [rsp + 0x50]
cmp qword [rsp + 0x68], 8
cmovae rdx, qword [rsp + 0x50]
mov rax, qword [rcx]
mov qword [rsp + 0x28], rdx
lea rdx, str.IsSystemProcess:_got_user_name_from_SYSTEM_sid___s
mov qword [rsp + 0x20], rdx
lea r9, str.ProcessUtils
lea r8, [0x14018bd54]
mov edx, 0xa
mov rax, qword [rax + 0x68]
call qword [case.0x14004792d.0]
lea rcx, [rsp + 0x78]
mov rbx, qword [rsp + 0x78]
mov rsi, qword [rbp - 0x70]
cmp rsi, 8
cmovae rcx, rbx
lea r8, [rsp + 0x50]
cmp qword [rsp + 0x68], 8
cmovae r8, qword [rsp + 0x50]
mov rdx, qword [rsp + 0x60]
cmp rdx, qword [rbp - 0x78]
jne 0x14005d0db
test rdx, rdx
je 0x14005d0d6
sub r8, rcx
movzx eax, word [rcx]
cmp word [r8 + rcx], ax
jne 0x14005d0db
add rcx, 2
sub rdx, 1
jne 0x14005d0c2
mov dil, 1
jmp 0x14005d0de
xor dil, dil
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalFree]
nop
cmp rsi, 8
jb 0x14005d122
lea rdx, [rsi*2 + 2]
mov rax, rbx
cmp rdx, 0x1000
jb 0x14005d119
add rdx, 0x27
mov rbx, qword [rbx - 8]
sub rax, rbx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14005d192
mov rcx, rbx
call fcn.14007c190
nop
mov rdx, qword [rsp + 0x68]
cmp rdx, 8
jb 0x14005d160
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14005d15b
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14005d18c
call fcn.14007c190
movzx eax, dil
mov rcx, qword [rbp + 0x5d0]
xor rcx, rsp
call fcn.14007bb60
lea r11, [rsp + 0x6e0]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret
call fcn.140082b90
nop
call fcn.140082b90
nop
int3