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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x61a7d0
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x6a8c7c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, ecx
mov dword [ebp - 0x20], eax
mov edi, dword [eax + 0x18]
push dword [0x6b43bc]
mov ebx, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
lea eax, [edi + 0x14]
neg edi
sbb edi, edi
and edi, eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4728a1
cmp dword [eax], edi
je 0x47294d
mov eax, dword [eax + 8]
test eax, eax
jne 0x472892
xor edi, edi
mov eax, dword [ebx]
add eax, 0x20
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
test edi, edi
je 0x4729d6
mov eax, dword [ebx]
cmp byte [eax + 0x38], 0
jne 0x4729d6
mov byte [eax + 0x38], 1
mov eax, dword [ebx]
add eax, 0x20
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebx]
xorps xmm0, xmm0
push dword [0x6b43a8]
movq qword [ebp - 0x1c], xmm0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x1c], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x1c]
push eax
push dword [0x6b43a8]
mov dword [ebp - 0x18], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, dword [ebp - 0x20]
mov dword [ebp - 4], 0
mov edi, dword [ebx]
mov dword [ebp - 0x30], edi
mov eax, dword [eax + 0x18]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x34], eax
push 0x6b42f4
push 0x450930
mov byte [ebp - 4], 1
push 0x6b432c
mov dword [ebp - 0x2c], 0
call fcn.005d1d6d
add esp, 0xc
test eax, eax
je 0x472a6b
jmp 0x472955
mov edi, dword [eax + 4]
jmp 0x4728a3
push 0
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x28], 0x6b42f4
push eax
mov eax, dword [ebp - 0x20]
push esi
push dword [eax + 0x18]
mov eax, dword [esi + 0x18]
call eax
add esp, 0x10
lea ebx, [edi + 0x20]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [edi + 0x3c]
test eax, eax
je 0x4729a5
mov ecx, dword [edi + 0x48]
test ecx, ecx
je 0x47298e
mov dword [ecx + 0x14], eax
jmp 0x472991
mov dword [edi + 0x44], eax
mov eax, dword [edi + 0x40]
mov dword [edi + 0x48], eax
mov dword [edi + 0x3c], 0
mov dword [edi + 0x40], 0
mov esi, dword [edi + 0x44]
test esi, esi
push ebx
setne al
mov byte [edi + 0x38], al
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test esi, esi
je 0x4729c5
push ecx
mov ecx, dword [ebp - 0x24]
push edi
call fcn.00471010
push dword [ebp - 0x14]
push dword [0x6b43a8]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
jmp 0x472a4d
mov eax, dword [ebx]
cmp byte [eax + 0x38], 0
je 0x472a14
mov dword [esi + 0x14], 0
mov ecx, dword [eax + 0x40]
test ecx, ecx
je 0x472a00
mov dword [ecx + 0x14], esi
mov dword [eax + 0x40], esi
mov eax, dword [ebx]
add eax, 0x20
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x472a4d
mov dword [eax + 0x3c], esi
mov dword [eax + 0x40], esi
mov eax, dword [ebx]
add eax, 0x20
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x472a4d
mov byte [eax + 0x38], 1
mov eax, dword [ebx]
add eax, 0x20
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebx]
mov dword [esi + 0x14], 0
mov ecx, dword [eax + 0x48]
test ecx, ecx
je 0x472a39
mov dword [ecx + 0x14], esi
jmp 0x472a3c
mov dword [eax + 0x44], esi
mov dword [eax + 0x48], esi
mov eax, dword [ebp - 0x20]
push ecx
push dword [ebx]
mov ecx, dword [eax + 0x18]
call fcn.00471010
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005d584c
mov esp, ebp
pop ebp
ret 8
call fcn.005f569e
int3