Function at 0x100090c0
Capabilities:
Set thread local storage value

Disassembly:
mov eax, dword [esp + 0xc]
push ebx
push ebp
mov ebp, dword [esp + 0xc]
push esi
mov esi, dword [eax]
inc esi
cmp dword [ebp + esi*4 + 0x458], 0
lea ebx, [ebp + esi*4 + 0x458]
push edi
mov edi, esi
je 0x10009127
mov eax, ebx
mov esi, dword [eax]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, dword [esi + 0x1cc]
test ecx, ecx
je 0x10009109
cmp dword [esi + 0x214], eax
jne 0x1000911a
inc dword [esi + 0x210]
jmp 0x10009385
mov edx, 1
lea ecx, [esi + 0x1cc]
xchg dword [ecx], edx
test edx, edx
je 0x10009169
add ebx, 4
inc edi
cmp dword [ebx], 0
mov esi, edi
mov eax, ebx
jne 0x100090e4
mov edx, dword [esp + 0x1c]
xor edi, edi
cmp dword [edx], edi
jle 0x10009199
lea eax, [ebp + 0x458]
mov dword [esp + 0x14], eax
jmp 0x10009140
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx]
test eax, eax
je 0x10009199
lea ebx, [eax + 0x1cc]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edx, dword [ebx]
test edx, edx
je 0x1000917e
cmp dword [ebx + 0x48], eax
jne 0x1000918b
inc dword [ebx + 0x44]
jmp 0x10009385
mov dword [esi + 0x214], eax
mov dword [esi + 0x210], 1
jmp 0x10009385
mov ecx, 1
mov edx, ebx
xchg dword [edx], ecx
test ecx, ecx
je 0x100091d5
mov eax, dword [esp + 0x1c]
add dword [esp + 0x14], 4
inc edi
cmp edi, dword [eax]
jl 0x10009140
cmp esi, dword [ebp + 0x50]
jge 0x100092bb
mov ecx, dword [0x1001d2bc]
test ecx, ecx
jne 0x100091b1
call fcn.10006140
mov ecx, dword [esp + 0x20]
mov edx, 0xfffffdb0
sub edx, dword [0x1001d2c0]
cmp ecx, edx
jae 0x100092bb
mov eax, dword [0x1001d2c4]
test ecx, ecx
jne 0x100091e4
mov ecx, eax
jmp 0x100091ea
mov dword [ebx + 0x48], eax
mov dword [ebx + 0x44], 1
jmp 0x10009385
add ecx, 0x250
lea ebx, [eax + ecx - 1]
dec eax
push 4
not eax
push 0x3000
and ebx, eax
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
je 0x100092bb
cmp eax, 0xffffffff
je 0x100092bb
call fcn.10007d90
mov edi, eax
or dword [edi + 0x1b8], 2
mov dword [edi + 0x1c8], 1
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [esp + 0x14], eax
xor ebx, ebx
mov ecx, dword [ebp]
test ecx, ecx
je 0x10009249
cmp dword [ebp + 0x48], eax
jne 0x10009256
inc dword [ebp + 0x44]
jmp 0x10009276
mov edx, 1
mov ecx, ebp
xchg dword [ecx], edx
test edx, edx
je 0x1000926c
inc ebx
test bl, 0x3f
jne 0x10009238
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SleepEx]
mov eax, dword [esp + 0x14]
jmp 0x10009238
mov dword [ebp + 0x48], eax
mov dword [ebp + 0x44], 1
cmp dword [ebp + esi*4 + 0x458], 0
lea eax, [ebp + esi*4 + 0x458]
je 0x1000929d
mov ecx, dword [ebp + 0x50]
lea ebx, [ebx]
cmp esi, ecx
jge 0x1000929d
add eax, 4
inc esi
cmp dword [eax], 0
jne 0x10009290
cmp esi, dword [ebp + 0x50]
jl 0x10009304
dec dword [ebp + 0x44]
jne 0x100092b4
mov dword [ebp + 0x48], 0
xor edx, edx
mov eax, ebp
xchg dword [eax], edx
mov eax, edi
call fcn.10007f00
mov ecx, dword [esp + 0x1c]
mov edx, dword [ecx]
mov esi, dword [ebp + edx*4 + 0x458]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edi, eax
xor ebx, ebx
mov eax, dword [esi + 0x1cc]
test eax, eax
je 0x100093c9
cmp dword [esi + 0x214], edi
jne 0x100093da
mov eax, dword [esp + 0x1c]
inc dword [esi + 0x210]
mov ecx, dword [eax]
mov eax, dword [ebp + ecx*4 + 0x458]
pop edi
pop esi
pop ebp
pop ebx
ret
mov dword [ebp + esi*4 + 0x458], edi
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [esp + 0x14], eax
xor ebx, ebx
jmp 0x10009320
mov ecx, dword [edi + 0x1cc]
test ecx, ecx
je 0x1000933a
cmp dword [edi + 0x214], eax
jne 0x1000934b
inc dword [edi + 0x210]
jmp 0x10009371
mov edx, 1
lea ecx, [edi + 0x1cc]
xchg dword [ecx], edx
test edx, edx
je 0x10009361
inc ebx
test bl, 0x3f
jne 0x10009320
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SleepEx]
mov eax, dword [esp + 0x14]
jmp 0x10009320
mov dword [edi + 0x214], eax
mov dword [edi + 0x210], 1
dec dword [ebp + 0x44]
jne 0x10009383
mov dword [ebp + 0x48], 0
xor edx, edx
mov eax, ebp
xchg dword [eax], edx
mov edi, esi
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov dword [ecx], edi
test eax, eax
je 0x100093a1
mov dword [eax], edi
mov eax, dword [ebp + edi*4 + 0x458]
pop edi
pop esi
pop ebp
pop ebx
ret
mov eax, dword [ebp + 0x454]
or edx, 0xffffffff
sub edx, edi
push edx
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x100093bd
call fcn.1000cf2c
mov eax, dword [ebp + edi*4 + 0x458]
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, 1
lea edx, [esi + 0x1cc]
xchg dword [edx], ecx
test ecx, ecx
je 0x100093f3
inc ebx
test bl, 0x3f
jne 0x100092d2
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SleepEx]
jmp 0x100092d2
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax]
mov eax, dword [ebp + ecx*4 + 0x458]
mov dword [esi + 0x214], edi
pop edi
mov dword [esi + 0x210], 1
pop esi
pop ebp
pop ebx
ret