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

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x4aae33
push eax
mov eax, 0x143c
mov dword fs:[0], esp
call fcn.00472aa0
push ebx
push ebp
push esi
push edi
mov ecx, 0x4eb358
call fcn.00418750
mov ebp, dword [esp + 0x145c]
mov ebx, dword [esp + 0x1460]
xor esi, esi
cmp ebp, esi
mov dword [eax + 0xb4], esi
je 0x4169a8
cmp ebx, esi
je 0x4169a8
cmp dword [esp + 0x1470], esi
jne 0x416a64
mov eax, dword [0x4eb358]
xor edi, edi
cmp eax, 0xffffffff
je 0x416a5a
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
cmp edi, esi
jne 0x416a5a
push 0xb8
call fcn.0048b346
add esp, 4
mov dword [esp + 0x10], eax
cmp eax, esi
mov dword [esp + 0x1454], esi
je 0x4169f0
mov ecx, eax
call fcn.00418520
mov edi, eax
jmp 0x4169f2
xor edi, edi
mov eax, dword [0x4eb358]
push edi
push eax
mov dword [esp + 0x145c], 0xffffffff
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
cmp eax, esi
jne 0x416a27
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x10]
push 0x4cb060
push ecx
mov dword [esp + 0x18], eax
call fcn.00472a64
push 8
call fcn.0048b346
add esp, 4
mov esi, eax
push 0x4eb360
mov dword [esi], edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [0x4eb35c]
push 0x4eb360
mov dword [esi + 4], edx
mov dword [0x4eb35c], esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [edi + 0xb4], 5
mov esi, dword [esp + 0x146c]
cmp esi, 0x100
jbe 0x416a78
mov esi, 0x100
cmp esi, 1
jae 0x416a82
mov esi, 1
lea ecx, [esp + 0x314]
call fcn.00424d90
mov ecx, dword [esp + 0x1468]
mov edx, dword [esp + 0x1464]
lea eax, [esp + 0x14]
mov dword [esp + 0x1454], 1
push eax
push 1
push esi
push ecx
push edx
push ebx
push ebp
lea ecx, [esp + 0x330]
call fcn.00424f50
test eax, eax
jne 0x416c49
mov eax, dword [0x4eb358]
or ebx, 0xffffffff
xor edi, edi
cmp eax, ebx
je 0x416b79
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
test edi, edi
jne 0x416b79
push 0xb8
call fcn.0048b346
add esp, 4
mov dword [esp + 0x10], eax
test eax, eax
mov byte [esp + 0x1454], 2
je 0x416b12
mov ecx, eax
call fcn.00418520
mov edi, eax
jmp 0x416b14
xor edi, edi
mov eax, dword [0x4eb358]
push edi
push eax
mov byte [esp + 0x145c], 1
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x416b46
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x10]
push 0x4cb060
push ecx
mov dword [esp + 0x18], eax
call fcn.00472a64
push 8
call fcn.0048b346
add esp, 4
mov esi, eax
push 0x4eb360
mov dword [esi], edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [0x4eb35c]
push 0x4eb360
mov dword [esi + 4], edx
mov dword [0x4eb35c], esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [edi + 0xb4], 1
mov eax, dword [0x4eb358]
xor edi, edi
cmp eax, ebx
mov dword [esp + 0x1454], ebx
je 0x416c3b
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
test edi, edi
jne 0x416c3b
push 0xb8
call fcn.0048b346
add esp, 4
mov dword [esp + 0x10], eax
test eax, eax
mov dword [esp + 0x1454], 3
je 0x416bd5
mov ecx, eax
call fcn.00418520
mov edi, eax
jmp 0x416bd7
xor edi, edi
mov eax, dword [0x4eb358]
push edi
push eax
mov dword [esp + 0x145c], ebx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x416c08
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x10]
push 0x4cb060
push ecx
mov dword [esp + 0x18], eax
call fcn.00472a64
push 8
call fcn.0048b346
add esp, 4
mov esi, eax
push 0x4eb360
mov dword [esi], edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [0x4eb35c]
push 0x4eb360
mov dword [esi + 4], edx
mov dword [0x4eb35c], esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [edi + 4]
dec eax
mov dword [edi + 4], eax
xor eax, eax
jmp 0x416d40
xor ecx, ecx
test esi, esi
jbe 0x416c79
mov eax, dword [esp + 0x1470]
inc eax
mov dl, byte [esp + ecx + 0x14]
inc ecx
mov byte [eax + 1], dl
mov dl, byte [esp + ecx + 0x113]
mov byte [eax], dl
mov dl, byte [esp + ecx + 0x213]
mov byte [eax - 1], dl
add eax, 4
cmp ecx, esi
jb 0x416c57
mov eax, dword [0x4eb358]
or esi, 0xffffffff
xor edi, edi
cmp eax, esi
mov dword [esp + 0x1454], esi
je 0x416d34
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
test edi, edi
jne 0x416d34
push 0xb8
call fcn.0048b346
add esp, 4
mov dword [esp + 0x10], eax
test eax, eax
mov dword [esp + 0x1454], 4
je 0x416cce
mov ecx, eax
call fcn.00418520
mov edi, eax
jmp 0x416cd0
xor edi, edi
mov eax, dword [0x4eb358]
push edi
push eax
mov dword [esp + 0x145c], esi
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x416d01
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x10]
push 0x4cb060
push ecx
mov dword [esp + 0x18], eax
call fcn.00472a64
push 8
call fcn.0048b346
add esp, 4
mov esi, eax
push 0x4eb360
mov dword [esi], edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [0x4eb35c]
push 0x4eb360
mov dword [esi + 4], edx
mov dword [0x4eb35c], esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [edi + 4]
dec eax
mov dword [edi + 4], eax
mov eax, 1
mov ecx, dword [esp + 0x144c]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x1448
ret