Function at 0x140043c50
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 [0x1400e9070]
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 0x140043daa
test rdi, rdi
je 0x140043cee
mov rbx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rdi
jmp 0x140043d6b
cmp qword [0x1400ed810], 0
je 0x140043d4f
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, [0x1400c3148]
mov qword [rsp + 0x20], r8
mov r9, r8
lea r8, str.ProcessUtils
lea rdx, str.OOBEUtils
mov ecx, PathResolve
mov rax, qword [0x1400ed810]
call qword [case.0x140049d6d.0]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalFree]
xor al, al
jmp 0x140044094
mov rbx, qword [0x1400ed818]
test rbx, rbx
je 0x140043d98
mov rbx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [0x1400ed818]
mov dword [rsp + 0x28], eax
lea rax, str.IsSystemProcess:_LookupAccountSid_Error__u_n
mov qword [rsp + 0x20], rax
lea r9, str.ProcessUtils
lea r8, [0x1400c3148]
mov edx, PathResolve
mov rax, qword [rbx + 0x68]
call qword [case.0x140049d6d.0]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalFree]
xor al, al
jmp 0x140044094
mov dword [rsp + 0x70], 0x101
lea rdx, [rsp + 0x70]
lea rcx, [rbp + 0x1b0]
call qword [sym.imp.ADVAPI32.dll_GetUserNameW]
test eax, eax
jne 0x140043e7b
test rdi, rdi
je 0x140043dea
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 0x140043d76
cmp qword [0x1400ed810], 0
je 0x140043e4b
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, [0x1400c3148]
mov qword [rsp + 0x20], r8
mov r9, r8
lea r8, str.ProcessUtils
lea rdx, str.OOBEUtils
mov ecx, PathResolve
mov rax, qword [0x1400ed810]
call qword [case.0x140049d6d.0]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalFree]
xor al, al
jmp 0x140044094
mov rbx, qword [0x1400ed818]
test rbx, rbx
je 0x140043d98
mov rbx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [0x1400ed818]
mov dword [rsp + 0x28], eax
lea rax, str.IsSystemProcess:_GetUserName_Error__u_n
jmp 0x140043d76
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 0x140043ea0
lea rdx, [rbp - 0x60]
lea rcx, [rsp + 0x50]
call fcn.140003250
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 0x140043ed0
mov r8, rbx
lea rdx, [rbp + 0x1b0]
lea rcx, [rsp + 0x78]
call fcn.140003250
nop
test rdi, rdi
je 0x140043f12
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 0x140043f8f
mov rax, qword [0x1400ed810]
test rax, rax
je 0x140043f6a
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, [0x1400c3148]
mov qword [rsp + 0x20], r8
mov r9, r8
lea r8, str.ProcessUtils
lea rdx, str.OOBEUtils
mov ecx, 0xa
call qword [case.0x140049d6d.0]
jmp 0x140043fb8
mov rcx, qword [0x1400ed818]
test rcx, rcx
je 0x140043fb8
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, [0x1400c3148]
mov edx, 0xa
mov rax, qword [rax + 0x68]
call qword [case.0x140049d6d.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 0x14004400b
test rdx, rdx
je 0x140044006
sub r8, rcx
movzx eax, word [rcx]
cmp word [r8 + rcx], ax
jne 0x14004400b
add rcx, 2
sub rdx, 1
jne 0x140043ff2
mov dil, 1
jmp 0x14004400e
xor dil, dil
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalFree]
nop
cmp rsi, 8
jb 0x140044052
lea rdx, [rsi*2 + 2]
mov rax, rbx
cmp rdx, 0x1000
jb 0x140044049
add rdx, 0x27
mov rbx, qword [rbx - 8]
sub rax, rbx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400440c2
mov rcx, rbx
call fcn.140079b70
nop
mov rdx, qword [rsp + 0x68]
cmp rdx, 8
jb 0x140044090
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14004408b
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400440bc
call fcn.140079b70
movzx eax, dil
mov rcx, qword [rbp + 0x5d0]
xor rcx, rsp
call fcn.140079b50
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.140080d34
nop
call fcn.140080d34
nop
int3