Function at 0x500e90
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x30
mov esi, dword [ebp + 8]
mov eax, dword [0x5f3418]
xor eax, ebp
mov dword [esp + 0x28], eax
test esi, esi
je 0x501134
mov ecx, 0x2e8
add ecx, dword [esi + 0xc]
mov byte [esp + 0xf], 0xff
movzx eax, byte [esi + 2]
push eax
mov dword [esp + 4], ecx
push ecx
call fcn.00501150
add esp, 8
movzx ebx, ax
shl ebx, 5
lea eax, [esi + ebx]
add eax, 0x48
mov dword [esp + 4], eax
lea edi, [esi + 0x40]
push edi
call dword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x5010f2
mov dword [esp + 8], edi
lea edi, [esi + 0x48]
mov ecx, dword [esp + 4]
mov eax, dword [ecx]
mov esi, dword [eax]
test esi, esi
je 0x5010a0
mov byte [esp + 0xf], 0
mov ecx, dword [esi]
test ecx, ecx
je 0x501099
mov ebx, dword [edi + ebx + 0xc]
bswap ecx
mov edx, ecx
xor edx, esi
cmp edx, 0x1fffff
ja 0x501108
mov edx, ecx
and edx, 0x1fc000
je 0x501108
prefetcht0 byte [ecx]
mov dword [eax], ecx
mov ecx, dword [eax + 0xc]
lea edx, [ecx + 2]
and edx, 0x3ffe
and ecx, 0xffffc001
or ecx, edx
mov dword [eax + 0xc], ecx
mov eax, dword [eax + 8]
mov ebx, dword [ebp + 8]
mov ecx, dword [ebx + 0x117c]
add ecx, dword [eax + 0xc]
mov eax, dword [ebx + 0x1180]
mov dword [ebx + 0x117c], ecx
cmp eax, ecx
cmova ecx, eax
mov dword [ebx + 0x1180], ecx
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
xor ecx, ecx
mov dword [esi], ecx
mov byte [esi + 4], 0
lea eax, [esi + 0x58]
push 0x280
push ecx
push eax
call fcn.005191b0
add esp, 0xc
mov dword [esi + 0x2d8], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [esi + 0x2dc], eax
xor eax, eax
mov dword [esi + 0x2e0], eax
mov dword [esi + 0x2e4], eax
push 0x5f6218
call dword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x501137
mov dword [esi + 0x2e4], 0
mov eax, dword [0x5f621c]
mov dword [0x5f621c], esi
mov dword [esi + 0x2e0], eax
test eax, eax
je 0x500ffb
mov dword [eax + 0x2e4], esi
push 0x5f6218
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
xorps xmm0, xmm0
movups xmmword [esi + 0x48], xmm0
movups xmmword [esi + 0x38], xmm0
movups xmmword [esi + 0x28], xmm0
movups xmmword [esi + 0x18], xmm0
movups xmmword [esi + 8], xmm0
mov eax, 0xb
nop word cs:[eax + eax]
mov dword [esi + eax*8], 0
mov byte [esi + eax*8 + 4], 0
movzx ecx, byte [eax + 0x6cd6ad]
mov byte [esi + eax*8 + 5], cl
movzx ecx, word [edi + 0xc]
mov word [esi + eax*8 + 6], cx
cmp dword [edi], 0
je 0x5010fe
inc eax
add edi, 0x20
cmp eax, 0x5b
jne 0x501030
push esi
push dword [0x6cd6b4]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, dword [0x5f75b4]
mov ecx, dword fs:[0x2c]
mov eax, dword [ecx + eax*4]
mov dword [eax + 0x140], esi
mov ecx, dword [esp + 0x28]
xor ecx, ebp
call fcn.00512ee3
mov eax, esi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
xor ecx, ecx
jmp 0x500f40
lea eax, [esp + 0xf]
push eax
push 0x4000
push dword [esp + 8]
push 2
push dword [ebp + 8]
call fcn.004ef710
test eax, eax
je 0x501146
mov esi, eax
mov ecx, eax
and ecx, 0xffe00000
mov edx, eax
shr edx, 9
and edx, 0xfe0
lea eax, [edx + ecx]
movzx ecx, byte [edx + ecx + 0x101e]
and ecx, 0x3f
shl ecx, 5
sub eax, ecx
add eax, 0x1000
jmp 0x500f59
mov ecx, edi
call fcn.004ef6b0
jmp 0x500ef3
mov byte [esi + eax*8 + 5], 0
jmp 0x501059
pcmpeqd xmm0, xmm0
lea edi, [esp + 0x10]
movdqa xmmword [edi], xmm0
mov ecx, edi
push 0
push dword [esi]
push str.first
call fcn.00569a10
push edi
call fcn.00404ca0
add esp, 4
mov ecx, ebx
call fcn.00582d50
int3
mov ecx, 0x5f6218
call fcn.004ef6b0
jmp 0x500fd6
xor esi, esi
mov ebx, dword [ebp + 8]
jmp 0x500f7f