Function at 0x100f1bd0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x10125c12
mov eax, dword fs:[0]
push eax
sub esp, 0xc8
mov eax, dword [0x1016e750]
xor eax, esp
mov dword [esp + 0xc0], eax
push ebx
push esi
push edi
mov eax, dword [0x1016e750]
xor eax, esp
push eax
lea eax, [esp + 0xd8]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
mov dword [esp + 0x18], ebx
call fcn.10022690
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x100f1c33
push 0x80004005
call fcn.100223c0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [esp + 0x20], esi
push ebx
mov dword [esp + 0xe4], 0
call dword [0x10173418]
mov edi, eax
mov dword [esp + 0x10], edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
or ebx, 0xffffffff
test edi, edi
jne 0x100f1ec7
cmp eax, 2
je 0x100f1c78
cmp eax, 3
jne 0x100f1ec7
push 0xa4
lea eax, [esp + 0x2c]
mov dword [esp + 0x28], 0
push 0
push eax
call fcn.101078f0
add esp, 0xc
call fcn.10022690
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x100f1cb0
push 0x80004005
call fcn.100223c0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x1c], eax
push ecx
mov byte [esp + 0xe4], 1
lea edi, [esp + 0x28]
mov ecx, esp
push dword [esp + 0x1c]
call fcn.10023fc0
mov edx, edi
lea ecx, [esp + 0x20]
call fcn.1002af10
mov edi, dword [esp + 0x20]
add esp, 4
test eax, eax
je 0x100f1ea2
push 0
push 0
push 0
push ecx
lea ecx, [edi - 0x10]
mov ebx, esp
call fcn.10024750
mov edx, dword [esp + 0x98]
lea ecx, [esp + 0x24]
add eax, 0x10
mov dword [ebx], eax
call fcn.1003d3b0
mov byte [esp + 0xf0], 2
lea eax, [esp + 0x20]
push dword [esp + 0x24]
push dword [esp + 0x2c]
push str.CitrixMode:_SetCurrentDirectory_failed_with__s._Retrying_with:__s
push eax
call fcn.10044f30
add esp, 0x20
mov byte [esp + 0xe0], 3
mov ecx, str.SetCurrentDirectory
mov edx, dword [eax]
call fcn.10043b30
mov byte [esp + 0xe0], 2
or ebx, 0xffffffff
mov edx, dword [esp + 0x10]
mov ecx, ebx
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x100f1d74
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test byte [esp + 0x24], 0x80
jne 0x100f1e0a
push dword [esp + 0x14]
lea eax, [esp + 0x14]
push str.CitrixMode:_pre_creating__s
push eax
call fcn.10044f30
add esp, 0xc
mov byte [esp + 0xe0], 4
mov ecx, str.SetCurrentDirectory
mov edx, dword [eax]
call fcn.10043b30
mov byte [esp + 0xe0], 2
mov ecx, ebx
mov edx, dword [esp + 0x10]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x100f1dce
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [0x1016f5d0]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov ecx, eax
or ecx, 1
mov dword [esp + 0x10], eax
push ecx
push dword [0x1016f5d0]
call ebx
mov ecx, dword [esp + 0x14]
call fcn.10046c10
push dword [esp + 0x10]
push dword [0x1016f5d0]
call ebx
or ebx, 0xffffffff
push dword [esp + 0x14]
call dword [0x10173418]
mov ecx, dword [esp + 0x18]
test ecx, ecx
mov dword [esp + 0x10], eax
mov eax, str.NULL
cmovne eax, ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [esp + 0x18]
lea eax, [esp + 0x24]
push str.ApiRetRet_.8xLE_dPathName_ws__CitrixMode:retry_
push eax
call fcn.10044f30
add esp, 0x14
mov byte [esp + 0xe0], 5
mov ecx, str.SetCurrentDirectory
mov edx, dword [eax]
call fcn.10043b30
mov byte [esp + 0xe0], 2
mov ecx, ebx
mov edx, dword [esp + 0x18]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x100f1e7d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [esp + 0xe0], 1
mov ecx, ebx
mov edx, dword [esp + 0x14]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x100f1ea2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add edi, 0xfffffff0
mov byte [esp + 0xe0], 0
mov ecx, ebx
lea eax, [edi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x100f1ec3
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, dword [esp + 0x10]
add esi, 0xfffffff0
mov dword [esp + 0xe0], 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jg 0x100f1ee9
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, edi
mov ecx, dword [esp + 0xd8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xc0]
xor ecx, esp
call fcn.10103392
mov esp, ebp
pop ebp
ret 4