Function at 0x140018ca0
Capabilities:
Get hostname

Disassembly:
mov r11, rsp
push rbp
push rsi
push rdi
push r12
push r13
sub rsp, 0x1b0
mov qword [rsp + 0x80], 0xfffffffffffffffe
mov qword [r11 + 8], rbx
mov rax, qword [0x1400a5de0]
xor rax, rsp
mov qword [rsp + 0x1a8], rax
movzx esi, r9b
mov rbp, r8
mov dword [rsp + 0x40], 0x27
mov qword [r11 - 0x128], 7
xor r12d, r12d
mov qword [r11 - 0x130], r12
mov word [r11 - 0x140], r12w
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rcx, [r11 - 0x148]
call fcn.140006050
nop
mov rbx, qword [0x1400ae080]
test rbx, rbx
jne 0x140018ddb
mov ecx, 0x310
call fcn.1400278b8
mov rbx, rax
mov qword [rsp + 0x88], rax
test rax, rax
je 0x140018dd1
call fcn.14002790c
mov rdx, rax
mov ecx, r12d
test rax, rax
setne cl
test ecx, ecx
jne 0x140018d61
mov ecx, 0x80004005
call fcn.140007e00
int3
mov rax, qword [rax]
mov rcx, rdx
call qword [rax + 0x18]
add rax, 0x18
mov qword [rbx], rax
mov word [rbx + 0x64], 0
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [0x14008a5b0]
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx - 1]
lea rdx, [0x14008a5b0]
mov rcx, rbx
call fcn.140008260
lea rcx, [rbx + 8]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea rcx, [rbx + 0x30]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea rcx, [rbx + 0x26c]
mov word [rcx], 0
lea r8, [0x14008a5b8]
mov edx, 0x50
call fcn.140052920
nop
jmp 0x140018dd4
mov rbx, r12
mov qword [0x1400ae080], rbx
movzx r8d, sil
lea rdx, str.GetIpAddrFromHostName_blIpv6___d_
mov rcx, rbx
call fcn.14000d860
movabs r13, 0x7ffffffffffffffe
cmp qword [rsp + 0xa8], 0
jne 0x140018fec
mov edx, 0x27
lea rcx, [rsp + 0xb8]
call qword [sym.imp.WS2_32.dll_gethostname]
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0xb8]
repne scasb al, byte [rdi]
not rcx
lea rdi, [rcx - 1]
mov dword [rsp + 0x28], 0x27
lea rax, [rsp + 0xe0]
mov qword [rsp + 0x20], rax
or r9d, 0xffffffff
lea r8, [rsp + 0xb8]
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp edi, 0x27
jae 0x140018e70
mov eax, edi
mov word [rsp + rax*2 + 0xe0], 0
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0xe0]
repne scasw ax, word [rdi]
not rcx
lea rbx, [rcx - 1]
lea rax, [rsp + 0x98]
mov rcx, qword [rsp + 0x98]
mov rdx, qword [rsp + 0xb0]
cmp rdx, 8
cmovae rax, rcx
lea rdi, [rsp + 0xe0]
mov r8, qword [rsp + 0xa8]
cmp rdi, rax
jb 0x140018f21
lea rax, [rsp + 0x98]
cmp rdx, 8
cmovae rax, rcx
lea rax, [rax + r8*2]
lea rdi, [rsp + 0xe0]
cmp rax, rdi
jbe 0x140018f21
lea rax, [rsp + 0x98]
cmp rdx, 8
cmovae rax, rcx
lea r8, [rsp + 0xe0]
sub r8, rax
sar r8, 1
mov r9, rbx
lea rdx, [rsp + 0x90]
lea rcx, [rsp + 0x90]
call fcn.140006050
mov rdx, qword [rsp + 0xb0]
jmp 0x140018ff4
cmp rbx, r13
jbe 0x140018f3b
call fcn.140077eb0
mov rdx, qword [rsp + 0xb0]
mov r8, qword [rsp + 0xa8]
cmp rdx, rbx
jae 0x140018f5a
mov rdx, rbx
lea rcx, [rsp + 0x90]
call fcn.1400062b0
mov rdx, qword [rsp + 0xb0]
jmp 0x140018f89
test rbx, rbx
jne 0x140018f89
mov qword [rsp + 0xa8], r12
lea rax, [rsp + 0x98]
cmp rdx, 8
cmovae rax, qword [rsp + 0x98]
mov word [rax], bx
mov rdx, qword [rsp + 0xb0]
jmp 0x140018ff4
test rbx, rbx
je 0x140018ff4
lea rcx, [rsp + 0x98]
cmp rdx, 8
cmovae rcx, qword [rsp + 0x98]
lea rdi, [rbx + rbx]
add rdx, rdx
mov r9, rdi
lea r8, [rsp + 0xe0]
call fcn.140052f70
mov qword [rsp + 0xa8], rbx
lea rax, [rsp + 0x98]
cmp qword [rsp + 0xb0], 8
cmovae rax, qword [rsp + 0x98]
mov word [rax + rdi], 0
mov rdx, qword [rsp + 0xb0]
jmp 0x140018ff4
mov rdx, qword [rsp + 0xb0]
xor eax, eax
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x78], rax
mov eax, 2
mov ecx, 0x17
cmp sil, 1
cmove eax, ecx
mov dword [rsp + 0x54], eax
mov dword [rsp + 0x58], 1
mov dword [rsp + 0x5c], 6
lea r8, [rsp + 0x98]
cmp rdx, 8
cmovae r8, qword [rsp + 0x98]
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, r8
repne scasw ax, word [rdi]
not rcx
lea rdi, [rcx - 1]
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0x27
lea rax, [rsp + 0x180]
mov qword [rsp + 0x20], rax
lea r9d, [rcx - 1]
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
cmp edi, 0x27
jae 0x1400190a0
mov eax, edi
mov byte [rsp + rax + 0x180], 0
mov rax, qword [0x1400aea08]
test rax, rax
jne 0x1400190ba
xor ecx, ecx
call fcn.140017ee0
mov qword [0x1400aea08], rax
lea r9, [rsp + 0x48]
lea r8, [rsp + 0x50]
xor edx, edx
lea rcx, [rsp + 0x180]
call rax
mov edi, eax
mov ecx, eax
call qword [sym.imp.WS2_32.dll_WSASetLastError]
test edi, edi
je 0x140019146
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0x400
lea rdi, [0x1400ae200]
mov qword [rsp + 0x20], rdi
mov r9d, 0x400
mov r8d, eax
xor edx, edx
mov ecx, 0x12ff
call qword [sym.imp.KERNEL32.dll_FormatMessageW]
call fcn.14000d730
mov rcx, rax
mov rdx, rdi
call fcn.14000d860
nop
cmp qword [rsp + 0xb0], 8
jb 0x14001913c
mov rcx, qword [rsp + 0x98]
call fcn.1400278fc
mov eax, 1
jmp 0x1400194de
mov rdi, qword [rsp + 0x48]
test rdi, rdi
jne 0x140019172
cmp qword [rsp + 0xb0], 8
jb 0x140019168
mov rcx, qword [rsp + 0x98]
call fcn.1400278fc
mov eax, 1
jmp 0x1400194de
mov rax, qword [rdi + 0x20]
test rax, rax
jne 0x1400191bf
mov rax, qword [0x1400aea10]
test rax, rax
jne 0x140019197
mov cx, 2
call fcn.140017ee0
mov qword [0x1400aea10], rax
mov rcx, rdi
call rax
nop
cmp qword [rsp + 0xb0], 8
jb 0x1400191b5
mov rcx, qword [rsp + 0x98]
call fcn.1400278fc
mov eax, 1
jmp 0x1400194de
mov esi, r12d
mov word [rsp + 0x130], si
xor ecx, ecx
mov qword [rsp + 0x132], rcx
mov qword [rsp + 0x13a], rcx
mov qword [rsp + 0x142], rcx
mov qword [rsp + 0x14a], rcx
mov qword [rsp + 0x152], rcx
mov qword [rsp + 0x15a], rcx
mov qword [rsp + 0x162], rcx
mov qword [rsp + 0x16a], rcx
mov qword [rsp + 0x172], rcx
mov dword [rsp + 0x17a], ecx
cmp word [rax], 0x17
jne 0x14001926e
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x130]
xor r8d, r8d
lea edx, [rcx + 0x1c]
mov rcx, qword [rdi + 0x20]
call qword [sym.imp.WS2_32.dll_WSAAddressToStringW]
test eax, eax
je 0x1400192ba
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.140017300
mov rdi, rax
call fcn.14000d730
mov rcx, rax
mov rdx, rdi
call fcn.14000d860
mov esi, 1
jmp 0x1400192ba
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x130]
xor r8d, r8d
lea edx, [r8 + 0x10]
mov rcx, qword [rdi + 0x20]
call qword [sym.imp.WS2_32.dll_WSAAddressToStringW]
test eax, eax
je 0x1400192ba
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.140017300
mov rdi, rax
call fcn.14000d730
mov rcx, rax
mov rdx, rdi
call fcn.14000d860
mov esi, 1
mov edx, 7
mov qword [rsp + 0xd8], rdx
mov r8, r12
mov qword [rsp + 0xd0], r12
mov word [rsp + 0xc0], r8w
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x130]
repne scasw ax, word [rdi]
not rcx
sub rcx, 1
mov rbx, rcx
cmp rcx, r13
jbe 0x140019310
call fcn.140077eb0
mov rdx, qword [rsp + 0xd8]
mov r8, qword [rsp + 0xd0]
cmp rdx, rbx
jae 0x14001932f
mov rdx, rbx
lea rcx, [rsp + 0xb8]
call fcn.1400062b0
mov rdx, qword [rsp + 0xd8]
jmp 0x140019356
test rbx, rbx
jne 0x140019356
mov qword [rsp + 0xd0], r12
lea rax, [rsp + 0xc0]
cmp rdx, 8
cmovae rax, qword [rsp + 0xc0]
mov word [rax], bx
jmp 0x1400193af
test rbx, rbx
je 0x1400193af
lea rcx, [rsp + 0xc0]
cmp rdx, 8
cmovae rcx, qword [rsp + 0xc0]
lea rdi, [rbx + rbx]
add rdx, rdx
mov r9, rdi
lea r8, [rsp + 0x130]
call fcn.140052f70
mov qword [rsp + 0xd0], rbx
lea rax, [rsp + 0xc0]
cmp qword [rsp + 0xd8], 8
cmovae rax, qword [rsp + 0xc0]
mov word [rax + rdi], 0
lea rdx, [rsp + 0xb8]
lea rcx, [rsp + 0xe0]
call fcn.140016f60
nop
mov rdx, rax
mov rcx, rbp
call fcn.140017110
nop
lea rax, [0x14008c268]
mov qword [rsp + 0xe0], rax
cmp byte [rsp + 0x118], 0
je 0x140019431
mov rcx, qword [rsp + 0x110]
test rcx, rcx
je 0x1400193fc
call fcn.1400278fc
mov rcx, qword [rsp + 0x120]
test rcx, rcx
je 0x140019416
call fcn.1400278fc
mov qword [rsp + 0x120], r12
mov qword [rsp + 0x110], r12
mov byte [rsp + 0x118], 0
mov dword [rsp + 0x11c], 2
cmp qword [rsp + 0x108], 8
jb 0x140019449
mov rcx, qword [rsp + 0xf0]
call fcn.1400278fc
mov qword [rsp + 0x108], 7
mov qword [rsp + 0x100], r12
mov word [rsp + 0xf0], 0
cmp qword [rsp + 0xd8], 8
jb 0x14001947f
mov rcx, qword [rsp + 0xc0]
call fcn.1400278fc
mov qword [rsp + 0xd8], 7
mov qword [rsp + 0xd0], r12
mov word [rsp + 0xc0], 0
mov rdi, qword [rsp + 0x48]
mov rax, qword [0x1400aea10]
test rax, rax
jne 0x1400194be
mov cx, 2
call fcn.140017ee0
mov qword [0x1400aea10], rax
mov rcx, rdi
call rax
nop
cmp qword [rsp + 0xb0], 8
jb 0x1400194dc
mov rcx, qword [rsp + 0x98]
call fcn.1400278fc
mov eax, esi
mov rcx, qword [rsp + 0x1a8]
xor rcx, rsp
call fcn.1400524a0
mov rbx, qword [rsp + 0x1e0]
add rsp, 0x1b0
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret