Function at 0x1403f3540
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 0x1403f3565
mov dword [rcx], r15d
cmp dword [rcx + 4], 0xffffffff
jne 0x1403f3572
mov dword [rcx + 4], 0x1388
cmp dword [rcx + 8], 0xffffffff
jne 0x1403f357f
mov dword [rcx + 8], 4
cmp dword [rcx + 0xc], 0xffffffff
jne 0x1403f358c
mov dword [rcx + 0xc], 1
cmp dword [rcx + 0x10], 0xffffffff
jne 0x1403f3596
mov dword [rcx + 0x10], r15d
cmp dword [rcx + 0x14], 0xffffffff
jne 0x1403f35ad
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 0x1403f35c4
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 0x1403f35d1
mov dword [rbx + 0x50], 0x500
cmp dword [rbx + 0x98], 0xffffffff
mov qword [rsp + 0x48], rsi
mov qword [rsp + 0x50], r14
jne 0x1403f363c
mov ecx, 0x90
call qword [0x14060c6e8]
mov qword [rbx + 0x90], rax
test rax, rax
je 0x1403f3728
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 0x1403f36fb
mov esi, 0x40
mov dword [rbx + 0x30], r15d
mov ecx, esi
mov r14d, esi
call qword [0x14060c6e8]
mov rdi, rax
test rax, rax
je 0x1403f3728
nop word [rax + rax]
mov edx, esi
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_gethostname]
cmp eax, 0xffffffff
jne 0x1403f36ac
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x271e
jne 0x1403f36b0
add r14, r14
mov rcx, rdi
mov rdx, r14
add esi, esi
call qword [0x14060c6f0]
test rax, rax
je 0x1403f3728
mov rdi, rax
jmp 0x1403f3670
test eax, eax
je 0x1403f36b3
mov byte [rdi], bpl
mov edx, 0x2e
mov rcx, rdi
call sub.VCRUNTIME140.dll_strchr
mov r14, rax
test rax, rax
je 0x1403f36fb
mov ecx, 8
call qword [0x14060c6e8]
mov qword [rbx + 0x28], rax
mov rsi, rax
test rax, rax
je 0x1403f3728
lea rcx, [r14 + 1]
call fcn.1403f6440
mov qword [rsi], rax
mov rax, qword [rbx + 0x28]
cmp qword [rax], rbp
je 0x1403f3728
mov dword [rbx + 0x30], 1
cmp dword [rbx + 0x40], 0xffffffff
jne 0x1403f3709
mov qword [rbx + 0x38], r15
mov dword [rbx + 0x40], r15d
cmp qword [rbx + 0x48], rbp
jne 0x1403f379f
lea rcx, [0x140558ea4]
call fcn.1403f6440
mov qword [rbx + 0x48], rax
test rax, rax
jne 0x1403f379f
mov rcx, qword [rbx + 0x90]
test rcx, rcx
je 0x1403f3741
call qword [0x14060c6f8]
mov qword [rbx + 0x90], r15
mov rcx, qword [rbx + 0x28]
test rcx, rcx
je 0x1403f376e
mov rax, qword [rcx]
test rax, rax
je 0x1403f375f
mov rcx, rax
call qword [0x14060c6f8]
mov rcx, qword [rbx + 0x28]
test rcx, rcx
je 0x1403f376e
call qword [0x14060c6f8]
mov qword [rbx + 0x28], r15
mov rcx, qword [rbx + 0x48]
test rcx, rcx
je 0x1403f3781
call qword [0x14060c6f8]
mov qword [rbx + 0x48], r15
mov rcx, qword [rbx + 0x12210]
mov ebp, reloc.WS2_32.dll_ntohs
test rcx, rcx
je 0x1403f379f
call qword [0x14060c6f8]
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 0x1403f37c1
mov rcx, rdi
call qword [0x14060c6f8]
mov eax, ebp
add rsp, 0x28
pop rdi
pop rbp
ret