Function at 0x140330670
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 0x140330695
mov dword [rcx], r15d
cmp dword [rcx + 4], 0xffffffff
jne 0x1403306a2
mov dword [rcx + 4], 0x1388
cmp dword [rcx + 8], 0xffffffff
jne 0x1403306af
mov dword [rcx + 8], 4
cmp dword [rcx + 0xc], 0xffffffff
jne 0x1403306bc
mov dword [rcx + 0xc], 1
cmp dword [rcx + 0x10], 0xffffffff
jne 0x1403306c6
mov dword [rcx + 0x10], r15d
cmp dword [rcx + 0x14], 0xffffffff
jne 0x1403306dd
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 0x1403306f4
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 0x140330701
mov dword [rbx + 0x50], 0x500
cmp dword [rbx + 0x98], 0xffffffff
mov qword [rsp + 0x48], rsi
mov qword [rsp + 0x50], r14
jne 0x14033076c
mov ecx, 0x90
call qword [0x1404fe858]
mov qword [rbx + 0x90], rax
test rax, rax
je 0x140330858
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 0x14033082b
mov esi, 0x40
mov dword [rbx + 0x30], r15d
mov ecx, esi
mov r14d, esi
call qword [0x1404fe858]
mov rdi, rax
test rax, rax
je 0x140330858
nop word [rax + rax]
mov edx, esi
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_gethostname]
cmp eax, 0xffffffff
jne 0x1403307dc
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x271e
jne 0x1403307e0
add r14, r14
mov rcx, rdi
mov rdx, r14
add esi, esi
call qword [0x1404fe860]
test rax, rax
je 0x140330858
mov rdi, rax
jmp 0x1403307a0
test eax, eax
je 0x1403307e3
mov byte [rdi], bpl
mov edx, 0x2e
mov rcx, rdi
call sub.VCRUNTIME140.dll_strchr
mov r14, rax
test rax, rax
je 0x14033082b
mov ecx, 8
call qword [0x1404fe858]
mov qword [rbx + 0x28], rax
mov rsi, rax
test rax, rax
je 0x140330858
lea rcx, [r14 + 1]
call fcn.140333570
mov qword [rsi], rax
mov rax, qword [rbx + 0x28]
cmp qword [rax], rbp
je 0x140330858
mov dword [rbx + 0x30], 1
cmp dword [rbx + 0x40], 0xffffffff
jne 0x140330839
mov qword [rbx + 0x38], r15
mov dword [rbx + 0x40], r15d
cmp qword [rbx + 0x48], rbp
jne 0x1403308cf
lea rcx, [0x140469c5c]
call fcn.140333570
mov qword [rbx + 0x48], rax
test rax, rax
jne 0x1403308cf
mov rcx, qword [rbx + 0x90]
test rcx, rcx
je 0x140330871
call qword [0x1404fe868]
mov qword [rbx + 0x90], r15
mov rcx, qword [rbx + 0x28]
test rcx, rcx
je 0x14033089e
mov rax, qword [rcx]
test rax, rax
je 0x14033088f
mov rcx, rax
call qword [0x1404fe868]
mov rcx, qword [rbx + 0x28]
test rcx, rcx
je 0x14033089e
call qword [0x1404fe868]
mov qword [rbx + 0x28], r15
mov rcx, qword [rbx + 0x48]
test rcx, rcx
je 0x1403308b1
call qword [0x1404fe868]
mov qword [rbx + 0x48], r15
mov rcx, qword [rbx + 0x12210]
mov ebp, reloc.WS2_32.dll_ntohs
test rcx, rcx
je 0x1403308cf
call qword [0x1404fe868]
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 0x1403308f1
mov rcx, rdi
call qword [0x1404fe868]
mov eax, ebp
add rsp, 0x28
pop rdi
pop rbp
ret