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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x10162be8
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push ebp
push esi
push edi
mov eax, dword [0x101c3584]
xor eax, esp
push eax
lea eax, [esp + 0x38]
mov dword fs:[0], eax
mov eax, dword [0x101c2dc8]
cmp eax, 0xffffffff
jne 0x1013b42b
xor ebp, ebp
jmp 0x1013b434
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebp, eax
mov dword [esp + 0x18], ebp
mov dword [esp + 0x40], 0
test ebp, ebp
je 0x1013b475
cmp dword [ebp + 0x2c], 0
jne 0x1013b4bc
cmp dword [ebp + 0xc], 0
jne 0x1013b4c2
push 0x10139b20
push 0x101f55a0
call fcn.10139de0
mov eax, dword [0x101c2dc8]
add esp, 8
cmp eax, 0xffffffff
je 0x1013b475
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov dword [esp + 0x40], 0xffffffff
test ebp, ebp
je 0x1013b4a8
lea ecx, [ebp + 4]
or edx, 0xffffffff
lock xadd dword [ecx], edx
jne 0x1013b4a8
mov eax, dword [ebp]
mov edx, dword [eax]
push 0
mov ecx, ebp
call edx
push ebp
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 0xc], 0
je 0x1013b50a
mov edi, dword [ebp + 0xc]
mov eax, dword [edi + 4]
mov dword [ebp + 0xc], eax
mov ecx, dword [edi]
test ecx, ecx
je 0x1013b4f4
mov edx, dword [ecx]
mov eax, dword [edx + 4]
call eax
mov esi, dword [edi]
mov edx, dword [esi]
mov eax, dword [edx]
push 0
mov ecx, esi
call eax
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [ebp + 0xc], 0
jne 0x1013b4c2
mov ecx, dword [ebp + 0x28]
mov esi, dword [ebp + 0x10]
mov edi, dword [ecx]
mov edx, ecx
mov eax, esi
mov dword [esp + 0x20], edi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x28], edx
mov dword [esp + 0x24], eax
test esi, esi
je 0x1013b530
cmp esi, dword [esp + 0x24]
je 0x1013b535
call fcn.1013da0c
cmp edi, dword [esp + 0x28]
je 0x1013b444
lea ecx, [esp + 0x1c]
call fcn.100163d0
test esi, esi
jne 0x1013b5d8
call fcn.1013da0c
xor eax, eax
cmp edi, dword [eax + 0x18]
jne 0x1013b561
call fcn.1013da0c
cmp dword [edi + 0x10], 0
je 0x1013b5bc
test esi, esi
jne 0x1013b5df
call fcn.1013da0c
xor eax, eax
cmp edi, dword [eax + 0x18]
jne 0x1013b57c
call fcn.1013da0c
cmp dword [edi + 0x18], 0
je 0x1013b5bc
test esi, esi
jne 0x1013b5e3
call fcn.1013da0c
xor eax, eax
cmp edi, dword [eax + 0x18]
jne 0x1013b597
call fcn.1013da0c
mov ebx, dword [edi + 0x10]
test esi, esi
jne 0x1013b5e7
call fcn.1013da0c
xor eax, eax
cmp edi, dword [eax + 0x18]
jne 0x1013b5af
call fcn.1013da0c
mov edx, dword [ebx]
mov eax, dword [edi + 0x18]
mov edx, dword [edx + 4]
push eax
mov ecx, ebx
call edx
push edi
push esi
lea eax, [esp + 0x34]
push eax
lea ecx, [ebp + 0x10]
call fcn.10016090
mov edi, dword [esp + 0x20]
mov esi, dword [esp + 0x1c]
jmp 0x1013b526
mov eax, dword [esi]
jmp 0x1013b557
mov eax, dword [esi]
jmp 0x1013b572
mov eax, dword [esi]
jmp 0x1013b58d
mov eax, dword [esi]
jmp 0x1013b5a5