Function at 0x1400139a0
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 [0x1400781a0]
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.140005380
nop
mov rbx, qword [0x1400803d0]
test rbx, rbx
jne 0x140013adb
mov ecx, 0x310
call fcn.14001f560
mov rbx, rax
mov qword [rsp + 0x88], rax
test rax, rax
je 0x140013ad1
call fcn.14002b6f8
mov rdx, rax
mov ecx, r12d
test rax, rax
setne cl
test ecx, ecx
jne 0x140013a61
mov ecx, 0x80004005
call fcn.140002210
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, [0x1400660dc]
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx - 1]
lea rdx, [0x1400660dc]
mov rcx, rbx
call fcn.140005c50
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, [0x1400660e0]
mov edx, 0x50
call fcn.140036860
nop
jmp 0x140013ad4
mov rbx, r12
mov qword [0x1400803d0], rbx
movzx r8d, sil
lea rdx, str.GetIpAddrFromHostName_blIpv6___d_
mov rcx, rbx
call fcn.14000f840
movabs r13, 0x7ffffffffffffffe
cmp qword [rsp + 0xa8], 0
jne 0x140013cec
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 0x140013b70
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 0x140013c21
lea rax, [rsp + 0x98]
cmp rdx, 8
cmovae rax, rcx
lea rax, [rax + r8*2]
lea rdi, [rsp + 0xe0]
cmp rax, rdi
jbe 0x140013c21
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.140005380
mov rdx, qword [rsp + 0xb0]
jmp 0x140013cf4
cmp rbx, r13
jbe 0x140013c3b
call fcn.140058730
mov rdx, qword [rsp + 0xb0]
mov r8, qword [rsp + 0xa8]
cmp rdx, rbx
jae 0x140013c5a
mov rdx, rbx
lea rcx, [rsp + 0x90]
call fcn.140005580
mov rdx, qword [rsp + 0xb0]
jmp 0x140013c89
test rbx, rbx
jne 0x140013c89
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 0x140013cf4
test rbx, rbx
je 0x140013cf4
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.140034f40
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 0x140013cf4
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 0x140013da0
mov eax, edi
mov byte [rsp + rax + 0x180], 0
mov rax, qword [0x140080d38]
test rax, rax
jne 0x140013dba
xor ecx, ecx
call fcn.140012be0
mov qword [0x140080d38], 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 0x140013e46
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0x400
lea rdi, [0x140080530]
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.14000f410
mov rcx, rax
mov rdx, rdi
call fcn.14000f840
nop
cmp qword [rsp + 0xb0], 8
jb 0x140013e3c
mov rcx, qword [rsp + 0x98]
call fcn.14001f5a4
mov eax, 1
jmp 0x1400141de
mov rdi, qword [rsp + 0x48]
test rdi, rdi
jne 0x140013e72
cmp qword [rsp + 0xb0], 8
jb 0x140013e68
mov rcx, qword [rsp + 0x98]
call fcn.14001f5a4
mov eax, 1
jmp 0x1400141de
mov rax, qword [rdi + 0x20]
test rax, rax
jne 0x140013ebf
mov rax, qword [0x140080d40]
test rax, rax
jne 0x140013e97
mov cx, 2
call fcn.140012be0
mov qword [0x140080d40], rax
mov rcx, rdi
call rax
nop
cmp qword [rsp + 0xb0], 8
jb 0x140013eb5
mov rcx, qword [rsp + 0x98]
call fcn.14001f5a4
mov eax, 1
jmp 0x1400141de
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 0x140013f6e
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 0x140013fba
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.140012000
mov rdi, rax
call fcn.14000f410
mov rcx, rax
mov rdx, rdi
call fcn.14000f840
mov esi, 1
jmp 0x140013fba
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 0x140013fba
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.140012000
mov rdi, rax
call fcn.14000f410
mov rcx, rax
mov rdx, rdi
call fcn.14000f840
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 0x140014010
call fcn.140058730
mov rdx, qword [rsp + 0xd8]
mov r8, qword [rsp + 0xd0]
cmp rdx, rbx
jae 0x14001402f
mov rdx, rbx
lea rcx, [rsp + 0xb8]
call fcn.140005580
mov rdx, qword [rsp + 0xd8]
jmp 0x140014056
test rbx, rbx
jne 0x140014056
mov qword [rsp + 0xd0], r12
lea rax, [rsp + 0xc0]
cmp rdx, 8
cmovae rax, qword [rsp + 0xc0]
mov word [rax], bx
jmp 0x1400140af
test rbx, rbx
je 0x1400140af
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.140034f40
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.140011c60
nop
mov rdx, rax
mov rcx, rbp
call fcn.140011e10
nop
lea rax, [0x1400667a8]
mov qword [rsp + 0xe0], rax
cmp byte [rsp + 0x118], 0
je 0x140014131
mov rcx, qword [rsp + 0x110]
test rcx, rcx
je 0x1400140fc
call fcn.14001f5a4
mov rcx, qword [rsp + 0x120]
test rcx, rcx
je 0x140014116
call fcn.14001f5a4
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 0x140014149
mov rcx, qword [rsp + 0xf0]
call fcn.14001f5a4
mov qword [rsp + 0x108], 7
mov qword [rsp + 0x100], r12
mov word [rsp + 0xf0], 0
cmp qword [rsp + 0xd8], 8
jb 0x14001417f
mov rcx, qword [rsp + 0xc0]
call fcn.14001f5a4
mov qword [rsp + 0xd8], 7
mov qword [rsp + 0xd0], r12
mov word [rsp + 0xc0], 0
mov rdi, qword [rsp + 0x48]
mov rax, qword [0x140080d40]
test rax, rax
jne 0x1400141be
mov cx, 2
call fcn.140012be0
mov qword [0x140080d40], rax
mov rcx, rdi
call rax
nop
cmp qword [rsp + 0xb0], 8
jb 0x1400141dc
mov rcx, qword [rsp + 0x98]
call fcn.14001f5a4
mov eax, esi
mov rcx, qword [rsp + 0x1a8]
xor rcx, rsp
call fcn.140034e40
mov rbx, qword [rsp + 0x1e0]
add rsp, 0x1b0
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret