Function at 0x10040c700
Capabilities:
Get hostname

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x270
mov rax, qword [0x10042d0d0]
xor rax, rsp
mov qword [rsp + 0x260], rax
mov rbx, rcx
test rcx, rcx
jne 0x10040c73d
lea rcx, str.SQL_Server_User_Instance_Name_not_set._Aborting_Initialization.
call fcn.100411330
mov rax, qword [0x10042d108]
lea rbp, [0x100455aa0]
mov edx, reloc.sqldk.dll_Ordinal_46
mov rcx, rbp
mov dword [rax + 0x4f08], 1
call qword [sym.imp.MSVCR100.dll_wcsrchr]
mov rdi, rax
test rax, rax
je 0x10040c791
call qword [sym.imp.sqldk.dll_Ordinal_403]
lea rdx, str..LOCALDB
mov rcx, rdi
mov r8, rax
call qword [sym.imp.MSVCR100.dll__wcsicmp_l]
xor r9d, r9d
test eax, eax
mov ecx, r9d
sete cl
jmp 0x10040c797
xor r9d, r9d
mov ecx, r9d
mov rax, qword [0x10042d108]
mov r8, rbx
mov edx, 0x105
mov dword [rax + 0x4f0c], ecx
mov rcx, qword [0x10042d108]
mov edi, r9d
add rcx, 0x875a
nop dword [rax]
lea rax, [rdx + 0x7ffffef9]
test rax, rax
je 0x10040c7e7
movzx eax, word [r8]
test ax, ax
je 0x10040c7e7
mov word [rcx], ax
add rcx, 2
add r8, 2
dec rdx
jne 0x10040c7c0
jmp 0x10040c7ec
test rdx, rdx
jne 0x10040c7f5
sub rcx, 2
mov edi, 0x8007007a
mov word [rcx], r9w
test edi, edi
jns 0x10040c845
mov ecx, edi
call qword [sym.imp.sqlmin.dll_Ordinal_1457]
call qword [sym.imp.sqldk.dll_Ordinal_403]
mov dword [rsp + 0x28], edi
lea rdi, str.String_Copy_Failure__instance_name_
lea r8, str._hs__HRESULT_0x_x_
lea rcx, [rsp + 0x60]
mov r9, rax
mov edx, Ordinal_516
mov qword [rsp + 0x20], rdi
call fcn.10040d510
mov rcx, rdi
test eax, eax
js 0x10040c840
lea rcx, [rsp + 0x60]
call fcn.100411330
call fcn.1004183e0
or rsi, 0xffffffffffffffff
mov rax, rsi
inc rax
cmp word [rbx + rax*2], 0
jne 0x10040c851
cmp eax, 0x10
jbe 0x10040c86c
lea rcx, str.Error:_Instance_name_exceeds_maximum_length.
call fcn.100411330
mov rax, rsi
nop
inc rax
cmp word [rbp + rax*2], 0
jne 0x10040c870
cmp eax, 0x10
jbe 0x10040c88c
lea rcx, str.Error:_Parent_iInstance_name_exceeds_maximum_length.
call fcn.100411330
lea r8, [0x100455a40]
xor edx, edx
mov rcx, rbp
call qword [sym.imp.instapi120.dll_GetSvcInstanceIDFromName]
test eax, eax
jne 0x10040c8ae
lea rcx, str.Error_getting_instance_ID_from_name.
call fcn.100411330
mov rdx, qword [0x10042d108]
lea r8, [rsp + 0x30]
lea rcx, [0x100455a40]
add rdx, 0x8f82
mov dword [rsp + 0x30], Ordinal_267
call qword [sym.imp.instapi120.dll_GetInstanceNameFromID]
test eax, eax
jne 0x10040c8e6
lea rcx, str.Error_getting_instance_name.
call fcn.100411330
call fcn.10040c370
lea rdx, [rsp + 0x34]
lea rcx, [rsp + 0x38]
mov dword [rsp + 0x34], Ordinal_23
call qword [sym.imp.KERNEL32.dll_GetComputerNameW]
test eax, eax
je 0x10040c98b
mov rdi, qword [0x10042d108]
lea rbx, [rdi + 0x875a]
call qword [sym.imp.sqldk.dll_Ordinal_403]
lea rcx, [rdi + 0x8d78]
mov r9, rax
lea rax, [rsp + 0x38]
lea r8, [0x1004244e0]
mov edx, 0x105
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rax
call fcn.100405260
lea rdx, str.String_Format_Failure__full_instance_name_
mov ecx, eax
call fcn.100411290
mov r11, qword [0x10042d108]
lea rax, [r11 + 0x8d78]
mov qword [r11 + 0x3da0], rax
nop dword [rax]
inc rsi
cmp word [rax + rsi*2], 0
jne 0x10040c970
mov rax, qword [0x10042d108]
add esi, esi
mov dword [rax + 0x3da8], esi
jmp 0x10040c997
lea rcx, str.GetComputerName___initialization_failed._Aborting_Initialization
call fcn.100411330
mov rcx, qword [0x10042d108]
lea r9, [rsp + 0x30]
xor edx, edx
lea r8, [rcx + 0x918c]
add rcx, 0x875a
mov dword [rsp + 0x30], Ordinal_267
call qword [sym.imp.instapi120.dll_GetSQLServiceByName]
test eax, eax
jne 0x10040c9d1
lea rcx, str.Unable_to_obtain_service_name.
call fcn.100411330
mov rcx, qword [rsp + 0x260]
xor rcx, rsp
call fcn.1004013c0
lea r11, [rsp + 0x270]
mov rbx, qword [r11 + 0x18]
mov rbp, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret