Function at 0x4c82c0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6ebd44
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [0x7ce4e4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
cmp dword [0x7d7ff0], 0
je 0x4c847f
push dword [0x7d7ff8]
mov ebx, dword [sym.imp.KERNEL32.dll_TlsGetValue]
call ebx
test eax, eax
je 0x4c8340
cmp dword [eax], 4
jbe 0x4c8340
mov eax, dword [eax + 8]
mov eax, dword [eax + 0x10]
test eax, eax
je 0x4c8340
push 0
push 0x7d9868
push 0x7d96a0
push 0
push eax
call fcn.005c1512
add esp, 0x14
test eax, eax
je 0x4c8340
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 8]
test eax, eax
jne 0x4c851a
cmp dword [0x7d7ff0], 0
je 0x4c847f
push 0x802b24
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x7d7ff0], 0
je 0x4c83a8
push dword [0x7d7ff8]
call ebx
test eax, eax
je 0x4c83a8
cmp dword [eax], 4
jbe 0x4c83a8
mov eax, dword [eax + 8]
mov eax, dword [eax + 0x10]
test eax, eax
je 0x4c83a8
push 0
push 0x7d9868
push 0x7d96a0
push 0
push eax
call fcn.005c1512
add esp, 0x14
test eax, eax
je 0x4c83a8
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 8]
mov esi, eax
test esi, esi
jne 0x4c8460
push 4
call fcn.005be217
mov esi, eax
mov dword [ebp - 0x10], esi
push 0x224
mov dword [ebp - 4], 0
call fcn.005be217
add esp, 8
mov dword [ebp - 0x14], eax
mov ecx, eax
mov byte [ebp - 4], 1
call fcn.004c6b50
mov dword [esi], eax
mov dword [ebp - 4], 0xffffffff
cmp dword [0x7d7ff0], 0
je 0x4c8460
push dword [0x7d7ff8]
call ebx
test eax, eax
je 0x4c8460
cmp dword [eax], 4
jbe 0x4c8460
mov eax, dword [eax + 8]
mov ecx, dword [eax + 0x10]
test ecx, ecx
jne 0x4c845a
push 8
call fcn.005be217
mov edi, eax
add esp, 4
mov dword [ebp - 0x14], edi
mov dword [edi], vtable.t_visualDataItemPtr_struct_t_ccThemeWrap_.0
mov dword [edi + 4], esi
cmp dword [0x7d7ff0], 0
je 0x4c8460
push dword [0x7d7ff8]
call ebx
test eax, eax
je 0x4c8460
cmp dword [eax], 4
jbe 0x4c8460
mov eax, dword [eax + 8]
push 0x802b24
mov dword [eax + 0x10], edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ecx]
push esi
call dword [eax + 0xc]
push 0x802b24
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [0x802be4]
test eax, eax
jne 0x4c851a
push 0x802b24
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword fs:[0x2c]
mov ecx, dword [eax]
mov eax, dword [0x80780c]
cmp eax, dword [ecx + 0x20]
jle 0x4c8500
push 0x80780c
call fcn.005be60a
add esp, 4
cmp dword [0x80780c], 0xffffffff
jne 0x4c8500
push 0x224
mov dword [ebp - 4], 2
call fcn.005be217
add esp, 4
mov dword [ebp - 0x14], eax
mov ecx, eax
mov byte [ebp - 4], 3
call fcn.004c6b50
push 0x6fe7b0
mov dword [0x807808], eax
call fcn.005be4c2
push 0x80780c
call fcn.005be5c0
add esp, 8
push 0x802b24
mov dword [0x802be4], 0x807808
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [0x802be4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret