Function at 0x140031840
Capabilities:
Get session user name

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
mov qword [rsp + 0x20], r14
push rbp
lea rbp, [rsp - 0x200]
sub rsp, 0x300
mov rax, qword [0x140048040]
xor rax, rsp
mov qword [rbp + 0x1f0], rax
xor r14d, r14d
mov dword [rbp - 0x70], 0x101
lea rdx, [rbp - 0x70]
lea rcx, [rbp - 0x20]
call qword [sym.imp.ADVAPI32.dll_GetUserNameW]
test eax, eax
je 0x140031bcb
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll___p___argv]
mov rcx, qword [rax]
mov rsi, qword [rcx]
mov rbx, 0xffffffffffffffff
mov rdi, rbx
nop dword [rax + rax]
inc rdi
cmp byte [rsi + rdi], r14b
jne 0x1400318b0
call fcn.1400338c0
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x48], rdi
lea r8, [rsp + 0x40]
mov edx, eax
lea rcx, [rsp + 0x50]
call fcn.140002120
nop
lea rcx, [rsp + 0x50]
cmp qword [rsp + 0x68], 7
cmova rcx, qword [rsp + 0x50]
mov rax, qword [rsp + 0x60]
lea r11, [rcx + rax*2]
mov r10, r11
mov rdx, r11
call fcn.140030b90
cmp rax, r11
je 0x14003192b
nop dword [rax]
nop dword [rax + rax]
lea rcx, [r10 - 2]
movzx edx, word [rcx]
cmp dx, 0x5c
je 0x14003192b
cmp dx, 0x2f
je 0x14003192b
mov r10, rcx
cmp rax, rcx
jne 0x140031910
sub r11, r10
sar r11, 1
xorps xmm0, xmm0
movups xmmword [rsp + 0x20], xmm0
mov qword [rsp + 0x30], r14
mov qword [rsp + 0x38], r14
mov r8, r11
mov rdx, r10
lea rcx, [rsp + 0x20]
call fcn.140033170
nop
lea rdx, [rsp + 0x20]
lea rcx, [rbp - 0x48]
call fcn.140032760
nop
mov rdx, qword [rsp + 0x38]
cmp rdx, 7
jbe 0x1400319a9
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x20]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400319a3
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400319a3
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400345ac
nop
mov rdx, qword [rsp + 0x68]
cmp rdx, 7
jbe 0x1400319ee
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400319e9
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400319e9
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400345ac
movdqa xmm0, xmmword [0x14003b830]
movdqu xmmword [rsp + 0x60], xmm0
mov word [rsp + 0x50], r14w
xorps xmm0, xmm0
movups xmmword [rsp + 0x70], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x80], xmm1
lea rax, [rbp - 0x20]
inc rbx
cmp word [rax + rbx*2], 0
jne 0x140031a16
mov r8, rbx
lea rdx, [rbp - 0x20]
lea rcx, [rsp + 0x70]
call fcn.140033170
nop
lea r8, [rbp - 0x48]
lea rdx, [rsp + 0x70]
lea rcx, [rbp - 0x68]
call fcn.1400315a0
nop
mov rdx, qword [rbp - 0x78]
cmp rdx, 7
jbe 0x140031a89
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140031a84
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140031a84
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400345ac
movdqa xmm0, xmmword [0x14003b830]
movdqu xmmword [rbp - 0x80], xmm0
mov word [rsp + 0x70], r14w
lea rdx, [rbp - 0x68]
cmp qword [rbp - 0x50], 7
cmova rdx, qword [rbp - 0x68]
xorps xmm0, xmm0
movups xmmword [rsp + 0x20], xmm0
mov qword [rsp + 0x30], r14
mov qword [rsp + 0x38], r14
mov r8, qword [rbp - 0x58]
lea rcx, [rsp + 0x20]
call fcn.140033170
nop
lea rcx, [rsp + 0x20]
call fcn.1400314a0
movzx ebx, al
mov rdx, qword [rsp + 0x38]
cmp rdx, 7
jbe 0x140031b1d
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x20]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140031b18
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140031b18
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400345ac
movdqa xmm0, xmmword [0x14003b830]
movdqu xmmword [rsp + 0x30], xmm0
mov word [rsp + 0x20], r14w
mov rdx, qword [rbp - 0x50]
cmp rdx, 7
jbe 0x140031b74
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x68]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140031b6f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140031b6f
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400345ac
mov qword [rbp - 0x58], r14
mov qword [rbp - 0x50], 7
mov word [rbp - 0x68], r14w
mov rdx, qword [rbp - 0x30]
cmp rdx, 7
jbe 0x140031bc8
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140031bc3
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140031bc3
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400345ac
movzx eax, bl
mov rcx, qword [rbp + 0x1f0]
xor rcx, rsp
call fcn.140034120
lea r11, [rsp + 0x300]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov r14, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret