Function at 0x140122980
Capabilities:
Get hostname

Disassembly:
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x28
mov qword [rsp + 0x48], rbx
mov rbx, qword [rsp + 0x40]
mov qword [rsp + 0x20], r15
xor r15d, r15d
mov edi, r15d
mov ebp, r15d
cmp qword [rbx + 8], r15
jne 0x1401229b1
mov qword [rbx + 8], 0x7d0
cmp qword [rbx + 0x10], rdi
jne 0x1401229bf
mov qword [rbx + 0x10], 3
cmp qword [rbx + 0x18], rdi
jne 0x1401229cd
mov qword [rbx + 0x18], 1
cmp word [rbx + 0x24], di
jne 0x1401229e2
mov ecx, getservbyname
call qword [sym.imp.WS2_32.dll_htons]
mov word [rbx + 0x24], ax
cmp word [rbx + 0x26], di
jne 0x1401229f7
mov ecx, getservbyname
call qword [sym.imp.WS2_32.dll_htons]
mov word [rbx + 0x26], ax
cmp qword [rbx + 0x58], rdi
jne 0x140122a05
mov qword [rbx + 0x58], 0x500
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x58], r14
cmp qword [rbx + 0xa0], rdi
jne 0x140122a96
mov rax, qword [0x140212a78]
mov ecx, 0x50
call qword [case.0x1400cc851.0]
mov qword [rbx + 0x98], rax
test rax, rax
je 0x140122b97
xorps xmm0, xmm0
mov ecx, 0x7f000001
movups xmmword [rax], xmm0
movups xmmword [rax + 0x10], xmm0
movups xmmword [rax + 0x20], xmm0
movups xmmword [rax + 0x30], xmm0
movups xmmword [rax + 0x40], xmm0
mov rax, qword [rbx + 0x98]
mov dword [rax + 8], 2
call qword [sym.imp.WS2_32.dll_htonl]
mov rcx, qword [rbx + 0x98]
mov dword [rcx + 0xc], eax
mov rax, qword [rbx + 0x98]
mov word [rax + 0x1c], r15w
mov rax, qword [rbx + 0x98]
mov word [rax + 0x1e], r15w
mov qword [rbx + 0xa0], 1
cmp qword [rbx + 0x38], rdi
jne 0x140122b6a
mov esi, 0x40
mov qword [rbx + 0x38], r15
mov rax, qword [0x140212a78]
mov ecx, esi
mov r14d, esi
call qword [case.0x1400cc851.0]
mov rdi, rax
test rax, rax
je 0x140122b97
nop word [rax + rax]
mov edx, esi
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_gethostname]
cmp eax, 0xffffffff
jne 0x140122b13
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x271e
jne 0x140122b17
mov rax, qword [0x140212a80]
add r14, r14
mov rdx, r14
mov rcx, rdi
add esi, esi
call qword [case.0x1400cc851.0]
test rax, rax
je 0x140122b97
mov rdi, rax
jmp 0x140122ad0
test eax, eax
je 0x140122b1a
mov byte [rdi], bpl
mov edx, 0x2e
mov rcx, rdi
call fcn.140135f08
mov r14, rax
test rax, rax
je 0x140122b6a
mov rax, qword [0x140212a78]
mov ecx, 8
call qword [case.0x1400cc851.0]
mov qword [rbx + 0x30], rax
mov rsi, rax
test rax, rax
je 0x140122b97
lea rcx, [r14 + 1]
call fcn.140129100
mov qword [rsi], rax
mov rax, qword [rbx + 0x30]
cmp qword [rax], rbp
je 0x140122b97
mov qword [rbx + 0x38], 1
cmp qword [rbx + 0x48], rbp
jne 0x140122b74
mov qword [rbx + 0x40], r15
cmp qword [rbx + 0x50], rbp
jne 0x140122c58
lea rcx, [0x1401aa86c]
call fcn.140129100
mov qword [rbx + 0x50], rax
test rax, rax
jne 0x140122c58
mov rcx, qword [rbx + 0x98]
test rcx, rcx
je 0x140122bb7
mov rax, qword [0x140212a88]
call qword [case.0x1400cc851.0]
mov qword [rbx + 0x98], r15
mov rcx, qword [rbx + 0x30]
mov qword [rbx + 0xa0], r15
test rcx, rcx
je 0x140122bf9
mov rax, qword [rcx]
test rax, rax
je 0x140122be8
mov rcx, rax
mov rax, qword [0x140212a88]
call qword [case.0x1400cc851.0]
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x140122bf9
mov rax, qword [0x140212a88]
call qword [case.0x1400cc851.0]
mov qword [rbx + 0x30], r15
mov rcx, qword [rbx + 0x50]
test rcx, rcx
je 0x140122c13
mov rax, qword [0x140212a88]
call qword [case.0x1400cc851.0]
mov qword [rbx + 0x50], r15
mov rcx, qword [rbx + 0x120]
test rcx, rcx
je 0x140122c33
mov rax, qword [0x140212a88]
call qword [case.0x1400cc851.0]
mov qword [rbx + 0x120], r15
mov rcx, qword [rbx + 0x128]
mov ebp, reloc.WS2_32.dll_ntohs
test rcx, rcx
je 0x140122c58
mov rax, qword [0x140212a88]
call qword [case.0x1400cc851.0]
mov qword [rbx + 0x128], r15
mov r15, qword [rsp + 0x20]
mov r14, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x48]
test rdi, rdi
je 0x140122c81
mov rax, qword [0x140212a88]
mov rcx, rdi
call qword [case.0x1400cc851.0]
mov eax, ebp
add rsp, 0x28
pop rdi
pop rbp
ret