Function at 0x423280
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x486820
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x49c33c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
cmp byte [ebx + 0x120], 0
lea esi, [ebx + 0x108]
mov dword [ebp - 0x18], esi
je 0x4232c3
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push dword [ebx + 0x148]
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_SetEvent]
cmp byte [ebx + 0x178], 0
mov edi, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jne 0x42349b
lea esi, [ebx + 0x124]
nop
cmp byte [ebx + 0x120], 0
je 0x423302
lea eax, [ebx + 0x108]
push eax
call edi
push 0xffffffffffffffff
push dword [ebx + 0x140]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp byte [ebx + 0x120], 0
je 0x423326
lea eax, [ebx + 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push dword [ebx + 0x140]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
xor cl, cl
mov byte [ebp - 0xd], cl
cmp byte [esi + 0x18], cl
je 0x423346
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov cl, byte [ebp - 0xd]
cmp byte [ebx + 0x178], 0
jne 0x423376
mov eax, dword [ebx + 0xd8]
cmp dword [eax + 0x1c], 0
jne 0x423376
push 0
call fcn.00461bfb
mov cl, 1
mov dword [ebx + 0x100], eax
add esp, 4
mov dword [ebx + 0x104], edx
mov byte [ebp - 0xd], cl
cmp byte [esi + 0x18], 0
je 0x423382
push esi
call edi
mov cl, byte [ebp - 0xd]
test cl, cl
je 0x4233a9
imul eax, dword [ebx + 0xf8], 0x3e8
push eax
push dword [ebx + 0x144]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebx + 0x144]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
cmp byte [esi + 0x18], 0
mov dword [ebp - 0x1c], esi
je 0x4233b9
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [ebx + 0xd8]
mov byte [ebp - 4], 1
mov edi, dword [ecx + 0x44]
mov dword [ebp - 0x14], edi
test edi, edi
je 0x423478
mov eax, dword [ebx + 0xf0]
mov dword [ebx + 0xf8], eax
mov eax, dword [ebx + 0xf4]
mov dword [ebx + 0xfc], eax
push edi
mov dword [ecx + 0x44], 0
push dword [ebx + 0x38]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push edi
mov ecx, ebx
call fcn.00422740
cmp byte [edi + 0xb7], 0
mov byte [edi + 0xb6], 0
je 0x423478
cmp byte [ebx + 0x1a8], 0
lea edi, [ebx + 0x190]
je 0x423428
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [ebp - 0x14]
add edx, 0x18
push 0xf8
mov ecx, dword [edx]
mov eax, dword [edx + 4]
mov dword [ecx + 4], eax
mov ecx, dword [edx + 4]
mov eax, dword [edx]
mov dword [ecx], eax
mov dword [edx + 4], edx
mov dword [edx], edx
mov edx, dword [ebp - 0x14]
push edx
mov ecx, dword [edx]
mov eax, dword [edx + 4]
mov dword [ecx + 4], eax
mov ecx, dword [edx + 4]
mov eax, dword [edx]
mov dword [ecx], eax
mov dword [edx + 4], edx
mov dword [edx], edx
call fcn.0042f8ab
add esp, 8
cmp byte [edi + 0x18], 0
je 0x423478
push edi
mov edi, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call edi
jmp 0x42347e
mov edi, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp byte [esi + 0x18], 0
mov byte [ebp - 4], 0
je 0x42348b
push esi
call edi
cmp byte [ebx + 0x178], 0
je 0x4232f0
mov esi, dword [ebp - 0x18]
cmp byte [esi + 0x18], 0
je 0x4234a4
push esi
call edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret