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

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4c2684
push eax
mov dword fs:[0], esp
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov ecx, 0x4ffbf8
mov dword [edi], 0
call fcn.00457460
mov ecx, dword [eax + 4]
add eax, 4
inc ecx
mov dword [eax], ecx
mov ebx, dword [esp + 0x24]
mov dword [esp + 0x18], 0
test ebx, ebx
je 0x45c191
mov eax, dword [esp + 0x28]
test eax, eax
je 0x45c191
mov ecx, dword [esp + 0x20]
test ecx, ecx
je 0x45c191
lea ecx, [ebx + ebx*2]
lea esi, [ecx*8 + 0x1f]
shr esi, 5
shl esi, 2
mov edx, esi
imul edx, eax
push edx
push 0x42
call dword [sym.imp.KERNEL32.DLL_GlobalAlloc]
mov ebp, eax
test ebp, ebp
jne 0x45bf0c
mov dword [edi], 1
mov eax, dword [0x4ffbf8]
or edi, 0xffffffff
xor esi, esi
cmp eax, edi
mov dword [esp + 0x18], edi
je 0x45c0bf
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x45c0bf
push 0xb8
call fcn.004b2d7a
add esp, 4
mov dword [esp + 0x28], eax
test eax, eax
mov dword [esp + 0x18], 1
je 0x45be9d
mov ecx, eax
call fcn.00457230
mov esi, eax
jmp 0x45be9f
xor esi, esi
mov eax, dword [0x4ffbf8]
push esi
push eax
mov dword [esp + 0x20], edi
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
test eax, eax
jne 0x45c08c
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea ecx, [esp + 0x28]
push 0x4e2f88
push ecx
mov dword [esp + 0x30], eax
call fcn.00499f84
push 8
call fcn.004b2d7a
add esp, 4
mov edi, eax
push 0x4ffc00
mov dword [edi], esi
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
mov edx, dword [0x4ffbfc]
push 0x4ffc00
mov dword [edi + 4], edx
mov dword [0x4ffbfc], edi
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
dec dword [esi + 4]
jmp 0x45c1b2
push ebp
call dword [sym.imp.KERNEL32.DLL_GlobalLock]
test eax, eax
jne 0x45bfe6
push ebp
call dword [sym.imp.KERNEL32.DLL_GlobalFree]
mov dword [edi], 1
mov eax, dword [0x4ffbf8]
or edi, 0xffffffff
xor esi, esi
cmp eax, edi
mov dword [esp + 0x18], edi
je 0x45c0bf
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x45c0bf
push 0xb8
call fcn.004b2d7a
add esp, 4
mov dword [esp + 0x28], eax
test eax, eax
mov dword [esp + 0x18], 2
je 0x45bf77
mov ecx, eax
call fcn.00457230
mov esi, eax
jmp 0x45bf79
xor esi, esi
mov eax, dword [0x4ffbf8]
push esi
push eax
mov dword [esp + 0x20], edi
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
test eax, eax
jne 0x45c08c
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea ecx, [esp + 0x28]
push 0x4e2f88
push ecx
mov dword [esp + 0x30], eax
call fcn.00499f84
push 8
call fcn.004b2d7a
add esp, 4
mov edi, eax
push 0x4ffc00
mov dword [edi], esi
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
mov edx, dword [0x4ffbfc]
push 0x4ffc00
mov dword [edi + 4], edx
mov dword [0x4ffbfc], edi
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
dec dword [esi + 4]
jmp 0x45c1b2
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x20]
push esi
push ecx
push ebx
push eax
push edx
mov ecx, edi
call fcn.0045bd40
mov ebx, eax
test ebx, ebx
je 0x45c0c7
push ebp
call dword [sym.imp.KERNEL32.DLL_GlobalFree]
mov dword [edi], ebx
mov eax, dword [0x4ffbf8]
or edi, 0xffffffff
xor esi, esi
cmp eax, edi
mov dword [esp + 0x18], edi
je 0x45c0bf
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x45c0bf
push 0xb8
call fcn.004b2d7a
add esp, 4
mov dword [esp + 0x28], eax
test eax, eax
mov dword [esp + 0x18], 3
je 0x45c05c
mov ecx, eax
call fcn.00457230
mov esi, eax
jmp 0x45c05e
xor esi, esi
mov eax, dword [0x4ffbf8]
push esi
push eax
mov dword [esp + 0x20], edi
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
test eax, eax
jne 0x45c08c
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea ecx, [esp + 0x28]
push 0x4e2f88
push ecx
mov dword [esp + 0x30], eax
call fcn.00499f84
push 8
call fcn.004b2d7a
add esp, 4
mov edi, eax
push 0x4ffc00
mov dword [edi], esi
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
mov edx, dword [0x4ffbfc]
push 0x4ffc00
mov dword [edi + 4], edx
mov dword [0x4ffbfc], edi
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
dec dword [esi + 4]
jmp 0x45c1b2
mov eax, dword [esp + 0x2c]
push ebp
mov dword [eax], esi
call dword [sym.imp.KERNEL32.DLL_GlobalUnlock]
mov eax, dword [0x4ffbf8]
or edi, 0xffffffff
xor esi, esi
cmp eax, edi
mov dword [esp + 0x18], edi
je 0x45c186
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x45c186
push 0xb8
call fcn.004b2d7a
add esp, 4
mov dword [esp + 0x28], eax
test eax, eax
mov dword [esp + 0x18], 4
je 0x45c123
mov ecx, eax
call fcn.00457230
mov esi, eax
jmp 0x45c125
xor esi, esi
mov ecx, dword [0x4ffbf8]
push esi
push ecx
mov dword [esp + 0x20], edi
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
test eax, eax
jne 0x45c154
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea edx, [esp + 0x28]
push 0x4e2f88
push edx
mov dword [esp + 0x30], eax
call fcn.00499f84
push 8
call fcn.004b2d7a
add esp, 4
mov edi, eax
push 0x4ffc00
mov dword [edi], esi
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
mov eax, dword [0x4ffbfc]
push 0x4ffc00
mov dword [edi + 4], eax
mov dword [0x4ffbfc], edi
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov eax, dword [esi + 4]
dec eax
mov dword [esi + 4], eax
mov eax, ebp
jmp 0x45c1b4
mov ecx, 0x4ffbf8
mov dword [edi], 5
mov dword [esp + 0x18], 0xffffffff
call fcn.00457460
mov ecx, dword [eax + 4]
add eax, 4
dec ecx
mov dword [eax], ecx
xor eax, eax
mov ecx, dword [esp + 0x10]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0xc
ret 0x10