Function at 0x140242ff8
Capabilities:
Get user security identifier

Disassembly:
mov rax, rsp
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rax - 0x78]
sub rsp, 0x150
mov qword [rbp - 0x80], 0xfffffffffffffffe
mov qword [rax + 0x20], rbx
mov rax, qword [0x1405420e0]
xor rax, rsp
mov qword [rbp + 0x40], rax
mov r14, r8
mov rdi, rdx
mov rbx, rcx
xor r15d, r15d
mov dword [rsp + 0x4c], r15d
mov dword [rsp + 0x48], r15d
mov dword [rsp + 0x40], r15d
lea rax, [rsp + 0x50]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x48]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x4c]
xor r8d, r8d
call qword [sym.imp.api_ms_win_security_lsalookup_l2_1_0.dll_LookupAccountNameW]
nop dword [rax + rax]
test eax, eax
jne 0x140243553
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov dword [rsp + 0x40], eax
cmp eax, 0x7a
je 0x140243165
call fcn.1400550c0
mov r10, qword [rax + 8]
cmp dword [r10], 3
jbe 0x14024314f
lea rax, str.Failed_to_query_sid___first_call_to_LookupAccountName_failed_with_unexpected_error_code
mov qword [rbp - 0x30], rax
mov qword [rbp - 0x28], 0xb0
lea rax, [rsp + 0x40]
mov qword [rbp - 0x20], rax
mov qword [rbp - 0x18], 4
lea rcx, [0x1403cb630]
mov r8, rcx
mov eax, r15d
or rdx, 0xffffffffffffffff
test rbx, rbx
je 0x1402430ed
mov r8, rbx
mov rax, rdx
inc rax
cmp word [rbx + rax*2], r15w
jne 0x1402430e3
mov qword [rbp - 0x10], r8
lea eax, [rax*2 + 2]
mov dword [rbp - 8], eax
mov dword [rbp - 4], r15d
mov rax, r15
test rdi, rdi
je 0x140243117
mov rcx, rdi
mov rax, rdx
inc rax
cmp word [rdi + rax*2], r15w
jne 0x14024310d
mov qword [rbp], rcx
lea eax, [rax*2 + 2]
mov dword [rbp + 8], eax
mov dword [rbp + 0xc], r15d
lea rax, [rbp - 0x50]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 6
xor r9d, r9d
xor r8d, r8d
lea rdx, [0x140484e25]
mov rcx, r10
call fcn.140001208
mov ecx, dword [rsp + 0x40]
movzx eax, cx
or eax, 0x80070000
test ecx, ecx
cmovle eax, ecx
jmp 0x14024359c
mov eax, dword [rsp + 0x4c]
test eax, eax
je 0x140243508
cmp dword [rsp + 0x48], r15d
je 0x140243508
mov byte [rsp + 0x44], r15b
mov edx, eax
mov qword [rsp + 0x60], r14
lea rax, [rsp + 0x44]
mov qword [rsp + 0x68], rax
movaps xmm0, xmmword [rsp + 0x60]
movdqa xmmword [rsp + 0x60], xmm0
lea r8, [rsp + 0x60]
mov rcx, r14
call fcn.1400cbc0c
mov edx, dword [rsp + 0x48]
lea rcx, [rbp + 0x10]
call fcn.14019d860
nop
lea rax, [rsp + 0x50]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x48]
mov qword [rsp + 0x28], rax
mov rsi, qword [rbp + 0x10]
mov qword [rsp + 0x20], rsi
lea r9, [rsp + 0x4c]
mov r8, qword [r14]
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.api_ms_win_security_lsalookup_l2_1_0.dll_LookupAccountNameW]
nop dword [rax + rax]
test eax, eax
jne 0x1402432dd
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov dword [rsp + 0x40], eax
call fcn.1400550c0
mov r10, qword [rax + 8]
cmp dword [r10], 3
jbe 0x1402432c6
lea rax, str.Failed_to_query_sid___second_call_to_LookupAccountName_failed.
mov qword [rbp - 0x30], rax
mov qword [rbp - 0x28], 0x7e
lea rax, [rsp + 0x40]
mov qword [rbp - 0x20], rax
mov qword [rbp - 0x18], 4
lea rcx, [0x1403cb630]
mov r8, rcx
mov rax, r15
or rdx, 0xffffffffffffffff
test rbx, rbx
je 0x140243264
mov r8, rbx
mov rax, rdx
inc rax
cmp word [rbx + rax*2], r15w
jne 0x14024325a
mov qword [rbp - 0x10], r8
lea eax, [rax*2 + 2]
mov dword [rbp - 8], eax
mov dword [rbp - 4], r15d
mov rax, r15
test rdi, rdi
je 0x14024328e
mov rcx, rdi
mov rax, rdx
inc rax
cmp word [rdi + rax*2], r15w
jne 0x140243284
mov qword [rbp], rcx
lea eax, [rax*2 + 2]
mov dword [rbp + 8], eax
mov dword [rbp + 0xc], r15d
lea rax, [rbp - 0x50]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 6
xor r9d, r9d
xor r8d, r8d
lea rdx, [0x140484e25]
mov rcx, r10
call fcn.140001208
mov eax, dword [rsp + 0x40]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
jmp 0x1402434f8
mov qword [rsp + 0x58], r15
lea rax, [rsp + 0x58]
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], r15
mov byte [rsp + 0x70], 1
lea rdx, [rsp + 0x68]
mov rcx, qword [r14]
call qword [sym.imp.api_ms_win_security_sddl_l1_1_0.dll_ConvertSidToStringSidW]
nop dword [rax + rax]
mov ebx, eax
lea rcx, [rsp + 0x60]
call fcn.140094d24
test ebx, ebx
jne 0x140243396
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov dword [rsp + 0x40], eax
call fcn.1400550c0
mov rcx, qword [rax + 8]
cmp dword [rcx], 3
jbe 0x14024337f
lea rax, str.Failed_to_query_sid___converting_sid_to_string_failed
mov qword [rbp - 0x30], rax
mov qword [rbp - 0x28], WSAStartup
lea rax, [rsp + 0x40]
mov qword [rbp - 0x20], rax
mov qword [rbp - 0x18], 4
lea rax, [rbp - 0x50]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 4
xor r9d, r9d
xor r8d, r8d
lea rdx, [0x140484e9e]
call fcn.140001208
mov eax, dword [rsp + 0x40]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
jmp 0x1402434e1
movdqa xmm0, xmmword [0x140420310]
movdqu xmmword [rbp - 0x68], xmm0
mov word [rbp - 0x78], r15w
mov rdx, qword [rbp + 0x18]
cmp rsi, rdx
je 0x1402433e4
sub rdx, rsi
sar rdx, 1
lea rcx, [rbp - 0x78]
cmp rdx, 7
ja 0x1402433dc
mov qword [rbp - 0x68], rdx
lea rbx, [rdx + rdx]
mov r8, rbx
mov rdx, rsi
call sub.api_ms_win_crt_private_l1_1_0.dll_memmove
mov word [rbp + rbx - 0x78], r15w
jmp 0x1402433e4
mov r9, rsi
call fcn.140055474
call fcn.1400550c0
mov r10, qword [rax + 8]
cmp dword [r10], 5
jbe 0x1402434d3
lea rax, str.Sid_successfully_retrieved
mov qword [rbp - 0x30], rax
mov qword [rbp - 0x28], 0x36
lea r8, [rbp - 0x78]
cmp qword [rbp - 0x60], 8
cmovae r8, qword [rbp - 0x78]
lea rcx, [0x1403cb630]
mov r9, rcx
mov rax, r15
or rdx, 0xffffffffffffffff
test r8, r8
je 0x14024343e
mov r9, r8
mov rax, rdx
inc rax
cmp word [r8 + rax*2], r15w
jne 0x140243434
mov qword [rbp - 0x20], r9
lea eax, [rax*2 + 2]
mov dword [rbp - 0x18], eax
mov dword [rbp - 0x14], r15d
mov r8, rcx
mov rax, r15
test rdi, rdi
je 0x14024346b
mov r8, rdi
mov rax, rdx
inc rax
cmp word [rdi + rax*2], r15w
jne 0x140243461
mov qword [rbp - 0x10], r8
lea eax, [rax*2 + 2]
mov dword [rbp - 8], eax
mov dword [rbp - 4], r15d
mov r8, r15
mov rax, qword [rsp + 0x58]
test rax, rax
je 0x14024349a
mov rcx, rax
mov r8, rdx
inc r8
cmp word [rax + r8*2], r15w
jne 0x140243490
mov qword [rbp], rcx
lea eax, [r8*2 + 2]
mov dword [rbp + 8], eax
mov dword [rbp + 0xc], r15d
lea rax, [rbp - 0x50]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 6
xor r9d, r9d
xor r8d, r8d
lea rdx, [0x140484dd8]
mov rcx, r10
call fcn.140001208
mov ebx, dword [rsp + 0x40]
lea rcx, [rbp - 0x78]
call fcn.140055f70
nop
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x1402434f8
call qword [sym.imp.KERNEL32.dll_LocalFree]
nop dword [rax + rax]
nop
lea rcx, [rbp + 0x10]
call fcn.140097a24
mov eax, ebx
jmp 0x14024359c
call fcn.1400550c0
mov rcx, qword [rax + 8]
cmp dword [rcx], 3
jbe 0x14024354c
lea rax, str.Failed_to_query_sid___sid_or_domain_size_is_0
mov qword [rbp + 0x30], rax
mov qword [rbp + 0x38], 0x5c
lea rax, [rbp + 0x10]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
lea rdx, [0x140484838]
call fcn.140001208
mov eax, 0x80070452
jmp 0x14024359c
call fcn.1400550c0
mov rcx, qword [rax + 8]
cmp dword [rcx], 3
jbe 0x140243597
lea rax, str.Failed_to_query_sid___calling_LookupAccountName_for_the_first_time_should_return_false
mov qword [rbp + 0x30], rax
mov qword [rbp + 0x38], 0xae
lea rax, [rbp + 0x10]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
lea rdx, [0x140484838]
call fcn.140001208
mov eax, 0x80004005
mov rcx, qword [rbp + 0x40]
xor rcx, rsp
call fcn.140356560
mov rbx, qword [rsp + 0x198]
add rsp, 0x150
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret