Function at 0x10002093
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
push ebx
push esi
push edi
mov edi, edx
test cl, cl
je 0x100020fe
cmp byte [ebp + 0x10], 0
je 0x100020da
mov byte [ebp - 1], 0
cmp byte [ebp - 1], 0
je 0x1000228d
push 0x26bb
xor ebx, ebx
xor cl, cl
push 0x5fe7
inc ebx
push ebx
push 0x747d
mov dl, bl
call fcn.10001acd
add esp, 0x10
jmp 0x1000228d
mov edx, dword [ebp + 0xc]
push 2
pop esi
mov dword [edx], 0
jmp 0x100020f5
mov ecx, dword [edx]
mov eax, dword [edi]
mov dword [eax + ecx*4], 0x9a57b5bf
inc dword [edx]
cmp dword [edx], esi
jl 0x100020e8
jmp 0x1000228d
mov dword [ebp - 0x18], 0x787e
cmp dword [ebp - 0x18], 0x7b7e
push 1
pop ebx
jle 0x100021a2
xor esi, esi
mov dword [ebp - 0x14], esi
xor edi, edi
mov dword [ebp - 0x10], edi
mov ecx, edi
mov dword [ebp - 8], esi
xor eax, eax
mov edi, esi
shl edi, cl
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], edi
mov ecx, eax
mov dword [ebp - 0x1c], edi
xor esi, esi
shl edi, cl
mov ecx, esi
mov eax, edi
sar eax, cl
lea ecx, [ebp - 0x34]
cdq
push edx
push eax
call fcn.10001a95
pop ecx
pop ecx
cmp dword [eax + 0x14], 0x10
jb 0x10002154
mov eax, dword [eax]
push eax
call fcn.1004af7c
pop ecx
push 0
push ebx
lea ecx, [ebp - 0x34]
call fcn.10005365
inc esi
cmp esi, 0x1596
jl 0x10002139
mov eax, dword [ebp - 0xc]
mov edi, dword [ebp - 8]
inc eax
mov dword [ebp - 0xc], eax
cmp eax, 0x3533
jl 0x10002130
mov edi, dword [ebp - 0x10]
mov esi, dword [ebp - 0x14]
inc edi
mov dword [ebp - 0x10], edi
cmp edi, 0x1440
jl 0x1000211f
inc esi
mov dword [ebp - 0x14], esi
cmp esi, 0x1def
jl 0x1000211a
cmp dword [ebp - 0x18], 0x74b3
jge 0x100021b6
push str.ihvwrey_edreuf_bpe_llswerq_jfxuz_iktjlbkhr_hiytic_qapbsky_fec
call fcn.1004af7c
pop ecx
cmp byte [ebp + 0x28], 0
je 0x100021da
mov eax, dword [ebp + 0x3c]
cmp byte [eax], 0
je 0x1000228d
push 0
push 0x10bc
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
jmp 0x1000228d
mov ecx, dword [ebp + 0x2c]
mov edi, dword [ebp + 0x14]
mov eax, dword [ecx]
mov eax, dword [ecx]
mov eax, dword [ebp + 0x20]
mov ecx, dword [ebp + 0x38]
mov eax, dword [eax]
dec dword [ecx]
mov eax, dword [edi]
mov eax, dword [ecx]
dec eax
je 0x100021fd
mov eax, dword [ebp + 0x34]
cmp dword [eax], 0
jne 0x100021ff
xor ebx, ebx
mov eax, dword [ebp + 8]
xor edx, edx
imul ecx, ebx, 0x5fffa
mov ebx, dword [ebp + 0x24]
push 2
mov eax, dword [eax]
pop esi
cmp ecx, eax
mov eax, dword [edi]
setg dl
xor ecx, ecx
cmp edx, esi
mov edx, dword [ebp + 0x30]
setg cl
sub eax, ecx
mov dword [edx], eax
mov ecx, dword [ebx]
mov eax, dword [edx]
add eax, dword [ecx + 0xc]
xor ecx, ecx
cmp eax, 0x7777bab6
mov eax, dword [ebp + 0x1c]
setne cl
cmp dword [eax], ecx
jg 0x10002241
mov eax, dword [edi]
mov edx, dword [ebp + 0x20]
xor ecx, ecx
mov eax, dword [edx]
mov eax, dword [ebx]
cmp dword [eax + 4], ecx
mov eax, dword [ebp + 0x18]
setne cl
cmp esi, ecx
mov dword [eax], ecx
sbb eax, eax
inc eax
xor ecx, ecx
cmp ecx, eax
sbb eax, eax
neg eax
sub eax, dword [edx]
je 0x1000226b
mov eax, dword [ebp + 0x38]
mov eax, dword [eax]
mov eax, dword [edi]
xor ecx, ecx
mov edx, dword [ebx]
mov eax, dword [edi]
cmp eax, dword [edx + 4]
mov eax, dword [ebp + 8]
setg cl
mov dword [eax], ecx
xor ecx, ecx
mov eax, dword [eax]
cmp eax, 6
mov eax, dword [ebx]
sete cl
mov dword [eax + 0xc], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret