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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
push ebx
mov ebx, dword [ebp + 8]
test ebx, ebx
je 0x41a4d4
push esi
lea esi, [ebx + 0x1c]
xor eax, eax
push edi
mov dword [ebp - 8], esi
nop dword [eax]
inc eax
xor edi, edi
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x20]
push eax
push esi
mov dword [ebp - 4], edi
call fcn.0041a740
mov eax, dword [ebx + 0x30]
mov dword [ebx + 0x34], eax
lea eax, [ebp - 0x20]
push eax
call fcn.0041a7d0
add esp, 0xc
nop word [eax + eax]
mov dword [ebp - 0x20], esi
lea eax, [ebx + 0x1c]
mov dword [ebp - 0x14], 0
lea esi, [ebp - 0x20]
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x1c], 0
xchg dword [eax], esi
test esi, esi
je 0x41a3a4
lea ecx, [ebp - 0x20]
lea eax, [esi + 4]
xchg dword [eax], ecx
or edx, 0xffffffff
lea ecx, [esi + 0xc]
xor eax, eax
lock cmpxchg dword [ecx], edx
test eax, eax
je 0x41a368
cmp eax, 0xffffffff
je 0x41a368
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
xor eax, eax
lea ecx, [ebp - 0x18]
lock xadd dword [ecx], eax
test eax, eax
jne 0x41a3a4
push eax
push eax
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov esi, eax
test esi, esi
je 0x41a3a4
mov ecx, esi
lea edx, [ebp - 0x18]
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
jne 0x41a39d
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebx + 0x34]
test esi, esi
je 0x41a4b8
mov edx, dword [esi + 4]
lea ecx, [ebp - 0x30]
add edx, 8
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x30], edx
xor eax, eax
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x2c], 0
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x41a3f6
lea eax, [ebp - 0x20]
push eax
call fcn.0041a7d0
add esp, 4
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
lea esi, [ebx + 0x1c]
jmp 0x41a320
mov eax, dword [esi + 8]
mov dword [ebx + 0x34], eax
mov edi, dword [esi + 4]
mov eax, dword [edi + 4]
push dword [edi]
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push 0
push dword [edi]
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test ebx, ebx
je 0x41a44b
cmp dword [ebp - 0xc], 4
jg 0x41a44b
lea eax, [ebp - 0x20]
push eax
call fcn.0041a7d0
lea eax, [ebp - 0x30]
push eax
call fcn.0041a7d0
mov edi, dword [ebp - 4]
inc edi
push ebx
mov dword [ebp - 4], edi
call dword [ebp - 0x10]
mov ebx, dword [ebp + 8]
mov esi, dword [ebp - 8]
jmp 0x41a312
mov ecx, dword [esi + 0x10]
mov eax, dword [esi + 8]
test ecx, ecx
je 0x41a458
mov dword [ecx + 8], eax
test eax, eax
je 0x41a45f
mov dword [eax + 0x10], ecx
mov ecx, dword [esi]
cmp dword [ecx + 0x30], esi
jne 0x41a46b
mov dword [ecx + 0x30], eax
mov ecx, dword [esi]
cmp dword [ecx + 0x34], esi
jne 0x41a473
mov dword [ecx + 0x34], eax
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0xc]
test ecx, ecx
je 0x41a480
mov dword [ecx + 0xc], eax
test eax, eax
je 0x41a487
mov dword [eax + 0x14], ecx
mov ecx, dword [esi + 4]
cmp dword [ecx + 0xc], esi
jne 0x41a492
mov dword [ecx + 0xc], eax
push esi
call fcn.004211d6
lea eax, [ebp - 0x20]
push eax
call fcn.0041a7d0
lea eax, [ebp - 0x30]
push eax
call fcn.0041a7d0
mov ebx, dword [ebp + 8]
mov edi, dword [ebp - 4]
mov esi, dword [ebp - 8]
jmp 0x41a312
lea eax, [ebp - 0x20]
push eax
call fcn.0041a7d0
mov eax, dword [ebp - 0xc]
lea esi, [ebx + 0x1c]
add esp, 4
test edi, edi
jne 0x41a2f0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret