Function at 0x14041a400
Capabilities:
Get hostname

Disassembly:
push rbp
push rdi
sub rsp, 0x28
mov qword [rsp + 0x40], rbx
mov rbx, rcx
mov qword [rsp + 0x20], r15
xor r15d, r15d
cmp dword [rcx], 0xffffffff
mov edi, r15d
mov ebp, r15d
jne 0x14041a425
mov dword [rcx], r15d
cmp dword [rcx + 4], 0xffffffff
jne 0x14041a432
mov dword [rcx + 4], 0x1388
cmp dword [rcx + 8], 0xffffffff
jne 0x14041a43f
mov dword [rcx + 8], 4
cmp dword [rcx + 0xc], 0xffffffff
jne 0x14041a44c
mov dword [rcx + 0xc], 1
cmp dword [rcx + 0x10], 0xffffffff
jne 0x14041a456
mov dword [rcx + 0x10], r15d
cmp dword [rcx + 0x14], 0xffffffff
jne 0x14041a46d
mov ecx, gethostname
call qword [sym.imp.WS2_32.dll_htons]
movzx eax, ax
mov dword [rbx + 0x14], eax
cmp dword [rbx + 0x18], 0xffffffff
jne 0x14041a484
mov ecx, gethostname
call qword [sym.imp.WS2_32.dll_htons]
movzx eax, ax
mov dword [rbx + 0x18], eax
cmp dword [rbx + 0x50], 0xffffffff
jne 0x14041a491
mov dword [rbx + 0x50], 0x500
cmp dword [rbx + 0x98], 0xffffffff
mov qword [rsp + 0x48], rsi
mov qword [rsp + 0x50], r14
jne 0x14041a4fc
mov ecx, 0x90
call qword [str.PhA_]
mov qword [rbx + 0x90], rax
test rax, rax
je 0x14041a5e8
mov ecx, 0x7f000001
mov dword [rax], 2
call qword [sym.imp.WS2_32.dll_htonl]
mov ecx, eax
mov rax, qword [rbx + 0x90]
mov dword [rax + 4], ecx
mov rax, qword [rbx + 0x90]
mov dword [rax + 0x14], r15d
mov rax, qword [rbx + 0x90]
mov dword [rax + 0x18], r15d
mov dword [rbx + 0x98], 1
cmp dword [rbx + 0x30], 0xffffffff
jne 0x14041a5bb
mov esi, 0x40
mov dword [rbx + 0x30], r15d
mov ecx, esi
mov r14d, esi
call qword [str.PhA_]
mov rdi, rax
test rax, rax
je 0x14041a5e8
nop word [rax + rax]
mov edx, esi
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_gethostname]
cmp eax, 0xffffffff
jne 0x14041a56c
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x271e
jne 0x14041a570
add r14, r14
mov rcx, rdi
mov rdx, r14
add esi, esi
call qword [0x140664578]
test rax, rax
je 0x14041a5e8
mov rdi, rax
jmp 0x14041a530
test eax, eax
je 0x14041a573
mov byte [rdi], bpl
mov edx, 0x2e
mov rcx, rdi
call sub.VCRUNTIME140.dll_strchr
mov r14, rax
test rax, rax
je 0x14041a5bb
mov ecx, 8
call qword [str.PhA_]
mov qword [rbx + 0x28], rax
mov rsi, rax
test rax, rax
je 0x14041a5e8
lea rcx, [r14 + 1]
call fcn.14041d300
mov qword [rsi], rax
mov rax, qword [rbx + 0x28]
cmp qword [rax], rbp
je 0x14041a5e8
mov dword [rbx + 0x30], 1
cmp dword [rbx + 0x40], 0xffffffff
jne 0x14041a5c9
mov qword [rbx + 0x38], r15
mov dword [rbx + 0x40], r15d
cmp qword [rbx + 0x48], rbp
jne 0x14041a65f
lea rcx, [0x14058b44c]
call fcn.14041d300
mov qword [rbx + 0x48], rax
test rax, rax
jne 0x14041a65f
mov rcx, qword [rbx + 0x90]
test rcx, rcx
je 0x14041a601
call qword [str._hA_]
mov qword [rbx + 0x90], r15
mov rcx, qword [rbx + 0x28]
test rcx, rcx
je 0x14041a62e
mov rax, qword [rcx]
test rax, rax
je 0x14041a61f
mov rcx, rax
call qword [str._hA_]
mov rcx, qword [rbx + 0x28]
test rcx, rcx
je 0x14041a62e
call qword [str._hA_]
mov qword [rbx + 0x28], r15
mov rcx, qword [rbx + 0x48]
test rcx, rcx
je 0x14041a641
call qword [str._hA_]
mov qword [rbx + 0x48], r15
mov rcx, qword [rbx + 0x12210]
mov ebp, reloc.WS2_32.dll_ntohs
test rcx, rcx
je 0x14041a65f
call qword [str._hA_]
mov qword [rbx + 0x12210], r15
mov r15, qword [rsp + 0x20]
mov r14, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x40]
test rdi, rdi
je 0x14041a681
mov rcx, rdi
call qword [str._hA_]
mov eax, ebp
add rsp, 0x28
pop rdi
pop rbp
ret