Function at 0x140001640
Capabilities:
Get hostname
Get user security identifier

Disassembly:
push rbp
push rsi
push r12
push r15
lea rbp, [rsp - 0x3f]
sub rsp, 0xa8
mov rax, qword [0x14003ebd8]
xor rax, rsp
mov qword [rbp + 0x17], rax
mov r15, r8
mov r12, rdx
mov rsi, rcx
test r8, r8
jne 0x14000168a
lea rcx, [rbp - 0x29]
lea r15, [rbp - 0x29]
call fcn.1400015b0
test eax, eax
je 0x14000168a
mov eax, 1
jmp 0x140001b98
mov qword [rsp + 0xe8], rbx
lea rcx, [0x14002e7d0]
mov qword [rsp + 0xa0], rdi
mov r8d, 2
mov rdx, rsi
mov qword [rsp + 0x90], r14
call fcn.14001bedc
test eax, eax
je 0x140001739
mov rdi, 0xffffffffffffffff
cmp word [rsi + rdi*2 + 2], 0
lea rdi, [rdi + 1]
jne 0x1400016c2
lea eax, [rdi*2 + 2]
mov dword [rbp - 0x39], eax
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8d, ebx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r14, rax
test rax, rax
jne 0x140001725
lea ecx, [rax + 2]
call fcn.14001c1d0
mov rcx, rax
lea r9, str.username_sid
lea r8, str.expanded
mov edx, 0xc00001fa
call fcn.140002950
lea rax, [rbp - 0x29]
cmp r15, rax
jmp 0x1400017bd
mov r8d, dword [rbp - 0x39]
mov rdx, rsi
mov rcx, rax
call fcn.140019060
jmp 0x1400017f9
lea rdx, [rbp - 0x39]
mov dword [rbp - 0x39], 0x10
lea rcx, [rbp - 9]
call qword [sym.imp.KERNEL32.dll_GetComputerNameW]
mov rdi, 0xffffffffffffffff
mov rcx, rdi
nop dword [rax + rax]
inc rcx
cmp word [rsi + rcx*2], 0
jne 0x140001760
mov eax, dword [rbp - 0x39]
add eax, ecx
mov ebx, eax
add rbx, rbx
mov dword [rbp - 0x39], eax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r14, rax
test rax, rax
jne 0x1400017d2
lea ecx, [rax + 2]
call fcn.14001c1d0
mov rcx, rax
lea r9, str.username_sid
lea r8, str.expanded
mov edx, 0xc00001fa
call fcn.140002950
lea rcx, [rbp - 0x29]
cmp r15, rcx
jne 0x1400017c8
mov rcx, qword [rbp - 0x29]
call sub.ADVAPI32.dll_LsaClose
mov eax, 2
jmp 0x140001b80
mov edx, dword [rbp - 0x39]
lea rax, [rsi + 4]
mov qword [rsp + 0x28], rax
lea r9, [0x14002e810]
lea rax, [rbp - 9]
mov r8, rdi
mov rcx, r14
mov qword [rsp + 0x20], rax
call fcn.140001d80
lea r8, [rbp - 0x19]
mov rcx, r14
lea rdx, [rbp - 0x11]
call fcn.140017f20
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, r14
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
test ebx, ebx
je 0x140001864
lea rax, [rbp - 0x29]
cmp r15, rax
jne 0x140001835
mov rcx, qword [rbp - 0x29]
call sub.ADVAPI32.dll_LsaClose
mov ecx, 2
call fcn.14001c1d0
mov rcx, rax
lea r9, str.username_sid__
lea r8, str.LSA_UNICODE_STRING
mov edx, 0xc00001fa
call fcn.140002950
mov eax, 4
jmp 0x140001b80
movzx eax, word [rbp - 0x19]
lea r9, [rbp - 0x21]
mov rcx, qword [r15]
lea r8, [rbp - 0x19]
add ax, ax
mov edx, 1
mov word [rbp - 0x19], ax
add ax, 2
mov word [rbp - 0x17], ax
lea rax, [rbp - 0x31]
mov qword [rsp + 0x20], rax
call sub.ADVAPI32.dll_LsaLookupNames
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, qword [rbp - 0x11]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
lea rax, [rbp - 0x29]
cmp r15, rax
jne 0x1400018be
mov rcx, qword [rbp - 0x29]
call sub.ADVAPI32.dll_LsaClose
test ebx, ebx
je 0x14000190c
mov rcx, qword [rbp - 0x21]
call sub.ADVAPI32.dll_LsaFreeMemory
mov rcx, qword [rbp - 0x31]
call sub.ADVAPI32.dll_LsaFreeMemory
mov ecx, ebx
call sub.ADVAPI32.dll_LsaNtStatusToWinError
mov ecx, eax
call fcn.140002510
mov ecx, 2
mov rbx, rax
call fcn.14001c1d0
mov rcx, rax
mov r9, rbx
mov r8, rsi
mov edx, 0x40000207
call fcn.140002950
mov eax, 5
jmp 0x140001b80
mov rcx, qword [rbp - 0x31]
mov edx, dword [rcx]
lea eax, [rdx - 1]
test eax, 0xfffffffb
je 0x140001944
cmp edx, 8
jne 0x1400019f6
lea r8d, [rdx + 3]
mov rdx, rsi
lea rcx, str.NT_Service_
call fcn.14001bedc
test eax, eax
jne 0x1400019f6
mov rcx, qword [rbp - 0x31]
movsxd rax, dword [rcx + 8]
mov rdx, qword [rbp - 0x21]
mov qword [rsp + 0x98], r13
lea rcx, [rax + rax*2]
mov rax, qword [rdx + 8]
lea r13, [rax + rcx*8]
test r13, r13
je 0x140001b48
mov rcx, qword [r13 + 0x10]
call qword [sym.imp.ADVAPI32.dll_IsValidSid]
test eax, eax
je 0x140001b44
mov rcx, qword [r13 + 0x10]
call qword [sym.imp.ADVAPI32.dll_GetSidSubAuthorityCount]
mov r14, rax
movzx ecx, byte [rax]
inc cl
call qword [sym.imp.ADVAPI32.dll_GetSidLengthRequired]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8d, ebx
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [r12], rax
test rax, rax
jne 0x140001a2c
mov rcx, qword [rbp - 0x21]
call sub.ADVAPI32.dll_LsaFreeMemory
mov rcx, qword [rbp - 0x31]
call sub.ADVAPI32.dll_LsaFreeMemory
mov ecx, 2
call fcn.14001c1d0
mov rcx, rax
lea r9, str.username_sid
lea r8, [0x14002e880]
mov edx, 0xc00001fa
call fcn.140002950
mov eax, 8
jmp 0x140001b78
mov rcx, qword [rbp - 0x21]
call sub.ADVAPI32.dll_LsaFreeMemory
mov rcx, qword [rbp - 0x31]
call sub.ADVAPI32.dll_LsaFreeMemory
mov ecx, 2
call fcn.14001c1d0
mov rcx, rax
mov r8, rsi
mov edx, 0x40000232
call fcn.140002950
mov eax, 6
jmp 0x140001b80
movzx ebx, byte [r14]
mov rcx, qword [r13 + 0x10]
inc bl
call qword [sym.imp.ADVAPI32.dll_GetSidIdentifierAuthority]
mov rcx, qword [r12]
movzx r8d, bl
mov rdx, rax
call qword [sym.imp.ADVAPI32.dll_InitializeSid]
test eax, eax
jne 0x140001ab1
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, qword [r12]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, qword [rbp - 0x21]
call sub.ADVAPI32.dll_LsaFreeMemory
mov rcx, qword [rbp - 0x31]
call sub.ADVAPI32.dll_LsaFreeMemory
mov ecx, ebx
call fcn.140002510
mov ecx, 2
mov rbx, rax
call fcn.14001c1d0
mov rcx, rax
mov r9, rbx
mov r8, rsi
mov edx, 0x40000208
call fcn.140002950
mov eax, 9
jmp 0x140001b78
xor bl, bl
nop dword [rax]
nop word [rax + rax]
mov rcx, qword [r12]
movzx edi, bl
mov edx, edi
call qword [sym.imp.ADVAPI32.dll_GetSidSubAuthority]
mov r15, rax
cmp bl, byte [r14]
jae 0x140001ae7
mov rcx, qword [r13 + 0x10]
mov edx, edi
call qword [sym.imp.ADVAPI32.dll_GetSidSubAuthority]
mov ecx, dword [rax]
jmp 0x140001aee
mov rax, qword [rbp - 0x31]
mov ecx, dword [rax + 4]
inc bl
mov dword [r15], ecx
cmp bl, byte [r14]
jbe 0x140001ac0
mov rax, qword [rbp - 0x31]
xor ebx, ebx
cmp dword [rax], 5
jne 0x140001b2e
mov rcx, qword [r12]
call fcn.140001c80
test rax, rax
jne 0x140001b2e
lea ecx, [rbx + 2]
call fcn.14001c1d0
mov rcx, rax
mov r8, rsi
mov edx, 0x40000232
call fcn.140002950
mov ebx, 0xa
mov rcx, qword [rbp - 0x21]
call sub.ADVAPI32.dll_LsaFreeMemory
mov rcx, qword [rbp - 0x31]
call sub.ADVAPI32.dll_LsaFreeMemory
mov eax, ebx
jmp 0x140001b78
mov rdx, qword [rbp - 0x21]
mov rcx, rdx
call sub.ADVAPI32.dll_LsaFreeMemory
mov rcx, qword [rbp - 0x31]
call sub.ADVAPI32.dll_LsaFreeMemory
mov ecx, 2
call fcn.14001c1d0
mov rcx, rax
mov r8, rsi
mov edx, 0x40000232
call fcn.140002950
mov eax, 7
mov r13, qword [rsp + 0x98]
mov rdi, qword [rsp + 0xa0]
mov rbx, qword [rsp + 0xe8]
mov r14, qword [rsp + 0x90]
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.1400180d0
add rsp, 0xa8
pop r15
pop r12
pop rsi
pop rbp
ret