Function at 0x140004e04
Capabilities:
Get session user name

Disassembly:
mov r11, rsp
mov qword [r11 + 0x10], rbx
mov qword [r11 + 0x18], rsi
mov qword [r11 + 0x20], rdi
push r12
push r13
push r14
sub rsp, 0x2b0
mov rax, qword [0x140078180]
xor rax, rsp
mov qword [rsp + 0x2a0], rax
mov rdi, rcx
mov qword [rsp + 0x48], rcx
xor r12d, r12d
mov dword [rsp + 0x20], r12d
xorps xmm0, xmm0
movups xmmword [rcx], xmm0
mov qword [rcx + 0x10], r12
lea r13d, [r12 + 0xf]
mov qword [rcx + 0x18], r13
mov byte [rcx], r12b
mov dword [rsp + 0x20], 1
mov dword [rsp + 0xd0], 0x101
lea rdx, [r11 - 0x1f8]
lea rcx, [r11 - 0x138]
call qword [sym.imp.ADVAPI32.dll_GetUserNameA]
test eax, eax
je 0x14000532b
xorps xmm0, xmm0
movups xmmword [rsp + 0x50], xmm0
mov qword [rsp + 0x60], r12
mov qword [rsp + 0x68], r12
lea rax, [rsp + 0x190]
or r14, 0xffffffffffffffff
mov r8, r14
inc r8
cmp byte [rax + r8], r12b
jne 0x140004ea8
lea rdx, [rsp + 0x190]
lea rcx, [rsp + 0x50]
call fcn.140009740
nop
mov r9d, 0x1d
lea r8, str.wmic_useraccount_where_name_
xor edx, edx
lea rcx, [rsp + 0x50]
call fcn.140009bcc
xorps xmm0, xmm0
movups xmmword [rsp + 0x28], xmm0
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x40], r12
movups xmm0, xmmword [rax]
movups xmmword [rsp + 0x28], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rsp + 0x38], xmm1
mov qword [rax + 0x10], r12
mov qword [rax + 0x18], r13
mov byte [rax], r12b
mov dword [rsp + 0x20], 3
mov r8d, 9
lea rdx, str.__get_sid
lea rcx, [rsp + 0x28]
call fcn.140008db0
xorps xmm0, xmm0
movups xmmword [rsp + 0xe8], xmm0
mov qword [rsp + 0xf8], r12
mov qword [rsp + 0x100], r12
movups xmm0, xmmword [rax]
movups xmmword [rsp + 0xe8], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rsp + 0xf8], xmm1
mov qword [rax + 0x10], r12
mov qword [rax + 0x18], r13
mov byte [rax], r12b
mov dword [rsp + 0x20], 7
mov rdx, qword [rsp + 0x40]
cmp rdx, r13
jbe 0x140004fae
inc rdx
mov rcx, qword [rsp + 0x28]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140004fa9
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140004fa9
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140057a1c
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x40], r13
mov byte [rsp + 0x28], r12b
mov rdx, qword [rsp + 0x68]
cmp rdx, r13
jbe 0x140004ffc
inc rdx
mov rcx, qword [rsp + 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140004ff7
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140004ff7
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140057a1c
lea rcx, [rsp + 0xe8]
cmp qword [rsp + 0x100], r13
cmova rcx, qword [rsp + 0xe8]
lea rdx, [0x140065338]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__popen]
mov rbx, rax
xorps xmm0, xmm0
movdqu xmmword [rsp + 0xd8], xmm0
mov rcx, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__pclose]
mov qword [rsp + 0xc8], rcx
mov qword [rsp + 0x80], rax
lea rax, [rsp + 0xc8]
mov qword [rsp + 0x88], rax
mov byte [rsp + 0x90], 1
mov ecx, 0x20
call fcn.1400579e0
mov rsi, rax
mov qword [rax], r12
mov qword [rax + 8], r12
mov qword [rax + 0x18], r12
mov rcx, qword [rsp + 0xc8]
mov dword [rax + 8], 1
mov dword [rax + 0xc], 1
lea rax, vtable.std::_Ref_count_resource_struct__iobuf____ptr64__int____cdecl___struct__iobuf____ptr64__.0
mov qword [rsi], rax
mov qword [rsi + 0x10], rcx
mov qword [rsi + 0x18], rbx
mov qword [rsp + 0xd8], rbx
mov qword [rsp + 0xe0], rsi
test rbx, rbx
je 0x140005302
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_feof]
test eax, eax
jne 0x140005107
mov r8, rbx
mov edx, 0x80
lea rcx, [rsp + 0x110]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fgets]
test rax, rax
je 0x1400050b9
lea rax, [rsp + 0x110]
mov r8, r14
inc r8
cmp byte [rax + r8], r12b
jne 0x1400050ec
lea rdx, [rsp + 0x110]
mov rcx, rdi
call fcn.140008db0
jmp 0x1400050b9
mov rax, rdi
cmp qword [rdi + 0x18], r13
jbe 0x140005113
mov rax, qword [rdi]
mov rcx, qword [rdi + 0x10]
lea r14, [rcx + rax]
mov rax, rdi
jbe 0x140005123
mov rax, qword [rdi]
lea rbx, [rcx + rax]
mov rcx, rdi
jbe 0x14000512f
mov rcx, qword [rdi]
mov r8b, 0xa
mov rdx, rbx
call fcn.1400573b0
mov rcx, rax
cmp rax, rbx
je 0x140005158
jmp 0x140005150
mov dl, byte [rax]
cmp dl, 0xa
je 0x140005150
mov byte [rcx], dl
inc rcx
inc rax
cmp rax, rbx
jne 0x140005144
mov rax, rdi
cmp qword [rdi + 0x18], r13
jbe 0x140005164
mov rax, qword [rdi]
mov rdx, rcx
sub rdx, rax
sub r14, rcx
mov rbx, qword [rdi + 0x10]
mov rax, rbx
sub rax, rdx
cmp rax, r14
cmovb r14, rax
mov rax, rdi
cmp qword [rdi + 0x18], r13
jbe 0x14000518a
mov rax, qword [rdi]
lea rcx, [rax + rdx]
sub rbx, r14
mov r8, rbx
sub r8, rdx
inc r8
lea rdx, [rcx + r14]
call sub.VCRUNTIME140.dll_memmove
mov qword [rdi + 0x10], rbx
mov rax, rdi
cmp qword [rdi + 0x18], r13
jbe 0x1400051b3
mov rax, qword [rdi]
lea r14, [rax + rbx]
mov rax, rdi
jbe 0x1400051bf
mov rax, qword [rdi]
add rbx, rax
mov rcx, rdi
cmp qword [rdi + 0x18], r13
jbe 0x1400051ce
mov rcx, qword [rdi]
mov r8b, 0x20
mov rdx, rbx
call fcn.1400573b0
mov rcx, rax
cmp rax, rbx
je 0x1400051f7
jmp 0x1400051ef
mov dl, byte [rax]
cmp dl, 0x20
je 0x1400051ef
mov byte [rcx], dl
inc rcx
inc rax
cmp rax, rbx
jne 0x1400051e3
mov rax, rdi
cmp qword [rdi + 0x18], r13
jbe 0x140005203
mov rax, qword [rdi]
mov rdx, rcx
sub rdx, rax
sub r14, rcx
mov rbx, qword [rdi + 0x10]
mov rax, rbx
sub rax, rdx
cmp rax, r14
cmovb r14, rax
mov rax, rdi
cmp qword [rdi + 0x18], r13
jbe 0x140005229
mov rax, qword [rdi]
lea rcx, [rax + rdx]
sub rbx, r14
mov r8, rbx
sub r8, rdx
inc r8
lea rdx, [rcx + r14]
call sub.VCRUNTIME140.dll_memmove
mov qword [rdi + 0x10], rbx
test rsi, rsi
je 0x140005284
or eax, 0xffffffff
lock xadd dword [rsi + 8], eax
cmp eax, 1
jne 0x140005284
mov rbx, qword [rsp + 0xe0]
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
or eax, 0xffffffff
lock xadd dword [rbx + 0xc], eax
cmp eax, 1
jne 0x140005284
mov rcx, qword [rsp + 0xe0]
mov rax, qword [rcx]
call qword [rax + ioctlsocket]
nop
mov rdx, qword [rsp + 0x100]
cmp rdx, r13
jbe 0x1400052ca
inc rdx
mov rcx, qword [rsp + 0xe8]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400052c4
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400052c4
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140057a1c
nop
jmp 0x1400052d1
mov rax, rdi
mov rcx, qword [rsp + 0x2a0]
xor rcx, rsp
call fcn.140057660
lea r11, [rsp + 0x2b0]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop r13
pop r12
ret
lea rdx, str.popen___failed_
lea rcx, [rsp + 0x98]
call fcn.140001810
lea rdx, [0x140074e30]
lea rcx, [rsp + 0x98]
call sub.VCRUNTIME140.dll__CxxThrowException
nop
lea rdx, str.GetUserNameA___failed_
lea rcx, [rsp + 0xb0]
call fcn.140001810
lea rdx, [0x140074e30]
lea rcx, [rsp + 0xb0]
call sub.VCRUNTIME140.dll__CxxThrowException
int3