Function at 0x1400ca930
Capabilities:
Get hostname

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x58
mov qword [rbp - 0x18], 0xfffffffffffffffe
mov r13, rcx
lea rbx, [0x140148ea8]
mov edi, 5
mov rcx, qword [0x140148ea8]
cmp rcx, rbx
je 0x1400ca988
test byte [rcx + 0x1c], 1
je 0x1400ca988
cmp byte [rcx + 0x19], dil
jb 0x1400ca988
lea edx, [rdi + 8]
mov r9, r13
lea r8, [0x140009138]
mov rcx, qword [rcx + 0x10]
call fcn.14000fda0
lea r14, [r13 + 0x48]
xor r12d, r12d
cmp dword [r14], r12d
je 0x1400ca9c8
mov esi, dword [r14]
test esi, esi
je 0x1400ca9c8
mov rdi, qword [0x14014d1c8]
mov rax, qword [rdi]
mov rbx, qword [rax + 0x20]
mov rcx, rbx
call qword [fcn.140015690]
mov edx, esi
mov rcx, rdi
call rbx
mov dword [r14], r12d
lea rbx, [0x140148ea8]
lea edi, [r12 + 5]
mov qword [rbp + 0x58], r12
lea rax, [rbp + 0x58]
mov qword [rsp + 0x20], rax
lea r9, [0x140009128]
xor edx, edx
lea r8d, [rdx + 0x17]
lea rcx, [0x1400caf50]
call qword [sym.imp.ole32.dll_CoCreateInstance]
mov esi, eax
mov r15d, 2
test eax, eax
jns 0x1400caa43
mov rcx, qword [0x140148ea8]
cmp rcx, rbx
je 0x1400caa31
test byte [rcx + 0x1c], r15b
je 0x1400caa31
cmp byte [rcx + 0x19], r15b
jb 0x1400caa31
lea edx, [r15 + 0xc]
mov r9d, eax
lea r8, [0x140009138]
mov rcx, qword [rcx + 0x10]
call fcn.14000fd64
mov rcx, qword [0x140148ea8]
mov rbx, qword [rbp + 0x58]
test rbx, rbx
je 0x1400caebd
jmp 0x1400caea1
mov r8, qword [rbp + 0x58]
lea rdx, [0x140009128]
mov rcx, r14
call fcn.1400e543c
mov esi, eax
test eax, eax
js 0x1400cae98
mov rcx, qword [0x140148ea8]
cmp rcx, rbx
je 0x1400caa8d
test byte [rcx + 0x1c], r15b
je 0x1400caa8d
cmp byte [rcx + 0x19], dil
jb 0x1400caa8d
mov edx, reloc.OLEAUT32.dll_SafeArrayDestroy
lea r8, [0x140009138]
mov rcx, qword [rcx + 0x10]
call fcn.14000fcb0
mov rcx, r13
call fcn.1400cb084
mov esi, eax
test eax, eax
js 0x1400cae98
mov rax, qword [section..data]
mov rbx, qword [rax + 0x18]
mov rcx, rbx
call qword [fcn.140015690]
lea rcx, section..data
call rbx
lea rbx, [rax + 0x18]
mov qword [rbp + 0x60], rbx
mov r14d, reloc.OLEAUT32.dll_SafeArrayGetDim
mov dword [rbp + 0x48], r14d
lea ecx, [r14 - 0xf]
sub ecx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, r14d
or eax, ecx
jge 0x1400caaef
mov edx, r14d
lea rcx, [rbp + 0x60]
call fcn.140011854
mov rbx, qword [rbp + 0x60]
cmp dword [rbx - 0xc], r14d
jl 0x1400caf18
mov dword [rbx - 0x10], r14d
mov word [rbx + 0x20], r12w
lea rdx, [rbp + 0x48]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetComputerNameW]
or rdi, 0xffffffffffffffff
test eax, eax
je 0x1400cab89
mov rax, rdi
inc rax
cmp word [rbx + rax*2], r12w
jne 0x1400cab1a
test eax, eax
js 0x1400cab7e
cmp eax, dword [rbx - 0xc]
jg 0x1400cab7e
mov dword [rbx - 0x10], eax
cdqe
mov word [rbx + rax*2], r12w
mov rcx, qword [0x140148ea8]
lea rdx, [0x140148ea8]
cmp rcx, rdx
je 0x1400cabf0
test byte [rcx + 0x1c], r15b
je 0x1400cabf0
mov eax, 5
cmp byte [rcx + 0x19], al
jb 0x1400cabf0
mov edx, r14d
mov r9, rbx
lea r8, [0x140009138]
mov rcx, qword [rcx + 0x10]
call fcn.14000fcd0
jmp 0x1400cabf0
mov ecx, 0x80070057
call fcn.1400119f0
int3
cmp dword [rbx - 0xc], r12d
jl 0x1400caf0d
mov dword [rbx - 0x10], r12d
mov word [rbx], r12w
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
mov ecx, 0x80004005
test esi, esi
cmovns esi, ecx
mov rcx, qword [0x140148ea8]
lea rdx, [0x140148ea8]
cmp rcx, rdx
je 0x1400cabf0
test byte [rcx + 0x1c], r15b
je 0x1400cabf0
cmp byte [rcx + 0x19], r15b
jb 0x1400cabf0
mov edx, SafeArrayUnlock
mov r9d, eax
lea r8, [0x140009138]
mov rcx, qword [rcx + 0x10]
call fcn.14000fd64
lea rcx, [rbp + 0x60]
call fcn.140043db4
mov rax, qword [section..data]
mov rbx, qword [rax + 0x18]
mov rcx, rbx
call qword [fcn.140015690]
lea rcx, section..data
call rbx
lea rbx, [rax + 0x18]
mov qword [rbp + 0x50], rbx
mov ecx, 1
sub ecx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
mov r14d, 0x105
sub eax, r14d
or eax, ecx
jge 0x1400cac46
mov edx, r14d
lea rcx, [rbp + 0x50]
call fcn.140011854
mov rbx, qword [rbp + 0x50]
cmp dword [rbx - 0xc], r14d
jl 0x1400caeff
mov dword [rbx - 0x10], r14d
mov word [rbx + 0x20a], r12w
mov r8d, r14d
mov rdx, rbx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x1400cad3a
mov rax, rdi
inc rax
cmp word [rbx + rax*2], r12w
jne 0x1400cac75
test eax, eax
js 0x1400cad2f
cmp eax, dword [rbx - 0xc]
jg 0x1400cad2f
mov dword [rbx - 0x10], eax
cdqe
mov word [rbx + rax*2], r12w
mov rax, rdi
inc rax
cmp word [rbx + rax*2], r12w
jne 0x1400cac9d
cdqe
lea rcx, [rbx + rax*2]
jmp 0x1400cacb8
cmp word [rcx], 0x5c
je 0x1400cacc6
sub rcx, r15
cmp rcx, rbx
jne 0x1400cacaf
cmp word [rcx], 0x5c
je 0x1400cacc6
mov rcx, r12
test rcx, rcx
je 0x1400cad3a
sub rcx, rbx
sar rcx, 1
cmp ecx, edi
je 0x1400cad3a
mov r8d, dword [rbx - 0x10]
sub r8d, ecx
dec r8d
lea rdx, [rbp - 0x20]
lea rcx, [rbp + 0x50]
call fcn.140074b64
nop
mov rdx, rax
lea rcx, [rbp + 0x50]
call fcn.1400115a8
nop
mov r14, qword [rbp - 0x20]
mov eax, edi
lock xadd dword [r14 - 8], eax
add eax, edi
test eax, eax
jg 0x1400cad29
mov rdi, qword [r14 - 0x18]
mov rax, qword [rdi]
mov rbx, qword [rax + 8]
mov rcx, rbx
call qword [fcn.140015690]
lea rdx, [r14 - 0x18]
mov rcx, rdi
call rbx
mov rbx, qword [rbp + 0x50]
jmp 0x1400cad3a
mov ecx, 0x80070057
call fcn.1400119f0
int3
mov rax, qword [section..data]
mov rdi, qword [rax + 0x18]
mov rcx, rdi
call qword [fcn.140015690]
lea rcx, section..data
call rdi
add rax, 0x18
mov qword [rbp - 0x28], rax
mov r9, qword [rbp + 0x60]
mov r8, rbx
lea rdx, [0x1400caf38]
lea rcx, [rbp - 0x28]
call fcn.1400157a0
mov rbx, qword [rbp - 0x28]
mov rcx, qword [0x140148ea8]
lea rax, [0x140148ea8]
cmp rcx, rax
je 0x1400cadb3
test byte [rcx + 0x1c], r15b
je 0x1400cadb3
mov eax, 5
cmp byte [rcx + 0x19], al
jb 0x1400cadb3
lea edx, [rax + 0xd]
mov r9, rbx
lea r8, [0x140009138]
mov rcx, qword [rcx + 0x10]
call fcn.14000fcd0
mov rcx, qword [r13 + 0x80]
cmp rbx, rcx
je 0x1400cadf1
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
test rbx, rbx
je 0x1400cadea
mov rcx, rbx
call qword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov qword [r13 + 0x80], rax
test rax, rax
jne 0x1400cadf1
mov ecx, 0x8007000e
call fcn.1400119f0
int3
mov qword [r13 + 0x80], r12
mov eax, 0x8007000e
cmp qword [r13 + 0x80], r12
cmove esi, eax
lea r14, [rbx - 0x18]
or r13, 0xffffffffffffffff
mov eax, r13d
lock xadd dword [r14 + 0x10], eax
add eax, r13d
test eax, eax
jg 0x1400cae34
mov rdi, qword [r14]
mov rax, qword [rdi]
mov rbx, qword [rax + 8]
mov rcx, rbx
call qword [fcn.140015690]
mov rdx, r14
mov rcx, rdi
call rbx
nop
mov r14, qword [rbp + 0x50]
mov eax, r13d
lock xadd dword [r14 - 8], eax
add eax, r13d
test eax, eax
jg 0x1400cae66
mov rdi, qword [r14 - 0x18]
mov rax, qword [rdi]
mov rbx, qword [rax + 8]
mov rcx, rbx
call qword [fcn.140015690]
lea rdx, [r14 - 0x18]
mov rcx, rdi
call rbx
nop
mov r14, qword [rbp + 0x60]
mov eax, r13d
lock xadd dword [r14 - 8], eax
add eax, r13d
test eax, eax
jg 0x1400cae98
mov rdi, qword [r14 - 0x18]
mov rax, qword [rdi]
mov rbx, qword [rax + 8]
mov rcx, rbx
call qword [fcn.140015690]
lea rdx, [r14 - 0x18]
mov rcx, rdi
call rbx
nop
mov rbx, qword [rbp + 0x58]
test rbx, rbx
je 0x1400caeb6
mov rax, qword [rbx]
mov rdi, qword [rax + 0x10]
mov rcx, rdi
call qword [fcn.140015690]
mov rcx, rbx
call rdi
mov rcx, qword [0x140148ea8]
lea rax, [0x140148ea8]
cmp rcx, rax
je 0x1400caefb
test byte [rcx + 0x1c], 1
je 0x1400caefb
movzx eax, byte [rcx + 0x19]
test esi, esi
mov edx, 5
cmovns r15d, edx
cmp eax, r15d
jl 0x1400caefb
mov edx, SafeArrayAccessData
mov r9d, esi
lea r8, [0x140009138]
mov rcx, qword [rcx + 0x10]
call fcn.14000fd64
mov eax, esi
jmp 0x1400caf26
mov ecx, 0x80070057
call fcn.1400119f0
nop
jmp 0x1400caf0c
nop
mov ecx, 0x80070057
call fcn.1400119f0
int3
mov ecx, 0x80070057
call fcn.1400119f0
nop
jmp 0x1400caf25
nop
add rsp, 0x58
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret