Function at 0x1400561a0
Capabilities:
Get session user name
Get user security identifier

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1c0]
sub rsp, 0x2c0
mov rax, qword [0x14012c080]
xor rax, rsp
mov qword [rbp + 0x1b0], rax
mov r14, rcx
mov qword [rsp + 0x50], rcx
xor edi, edi
mov dword [rsp + 0x58], 0x101
lea rdx, [rsp + 0x58]
lea rcx, [rbp - 0x60]
call qword [sym.imp.ADVAPI32.dll_GetUserNameW]
mov dword [rsp + 0x48], edi
mov dword [rsp + 0x44], edi
lea rax, [rsp + 0x5c]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x44]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x48]
xor r8d, r8d
lea rdx, [rbp - 0x60]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
mov ecx, dword [rsp + 0x48]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov r12, rax
mov ecx, dword [rsp + 0x44]
mov eax, 2
mul rcx
mov rbx, 0xffffffffffffffff
cmovb rax, rbx
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov r13, rax
lea rax, [rsp + 0x5c]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x44]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r13
lea r9, [rsp + 0x48]
mov r8, r12
lea rdx, [rbp - 0x60]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
test eax, eax
je 0x140056561
lea rdx, [rsp + 0x50]
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_ConvertSidToStringSidW]
test eax, eax
je 0x140056561
mov r15, qword [rsp + 0x50]
xorps xmm0, xmm0
movups xmmword [rsp + 0x60], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x70], xmm1
nop
inc rbx
cmp word [r15 + rbx*2], di
jne 0x1400562c0
movabs rsi, 0x7ffffffffffffffe
cmp rbx, rsi
ja 0x1400565d6
movabs rdx, 0x7fffffffffffffff
cmp rbx, 7
ja 0x14005631b
mov qword [rsp + 0x70], rbx
mov qword [rsp + 0x78], 7
add rbx, rbx
mov r8, rbx
mov rdx, r15
lea rcx, [rsp + 0x60]
call sub.VCRUNTIME140.dll_memcpy
mov word [rsp + rbx + 0x60], di
xor r15d, r15d
jmp 0x1400563b3
mov rax, rbx
or rax, 7
cmp rax, rsi
jbe 0x14005632d
lea rcx, [rdx + rdx]
jmp 0x14005634e
mov rsi, rax
mov ecx, 0xa
cmp rax, rcx
cmovb rsi, rcx
lea rcx, [rsi + 1]
cmp rcx, rdx
ja 0x1400565ca
add rcx, rcx
je 0x14005638b
cmp rcx, 0x1000
jb 0x140056383
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x1400565ca
mov rcx, rax
call fcn.1400db414
test rax, rax
je 0x140056553
lea rdi, [rax + 0x27]
and rdi, 0xffffffffffffffe0
mov qword [rdi - 8], rax
jmp 0x14005638b
call fcn.1400db414
mov rdi, rax
mov qword [rsp + 0x60], rdi
mov qword [rsp + 0x70], rbx
mov qword [rsp + 0x78], rsi
add rbx, rbx
mov r8, rbx
mov rdx, r15
mov rcx, rdi
call sub.VCRUNTIME140.dll_memcpy
xor r15d, r15d
mov word [rdi + rbx], r15w
lea rdx, [rsp + 0x60]
cmp qword [rsp + 0x78], 7
cmova rdx, qword [rsp + 0x60]
mov rax, qword [rsp + 0x70]
lea rsi, [rdx + rax*2]
lea rdi, [rsp + 0x60]
cmova rdi, qword [rsp + 0x60]
xorps xmm0, xmm0
movups xmmword [rbp - 0x80], xmm0
mov ebx, reloc.WS2_32.dll_ntohs
mov qword [rbp - 0x68], rbx
cmp rdi, rsi
jne 0x1400563fa
mov qword [rbp - 0x70], r15
mov byte [rbp - 0x80], 0
jmp 0x1400564ec
sub rsi, rdi
sar rsi, 1
movabs rax, 0x7fffffffffffffff
cmp rsi, rax
ja 0x1400565dc
cmp rsi, rbx
jbe 0x1400564af
mov rbx, rsi
or rbx, 0xf
cmp rbx, rax
jbe 0x14005645f
mov rbx, rax
movabs rax, 0x8000000000000000
add rax, 0x27
mov rcx, rax
call fcn.1400db414
mov rcx, rax
test rax, rax
je 0x140056499
add rax, 0x27
and rax, 0xffffffffffffffe0
mov qword [rax - 8], rcx
mov qword [rbp - 0x80], rax
mov qword [rbp - 0x68], rbx
jmp 0x1400564b3
mov eax, reloc.WLDAP32.dll_Ordinal_22
cmp rbx, rax
cmovb rbx, rax
lea rcx, [rbx + 1]
test rcx, rcx
jne 0x140056481
mov rax, r15
mov qword [rbp - 0x80], rax
mov qword [rbp - 0x68], rbx
jmp 0x1400564b3
cmp rcx, 0x1000
jb 0x1400564a0
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x1400565d0
jmp 0x140056439
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400db414
mov qword [rbp - 0x80], rax
mov qword [rbp - 0x68], rbx
jmp 0x1400564b3
mov rax, qword [rbp - 0x80]
lea r8, [rbp - 0x80]
cmp rbx, 0xf
cmova r8, rax
mov rcx, r8
mov rdx, rsi
test rsi, rsi
je 0x1400564e3
nop word [rax + rax]
movzx eax, byte [rdi]
mov byte [rcx], al
lea rcx, [rcx + 1]
lea rdi, [rdi + 2]
sub rdx, 1
jne 0x1400564d0
mov qword [rbp - 0x70], rsi
mov byte [r8 + rsi], 0
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, r12
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, r13
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
movups xmm0, xmmword [rbp - 0x80]
movups xmmword [r14], xmm0
movups xmm1, xmmword [rbp - 0x70]
movups xmmword [r14 + 0x10], xmm1
mov rdx, qword [rsp + 0x78]
cmp rdx, 7
jbe 0x140056597
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14005655a
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14005655a
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400db0f4
jmp 0x140056597
mov rcx, r12
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, r13
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
xorps xmm0, xmm0
movups xmmword [r14], xmm0
mov qword [r14 + 0x10], rdi
mov qword [r14 + 0x18], rdi
mov r8d, 5
lea rdx, str.ERROR
mov rcx, r14
call fcn.14006a5b0
mov rax, r14
mov rcx, qword [rbp + 0x1b0]
xor rcx, rsp
call fcn.1400dace0
lea r11, [rsp + 0x2c0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
call fcn.140051f00
nop
call fcn.140051f00
nop
call fcn.140051fa0
nop
call fcn.140051fa0
int3