Function at 0x140001100
Capabilities:
Get hostname

Disassembly:
push rbx
push r13
push r14
sub rsp, 0xb0
mov rax, qword [0x140029c30]
xor rax, rsp
mov qword [rsp + 0x80], rax
mov rbx, r8
mov r14, rdx
mov r13, rcx
test r8, r8
jne 0x14000114a
lea rcx, [rsp + 0x40]
lea rbx, [rsp + 0x40]
call fcn.140001000
test eax, eax
je 0x14000114a
mov eax, 1
jmp 0x140001453
lea rcx, [0x140022804]
mov r8d, 2
mov rdx, r13
mov qword [rsp + 0xa0], rsi
mov qword [rsp + 0x98], rdi
call fcn.1400173bc
test eax, eax
je 0x1400011bc
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, r13
repne scasw ax, word [rdi]
not rcx
lea eax, [rcx + rcx]
mov dword [rsp + 0x30], eax
mov edi, eax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rsi, rax
test rax, rax
je 0x140001211
mov r8d, dword [rsp + 0x30]
mov rdx, r13
mov rcx, rax
call fcn.140016eb0
jmp 0x14000127a
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x60]
mov dword [rsp + 0x30], 0x10
call qword [sym.imp.KERNEL32.dll_GetComputerNameW]
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, r13
repne scasw ax, word [rdi]
mov eax, dword [rsp + 0x30]
not rcx
dec rcx
add eax, ecx
mov edi, eax
mov dword [rsp + 0x30], eax
add rdi, rdi
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rdi
mov rcx, rax
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rsi, rax
test rax, rax
jne 0x140001250
call fcn.140016bd0
lea r9, str.username_sid
lea r8, str.expanded
lea rcx, [rax + 0x60]
mov edx, 0xc00001fa
call fcn.140007220
lea rdx, [rsp + 0x40]
cmp rbx, rdx
jne 0x140001246
mov rcx, qword [rsp + 0x40]
call sub.ADVAPI32.dll_LsaClose
mov eax, 2
jmp 0x140001443
mov edx, dword [rsp + 0x30]
lea rax, [r13 + 4]
lea r9, [0x1400227c0]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x60]
or r8, 0xffffffffffffffff
mov rcx, rsi
mov qword [rsp + 0x20], rax
call fcn.140016e78
or rcx, 0xffffffffffffffff
xor eax, eax
mov qword [rsp + 0x58], rsi
mov rdi, rsi
lea r9, [rsp + 0x48]
lea r8, [rsp + 0x50]
repne scasw ax, word [rdi]
lea rax, [rsp + 0x38]
mov edx, 1
not rcx
mov qword [rsp + 0x20], rax
dec rcx
add cx, cx
mov word [rsp + 0x50], cx
add cx, 2
mov word [rsp + 0x52], cx
mov rcx, qword [rbx]
call sub.ADVAPI32.dll_LsaLookupNames
mov edi, eax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rsi
mov rcx, rax
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
lea r11, [rsp + 0x40]
cmp rbx, r11
jne 0x1400012ed
mov rcx, qword [rsp + 0x40]
call sub.ADVAPI32.dll_LsaClose
test edi, edi
je 0x140001339
mov rcx, qword [rsp + 0x48]
call sub.ADVAPI32.dll_LsaFreeMemory
mov rcx, qword [rsp + 0x38]
call sub.ADVAPI32.dll_LsaFreeMemory
mov ecx, edi
call sub.ADVAPI32.dll_LsaNtStatusToWinError
mov ecx, eax
call fcn.140006fa0
mov rdi, rax
call fcn.140016bd0
mov r9, rdi
lea rcx, [rax + 0x60]
mov r8, r13
mov edx, 0x40000207
call fcn.140007220
mov eax, 5
jmp 0x140001443
mov rcx, qword [rsp + 0x38]
mov eax, dword [rcx]
cmp eax, 1
je 0x14000137e
cmp eax, 5
je 0x14000137e
mov rcx, qword [rsp + 0x48]
call sub.ADVAPI32.dll_LsaFreeMemory
mov rcx, qword [rsp + 0x38]
call sub.ADVAPI32.dll_LsaFreeMemory
call fcn.140016bd0
mov r8, r13
lea rcx, [rax + 0x60]
mov edx, 0x4000022f
call fcn.140007220
mov eax, 6
jmp 0x140001443
movsxd rax, dword [rcx + 8]
mov rdx, qword [rsp + 0x48]
mov qword [rsp + 0x90], r12
lea rcx, [rax + rax*2]
mov rax, qword [rdx + 8]
lea r12, [rax + rcx*8]
test r12, r12
je 0x140001592
mov rcx, qword [r12 + 0x10]
call qword [sym.imp.ADVAPI32.dll_IsValidSid]
test eax, eax
je 0x14000158d
mov rcx, qword [r12 + 0x10]
mov qword [rsp + 0xa8], rbp
call qword [sym.imp.ADVAPI32.dll_GetSidSubAuthorityCount]
mov rbp, rax
movzx ecx, byte [rax]
inc cl
call qword [sym.imp.ADVAPI32.dll_GetSidLengthRequired]
mov edi, eax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rdi
mov rcx, rax
mov edx, 8
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [r14], rax
test rax, rax
jne 0x140001470
mov rcx, qword [rsp + 0x48]
call sub.ADVAPI32.dll_LsaFreeMemory
mov rcx, qword [rsp + 0x38]
call sub.ADVAPI32.dll_LsaFreeMemory
call fcn.140016bd0
lea r9, str.username_sid
lea r8, [0x1400227b8]
lea rcx, [rax + 0x60]
mov edx, 0xc00001fa
call fcn.140007220
mov eax, 8
mov rbp, qword [rsp + 0xa8]
mov r12, qword [rsp + 0x90]
mov rsi, qword [rsp + 0xa0]
mov rdi, qword [rsp + 0x98]
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.140017480
add rsp, 0xb0
pop r14
pop r13
pop rbx
ret
movzx edi, byte [rbp]
mov rcx, qword [r12 + 0x10]
inc dil
call qword [sym.imp.ADVAPI32.dll_GetSidIdentifierAuthority]
mov rcx, qword [r14]
mov rdx, rax
movzx r8d, dil
call qword [sym.imp.ADVAPI32.dll_InitializeSid]
test eax, eax
jne 0x1400014f3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, qword [r14]
mov rcx, rax
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, qword [rsp + 0x48]
call sub.ADVAPI32.dll_LsaFreeMemory
mov rcx, qword [rsp + 0x38]
call sub.ADVAPI32.dll_LsaFreeMemory
mov ecx, edi
call fcn.140006fa0
mov rdi, rax
call fcn.140016bd0
mov r9, rdi
lea rcx, [rax + 0x60]
mov r8, r13
mov edx, 0x40000208
call fcn.140007220
mov eax, 9
jmp 0x140001433
xor dil, dil
nop word [rax + rax]
mov rcx, qword [r14]
movzx esi, dil
mov edx, esi
call qword [sym.imp.ADVAPI32.dll_GetSidSubAuthority]
mov rbx, rax
cmp dil, byte [rbp]
jae 0x14000152b
mov rcx, qword [r12 + 0x10]
mov edx, esi
call qword [sym.imp.ADVAPI32.dll_GetSidSubAuthority]
mov ecx, dword [rax]
mov dword [rbx], ecx
jmp 0x140001535
mov rax, qword [rsp + 0x38]
mov ecx, dword [rax + 4]
mov dword [rbx], ecx
inc dil
cmp dil, byte [rbp]
jbe 0x140001500
mov rax, qword [rsp + 0x38]
xor edi, edi
cmp dword [rax], 5
jne 0x140001572
mov rcx, qword [r14]
call fcn.140001080
test rax, rax
jne 0x140001572
call fcn.140016bd0
mov r8, r13
mov edx, 0x4000022f
lea rcx, [rax + 0x60]
call fcn.140007220
mov edi, 0xa
mov rcx, qword [rsp + 0x48]
call sub.ADVAPI32.dll_LsaFreeMemory
mov rcx, qword [rsp + 0x38]
call sub.ADVAPI32.dll_LsaFreeMemory
mov eax, edi
jmp 0x140001433
mov rdx, qword [rsp + 0x48]
mov rcx, rdx
call sub.ADVAPI32.dll_LsaFreeMemory
mov rcx, qword [rsp + 0x38]
call sub.ADVAPI32.dll_LsaFreeMemory
call fcn.140016bd0
mov r8, r13
lea rcx, [rax + 0x60]
mov edx, 0x4000022f
call fcn.140007220
mov eax, 7
jmp 0x14000143b