Function at 0x140064820
Capabilities:
Get hostname

Disassembly:
mov r11, rsp
push rbp
push rsi
push rdi
push r12
push r13
sub rsp, 0x1b0
mov qword [rsp + 0x88], 0xfffffffffffffffe
mov qword [r11 + 8], rbx
mov rax, qword [0x14012ce40]
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.140015460
nop
mov rax, qword [0x1401370f0]
test rax, rax
jne 0x1400648c7
mov ecx, 0x310
call fcn.140084d88
mov qword [rsp + 0x50], rax
test rax, rax
je 0x1400648bd
mov rcx, rax
call fcn.140050830
jmp 0x1400648c0
mov rax, r12
mov qword [0x1401370f0], rax
movzx r8d, sil
lea rdx, str.GetIpAddrFromHostName_blIpv6___d_
mov rcx, rax
call fcn.140050c00
movabs r13, 0x7ffffffffffffffe
cmp qword [rsp + 0xa8], 0
jne 0x140064ad8
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 0x14006495c
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 0x140064a0d
lea rax, [rsp + 0x98]
cmp rdx, 8
cmovae rax, rcx
lea rax, [rax + r8*2]
lea rdi, [rsp + 0xe0]
cmp rax, rdi
jbe 0x140064a0d
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.140015460
mov rdx, qword [rsp + 0xb0]
jmp 0x140064ae0
cmp rbx, r13
jbe 0x140064a27
call fcn.1400d8c10
mov rdx, qword [rsp + 0xb0]
mov r8, qword [rsp + 0xa8]
cmp rdx, rbx
jae 0x140064a46
mov rdx, rbx
lea rcx, [rsp + 0x90]
call fcn.1400156c0
mov rdx, qword [rsp + 0xb0]
jmp 0x140064a75
test rbx, rbx
jne 0x140064a75
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 0x140064ae0
test rbx, rbx
je 0x140064ae0
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.1400b09f0
mov qword [rsp + 0xa8], rbx
lea rax, [rsp + 0x98]
cmp qword [rsp + 0xb0], 8
cmovae rax, qword [rsp + 0x98]
mov word [rdi + rax], 0
mov rdx, qword [rsp + 0xb0]
jmp 0x140064ae0
mov rdx, qword [rsp + 0xb0]
xor eax, eax
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 qword [rsp + 0x80], rax
mov eax, 2
mov ecx, 0x17
cmp sil, 1
cmove eax, ecx
mov dword [rsp + 0x5c], eax
mov dword [rsp + 0x60], 1
mov dword [rsp + 0x64], 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 0x140064b8f
mov eax, edi
mov byte [rsp + rax + 0x180], 0
mov rax, qword [0x140137e98]
test rax, rax
jne 0x140064ba9
xor ecx, ecx
call fcn.140063f60
mov qword [0x140137e98], rax
lea r9, [rsp + 0x48]
lea r8, [rsp + 0x58]
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 0x140064c68
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0x400
lea rdi, [0x140137690]
mov qword [rsp + 0x20], rdi
mov r9d, 0x400
mov r8d, eax
xor edx, edx
mov ecx, 0x12ff
call qword [sym.imp.KERNEL32.dll_FormatMessageW]
mov rax, qword [0x1401370f0]
test rax, rax
jne 0x140064c3a
mov ecx, 0x310
call fcn.140084d88
mov qword [rsp + 0x50], rax
test rax, rax
je 0x140064c30
mov rcx, rax
call fcn.140050830
jmp 0x140064c33
mov rax, r12
mov qword [0x1401370f0], rax
mov rdx, rdi
mov rcx, rax
call fcn.140050c00
nop
cmp qword [rsp + 0xb0], 8
jb 0x140064c5e
mov rcx, qword [rsp + 0x98]
call fcn.140084dcc
mov eax, 1
jmp 0x140065000
mov rdi, qword [rsp + 0x48]
test rdi, rdi
jne 0x140064c94
cmp qword [rsp + 0xb0], 8
jb 0x140064c8a
mov rcx, qword [rsp + 0x98]
call fcn.140084dcc
mov eax, 1
jmp 0x140065000
mov rax, qword [rdi + 0x20]
test rax, rax
jne 0x140064ce1
mov rax, qword [0x140137ea0]
test rax, rax
jne 0x140064cb9
mov cx, 2
call fcn.140063f60
mov qword [0x140137ea0], rax
mov rcx, rdi
call rax
nop
cmp qword [rsp + 0xb0], 8
jb 0x140064cd7
mov rcx, qword [rsp + 0x98]
call fcn.140084dcc
mov eax, 1
jmp 0x140065000
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 0x140064d90
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 0x140064ddc
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.140063380
mov rdi, rax
call fcn.1400507c0
mov rcx, rax
mov rdx, rdi
call fcn.140050c00
mov esi, 1
jmp 0x140064ddc
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 0x140064ddc
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.140063380
mov rdi, rax
call fcn.1400507c0
mov rcx, rax
mov rdx, rdi
call fcn.140050c00
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 0x140064e32
call fcn.1400d8c10
mov rdx, qword [rsp + 0xd8]
mov r8, qword [rsp + 0xd0]
cmp rdx, rbx
jae 0x140064e51
mov rdx, rbx
lea rcx, [rsp + 0xb8]
call fcn.1400156c0
mov rdx, qword [rsp + 0xd8]
jmp 0x140064e78
test rbx, rbx
jne 0x140064e78
mov qword [rsp + 0xd0], r12
lea rax, [rsp + 0xc0]
cmp rdx, 8
cmovae rax, qword [rsp + 0xc0]
mov word [rax], bx
jmp 0x140064ed1
test rbx, rbx
je 0x140064ed1
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.1400b09f0
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.140062fe0
nop
mov rdx, rax
mov rcx, rbp
call fcn.140063190
nop
lea rax, [0x1400fae70]
mov qword [rsp + 0xe0], rax
cmp byte [rsp + 0x118], 0
je 0x140064f53
mov rcx, qword [rsp + 0x110]
test rcx, rcx
je 0x140064f1e
call fcn.140084dcc
mov rcx, qword [rsp + 0x120]
test rcx, rcx
je 0x140064f38
call fcn.140084dcc
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 0x140064f6b
mov rcx, qword [rsp + 0xf0]
call fcn.140084dcc
mov qword [rsp + 0x108], 7
mov qword [rsp + 0x100], r12
mov word [rsp + 0xf0], 0
cmp qword [rsp + 0xd8], 8
jb 0x140064fa1
mov rcx, qword [rsp + 0xc0]
call fcn.140084dcc
mov qword [rsp + 0xd8], 7
mov qword [rsp + 0xd0], r12
mov word [rsp + 0xc0], 0
mov rdi, qword [rsp + 0x48]
mov rax, qword [0x140137ea0]
test rax, rax
jne 0x140064fe0
mov cx, 2
call fcn.140063f60
mov qword [0x140137ea0], rax
mov rcx, rdi
call rax
nop
cmp qword [rsp + 0xb0], 8
jb 0x140064ffe
mov rcx, qword [rsp + 0x98]
call fcn.140084dcc
mov eax, esi
mov rcx, qword [rsp + 0x1a8]
xor rcx, rsp
call fcn.1400b09d0
mov rbx, qword [rsp + 0x1e0]
add rsp, 0x1b0
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret