Function at 0x100401700
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push r14
mov eax, 0x11b0
call fcn.100402360
sub rsp, rax
lea rbp, [rsp + 0x40]
mov qword [rbp + 0x40], 0xfffffffffffffffe
mov qword [rbp + 0x11a0], rbx
mov qword [rbp + 0x11a8], rsi
mov rax, qword [0x10042d0d0]
xor rax, rbp
mov qword [rbp + 0x1160], rax
mov rsi, rdx
mov edi, ecx
xor r14d, r14d
mov qword [rbp + 0x48], r14
xor eax, eax
mov dword [rbp + 0x50], eax
lea rcx, [rbp + 0x48]
call qword [sym.imp.SQLOS.dll_GetTlsSlotInfo]
lea rcx, [0x100454b50]
call qword [sym.imp.sqldk.dll_Ordinal_867]
lea r11, [0x100454b60]
mov rax, qword [sym.imp.sqldk.dll_Ordinal_1002]
mov qword [rax], r11
call qword [sym.imp.sqllang.dll_Ordinal_882]
lea r11, str.MSSQLSERVER
mov edx, 0x105
mov rcx, qword [0x10042d108]
add rcx, 0x8550
mov ebx, r14d
nop word [rax + rax]
lea rax, [rdx + 0x7ffffef9]
test rax, rax
je 0x1004017c7
movzx eax, word [r11]
test ax, ax
je 0x1004017c7
mov word [rcx], ax
add rcx, 2
add r11, 2
dec rdx
jne 0x1004017a0
jmp 0x1004017cc
test rdx, rdx
jne 0x1004017d5
sub rcx, 2
mov ebx, 0x8007007a
mov word [rcx], r14w
test ebx, ebx
jns 0x100401829
mov ecx, ebx
call qword [sym.imp.sqlmin.dll_Ordinal_1457]
call qword [sym.imp.sqldk.dll_Ordinal_403]
mov r9, rax
mov dword [rsp + 0x28], ebx
lea rbx, str.String_copy_failure__build_server_name_
mov qword [rsp + 0x20], rbx
lea r8, str._hs__HRESULT_0x_x_
mov edx, Ordinal_516
lea rcx, [rbp + 0xf60]
call fcn.10040d510
test eax, eax
mov rcx, rbx
js 0x100401824
lea rcx, [rbp + 0xf60]
call fcn.100411330
call qword [sym.imp.sqllang.dll_Ordinal_795]
mov rbx, rax
call qword [sym.imp.sqllang.dll_Ordinal_609]
mov qword [rbp], rax
mov qword [rbp + 8], r14
mov qword [rbp + 0x10], rbx
movsd xmm0, qword [rbp]
movsd qword [rbp + 0x20], xmm0
movsd xmm1, qword [rbp + 8]
movsd qword [rbp + 0x28], xmm1
movsd xmm0, qword [rbp + 0x10]
movsd qword [rbp + 0x30], xmm0
mov edx, Ordinal_22
lea rcx, [rbp + 0x20]
call qword [sym.imp.sqldk.dll_Ordinal_682]
mov r11, qword [sym.imp.sqldk.dll_Ordinal_1071]
mov r8, qword [r11 + 8]
lea rax, [r8*8]
lea rcx, [rax + 0xf]
cmp rcx, rax
ja 0x100401897
movabs rcx, 0xffffffffffffff0
and rcx, 0xfffffffffffffff0
mov rax, rcx
call fcn.100402360
sub rsp, rcx
lea r9, [rsp + 0x40]
mov qword [rsp + 0x30], r14
mov qword [rsp + 0x28], r14
mov dword [rsp + 0x20], 1
xor edx, edx
lea rcx, [rbp + 0x60]
call qword [sym.imp.sqldk.dll_Ordinal_46]
nop
mov rcx, qword [0x10042d0c0]
mov rax, qword gs:[0x30]
add rax, rcx
cmp rcx, 0x1480
jge 0x1004018ec
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x1004018fd
mov rbx, qword [rax + 0xe8]
test rbx, rbx
jne 0x10040192f
call qword [sym.imp.sqldk.dll_Ordinal_7]
mov r11, qword [0x10042d0c0]
mov rax, qword gs:[0x30]
add rax, r11
cmp r11, 0x1480
jge 0x100401928
mov ecx, r11d
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, qword [rax + 0xe8]
or dword [rbx + 0x220], 0x20
mov rax, qword [sym.imp.sqldk.dll_Ordinal_1088]
test rax, rax
lea r8, [rax + 0x40]
jne 0x100401949
mov r8, r14
mov eax, Ordinal_132
lea r9d, [rax - 0x78]
mov word [rsp + 0x20], ax
lea edx, [rax - 0x7c]
lea ecx, [rax - 0x7f]
call qword [sym.imp.sqldk.dll_Ordinal_267]
mov qword [rbx + 0x3a0], rax
mov edx, 1
lea rcx, [0x100406750]
call qword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
cmp eax, 1
je 0x1004019a1
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x100401993
movzx eax, ax
or eax, 0x80070000
lea rdx, str.SetConsoleCtrlHandler_failure
mov ecx, eax
call fcn.100411290
mov rdx, rsi
mov ecx, edi
call fcn.100410e60
mov edx, 0x63
lea rcx, [0x100454f90]
call qword [sym.imp.sqldk.dll_Ordinal_492_1]
mov ecx, r14d
test rax, rax
sete cl
mov rax, qword [0x10042d108]
mov dword [rax + 0x8538], ecx
test ecx, ecx
je 0x100401a42
lea rax, [0x100422a98]
mov qword [rbp], rax
lea rax, [0x100405f50]
mov qword [rbp + 8], rax
mov qword [rbp + 0x10], r14
mov qword [rbp + 0x18], r14
lea rcx, [rbp]
call qword [sym.imp.ADVAPI32.dll_StartServiceCtrlDispatcherW]
test eax, eax
jne 0x100401a2c
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, reloc.sqldk.dll_Ordinal_1063
je 0x100401a34
cmp eax, 1
je 0x100401a34
mov ecx, 0x42f4
call fcn.100406110
nop
lea rcx, [rbp + 0x60]
call qword [sym.imp.sqldk.dll_Ordinal_104]
jmp 0x100401a58
xor ecx, ecx
call qword [sym.imp.sqldk.dll_Ordinal_631_1]
mov rax, qword [0x10042d108]
mov dword [rax + 0x8538], r14d
call fcn.100401a90
nop
lea rcx, [rbp + 0x60]
call qword [sym.imp.sqldk.dll_Ordinal_104]
call qword [sym.imp.MSVCR100.dll__endthread]
xor eax, eax
mov rcx, qword [rbp + 0x1160]
xor rcx, rbp
call fcn.1004013c0
mov rbx, qword [rbp + 0x11a0]
mov rsi, qword [rbp + 0x11a8]
lea rsp, [rbp + 0x1170]
pop r14
pop rdi
pop rbp
ret