Function at 0x4204c0
Capabilities:
Set thread local storage value

Disassembly:
push ebx
mov ebx, dword [esp + 0x10]
push ebp
mov ebp, dword [esp + 0xc]
push esi
mov esi, dword [ebx]
add esi, 1
cmp dword [ebp + esi*4 + 0x418], 0
lea ecx, [ebp + esi*4 + 0x418]
push edi
mov edi, esi
je 0x420537
mov eax, ecx
jmp 0x4204f0
mov eax, dword [eax]
mov edx, dword [eax + 0x1bc]
add eax, 0x1bc
test edx, edx
je 0x42051b
mov edx, dword fs:[0x18]
mov edx, dword [edx + 0x24]
mov esi, dword [eax + 8]
cmp esi, edx
jne 0x420528
add dword [eax + 4], 1
jmp 0x420724
mov edx, 1
mov esi, eax
xchg dword [esi], edx
test edx, edx
je 0x42056b
add ecx, 4
add edi, 1
cmp dword [ecx], 0
mov esi, edi
mov eax, ecx
jne 0x4204f0
xor edi, edi
cmp dword [ebx], edi
jle 0x42059f
lea ecx, [ebp + 0x418]
mov eax, dword [ecx]
test eax, eax
je 0x42059f
mov edx, dword [eax + 0x1bc]
add eax, 0x1bc
test edx, edx
je 0x420584
mov edx, dword fs:[0x18]
mov edx, dword [edx + 0x24]
mov ebx, dword [eax + 8]
cmp ebx, edx
je 0x420512
jmp 0x420591
mov ecx, dword fs:[0x18]
mov edx, dword [ecx + 0x24]
mov dword [eax + 8], edx
mov dword [eax + 4], 1
jmp 0x420724
mov edx, 1
mov ebx, eax
xchg dword [ebx], edx
test edx, edx
je 0x42056b
mov eax, dword [esp + 0x1c]
add edi, 1
add ecx, 4
cmp edi, dword [eax]
jl 0x420543
cmp esi, dword [ebp + 0x10]
jge 0x420659
mov eax, dword [esp + 0x20]
call fcn.0041f590
mov edi, eax
test edi, edi
je 0x420659
xor ebx, ebx
lea ecx, [ecx]
mov eax, dword [ebp]
test eax, eax
je 0x4205de
mov ecx, dword fs:[0x18]
mov eax, dword [ecx + 0x24]
mov edx, dword [ebp + 8]
cmp edx, eax
jne 0x4205eb
add dword [ebp + 4], 1
jmp 0x420620
mov eax, 1
mov ecx, ebp
xchg dword [ecx], eax
test eax, eax
je 0x4205ff
add ebx, 1
test bl, 0x3f
jne 0x4205c0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SleepEx]
jmp 0x4205c0
mov edx, dword fs:[0x18]
mov eax, dword [edx + 0x24]
mov dword [ebp + 4], eax
mov ecx, dword fs:[0x18]
mov edx, dword [ecx + 0x24]
mov dword [ebp + 8], edx
mov dword [ebp + 4], 1
lea eax, [ebp + esi*4 + 0x418]
xor ebx, ebx
cmp dword [eax], ebx
je 0x42063e
mov ecx, dword [ebp + 0x10]
cmp esi, ecx
jge 0x42063e
add eax, 4
add esi, 1
cmp dword [eax], ebx
jne 0x420630
cmp esi, dword [ebp + 0x10]
jl 0x4206a5
add dword [ebp + 4], 0xffffffff
jne 0x420652
mov dword [ebp + 8], ebx
xor eax, eax
mov ecx, ebp
xchg dword [ecx], eax
mov eax, edi
call fcn.0041f610
mov ecx, dword [esp + 0x1c]
mov edx, dword [ecx]
mov esi, dword [ebp + edx*4 + 0x418]
add esi, 0x1bc
xor ebx, ebx
mov edi, edi
mov eax, dword [esi]
test eax, eax
je 0x420769
mov ecx, dword fs:[0x18]
mov eax, dword [ecx + 0x24]
mov edx, dword [esi + 8]
cmp edx, eax
jne 0x420776
add dword [esi + 4], 1
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax]
mov eax, dword [ebp + ecx*4 + 0x418]
pop edi
pop esi
pop ebp
pop ebx
ret
mov dword [ebp + esi*4 + 0x418], edi
add edi, 0x1bc
mov edx, dword [edi]
test edx, edx
je 0x4206ce
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x24]
mov ecx, dword [edi + 8]
cmp ecx, eax
jne 0x4206db
add dword [edi + 4], 1
jmp 0x42070f
mov edx, 1
mov eax, edi
xchg dword [eax], edx
test edx, edx
je 0x4206ef
add ebx, 1
test bl, 0x3f
jne 0x4206b2
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SleepEx]
jmp 0x4206b2
mov ecx, dword fs:[0x18]
mov edx, dword [ecx + 0x24]
mov dword [edi + 4], edx
mov eax, dword fs:[0x18]
mov ecx, dword [eax + 0x24]
mov dword [edi + 8], ecx
mov dword [edi + 4], 1
add dword [ebp + 4], 0xffffffff
jne 0x420722
mov dword [ebp + 8], 0
xor edx, edx
mov eax, ebp
xchg dword [eax], edx
mov edi, esi
mov eax, dword [esp + 0x18]
test eax, eax
mov ecx, dword [esp + 0x1c]
mov dword [ecx], edi
je 0x420740
mov dword [eax], edi
mov eax, dword [ebp + edi*4 + 0x418]
pop edi
pop esi
pop ebp
pop ebx
ret
mov eax, dword [ebp + 0x414]
or edx, 0xffffffff
sub edx, edi
push edx
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x42075d
call dword [sym.imp.MSVCR80.dll_abort]
mov eax, dword [ebp + edi*4 + 0x418]
pop edi
pop esi
pop ebp
pop ebx
ret
mov eax, 1
mov ecx, esi
xchg dword [ecx], eax
test eax, eax
je 0x420791
add ebx, 1
test bl, 0x3f
jne 0x420670
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SleepEx]
jmp 0x420670
mov edx, dword fs:[0x18]
mov eax, dword [edx + 0x24]
mov dword [esi + 4], eax
mov ecx, dword fs:[0x18]
mov edx, dword [ecx + 0x24]
mov eax, dword [esp + 0x1c]
mov dword [esi + 8], edx
mov dword [esi + 4], 1
mov ecx, dword [eax]
mov eax, dword [ebp + ecx*4 + 0x418]
pop edi
pop esi
pop ebp
pop ebx
ret