Function at 0x18004ef48
Capabilities:
Get hostname

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x70
mov rax, qword [0x180093630]
xor rax, rsp
mov qword [rsp + 0x60], rax
xor r14d, r14d
or rbp, 0xffffffffffffffff
mov qword [r9], r14
mov r12, r9
mov r13, rdx
mov rdi, rcx
mov r15d, r14d
mov esi, r14d
test rcx, rcx
je 0x18004f0cc
mov rbx, rbp
inc rbx
cmp word [rcx + rbx*2], r14w
jne 0x18004ef90
movzx eax, word [rcx]
test ax, ax
je 0x18004f0cc
cmp ax, 0x5c
jne 0x18004efc8
cmp word [rcx + 2], ax
jne 0x18004efbe
mov rsi, rdi
add rdi, 4
add ebx, 0xfffffffe
jne 0x18004f004
mov eax, 0xc0000122
jmp 0x18004f22e
lea edx, [rbx + 3]
xor ecx, ecx
add rdx, rdx
call qword [sym.imp.KERNELBASE.dll_LocalAlloc]
mov r15, rax
test rax, rax
jne 0x18004efe8
mov eax, 0xc0000017
jmp 0x18004f22e
lea r8d, [rbx + 1]
mov dword [rax], 0x5c005c
add r8, r8
lea rcx, [rax + 4]
mov rdx, rdi
call sub.msvcrt.dll_memcpy
mov rsi, r15
test rdi, rdi
je 0x18004f0cc
cmp ebx, 0xf
ja 0x18004f050
lea r8, [rsp + 0x30]
mov dword [rsp + 0x30], 0x10
lea rdx, [rsp + 0x40]
xor ecx, ecx
call qword [sym.imp.api_ms_win_core_sysinfo_l1_1_0.dll_GetComputerNameExW]
test eax, eax
je 0x18004f050
cmp ebx, dword [rsp + 0x30]
jne 0x18004f050
mov r8d, ebx
lea rcx, [rsp + 0x40]
mov rdx, rdi
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
jne 0x18004f050
mov rsi, r14
jmp 0x18004f0cc
lea r14d, [rbx - 1]
mov edx, 0x20a
cmp word [rdi + r14*2], 0x2e
cmovne r14d, ebx
xor ecx, ecx
call qword [sym.imp.KERNELBASE.dll_LocalAlloc]
mov rbx, rax
test rax, rax
jne 0x18004f07d
mov ebx, 0xc0000017
jmp 0x18004f21e
lea r8, [rsp + 0x30]
mov dword [rsp + 0x30], 0x105
mov rdx, rbx
mov ecx, 3
call qword [sym.imp.api_ms_win_core_sysinfo_l1_1_0.dll_GetComputerNameExW]
test eax, eax
je 0x18004f0c0
cmp r14d, dword [rsp + 0x30]
jne 0x18004f0c0
mov r8d, r14d
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
mov r14d, 0
cmove rsi, r14
jmp 0x18004f0c3
xor r14d, r14d
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LocalFree]
cmp word [r13 + rbp*2 + 2], 0
lea rbp, [rbp + 1]
jne 0x18004f0cc
lea rbp, [rbp*2 + 0x10]
xor ecx, ecx
mov rdx, rbp
call qword [sym.imp.KERNELBASE.dll_LocalAlloc]
mov rdi, rax
test rax, rax
jne 0x18004f0fe
mov ebx, 0xc0000017
jmp 0x18004f21e
mov rcx, rbp
mov r8d, 0x7ffffffe
shr rcx, 1
mov edx, r14d
mov ebx, 0xc000000d
lea rax, [rcx - 1]
cmp rax, r8
cmova edx, ebx
test edx, edx
js 0x18004f16f
mov rdx, rdi
test rcx, rcx
je 0x18004f155
sub r8, rcx
lea r9, str.PIPE_
sub r9, rdi
lea rax, [r8 + rcx]
test rax, rax
je 0x18004f155
movzx eax, word [r9 + rdx]
test ax, ax
je 0x18004f155
mov word [rdx], ax
add rdx, 2
sub rcx, 1
jne 0x18004f135
lea rax, [rdx - 2]
test rcx, rcx
cmovne rax, rdx
mov edx, 0x80000005
cmovne edx, r14d
mov word [rax], r14w
jmp 0x18004f178
test rcx, rcx
je 0x18004f178
mov word [rdi], r14w
mov rcx, rdi
test edx, edx
jns 0x18004f18a
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x18004f21e
mov r8, r13
mov rdx, rbp
call fcn.18004f254
test eax, eax
jns 0x18004f1a4
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x18004f21e
lea rax, [rsp + 0x38]
mov r9, rdi
mov qword [rsp + 0x28], rax
lea rdx, str.ncacn_np
mov r8, rsi
mov qword [rsp + 0x20], r14
xor ecx, ecx
call qword [sym.imp.RPCRT4.dll_RpcStringBindingComposeW]
mov rcx, rdi
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_LocalFree]
test ebx, ebx
je 0x18004f1de
mov ebx, 0xc0000017
jmp 0x18004f21e
mov rcx, qword [rsp + 0x38]
mov rdx, r12
call qword [sym.imp.RPCRT4.dll_RpcBindingFromStringBindingW]
lea rcx, [rsp + 0x38]
mov ebx, eax
call qword [sym.imp.RPCRT4.dll_RpcStringFreeW]
test ebx, ebx
je 0x18004f21b
lea eax, [rbx - 0x6aa]
mov qword [r12], r14
mov ebx, 0xc0000017
cmp eax, 1
mov ecx, 0xc0000122
cmova ecx, ebx
mov ebx, ecx
jmp 0x18004f21e
mov ebx, r14d
test r15, r15
je 0x18004f22c
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, ebx
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.180017170
mov rbx, qword [rsp + 0xc0]
add rsp, 0x70
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret