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

Disassembly:
push 0xffffffffffffffff
push 0x4e4c9d
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1c
push ebx
push ebp
push esi
push edi
lea ecx, [esp + 0x18]
call fcn.0047ea90
mov eax, dword [esp + 0x48]
mov ebp, dword [esp + 0x44]
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x3c]
push eax
push ebp
xor ebx, ebx
push ecx
push edx
lea ecx, [esp + 0x28]
mov dword [esp + 0x44], ebx
call fcn.0047f4f0
mov dword [esp + 0x10], eax
mov eax, dword [0x55c9d8]
xor esi, esi
cmp eax, 0xffffffff
je 0x47d2b5
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov esi, eax
cmp esi, ebx
jne 0x47d2b5
push 0xb8
call fcn.004d576b
add esp, 4
mov dword [esp + 0x44], eax
cmp eax, ebx
mov byte [esp + 0x34], 1
je 0x47d252
mov ecx, eax
call fcn.0047dee0
mov esi, eax
jmp 0x47d254
xor esi, esi
mov eax, dword [0x55c9d8]
push esi
push eax
mov byte [esp + 0x3c], bl
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
cmp eax, ebx
jne 0x47d282
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea ecx, [esp + 0x44]
push 0x507ad0
push ecx
mov dword [esp + 0x4c], eax
call fcn.004bade4
push 8
call fcn.004d576b
add esp, 4
mov edi, eax
push 0x55c9e0
mov dword [edi], esi
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
mov edx, dword [0x55c9dc]
push 0x55c9e0
mov dword [edi + 4], edx
mov dword [0x55c9dc], edi
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov eax, dword [esp + 0x18]
xor edi, edi
mov dword [esi + 0xb4], eax
mov eax, dword [0x55c9d8]
cmp eax, 0xffffffff
je 0x47d36d
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov edi, eax
cmp edi, ebx
jne 0x47d368
push 0xb8
call fcn.004d576b
add esp, 4
mov dword [esp + 0x44], eax
cmp eax, ebx
mov byte [esp + 0x34], 2
je 0x47d305
mov ecx, eax
call fcn.0047dee0
mov edi, eax
jmp 0x47d307
xor edi, edi
mov ecx, dword [0x55c9d8]
push edi
push ecx
mov byte [esp + 0x3c], bl
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
cmp eax, ebx
jne 0x47d336
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea edx, [esp + 0x44]
push 0x507ad0
push edx
mov dword [esp + 0x4c], eax
call fcn.004bade4
push 8
call fcn.004d576b
add esp, 4
mov esi, eax
push 0x55c9e0
mov dword [esi], edi
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
mov eax, dword [0x55c9dc]
push 0x55c9e0
mov dword [esi + 4], eax
mov dword [0x55c9dc], esi
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov eax, dword [0x55c9d8]
mov cl, byte [edi + 0xb0]
and cl, 1
cmp cl, 1
je 0x47d54b
cmp dword [ebp], 0x64
jae 0x47d392
mov edx, dword [esp + 0x48]
cmp dword [edx], 0x64
jb 0x47d54b
or ebp, 0xffffffff
xor esi, esi
cmp eax, ebp
je 0x47d514
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov esi, eax
cmp esi, ebx
jne 0x47d514
push 0xb8
call fcn.004d576b
mov esi, eax
add esp, 4
mov dword [esp + 0x3c], esi
cmp esi, ebx
mov byte [esp + 0x34], 3
je 0x47d4b1
lea eax, [esp + 0x48]
lea ecx, [esi + 0x34]
push eax
call fcn.0047dfe0
lea ecx, [esp + 0x44]
mov byte [esp + 0x34], 4
push ecx
lea ecx, [esi + 0x44]
call fcn.0047dfe0
lea edx, [esp + 0x40]
lea ecx, [esi + 0x88]
push edx
mov byte [esp + 0x38], 5
call fcn.0047dfe0
lea eax, [esp + 0x3c]
lea ecx, [esi + 0x98]
push eax
mov byte [esp + 0x38], 6
call fcn.0047dfe0
mov byte [esp + 0x20], bl
mov word [esp + 0x22], bx
mov edx, dword [esp + 0x20]
lea ecx, [esi + 0x28]
mov word [esp + 0x24], bx
mov word [esp + 0x26], bx
mov dword [ecx], edx
mov edx, dword [esp + 0x24]
mov eax, 1
mov dword [esi + 0x20], 0x33333333
mov dword [ecx + 4], edx
mov dword [esi], ebx
mov dword [esi + 4], ebx
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], ebx
mov dword [esi + 0x24], 0x40073333
mov word [ecx + 8], bx
mov dword [esi + 0x54], eax
mov dword [esi + 0x58], eax
mov dword [esi + 0x5c], eax
mov dword [esi + 0x60], eax
mov dword [esi + 0x64], eax
mov dword [esi + 0x68], eax
mov dword [esi + 0x6c], ebx
mov dword [esi + 0x70], eax
mov dword [esi + 0x74], eax
mov dword [esi + 0x78], ebx
mov dword [esi + 0x7c], eax
mov dword [esi + 0x80], eax
mov dword [esi + 0x84], ebx
mov dword [esi + 0xa8], ebx
mov dword [esi + 0xac], ebx
mov byte [esi + 0xb0], bl
mov dword [esi + 0xb4], ebx
jmp 0x47d4b3
xor esi, esi
mov eax, dword [0x55c9d8]
push esi
push eax
mov byte [esp + 0x3c], bl
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
cmp eax, ebx
jne 0x47d4e1
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea ecx, [esp + 0x14]
push 0x507ad0
push ecx
mov dword [esp + 0x1c], eax
call fcn.004bade4
push 8
call fcn.004d576b
add esp, 4
mov edi, eax
push 0x55c9e0
mov dword [edi], esi
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
mov edx, dword [0x55c9dc]
push 0x55c9e0
mov dword [edi + 4], edx
mov dword [0x55c9dc], edi
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov eax, dword [esp + 0x10]
mov dword [esi + 0xb4], ebp
cmp eax, ebx
je 0x47d529
push eax
call dword [sym.imp.KERNEL32.DLL_GlobalFree]
lea ecx, [esp + 0x18]
mov dword [esp + 0x34], ebp
call fcn.0047ec40
xor eax, eax
mov ecx, dword [esp + 0x2c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
lea ecx, [esp + 0x18]
mov dword [esp + 0x34], 0xffffffff
call fcn.0047ec40
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x28
ret