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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c28bf
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
sub esp, 0x5c
push ebx
push esi
mov dword [ebp - 0x18], ecx
push edi
mov ecx, 0x4ffbf8
mov dword [ebp - 0x10], esp
call fcn.00457460
mov ecx, dword [eax + 4]
add eax, 4
inc ecx
mov dword [eax], ecx
mov esi, dword [ebp + 8]
xor edi, edi
mov dword [ebp - 4], edi
mov byte [ebp - 4], 1
lea eax, [esi + esi*2]
shl eax, 4
push eax
call fcn.004b2d7a
add esp, 4
mov dword [ebp - 0x14], eax
jmp 0x45f7da
mov eax, dword [ebp - 0x14]
mov dword [ebp - 4], edi
cmp eax, edi
jne 0x45f813
mov ecx, 0x4ffbf8
mov dword [ebp - 4], 0xffffffff
call fcn.00457460
mov ecx, dword [eax + 4]
add eax, 4
dec ecx
mov dword [eax], ecx
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], edi
fild qword [ebp - 0x34]
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x30], edi
fild qword [ebp - 0x34]
cmp ecx, edi
mov dword [ebp + 0x14], edi
fdivp st(1)
fstp qword [ebp - 0x64]
jbe 0x45fbcc
mov edx, dword [ebp + 0x1c]
lea ebx, [eax - 1]
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], edi
fild qword [ebp - 0x34]
lea ecx, [esi + esi*2]
inc edx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x30], ecx
fstp qword [ebp - 0x44]
mov dword [ebp + 0x1c], edx
jmp 0x45f864
mov ebx, dword [ebp - 0x20]
mov esi, dword [ebp + 8]
xor edi, edi
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x3c], eax
fild qword [ebp - 0x3c]
fmul qword [ebp - 0x64]
fcom qword [ebp - 0x44]
fst qword [ebp - 0x6c]
fnstsw ax
test ah, 1
jne 0x45f885
fstp st(0)
fld qword [ebp - 0x44]
call fcn.004989f0
lea ecx, [eax + 1]
cmp ecx, ebx
jae 0x45f893
mov ebx, ecx
mov ecx, dword [ebp - 0x14]
mov edi, dword [ebp + 0x18]
push ecx
mov ecx, dword [ebp - 0x18]
push edi
push 0
push eax
push esi
mov esi, dword [ebp + 0x10]
push esi
call fcn.0045fd80
mov edx, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x18]
push edx
push edi
push 1
push ebx
mov ebx, dword [ebp + 8]
push ebx
push esi
call fcn.0045fd80
test ebx, ebx
jbe 0x45f989
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp + 8]
dec esi
lea ecx, [ebx + ebx*2]
mov dword [ebp - 0x4c], esi
mov esi, dword [ebp + 0x1c]
mov dword [ebp - 0x48], 0
lea edi, [eax + 8]
fild qword [ebp - 0x4c]
lea ebx, [eax + ecx*8 + 8]
mov dword [ebp - 0x1c], edx
fld qword [ebp - 0x6c]
fcom st(1)
fnstsw ax
test ah, 1
jne 0x45f8fc
fstp st(0)
fld st(0)
fld st(0)
call fcn.004989f0
xor ecx, ecx
lea edx, [eax + 1]
mov dword [ebp - 0x50], ecx
mov dword [ebp - 0x54], edx
fild qword [ebp - 0x54]
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x58], ecx
fild qword [ebp - 0x5c]
fld qword [ebx - 8]
fxch st(2)
fsub st(3)
fxch st(1)
fsubr st(3)
fld qword [edi - 8]
fxch st(2)
fstp st(4)
fxch st(1)
fmul st(3)
fxch st(2)
fmul st(1)
fxch st(2)
faddp st(2)
fxch st(1)
call fcn.004989f0
fld st(1)
fld st(1)
fxch st(1)
mov byte [esi - 1], al
fmul qword [edi]
fxch st(1)
fmul qword [ebx]
faddp st(1)
call fcn.004989f0
mov byte [esi], al
fld qword [edi + 8]
fld qword [ebx + 8]
fmul st(2)
fxch st(1)
fmul st(3)
faddp st(1)
call fcn.004989f0
mov byte [esi + 1], al
mov eax, dword [ebp - 0x1c]
add esi, 3
add edi, 0x18
add ebx, 0x18
dec eax
fstp st(0)
fstp st(0)
mov dword [ebp - 0x1c], eax
jne 0x45f8ec
fstp st(0)
mov eax, dword [0x4ffbf8]
xor edi, edi
cmp eax, 0xffffffff
je 0x45fa3c
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov edi, eax
test edi, edi
jne 0x45fa37
push 0xb8
call fcn.004b2d7a
add esp, 4
mov dword [ebp - 0x1c], eax
test eax, eax
mov byte [ebp - 4], 3
je 0x45f9cd
mov ecx, eax
call fcn.00457230
mov edi, eax
jmp 0x45f9cf
xor edi, edi
mov eax, dword [0x4ffbf8]
push edi
push eax
mov byte [ebp - 4], 0
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
test eax, eax
jne 0x45f9fb
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea ecx, [ebp - 0x24]
push 0x4e2f88
push ecx
mov dword [ebp - 0x24], eax
call fcn.00499f84
push 8
call fcn.004b2d7a
mov ebx, dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
add esp, 4
mov esi, eax
push 0x4ffc00
mov dword [esi], edi
call ebx
mov edx, dword [0x4ffbfc]
push 0x4ffc00
mov dword [esi + 4], edx
mov dword [0x4ffbfc], esi
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov eax, dword [0x4ffbf8]
jmp 0x45fa42
mov eax, dword [0x4ffbf8]
mov ebx, dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
cmp dword [edi + 4], 1
jne 0x45fba3
xor edi, edi
cmp eax, 0xffffffff
je 0x45faed
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov edi, eax
test edi, edi
jne 0x45fae8
push 0xb8
call fcn.004b2d7a
add esp, 4
mov dword [ebp - 0x1c], eax
test eax, eax
mov byte [ebp - 4], 4
je 0x45fa8b
mov ecx, eax
call fcn.00457230
mov edi, eax
jmp 0x45fa8d
xor edi, edi
mov eax, dword [0x4ffbf8]
push edi
push eax
mov byte [ebp - 4], 0
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
test eax, eax
jne 0x45fab9
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea ecx, [ebp - 0x28]
push 0x4e2f88
push ecx
mov dword [ebp - 0x28], eax
call fcn.00499f84
push 8
call fcn.004b2d7a
add esp, 4
mov esi, eax
push 0x4ffc00
mov dword [esi], edi
call ebx
mov edx, dword [0x4ffbfc]
push 0x4ffc00
mov dword [esi + 4], edx
mov dword [0x4ffbfc], esi
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov eax, dword [0x4ffbf8]
cmp dword [edi], 0
je 0x45fba3
xor edi, edi
cmp eax, 0xffffffff
je 0x45fb92
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov edi, eax
test edi, edi
jne 0x45fb92
push 0xb8
call fcn.004b2d7a
add esp, 4
mov dword [ebp - 0x1c], eax
test eax, eax
mov byte [ebp - 4], 5
je 0x45fb35
mov ecx, eax
call fcn.00457230
mov edi, eax
jmp 0x45fb37
xor edi, edi
mov eax, dword [0x4ffbf8]
push edi
push eax
mov byte [ebp - 4], 0
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
test eax, eax
jne 0x45fb63
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea ecx, [ebp - 0x2c]
push 0x4e2f88
push ecx
mov dword [ebp - 0x2c], eax
call fcn.00499f84
push 8
call fcn.004b2d7a
add esp, 4
mov esi, eax
push 0x4ffc00
mov dword [esi], edi
call ebx
mov edx, dword [0x4ffbfc]
push 0x4ffc00
mov dword [esi + 4], edx
mov dword [0x4ffbfc], esi
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x14]
push eax
push ecx
call dword [edi]
neg eax
sbb eax, eax
inc eax
jmp 0x45fba5
xor eax, eax
test eax, eax
jne 0x45fca3
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp - 0x30]
mov esi, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0xc]
inc eax
add esi, edx
cmp eax, ecx
mov dword [ebp + 0x14], eax
mov dword [ebp + 0x1c], esi
jb 0x45f85c
xor edi, edi
mov edx, dword [ebp - 0x14]
push edx
call fcn.004b2da3
mov eax, dword [0x4ffbf8]
or esi, 0xffffffff
add esp, 4
xor ebx, ebx
cmp eax, esi
mov dword [ebp - 4], esi
je 0x45fc84
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov ebx, eax
cmp ebx, edi
jne 0x45fc84
push 0xb8
call fcn.004b2d7a
add esp, 4
mov dword [ebp + 8], eax
cmp eax, edi
mov dword [ebp - 4], 7
je 0x45fc24
mov ecx, eax
call fcn.00457230
mov ebx, eax
jmp 0x45fc26
xor ebx, ebx
mov eax, dword [0x4ffbf8]
push ebx
push eax
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
cmp eax, edi
jne 0x45fc51
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea ecx, [ebp + 8]
push 0x4e2f88
push ecx
mov dword [ebp + 8], eax
call fcn.00499f84
push 8
call fcn.004b2d7a
add esp, 4
mov esi, eax
push 0x4ffc00
mov dword [esi], ebx
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
mov edx, dword [0x4ffbfc]
push 0x4ffc00
mov dword [esi + 4], edx
mov dword [0x4ffbfc], esi
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov eax, dword [ebx + 4]
dec eax
mov dword [ebx + 4], eax
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
push ecx
mov dword [eax], 0xe
call fcn.004b2da3
mov eax, dword [0x4ffbf8]
or esi, 0xffffffff
add esp, 4
xor edi, edi
cmp eax, esi
mov dword [ebp - 4], esi
je 0x45fd61
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov edi, eax
test edi, edi
jne 0x45fd61
push 0xb8
call fcn.004b2d7a
add esp, 4
mov dword [ebp + 8], eax
test eax, eax
mov dword [ebp - 4], 6
je 0x45fd04
mov ecx, eax
call fcn.00457230
mov edi, eax
jmp 0x45fd06
xor edi, edi
mov edx, dword [0x4ffbf8]
push edi
push edx
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
test eax, eax
jne 0x45fd32
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [ebp + 8], eax
lea eax, [ebp + 8]
push 0x4e2f88
push eax
call fcn.00499f84
push 8
call fcn.004b2d7a
add esp, 4
mov esi, eax
push 0x4ffc00
mov dword [esi], edi
call ebx
mov ecx, dword [0x4ffbfc]
push 0x4ffc00
mov dword [esi + 4], ecx
mov dword [0x4ffbfc], esi
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov eax, dword [edi + 4]
mov ecx, dword [ebp - 0xc]
dec eax
mov dword [edi + 4], eax
pop edi
pop esi
xor eax, eax
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0x18