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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x158
mov eax, dword [0x10250150]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, ecx
lea ecx, [ebp - 0x140]
push esi
push edi
mov edi, dword [ebp + 8]
mov eax, dword [ebx]
push ecx
mov ecx, ebx
mov esi, dword [edi + 0x74]
call dword [eax + 0x1c]
xor ecx, ecx
cmp esi, 2
sete cl
push ecx
push dword [eax]
push dword [edi + 0x40]
call fcn.100286f0
mov ecx, eax
call fcn.1002cbc0
mov edx, dword [ebp - 0x140]
lea esi, [ebx + 0xc4]
mov dword [esi], eax
add edx, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x101a0a4c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [edi + 0x74]
xor eax, eax
cmp ecx, 2
mov dword [ebp - 0x144], ecx
push edi
sete al
mov dword [ebp - 0x14c], esi
inc eax
lea ecx, [ebx + 0xd8]
mov dword [ebp - 0x148], eax
lea eax, [ebp - 0x158]
push eax
call fcn.10020ef0
mov ecx, dword [ebp - 0x150]
cmp byte [ecx + 0xd], 0
jne 0x101a0a98
mov eax, dword [edi]
cmp eax, dword [ecx + 0x10]
jb 0x101a0a98
mov eax, dword [ebx + 0xd8]
jmp 0x101a0aa0
mov ecx, dword [ebx + 0xd8]
mov eax, ecx
cmp ecx, eax
jne 0x101a0aab
xor esi, esi
jmp 0x101a0c60
mov eax, dword [edi]
mov dword [ebx + 0xec], eax
mov eax, dword [0x1025a378]
cmp eax, 0xffffffff
je 0x101a0b0c
cmp dword [0x1025a37c], 0xffffffff
je 0x101a0b0c
push eax
mov dword [ebp - 0x140], 0
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
jne 0x101a0b0c
mov eax, dword [0x1025a380]
test eax, eax
je 0x101a0b0c
lea ecx, [ebp - 0x140]
push ecx
call eax
push eax
push dword [0x1025a378]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push dword [ebp - 0x140]
push dword [0x1025a37c]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov ecx, dword [ebx + 4]
test ecx, ecx
je 0x101a0b1a
mov eax, dword [ecx]
call dword [eax + 0x1c]
jmp 0x101a0b1f
mov eax, 0x10219d7c
push eax
lea ecx, [ebp - 0x13c]
call fcn.10195b20
mov eax, dword [ebx]
lea ecx, [ebp - 0x140]
push ecx
mov ecx, ebx
call dword [eax + 0x1c]
lea ecx, [ebp - 0x124]
push dword [eax]
push dword [edi + 0x44]
push dword [edi + 0x40]
push dword [edi]
push dword [edi + 0xc]
push dword [edi + 8]
call fcn.10137700
mov edx, dword [ebp - 0x140]
or eax, 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x101a0b72
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [ebx + 0x218], 0
je 0x101a0ba1
mov eax, dword [ebx + 0x21c]
cmp eax, dword [edi]
jne 0x101a0ba1
lea eax, [ebp - 0x124]
mov ecx, ebx
push eax
push dword [ebp - 0x148]
push dword [ebx + 0x220]
call fcn.101a0e50
jmp 0x101a0bf9
cmp dword [ebp - 0x144], 2
je 0x101a0bea
call fcn.100e9430
test eax, eax
je 0x101a0bea
cmp dword [edi + 0x44], 1
jne 0x101a0bea
push edi
lea eax, [ebp - 0x144]
push eax
lea ecx, [ebx + 0xd8]
call fcn.100ccf40
mov eax, dword [ebp - 0x144]
cmp eax, dword [ebx + 0xd8]
je 0x101a0bea
push 1
push dword [eax + 0x18]
lea ecx, [ebp - 0x124]
call fcn.10137e20
lea eax, [ebp - 0x13c]
mov ecx, ebx
push eax
push edi
call fcn.101a54b0
mov eax, dword [0x1025a378]
cmp eax, 0xffffffff
je 0x101a0c43
cmp dword [0x1025a37c], 0xffffffff
je 0x101a0c43
mov esi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
push eax
call esi
test eax, eax
je 0x101a0c43
cmp dword [0x1025a384], 0
je 0x101a0c43
push dword [0x1025a37c]
call esi
push eax
call dword [0x1025a384]
neg eax
sbb eax, eax
inc eax
push eax
push dword [0x1025a378]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
cmp dword [edi + 0x74], 2
jne 0x101a0c50
mov dword [edi + 0x74], 3
lea ecx, [ebp - 0x13c]
mov esi, 1
call fcn.10196000
lea ecx, [ebp - 0x14c]
call fcn.10195ea0
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10212f74
mov esp, ebp
pop ebp
ret 4