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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5cde90
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
sub esp, 0x70
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x68], ecx
mov dword [ebp - 0x14], 0
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x68]
cmp dword [eax], 0xffffffff
je 0x4757c5
mov ecx, dword [ebp - 0x68]
mov edx, dword [ecx]
push edx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x4757c5
push 0x24
call fcn.00596900
add esp, 4
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp - 0x6c]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x475669
mov ecx, dword [ebp - 0x20]
add ecx, 0x14
mov dword [ebp - 0x30], ecx
mov dl, byte [ebp - 0x29]
mov eax, dword [ebp - 0x30]
mov byte [eax], dl
mov ecx, dword [ebp - 0x30]
mov dword [ecx + 4], 0
mov edx, dword [ebp - 0x30]
mov dword [edx + 8], 0
mov eax, dword [ebp - 0x30]
mov dword [eax + 0xc], 0
mov ecx, dword [ebp - 0x20]
mov dword [ecx], 0
mov edx, dword [ebp - 0x20]
mov dword [edx + 4], 0
mov eax, dword [ebp - 0x20]
mov dword [eax + 0x10], 0
mov ecx, dword [ebp - 0x20]
mov dword [ecx + 8], 0
mov edx, dword [ebp - 0x20]
mov dword [edx + 0xc], 0
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x70], eax
jmp 0x475670
mov dword [ebp - 0x70], 0
mov ecx, dword [ebp - 0x70]
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0x68]
mov edx, dword [ecx]
push edx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x4756b8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x24], ecx
push 0x6079b8
lea edx, [ebp - 0x24]
push edx
call fcn.004f82ed
mov eax, dword [ebp - 0x68]
add eax, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [ebp - 0x68]
add ecx, 4
mov dword [ebp - 0x64], ecx
mov edx, dword [ebp - 0x64]
mov eax, dword [edx + 4]
mov dword [ebp - 0x40], eax
mov ecx, dword [ebp - 0x40]
mov dword [ebp - 0x38], ecx
mov edx, dword [ebp - 0x38]
mov dword [ebp - 0x60], edx
mov eax, dword [ebp - 0x60]
mov dword [ebp - 0x44], eax
mov ecx, dword [ebp - 0x44]
mov edx, dword [ecx + 4]
mov dword [ebp - 0x54], edx
mov dword [ebp - 0x50], 0xc
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
jge 0x47570c
mov dword [ebp - 0x4c], 0
mov ecx, dword [ebp - 0x4c]
push ecx
call fcn.00596900
add esp, 4
mov dword [ebp - 0x74], eax
mov edx, dword [ebp - 0x74]
mov dword [ebp - 0x48], edx
cmp dword [ebp - 0x44], 0
je 0x47572f
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x78], eax
jmp 0x475735
mov ecx, dword [ebp - 0x48]
mov dword [ebp - 0x78], ecx
mov edx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x78]
mov dword [edx], eax
cmp dword [ebp - 0x54], 0
je 0x47574b
mov ecx, dword [ebp - 0x54]
mov dword [ebp - 0x7c], ecx
jmp 0x475751
mov edx, dword [ebp - 0x48]
mov dword [ebp - 0x7c], edx
mov eax, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x7c]
mov dword [eax + 4], ecx
mov edx, dword [ebp - 0x44]
mov eax, dword [ebp - 0x48]
mov dword [edx + 4], eax
mov ecx, dword [ebp - 0x44]
mov edx, dword [ecx + 4]
mov dword [ebp - 0x44], edx
mov eax, dword [ebp - 0x44]
mov ecx, dword [eax + 4]
mov dword [ebp - 0x58], ecx
mov edx, dword [ebp - 0x58]
mov eax, dword [ebp - 0x44]
mov dword [edx], eax
mov ecx, dword [ebp - 0x44]
add ecx, 8
mov dword [ebp - 0x5c], ecx
cmp dword [ebp - 0x5c], 0
je 0x47579c
mov edx, dword [ebp - 0x5c]
mov eax, dword [ebp - 0x14]
mov dword [edx], eax
mov ecx, dword [ebp - 0x5c]
mov dword [ebp - 0x80], ecx
jmp 0x4757a3
mov dword [ebp - 0x80], 0
mov edx, dword [ebp - 0x64]
mov eax, dword [edx + 8]
add eax, 1
mov ecx, dword [ebp - 0x64]
mov dword [ecx + 8], eax
mov edx, dword [ebp - 0x44]
mov dword [ebp - 0x3c], edx
mov eax, dword [ebp - 0x68]
add eax, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x4757d4
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret