Function at 0x100401a90
Capabilities:
Get thread local storage value

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x240
mov rax, qword [0x10042d0d0]
xor rax, rsp
mov qword [rsp + reloc.sqlmin.dll_Ordinal_560], rax
lea rcx, [0x100454f90]
mov edx, Ordinal_260
call qword [sym.imp.sqldk.dll_Ordinal_335_1]
mov ebx, eax
test eax, eax
je 0x100401ada
call fcn.10040a530
lea rdx, [0x100454f90]
mov ecx, ebx
call fcn.100410d30
mov rax, qword [0x10042d108]
cmp dword [rax + 0x4f04], 0
lea rcx, [rax + 0x8550]
je 0x100401af8
call fcn.10040ca00
jmp 0x100401b0e
cmp word [0x100455aa0], 0
je 0x100401b09
call fcn.10040c700
jmp 0x100401b0e
call fcn.10040c4b0
mov rax, qword [0x10042d108]
mov rcx, qword [rax + 0x3da0]
mov qword [rax + 0x3d98], rcx
mov rax, qword [0x10042d108]
mov ecx, dword [rax + 0x3da8]
mov dword [rax + 0x3d94], ecx
call qword [sym.imp.sqldk.dll_Ordinal_681]
test eax, eax
je 0x100401b5b
mov ecx, 0x42af
call fcn.100406110
xor ecx, ecx
call qword [sym.imp.sqldk.dll_Ordinal_631_1]
or ecx, 0xffffffff
call qword [sym.imp.sqldk.dll_Ordinal_815]
call qword [sym.imp.sqllang.dll_Ordinal_862]
call qword [sym.imp.sqldk.dll_Ordinal_588]
call qword [sym.imp.MSVCR100.dll__statusfp]
mov ebx, eax
test al, 0x1c
je 0x100401b84
call qword [sym.imp.MSVCR100.dll__clearfp]
test bl, 0x10
je 0x100401b84
call qword [sym.imp.MSVCR100.dll__fpreset]
mov edx, 0xb031f
mov ecx, 0x9001f
call qword [sym.imp.MSVCR100.dll__controlfp]
mov rax, qword [0x10042d108]
xor edi, edi
mov rcx, qword [rax + 0x4660]
lea r11, str.master.mdf
mov edx, 0x105
mov ebx, edi
lea rax, [rdx + 0x7ffffef9]
test rax, rax
je 0x100401bd9
movzx eax, word [r11]
test ax, ax
je 0x100401bd9
mov word [rcx], ax
add rcx, 2
add r11, 2
dec rdx
jne 0x100401bb2
jmp 0x100401bde
test rdx, rdx
jne 0x100401be7
sub rcx, 2
mov ebx, 0x8007007a
mov word [rcx], di
test ebx, ebx
jns 0x100401c36
mov ecx, ebx
call qword [sym.imp.sqlmin.dll_Ordinal_1457]
call qword [sym.imp.sqldk.dll_Ordinal_403]
mov dword [rsp + 0x28], ebx
lea rbx, str.String_copy_failure__master.mdf_
lea r8, str._hs__HRESULT_0x_x_
lea rcx, [rsp + 0x30]
mov r9, rax
mov edx, Ordinal_516
mov qword [rsp + 0x20], rbx
call fcn.10040d510
mov rcx, rbx
test eax, eax
js 0x100401c31
lea rcx, [rsp + 0x30]
call fcn.100411330
call qword [sym.imp.sqlTsEs.dll_Ordinal_550]
call qword [sym.imp.sqlTsEs.dll_Ordinal_549]
mov rax, qword [sym.imp.sqldk.dll_Ordinal_787]
lea r11, [0x10040a510]
mov qword [rax], r11
call qword [sym.imp.sqlmin.dll_Ordinal_1492]
call qword [sym.imp.sqldk.dll_Ordinal_23_1]
mov rcx, rax
call qword [sym.imp.sqllang.dll_Ordinal_845]
call fcn.100407f40
call qword [sym.imp.sqldk.dll_Ordinal_23_1]
mov rcx, rax
call qword [sym.imp.sqllang.dll_Ordinal_1213]
call fcn.100411100
mov rax, qword [0x10042d108]
cmp dword [rax + 0x4ed4], edi
je 0x100401cc4
mov rax, qword [0x10042d0c8]
test byte [rax + 0x4b7], 2
je 0x100401cc4
call qword [sym.imp.CLOUDDBEXT.dll_InitFunctions]
test al, al
jne 0x100401cc4
lea rdx, str.SQL_Azure_Functions
mov ecx, 0x42f2
call fcn.1004137c0
or ecx, 0xffffffff
call qword [sym.imp.sqldk.dll_Ordinal_815]
mov rcx, qword [sym.imp.sqldk.dll_Ordinal_1002]
mov rax, qword [rcx]
cmp dword [rax + 0x10], 2
jne 0x100401d5b
mov rax, qword [0x10042d0c8]
test byte [rax + 0x4e2], 1
jne 0x100401d34
mov rcx, qword [0x10042d0c0]
mov rax, qword gs:[0x30]
add rax, rcx
cmp rcx, 0x1480
jge 0x100401d0a
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rax, qword [rax]
test rax, rax
je 0x100401d5b
mov rax, qword [rax + 8]
mov rcx, qword [rax]
test rcx, rcx
je 0x100401d5b
mov edx, 0x2710
call qword [sym.imp.sqldk.dll_Ordinal_22]
test eax, eax
je 0x100401d5b
mov rcx, qword [sym.imp.sqldk.dll_Ordinal_1002]
mov rcx, qword [rcx]
mov rax, qword [rcx]
call qword [rax + reloc.sqllang.dll_Ordinal_296]
cmp eax, 0x2523
je 0x100401d56
mov rax, qword [0x10042d108]
cmp dword [rax + 0x4ed0], edi
je 0x100401d5b
mov edi, 1
mov rax, qword [0x10042d108]
mov dword [rax + 0x4f00], edi
call qword [sym.imp.sqlmin.dll_Ordinal_1288]
call qword [sym.imp.sqldk.dll_Ordinal_23_1]
mov rcx, rax
mov edx, 1
call qword [sym.imp.sqllang.dll_Ordinal_844]
call qword [sym.imp.sqldk.dll_Ordinal_23_1]
mov rcx, rax
call qword [sym.imp.sqllang.dll_Ordinal_925]
call fcn.100410620
call fcn.100406190
mov r11, qword [sym.imp.sqldk.dll_Ordinal_1002]
mov rax, qword [r11]
cmp dword [rax + 0x14], 1
je 0x100401db0
call fcn.10040a6f0
mov edx, dword [0x1004558b0]
cmp edx, 0xffffff00
jne 0x100401de1
mov ecx, 0x429b
call fcn.1004137c0
mov edx, 0x429b
xor ecx, ecx
mov r8d, reloc.sqldk.dll_Ordinal_1066
call qword [sym.imp.sqldk.dll_Ordinal_816]
mov edx, dword [0x1004558b0]
cmp edx, 0xb
jge 0x100401df4
test edx, edx
je 0x100401df4
mov ecx, 0x42a0
call fcn.1004137c0
mov rcx, qword [0x10042d108]
call qword [sym.imp.sqlmin.dll_Ordinal_972]
mov r11, qword [0x10042d108]
cmp dword [r11 + 0x4ed8], 0
je 0x100401e56
mov rcx, r11
call qword [sym.imp.sqlmin.dll_Ordinal_995]
call qword [sym.imp.sqldk.dll_Ordinal_26]
test eax, eax
je 0x100401e4f
xor r9d, r9d
mov ecx, 0x1f51
or edx, 0xffffffff
lea r8d, [r9 + 1]
call qword [sym.imp.sqldk.dll_Ordinal_926]
test al, al
jne 0x100401e4f
lea rcx, str.Failed_to_setup_trace_flag__d_to_force_static_affinity_n
mov edx, 0x1f51
call fcn.1004138d0
mov r11, qword [0x10042d108]
cmp dword [r11 + 0x8538], 0
je 0x100401e65
call fcn.100407500
call fcn.10040ace0
call qword [sym.imp.sqldk.dll_Ordinal_211]
test eax, eax
je 0x100401e8e
lea rdx, str.SQL_OS_Boot
mov ecx, 0x42f2
call fcn.1004137c0
or ecx, 0xffffffff
call qword [sym.imp.sqldk.dll_Ordinal_815]
mov rcx, qword [0x10042d108]
call qword [sym.imp.sqlmin.dll_Ordinal_978]
call qword [sym.imp.sqldk.dll_Ordinal_23_1]
mov rcx, rax
call qword [sym.imp.sqllang.dll_Ordinal_924]
call qword [sym.imp.sqlmin.dll_Ordinal_999]
call fcn.10040a600
lea rcx, [0x10042d130]
call fcn.1004048c0
test eax, eax
je 0x100401ed6
lea rdx, str.Non_yield_analysis_object
mov ecx, 0x42f2
call fcn.1004137c0
lea rcx, [0x100421ee0]
call fcn.100407bc0
lea rcx, [0x100421f00]
call fcn.100407bc0
call fcn.100402c10
mov rcx, qword [rsp + reloc.sqlmin.dll_Ordinal_560]
xor rcx, rsp
call fcn.1004013c0
mov rbx, qword [rsp + 0x250]
add rsp, 0x240
pop rdi
ret