Function at 0x14001d0f0
Capabilities:
Get hostname

Disassembly:
push rbp
lea rbp, [rsp - 0x260]
sub rsp, 0x360
mov rax, qword [0x1400ca008]
xor rax, rsp
mov qword [rbp + 0x240], rax
test byte [0x1400d0930], 1
je 0x14001d131
lea rdx, str.crypto_setup:_spurious_crypto_command
mov ecx, 5
call fcn.14005c0d0
jmp 0x14001d6dd
mov qword [rsp + 0x370], rbx
mov qword [rsp + 0x380], rdi
call fcn.140069b40
call qword [sym.imp.libcrypto_3_x64.dll_RAND_status]
or rbx, 0xffffffffffffffff
test eax, eax
jne 0x14001d1d8
mov rdi, qword [0x1400d0970]
test rdi, rdi
jne 0x14001d176
mov edx, 0x100
lea rcx, [rsp + 0x40]
call qword [sym.imp.libcrypto_3_x64.dll_RAND_file_name]
jmp 0x14001d19d
cmp byte [rdi], 0x2f
je 0x14001d1a2
mov r9, qword [str._windir__system32driversetc]
lea r8, str._s__s
mov edx, 0x100
mov qword [rsp + 0x20], rdi
lea rcx, [rsp + 0x40]
call fcn.14005e600
lea rdi, [rsp + 0x40]
mov edx, ebx
mov rcx, rdi
call qword [sym.imp.libcrypto_3_x64.dll_RAND_load_file]
test eax, eax
je 0x14001d6f5
lea rcx, [rsp + 0x38]
call fcn.1400680f0
mov edx, 8
lea rcx, [rsp + 0x38]
call qword [sym.imp.libcrypto_3_x64.dll_RAND_seed]
mov rcx, rdi
call qword [sym.imp.libcrypto_3_x64.dll_RAND_write_file]
mov edx, 0x100
mov qword [rsp + 0x378], rsi
lea rcx, [rbp + 0x40]
call qword [sym.imp.WS2_32.dll_gethostname]
mov rcx, qword [0x1400d0978]
mov edi, 0xff
test rcx, rcx
je 0x14001d23b
lea rdx, [rbp + 0x40]
mov r8d, edi
nop word [rax + rax]
movzx eax, byte [rcx]
inc rcx
mov byte [rdx], al
lea rdx, [rdx + 1]
test al, al
je 0x14001d228
sub r8, 1
jne 0x14001d210
jmp 0x14001d22d
test r8, r8
jne 0x14001d23b
mov byte [rdx], 0
movzx eax, byte [rcx]
lea rcx, [rcx + 1]
test al, al
jne 0x14001d230
cmp qword [0x1400d0940], 0
jne 0x14001d255
lea rcx, [rbp + 0x40]
call fcn.14005e6e0
mov qword [0x1400d0940], rax
xor eax, eax
lea r9, [rbp + 0x40]
lea r8, str.ntpkey_host__s
mov qword [0x1400d7320], rax
mov edx, 0x100
mov qword [0x1400d7328], rax
lea rcx, [rsp + 0x40]
mov qword [0x1400d7330], rax
mov qword [0x1400d7338], rax
mov qword [0x1400d7340], rax
mov qword [0x1400d72e0], rax
mov qword [0x1400d72e8], rax
mov qword [0x1400d72f0], rax
mov qword [0x1400d72f8], rax
mov qword [0x1400d7300], rax
mov qword [0x1400d72a0], rax
mov qword [0x1400d72a8], rax
mov qword [0x1400d72b0], rax
mov qword [0x1400d72b8], rax
mov qword [0x1400d72c0], rax
call fcn.14005e600
mov rdx, qword [0x1400d0940]
lea rcx, [rsp + 0x40]
xor r8d, r8d
call fcn.14001cbc0
mov rsi, rax
test rax, rax
je 0x14001d711
mov rcx, qword [rax + 8]
call qword [sym.imp.libcrypto_3_x64.dll_EVP_PKEY_get_base_id]
cmp eax, 6
jne 0x14001d72f
mov edx, dword [rsi + 0x18]
mov r8d, edx
mov rcx, qword [rsi + 8]
mov eax, edx
shl r8d, 0x10
and eax, 0xff00
or r8d, eax
shr edx, 8
movzx eax, byte [rsi + 0x1b]
and edx, 0xff00
shl r8d, 8
or r8d, edx
mov qword [rsp + 0x358], r14
or r8d, eax
mov qword [rsp + 0x350], r15
xor edx, edx
mov dword [0x1400d7324], r8d
mov qword [0x1400d0960], rcx
mov qword [0x1400d0990], rcx
call qword [sym.imp.libcrypto_3_x64.dll_i2d_PublicKey]
test eax, eax
mov edx, eax
mov r15d, 1
mov esi, eax
cmove edx, r15d
xor ecx, ecx
call fcn.140088978
test rax, rax
je 0x14001d748
mov rcx, qword [0x1400d0960]
lea rdx, [rsp + 0x30]
mov qword [rsp + 0x30], rax
mov qword [0x1400d72f0], rax
call qword [sym.imp.libcrypto_3_x64.dll_i2d_PublicKey]
mov eax, dword [0x1400d7324]
lea r9, [rbp + 0x40]
bswap esi
lea r8, str.ntpkey_sign__s
mov dword [0x1400d72e4], eax
mov edx, 0x100
mov dword [0x1400d72e8], esi
lea rcx, [rsp + 0x40]
call fcn.14005e600
mov rdx, qword [0x1400d0940]
lea rcx, [rsp + 0x40]
xor r8d, r8d
call fcn.14001cbc0
test rax, rax
je 0x14001d3f9
mov rax, qword [rax + 8]
mov qword [0x1400d0990], rax
lea r9, [rbp + 0x40]
mov edx, 0x100
lea r8, str.ntpkey_cert__s
lea rcx, [rsp + 0x40]
call fcn.14005e600
lea rcx, [rsp + 0x40]
call fcn.14001ce80
mov qword [0x1400d0928], rax
test rax, rax
je 0x14001d76c
mov rcx, qword [0x1400d0990]
mov qword [0x1400d0968], rax
mov rax, qword [rax + 0x20]
mov qword [0x1400d0998], rax
call qword [sym.imp.libcrypto_3_x64.dll_EVP_PKEY_get_size]
mov r8, qword [0x1400d0928]
mov dword [0x1400d1fa4], eax
test byte [r8 + 8], 8
je 0x14001d467
or dword [0x1400d0930], 0x10
mov r9, qword [r8 + 0x40]
mov r8, qword [r8 + 0x48]
mov rax, r9
sub r8, r9
nop word [rax + rax]
movzx edx, byte [rax]
movzx ecx, byte [rax + r8]
sub edx, ecx
jne 0x14001d493
inc rax
test ecx, ecx
jne 0x14001d480
test edx, edx
jne 0x14001d78a
mov rcx, r9
call fcn.14005e6e0
mov rcx, qword [0x1400d0928]
mov r8, rax
mov qword [0x1400d7330], rax
mov rdx, qword [rcx + 0x40]
mov rcx, rbx
nop dword [rax + rax]
inc rcx
cmp byte [rdx + rcx], 0
jne 0x14001d4c0
and ecx, 0xff0000
mov rax, rbx
inc rax
cmp byte [rdx + rax], 0
jne 0x14001d4d2
shr eax, 0x10
or ecx, eax
mov rax, rbx
shr ecx, 8
inc rax
cmp byte [rdx + rax], 0
jne 0x14001d4e6
shl eax, 0x10
inc rbx
cmp byte [rdx + rbx], 0
jne 0x14001d4f2
and ebx, 0xff00
mov qword [0x1400d0948], r8
or eax, ebx
mov edx, 0x40
shl eax, 8
or ecx, eax
mov dword [0x1400d7328], ecx
mov rcx, r8
call fcn.140074960
mov qword [rsp + 0x30], rax
test rax, rax
je 0x14001d543
inc rax
mov rcx, rax
mov qword [rsp + 0x30], rax
call fcn.14005e6e0
mov qword [0x1400d0958], rax
mov rcx, qword [0x1400d0950]
test rcx, rcx
je 0x14001d58b
lea rdx, [rbp + 0x40]
nop dword [rax]
nop word [rax + rax]
movzx eax, byte [rcx]
inc rcx
mov byte [rdx], al
lea rdx, [rdx + 1]
test al, al
je 0x14001d577
sub rdi, r15
jne 0x14001d560
jmp 0x14001d57c
test rdi, rdi
jne 0x14001d58b
mov byte [rdx], 0
nop
movzx eax, byte [rcx]
lea rcx, [rcx + 1]
test al, al
jne 0x14001d580
lea r9, [rbp + 0x40]
mov edx, 0x100
lea r8, str.ntpkey_iffkey__s
lea rcx, [rsp + 0x40]
call fcn.14005e600
mov rdx, qword [0x1400d0940]
lea rcx, [rsp + 0x40]
xor r8d, r8d
call fcn.14001cbc0
mov qword [0x1400d09a0], rax
test rax, rax
je 0x14001d5cc
or dword [0x1400d0930], 0x20
lea r9, [rbp + 0x40]
mov edx, 0x100
lea r8, str.ntpkey_gqkey__s
lea rcx, [rsp + 0x40]
call fcn.14005e600
mov rdx, qword [0x1400d0940]
lea rcx, [rsp + 0x40]
xor r8d, r8d
call fcn.14001cbc0
mov qword [0x1400d0980], rax
test rax, rax
je 0x14001d60d
or dword [0x1400d0930], 0x40
lea r9, [rbp + 0x40]
mov edx, 0x100
lea r8, str.ntpkey_mvkey__s
lea rcx, [rsp + 0x40]
call fcn.14005e600
mov rdx, qword [0x1400d0940]
lea rcx, [rsp + 0x40]
xor r8d, r8d
call fcn.14001cbc0
mov edx, dword [0x1400d0930]
mov qword [0x1400d0938], rax
test rax, rax
je 0x14001d651
bts edx, 7
mov rax, qword [0x1400d0928]
mov ecx, dword [rax + 0x1c]
mov eax, ecx
shl eax, 0x10
or eax, r15d
or edx, eax
mov dword [0x1400d0930], edx
call qword [sym.imp.libcrypto_3_x64.dll_OBJ_nid2ln]
mov r9d, dword [0x1400d0930]
lea r8, str.setup_0x_x_host__s__s
mov qword [rsp + 0x28], rax
lea rcx, [rbp + 0x140]
lea rax, [rbp + 0x40]
mov edx, 0x100
mov qword [rsp + 0x20], rax
call fcn.14005e600
cmp dword [0x1400d5ef8], 0
je 0x14001d6b5
lea rdx, [rbp + 0x140]
xor ecx, ecx
call fcn.14003dac0
mov r14, qword [rsp + 0x358]
mov r15, qword [rsp + 0x350]
mov rsi, qword [rsp + 0x378]
mov rbx, qword [rsp + 0x370]
mov rdi, qword [rsp + 0x380]
mov rcx, qword [rbp + 0x240]
xor rcx, rsp
call fcn.140073c20
add rsp, 0x360
pop rbp
ret
mov r8, rdi
lea rdx, str.crypto_setup:_random_seed_file__s_missing
mov ecx, 3
call fcn.14005c0d0
mov ecx, ebx
call fcn.1400786ac
int3
lea r8, [rsp + 0x40]
mov ecx, 3
lea rdx, str.crypto_setup:_host_key_file__s_not_found_or_corrupt
call fcn.14005c0d0
mov ecx, ebx
call fcn.1400786ac
int3
lea rdx, str.crypto_setup:_host_key_is_not_RSA_key_type
mov ecx, 3
call fcn.14005c0d0
mov ecx, ebx
call fcn.1400786ac
int3
mov r8d, esi
mov dword [0x1400d1b14], r15d
lea rdx, str.fatal_out_of_memory___lu_bytes_
mov ecx, 3
call fcn.14005c0d0
mov ecx, r15d
call fcn.1400786ac
int3
lea r8, [rsp + 0x40]
mov ecx, 3
lea rdx, str.crypto_setup:_certificate_file__s_not_found_or_corrupt
call fcn.14005c0d0
mov ecx, ebx
call fcn.1400786ac
int3
lea r8, [rsp + 0x40]
mov ecx, 3
lea rdx, str.crypto_setup:_certificate__s_is_not_self_signed
call fcn.14005c0d0
mov ecx, ebx
call fcn.1400786ac
int3