Function at 0x1005d9e0
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0x18
mov eax, dword [esp + 0x20]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x38]
push edi
mov edi, dword [sym.imp.OLEAUT32.dll_VariantInit]
xor ebx, ebx
push eax
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x28], ebx
mov dword [esp + 0x20], 1
mov dword [esp + 0x18], esi
call edi
mov ecx, dword [esp + 0x38]
push ecx
mov ebp, eax
call edi
mov edi, eax
call fcn.10057e50
push esi
call dword [sym.imp.OLEAUT32.dll_SysAllocStringByteLen]
test eax, eax
je 0x1005da34
mov ebx, 4
jmp 0x1005da38
mov dword [esp + 0x14], ebx
mov esi, dword [esp + 0x2c]
test esi, esi
je 0x1005da67
mov eax, dword [esi + 0x1c]
test eax, eax
jne 0x1005da53
push 0x11
push esi
call fcn.10055ad0
test eax, eax
je 0x1005da67
mov eax, dword [esi + 0x1c]
test eax, eax
jne 0x1005da62
push 0x11
push esi
call fcn.10055ad0
mov edx, dword [eax + 0x70]
jmp 0x1005da79
mov eax, dword [0x1007eed0]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [eax + 0x28]
mov edx, dword [ecx + 0x70]
cmp edx, 0xffffffff
mov dword [esp + 0x3c], edx
jne 0x1005da9b
push 1
push 0
push esi
push 0xfffffbfb
call fcn.1005a550
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0x18
cmp ebp, 1
jl 0x1005dd99
cmp ebp, 0x21c
ja 0x1005dd99
cmp edi, 0x21c
ja 0x1005dd99
mov eax, dword [esp + 0x40]
test al, 0x79
jne 0x1005dacd
or eax, 0x1000
mov dword [esp + 0x40], eax
test ax, ax
je 0x1005db33
mov edx, 1
mov ecx, ebx
movzx esi, ax
lea esp, [esp]
movzx eax, dx
and eax, esi
cmp eax, 8
jg 0x1005db0d
je 0x1005db08
sub eax, 1
je 0x1005db05
sub eax, 1
je 0x1005db00
sub eax, 2
jne 0x1005db2a
or ecx, 2
jmp 0x1005db2a
or ecx, 1
jmp 0x1005db2a
or ecx, 8
or ecx, 0x10
jmp 0x1005db2a
cmp eax, 0x10
je 0x1005db27
cmp eax, 0x20
je 0x1005db22
cmp eax, 0x1000
jne 0x1005db2a
or ecx, eax
jmp 0x1005db2a
or ecx, 0x40
jmp 0x1005db2a
or ecx, 0x20
add edx, edx
test dx, dx
jne 0x1005dae0
mov ebx, ecx
mov ebp, dword [esp + 0x30]
push 0
push ebp
call fcn.1005d220
mov edi, eax
mov eax, dword [esp + 0x38]
push 0
push eax
mov dword [esp + 0x28], edi
call fcn.1005d220
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
push ebp
mov dword [esp + 0x1c], eax
call esi
cmp eax, 0x103
jg 0x1005dd7c
test edi, edi
je 0x1005db7b
push edi
call esi
cmp eax, 0x103
jg 0x1005dd7c
mov edi, dword [esp + 0x18]
test edi, edi
je 0x1005db91
push edi
call esi
cmp eax, 0x103
jg 0x1005dd7c
mov ecx, dword [esp + 0x38]
push ecx
call esi
cmp eax, 0x103
jg 0x1005dd7c
test edi, edi
mov eax, edi
jne 0x1005dbad
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x14]
mov edi, dword [esp + 0x34]
push ebx
push 0
push edx
push eax
push edi
push ebp
mov ebp, dword [esp + 0x54]
push ebp
call dword [0x1007ef24]
mov esi, eax
test esi, esi
jge 0x1005dc7c
mov ecx, dword [esp + 0x18]
test ecx, ecx
mov ebp, esi
jne 0x1005dbdf
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x1005dbeb
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x14]
push ebx
push 0
push edx
push ecx
push edi
push eax
mov eax, dword [esp + 0x54]
push eax
call dword [0x1007ef24]
mov esi, eax
test esi, esi
jge 0x1005dc78
test ebp, ebp
mov esi, ebp
jge 0x1005dc78
cmp ebp, 0xfffffb4c
je 0x1005dc25
cmp ebp, 0xfffffb4f
je 0x1005dc25
cmp ebp, 0xfffffc01
jne 0x1005dc2d
mov dword [esp + 0x1c], 0
mov ebp, dword [esp + 0x3c]
mov eax, dword [esp + 0x20]
test eax, eax
mov edi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
je 0x1005dc42
push eax
call edi
mov eax, dword [esp + 0x18]
test eax, eax
je 0x1005dc4d
push eax
call edi
test esi, esi
jge 0x1005dd59
cmp dword [esp + 0x1c], 0
mov eax, dword [esp + 0x30]
jne 0x1005dc64
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x2c]
push eax
push ebp
push edx
push esi
call fcn.1005a1e0
mov esi, eax
jmp 0x1005dd5d
mov ebp, dword [esp + 0x3c]
xor eax, eax
test byte [esp + 0x40], 0x30
mov dword [esp + 0x1c], eax
je 0x1005dc31
mov edx, dword [esp + 0x30]
push 1
lea ecx, [esp + 0x14]
push ecx
push edi
push edx
or ebx, 0xffffffff
push ebp
mov dword [esp + 0x54], eax
mov dword [esp + 0x50], ebx
call dword [0x1007efe8]
xor ecx, ecx
test eax, eax
setl cl
mov esi, ecx
test esi, esi
jne 0x1005dc31
mov eax, dword [esp + 0x10]
push 8
push 4
lea edx, [esp + 0x48]
push edx
push eax
push ebp
call dword [0x1007ef88]
xor ecx, ecx
test eax, eax
setl cl
mov esi, ecx
test esi, esi
jne 0x1005dc31
mov edx, dword [esp + 0x10]
push ecx
push edx
push ebp
call dword [0x1007ef18]
mov eax, dword [esp + 0x40]
shr eax, 0x10
cmp eax, 1
mov dword [esp + 0x10], ebx
jne 0x1005dc31
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x1005dd0c
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x14]
push 0
lea ecx, [esp + 0x14]
push ecx
push edx
push eax
push ebp
call dword [0x1007efe8]
mov esi, eax
test esi, esi
jl 0x1005dc31
mov ecx, dword [esp + 0x10]
push 0
push 3
push 4
lea eax, [esp + 0x48]
push eax
push str.V1xNullBehavior
push 0
push str.MSysDb
push str.Databases
push ecx
push ebp
call dword [0x1007f048]
mov esi, eax
jmp 0x1005dc31
mov esi, dword [esp + 0x24]
mov eax, dword [esp + 0x10]
cmp eax, 0xffffffff
je 0x1005dd70
push 0
push eax
push ebp
call dword [0x1007ef18]
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0x18
mov eax, dword [esp + 0x2c]
push 1
push 0
push eax
push 0xfffffbec
call fcn.1005a550
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0x18
push 1
push 0
push esi
push 0xfffffbec
call fcn.1005a550
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0x18