Function at 0x180066ac0
Capabilities:
Get session user name

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 8], rcx
push rbp
push rsi
push r12
push r13
lea rbp, [rsp - 0x88]
sub rsp, 0x188
mov eax, dword [0x1800d5a80]
mov r13, r8
mov r12, rdx
test al, 1
jne 0x180066af8
or eax, 1
mov dword [0x1800d5a80], eax
mov esi, dword [rbp + 0xe0]
mov qword [rsp + 0x1b8], rbx
mov qword [rsp + 0x180], rdi
mov qword [rsp + 0x178], r14
lea eax, [rsi + 0x270]
mov qword [rsp + 0x170], r15
mov dword [rsp + 0x48], eax
cmp esi, eax
jae 0x180066dfa
movsxd r15, dword [rbp + 0xe0]
mov ebx, dword [rbp + 0xe0]
mov r14, r15
mov edi, 1
cmp esi, 0x11f
ja 0x180066cfd
je 0x180066c62
mov eax, esi
sub eax, 0x5d
je 0x180066c35
sub eax, 0x4e
je 0x180066c28
sub eax, 0x26
je 0x180066bb7
cmp eax, 0x28
jne 0x180066dcf
mov eax, dword [0x1800d5a7c]
lea edi, [rax + rbx]
cmp edi, dword [r12 + 4]
jae 0x180066da6
mov r8d, eax
mov ecx, ebx
mov rax, qword [rbp + 0xd8]
lea rdx, [0x1800d5a70]
add rcx, qword [rax]
call fcn.18006ff30
test eax, eax
jne 0x180066da6
mov ebx, edi
jmp 0x180066dcf
mov rax, qword [rbp + 0xd8]
lea r9, [rsp + 0x40]
mov r8d, 0x10c
mov word [rbp + 0xe0], di
lea rdx, [rbp + 0xe0]
lea rcx, [rsp + 0x70]
mov rax, qword [rax]
mov qword [rsp + 0x40], rax
call fcn.180059270
lea rdx, [rsp + 0x58]
mov qword [rsp + 0x58], 0xff
lea rcx, [rsp + 0x70]
mov byte [rsp + rax + 0x70], 0
call qword [sym.imp.ADVAPI32.dll_GetUserNameW]
test eax, eax
je 0x180066c15
mov qword [rsp + 0x40], rdi
jmp 0x180066dcf
mov byte [rsp + 0x70], 0
mov qword [rsp + 0x40], 0
jmp 0x180066dcf
mov ebx, dword [rcx]
xor r15d, r15d
xor r14d, r14d
jmp 0x180066dcf
movsd xmm0, qword [str.___CDATA_]
movzx eax, word [0x1800a07d0]
movsd qword [0x1800d5a70], xmm0
mov word [0x1800d5a78], ax
mov dword [0x1800d5a7c], 9
jmp 0x180066dcf
lea rcx, [rsp + 0x70]
mov rax, 0xffffffffffffffff
nop
inc rax
cmp byte [rcx + rax], 0
jne 0x180066c70
mov qword [rsp + 0x58], rax
lea r9, [rsp + 0x50]
mov qword [rsp + 0x60], rax
lea r8, [rbp + 0xe0]
mov word [rbp + 0xe0], di
mov edx, 0x12f
mov rdi, qword [rbp + 0xd8]
xor ecx, ecx
mov qword [rsp + 0x30], 0
mov rax, qword [rdi]
mov qword [rsp + 0x50], rax
lea rax, [rsp + 0x60]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
call fcn.18001fab0
mov rax, qword [rsp + 0x40]
lea rdx, [rbp + 0xe0]
mov dword [rbp + 0xe0], eax
lea rcx, [rsp + 0x50]
mov rax, qword [rdi]
mov r8d, 0x92
mov qword [rsp + 0x50], rax
call fcn.18004ff10
jmp 0x180066dcf
mov eax, esi
sub eax, 0x147
je 0x180066d40
sub eax, 0x4e
je 0x180066dca
cmp eax, 0x4e
jne 0x180066dcf
mov eax, 0xa8
nop dword [rax]
cmp eax, 0xa8
je 0x180066de4
add eax, 0xab
cmp eax, 0x153
jb 0x180066d20
jmp 0x180066dcf
mov r10d, 0x11f
mov eax, r10d
sub eax, 0x11d
je 0x180066db0
sub eax, 1
je 0x180066daa
cmp eax, 1
jne 0x180066db6
mov r9d, dword [r12 + r14*8 + 4]
lea eax, [rbx + 2]
cmp eax, r9d
jae 0x180066d94
mov rdi, qword [rbp + 0xd8]
mov r8, qword [rdi]
mov ecx, ebx
cmp byte [rcx + r8], 0x5d
jne 0x180066d8b
lea ecx, [rax - 1]
cmp byte [rcx + r8], 0x5d
jne 0x180066d8b
cmp byte [rax + r8], 0x3e
je 0x180066dc7
inc ebx
inc eax
cmp eax, r9d
jb 0x180066d71
mov rax, qword [rbp + 0xd0]
inc r15d
inc r14
cmp r15d, dword [rax]
jl 0x180066db6
xor eax, eax
jmp 0x180066e00
mov ebx, dword [r12 + r14*8]
jmp 0x180066db6
cmp ebx, dword [r13]
jae 0x180066da6
dec r10d
cmp r10d, 0x11c
ja 0x180066d46
jmp 0x180066d40
add ebx, 2
mov esi, 0x195
add esi, 0x4e
cmp esi, dword [rsp + 0x48]
jae 0x180066dfa
mov rcx, qword [rbp + 0xb0]
jmp 0x180066b40
cmp ebx, dword [r13]
jae 0x180066da6
mov rdx, qword [rbp + 0xc8]
lea ecx, [rbx + 1]
mov eax, edi
mov dword [rdx], ecx
jmp 0x180066e00
mov eax, dword [rbp + 0xe0]
mov r15, qword [rsp + 0x170]
mov r14, qword [rsp + 0x178]
mov rdi, qword [rsp + 0x180]
mov rbx, qword [rsp + 0x1b8]
add rsp, 0x188
pop r13
pop r12
pop rsi
pop rbp
ret