Function at 0x1799870
Capabilities:
Get hostname

Disassembly:
push rdi
sub rsp, 0x50
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov qword [rsp + 0x60], rbx
mov edi, edx
mov rbx, rcx
mov dword [rsp + 0x70], 0
lea r8, [rsp + 0x70]
xor edx, edx
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_GetComputerNameExW]
test eax, eax
jne 0x17998db
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
je 0x17998d3
mov qword [rsp + 0x20], 0x1000000f
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov ecx, 0xc1010000
call fcn.0124e580
mov ebx, eax
jmp 0x1799b06
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x48], 0xffffffffffffffff
mov r8d, dword [rsp + 0x70]
mov qword [rsp + 0x48], r8
xor r9d, r9d
lea rdx, [rsp + 0x38]
mov rcx, qword [rsp + 0x40]
call fcn.0134b4b0
mov r11d, eax
test eax, eax
jns 0x1799919
mov ebx, eax
jmp 0x179992c
mov rcx, qword [rsp + 0x38]
mov rax, qword [rsp + 0x48]
mov word [rcx + rax*2], 0
mov ebx, r11d
test r11d, r11d
jns 0x179997b
cmp qword [rsp + 0x38], 0
je 0x1799b06
mov rax, qword [rsp + 0x40]
mov rcx, qword [rax]
test rcx, rcx
je 0x179995b
movzx eax, byte [rcx - 5]
test al, 0x40
jne 0x1799956
test al, 0x20
je 0x179995d
mov rcx, qword [rcx]
jmp 0x179995d
xor ecx, ecx
mov rax, qword [rsp + 0x48]
mov word [rcx + rax*2], 0
or rdx, 0xffffffffffffffff
mov rcx, qword [rsp + 0x40]
call fcn.0134b490
jmp 0x1799b06
lea r8, [rsp + 0x70]
mov rdx, qword [rsp + 0x38]
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_GetComputerNameExW]
test eax, eax
jne 0x17999f8
mov qword [rsp + 0x20], 0x1000000f
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov ecx, 0xc1010000
call fcn.0124e580
mov ebx, eax
cmp qword [rsp + 0x38], 0
je 0x1799b06
mov rax, qword [rsp + 0x40]
mov rcx, qword [rax]
test rcx, rcx
je 0x17999d8
movzx eax, byte [rcx - 5]
test al, 0x40
jne 0x17999d3
test al, 0x20
je 0x17999da
mov rcx, qword [rcx]
jmp 0x17999da
xor ecx, ecx
mov rax, qword [rsp + 0x48]
mov word [rcx + rax*2], 0
or rdx, 0xffffffffffffffff
mov rcx, qword [rsp + 0x40]
call fcn.0134b490
jmp 0x1799b06
mov eax, dword [rsp + 0x70]
mov rdx, qword [rsp + 0x48]
cmp rax, rdx
jg 0x1799a12
test rax, rax
cmovns rdx, rax
mov qword [rsp + 0x48], rdx
mov r8, qword [rsp + 0x40]
mov rax, qword [r8]
test rax, rax
je 0x1799a37
movzx ecx, byte [rax - 5]
test cl, 0x40
jne 0x1799a32
test cl, 0x20
jne 0x1799a32
mov rcx, rax
jmp 0x1799a39
mov rcx, qword [rax]
jmp 0x1799a39
xor ecx, ecx
cmp word [rcx + rdx*2], 0
je 0x1799a6a
test rax, rax
je 0x1799a58
movzx ecx, byte [rax - 5]
test cl, 0x40
jne 0x1799a53
test cl, 0x20
je 0x1799a5a
mov rax, qword [rax]
jmp 0x1799a5a
xor eax, eax
mov word [rax + rdx*2], 0
mov rdx, qword [rsp + 0x48]
mov r8, qword [rsp + 0x40]
mov qword [rsp + 0x38], 0
mov rcx, r8
call fcn.0134b490
mov ebx, eax
test eax, eax
jns 0x1799ac4
cmp qword [rsp + 0x38], 0
je 0x1799b06
mov rax, qword [rsp + 0x40]
mov rcx, qword [rax]
test rcx, rcx
je 0x1799aa7
movzx eax, byte [rcx - 5]
test al, 0x40
jne 0x1799aa2
test al, 0x20
je 0x1799aa9
mov rcx, qword [rcx]
jmp 0x1799aa9
xor ecx, ecx
mov rax, qword [rsp + 0x48]
mov word [rcx + rax*2], 0
or rdx, 0xffffffffffffffff
mov rcx, qword [rsp + 0x40]
call fcn.0134b490
jmp 0x1799b06
xor ebx, ebx
cmp qword [rsp + 0x38], rbx
je 0x1799b06
mov rax, qword [rsp + 0x40]
mov rcx, qword [rax]
test rcx, rcx
je 0x1799aeb
movzx eax, byte [rcx - 5]
test al, 0x40
jne 0x1799ae6
test al, 0x20
je 0x1799aed
mov rcx, qword [rcx]
jmp 0x1799aed
xor ecx, ecx
mov rax, qword [rsp + 0x48]
mov word [rcx + rax*2], 0
or rdx, 0xffffffffffffffff
mov rcx, qword [rsp + 0x40]
call fcn.0134b490
mov eax, ebx
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rdi
ret