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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x644f60
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x6ddc7c]
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 [0x6eba40]
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 0x477a51
cmp dword [eax], edi
je 0x477afd
mov eax, dword [eax + 8]
test eax, eax
jne 0x477a42
xor edi, edi
mov eax, dword [ebx]
add eax, 0x20
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
test edi, edi
je 0x477b86
mov eax, dword [ebx]
cmp byte [eax + 0x38], 0
jne 0x477b86
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 [0x6eba2c]
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 [0x6eba2c]
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 0x6eb974
push 0x450a50
mov byte [ebp - 4], 1
push 0x6eb9ac
mov dword [ebp - 0x2c], 0
call fcn.005fbcbd
add esp, 0xc
test eax, eax
je 0x477c1b
jmp 0x477b05
mov edi, dword [eax + 4]
jmp 0x477a53
push 0
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x28], 0x6eb974
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 0x477b55
mov ecx, dword [edi + 0x48]
test ecx, ecx
je 0x477b3e
mov dword [ecx + 0x14], eax
jmp 0x477b41
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 0x477b75
push ecx
mov ecx, dword [ebp - 0x24]
push edi
call fcn.00473c00
push dword [ebp - 0x14]
push dword [0x6eba2c]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
jmp 0x477bfd
mov eax, dword [ebx]
cmp byte [eax + 0x38], 0
je 0x477bc4
mov dword [esi + 0x14], 0
mov ecx, dword [eax + 0x40]
test ecx, ecx
je 0x477bb0
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 0x477bfd
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 0x477bfd
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 0x477be9
mov dword [ecx + 0x14], esi
jmp 0x477bec
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.00473c00
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.005ff7bd
mov esp, ebp
pop ebp
ret 8
call fcn.0061f60e
int3