Function at 0x18012f320
Capabilities:
Get hostname

Disassembly:
mov qword [rsp + 0x20], rbx
push rsi
push rdi
push r15
sub rsp, 0x60
mov rax, qword [0x180428208]
xor rax, rsp
mov qword [rsp + 0x50], rax
xor r15d, r15d
mov rbx, rcx
test byte [rcx + 0x6c], 1
mov esi, r15d
mov edi, r15d
jne 0x18012f354
mov dword [rcx], 0x100
cmp qword [rcx + 0x60], rsi
jne 0x18012f362
mov qword [rcx + 0x60], 0x500
cmp qword [rcx + 8], rsi
jne 0x18012f370
mov qword [rcx + 8], 0x7d0
cmp qword [rcx + 0x10], rsi
jne 0x18012f37e
mov qword [rcx + 0x10], 3
cmp qword [rcx + 0x18], rsi
jne 0x18012f38c
mov qword [rcx + 0x18], 1
mov rcx, qword [rcx + 0xb0]
call fcn.1801c91b0
test rax, rax
jne 0x18012f3ff
mov ecx, 0x7f000001
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x38], 2
call qword [sym.imp.WS2_32.dll_htonl]
xor r9d, r9d
mov qword [rsp + 0x20], r15
xor r8d, r8d
mov dword [rsp + 0x3c], eax
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0x30]
call fcn.1801322c0
test eax, eax
jne 0x18012f592
mov rdx, qword [rsp + 0x30]
xor r8d, r8d
mov rcx, rbx
call fcn.180131dd0
mov rcx, qword [rsp + 0x30]
mov edi, eax
call fcn.1801c8cb0
test edi, edi
jne 0x18012f590
mov qword [rsp + 0x88], rbp
mov qword [rsp + 0x90], r14
cmp qword [rbx + 0x40], rsi
jne 0x18012f4d5
mov ebp, 0x40
mov qword [rbx + 0x40], r15
mov ecx, ebp
mov r14d, ebp
call qword [0x180428630]
mov rsi, rax
test rax, rax
jne 0x18012f440
mov edi, reloc.WS2_32.dll_ntohs
jmp 0x18012f503
mov edx, ebp
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_gethostname]
cmp eax, 0xffffffff
jne 0x18012f478
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x271e
jne 0x18012f47c
add r14, r14
mov rcx, rsi
mov rdx, r14
add ebp, ebp
call qword [0x180428638]
test rax, rax
je 0x18012f435
mov rsi, rax
jmp 0x18012f440
test eax, eax
je 0x18012f47f
mov byte [rsi], r15b
mov edx, 0x2e
mov rcx, rsi
call fcn.180283718
mov rbp, rax
test rax, rax
je 0x18012f4d5
mov ecx, 8
call qword [0x180428630]
mov qword [rbx + 0x38], rax
test rax, rax
jne 0x18012f4ad
lea edi, [rax + 0xf]
jmp 0x18012f503
lea rcx, [rbp + 1]
call fcn.1801c97f0
mov rcx, qword [rbx + 0x38]
mov qword [rcx], rax
mov rax, qword [rbx + 0x38]
cmp qword [rax], r15
jne 0x18012f4cd
mov edi, reloc.WS2_32.dll_ntohs
jmp 0x18012f503
mov qword [rbx + 0x40], 1
cmp qword [rbx + 0x50], r15
jne 0x18012f4df
mov qword [rbx + 0x48], r15
cmp qword [rbx + 0x58], r15
jne 0x18012f4ff
lea rcx, [0x1803c737c]
call fcn.1801c97f0
mov qword [rbx + 0x58], rax
test rax, rax
jne 0x18012f4ff
lea edi, [rax + 0xf]
jmp 0x18012f503
test edi, edi
je 0x18012f572
mov rax, qword [rbx + 0x38]
test rax, rax
je 0x18012f51a
mov rcx, qword [rax]
test rcx, rcx
je 0x18012f51a
call qword [fcn.1800a58b0]
mov rcx, qword [rbx + 0x38]
test rcx, rcx
je 0x18012f52d
call qword [fcn.1800a58b0]
mov qword [rbx + 0x38], r15
mov rcx, qword [rbx + 0x58]
test rcx, rcx
je 0x18012f540
call qword [fcn.1800a58b0]
mov qword [rbx + 0x58], r15
mov rcx, qword [rbx + 0x120]
test rcx, rcx
je 0x18012f559
call qword [fcn.1800a58b0]
mov qword [rbx + 0x120], r15
mov rcx, qword [rbx + 0x128]
test rcx, rcx
je 0x18012f572
call qword [fcn.1800a58b0]
mov qword [rbx + 0x128], r15
mov r14, qword [rsp + 0x90]
mov rbp, qword [rsp + 0x88]
test rsi, rsi
je 0x18012f590
mov rcx, rsi
call qword [fcn.1800a58b0]
mov eax, edi
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.1800a5910
mov rbx, qword [rsp + 0x98]
add rsp, 0x60
pop r15
pop rdi
pop rsi
ret