Function at 0x10040ca00
Capabilities:
Get hostname

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r14
sub rsp, reloc.sqlmin.dll_Ordinal_656
mov rax, qword [0x10042d0d0]
xor rax, rsp
mov qword [rsp + 0x280], rax
mov rcx, qword [0x10042d108]
lea rbx, str.MKMASTR
mov dword [rsp + 0x30], 0x1d
add rcx, 0x8550
xor r14d, r14d
mov r8, rbx
mov edi, r14d
mov edx, 0x105
nop word [rax + rax]
lea rax, [rdx + 0x7ffffef9]
test rax, rax
je 0x10040ca87
movzx eax, word [r8]
test ax, ax
je 0x10040ca87
mov word [rcx], ax
add rcx, 2
add r8, 2
dec rdx
jne 0x10040ca60
jmp 0x10040ca8c
test rdx, rdx
jne 0x10040ca95
sub rcx, 2
mov edi, 0x8007007a
mov word [rcx], r14w
test edi, edi
jns 0x10040caeb
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__build_server_name_
lea r8, str._hs__HRESULT_0x_x_
lea rcx, [rsp + 0x80]
mov r9, rax
mov edx, Ordinal_516
mov qword [rsp + 0x20], rdi
call fcn.10040d510
mov rcx, rdi
test eax, eax
js 0x10040cae6
lea rcx, [rsp + 0x80]
call fcn.100411330
lea rbp, [0x100455a40]
mov r8, rbx
mov edx, 0x27
mov rcx, rbp
sub r8, rbp
mov edi, r14d
lea rax, [rdx + 0x7fffffd7]
test rax, rax
je 0x10040cb27
movzx eax, word [r8 + rcx]
test ax, ax
je 0x10040cb27
mov word [rcx], ax
add rcx, 2
dec rdx
jne 0x10040cb03
jmp 0x10040cb2c
test rdx, rdx
jne 0x10040cb35
sub rcx, 2
mov edi, 0x8007007a
mov word [rcx], r14w
test edi, edi
jns 0x10040cb8b
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__build_instance_ID_
lea r8, str._hs__HRESULT_0x_x_
lea rcx, [rsp + 0x80]
mov r9, rax
mov edx, Ordinal_516
mov qword [rsp + 0x20], rdi
call fcn.10040d510
mov rcx, rdi
test eax, eax
js 0x10040cb86
lea rcx, [rsp + 0x80]
call fcn.100411330
or rsi, 0xffffffffffffffff
mov rax, rsi
inc rax
cmp word [rbp + rax*2], r14w
jne 0x10040cb92
mov rcx, qword [0x10042d108]
mov dword [0x100455a90], eax
mov edx, 0x105
add rcx, 0x875a
mov edi, r14d
nop dword [rax]
lea rax, [rdx + 0x7ffffef9]
test rax, rax
je 0x10040cbe6
movzx eax, word [rbx]
test ax, ax
je 0x10040cbe6
mov word [rcx], ax
add rcx, 2
add rbx, 2
dec rdx
jne 0x10040cbc0
jmp 0x10040cbeb
test rdx, rdx
jne 0x10040cbf4
sub rcx, 2
mov edi, 0x8007007a
mov word [rcx], r14w
test edi, edi
jns 0x10040cc4a
mov ecx, edi
call qword [sym.imp.sqlmin.dll_Ordinal_1457]
call qword [sym.imp.sqldk.dll_Ordinal_403]
lea rbx, str.String_copy_failure__build_instance_name_
lea r8, str._hs__HRESULT_0x_x_
lea rcx, [rsp + 0x80]
mov r9, rax
mov edx, Ordinal_516
mov dword [rsp + 0x28], edi
mov qword [rsp + 0x20], rbx
call fcn.10040d510
mov rcx, rbx
test eax, eax
js 0x10040cc45
lea rcx, [rsp + 0x80]
call fcn.100411330
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_GetComputerNameW]
test eax, eax
je 0x10040ccdc
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 qword [sym.imp.MSVCR100.dll__snwprintf_l]
mov rax, qword [0x10042d108]
mov word [rax + 0x8f80], r14w
mov rax, qword [0x10042d108]
lea rcx, [rax + 0x8d78]
mov qword [rax + 0x3da0], rcx
inc rsi
cmp word [rcx + rsi*2], r14w
jne 0x10040ccc1
mov rax, qword [0x10042d108]
add esi, esi
mov dword [rax + 0x3da8], esi
jmp 0x10040ccfc
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x10040ccee
movzx eax, ax
or eax, 0x80070000
lea rdx, str.GetComputerName___initialization_failed._Aborting_Initilialization
mov ecx, eax
call fcn.100411290
mov rcx, qword [0x10042d108]
mov edx, 0x105
lea r8, [rcx + 0x875a]
add rcx, 0x918c
mov r9d, edx
call qword [sym.imp.MSVCR100.dll_wcsncpy_s]
mov rax, qword [0x10042d108]
mov word [rax + 0x9394], r14w
mov rcx, qword [rsp + 0x280]
xor rcx, rsp
call fcn.1004013c0
lea r11, [rsp + reloc.sqlmin.dll_Ordinal_656]
mov rbx, qword [r11 + 0x10]
mov rbp, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop r14
ret