Function at 0x47ead0
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 edx, dword [ebp + 8]
mov eax, dword [0x597010]
xor eax, ebp
mov dword [esp + 0x28], eax
test edx, edx
je 0x47eea0
mov ecx, dword [edx + 0xc]
lea ebx, [ecx + 0x308]
mov byte [esp + 0xf], 0xff
lea edi, [edx + 0x48]
movzx eax, byte [edx + 2]
cmp eax, 2
mov dword [esp + 4], ebx
je 0x47eb40
cmp eax, 1
jne 0x47eb86
lea edx, [ecx + 0x207]
mov eax, ebx
cmp edx, 0xfefe
ja 0x47ebe9
add ecx, 0x307
je 0x47ebcc
bsr ecx, ecx
xor ecx, 0x1f
jmp 0x47ebd1
mov eax, 0x20
mov ecx, 0x20
test ebx, ebx
je 0x47eb54
bsr ecx, ebx
xor ecx, 0x1f
sub eax, ecx
mov edx, 0x581ed9
sub edx, ecx
movzx ecx, byte [edx]
mov edx, ebx
shr edx, cl
and edx, 7
mov ecx, dword [eax*4 + 0x581edc]
and ecx, ebx
lea eax, [edx + eax*8]
cmp ecx, 1
sbb eax, 0xffffffff
movzx eax, word [eax + eax + 0x582adc]
jmp 0x47ec3e
mov eax, 0x20
mov edx, 0x20
test ebx, ebx
je 0x47eb9a
bsr edx, ebx
xor edx, 0x1f
mov ecx, 0x581ed9
sub ecx, edx
movzx ecx, byte [ecx]
mov esi, ebx
shr esi, cl
sub eax, edx
and esi, 7
mov ecx, dword [eax*4 + 0x581edc]
and ecx, ebx
lea eax, [esi + eax*8]
cmp ecx, 1
sbb eax, 0xffffffff
movzx ecx, word [eax + eax + 0x582adc]
cmp ebx, 0x41
jmp 0x47ec2d
mov ecx, 0x20
neg cl
mov edx, 1
shl edx, cl
mov eax, edx
shr eax, 1
lea eax, [eax + eax*4]
shr eax, 2
cmp eax, ebx
cmovb eax, edx
mov edx, 0x20
mov esi, 0x20
test eax, eax
je 0x47ebfd
bsr esi, eax
xor esi, 0x1f
mov ecx, 0x581ed9
sub ecx, esi
movzx ecx, byte [ecx]
mov ebx, eax
shr ebx, cl
sub edx, esi
and ebx, 7
mov ecx, dword [edx*4 + 0x581edc]
and ecx, eax
lea edx, [ebx + edx*8]
cmp ecx, 1
sbb edx, 0xffffffff
movzx ecx, word [edx + edx + 0x582adc]
cmp eax, 0x41
setae al
cmp cx, 0x76
setb dl
and dl, al
movzx eax, dl
or eax, ecx
movzx ebx, ax
shl ebx, 5
lea eax, [edi + ebx]
mov dword [esp], eax
mov eax, dword [ebp + 8]
lea esi, [eax + 0x40]
push esi
call dword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
jne 0x47ec62
mov ecx, esi
call fcn.0047f4c0
mov dword [esp + 8], esi
mov ecx, dword [esp]
mov eax, dword [ecx]
mov esi, dword [eax]
test esi, esi
je 0x47ee1c
mov byte [esp + 0xf], 0
mov edx, dword [esi]
test edx, edx
je 0x47ecae
mov ecx, dword [edi + ebx + 0xc]
mov dword [esp], ecx
mov ebx, edx
bswap edx
mov ecx, edx
xor ecx, esi
cmp ecx, 0x1fffff
ja 0x47ee6b
mov ecx, edx
and ecx, 0x1fc000
je 0x47ee6b
prefetcht0 byte [edx]
jmp 0x47ecb0
xor edx, edx
mov dword [eax], edx
mov ecx, dword [eax + 0xc]
lea edx, [ecx + 2]
and edx, 0x3ffe
and ecx, 0xffffc001
or ecx, edx
mov dword [eax + 0xc], ecx
mov ebx, dword [ebp + 8]
mov eax, dword [eax + 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]
mov dword [esi], 0
mov byte [esi + 4], 0
lea eax, [esi + 0x78]
push 0x280
push 0
push eax
call fcn.0052c210
add esp, 0xc
mov dword [esi + 0x2f8], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [esi + 0x2fc], eax
mov dword [esi + 0x300], 0
mov dword [esi + 0x304], 0
push 0x599b50
call dword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
jne 0x47ed55
mov ecx, 0x599b50
call fcn.0047f4c0
mov dword [esi + 0x304], 0
mov eax, dword [0x599b54]
mov dword [0x599b54], esi
mov dword [esi + 0x300], eax
test eax, eax
je 0x47ed7a
mov dword [eax + 0x304], esi
push 0x599b50
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, 0xf
jmp 0x47edb9
inc eax
add edi, 0x20
cmp eax, 0x5f
je 0x47ede5
mov dword [esi + eax*8], 0
mov byte [esi + eax*8 + 4], 0
movzx ecx, byte [eax + 0x59d965]
mov byte [esi + eax*8 + 5], cl
movzx ecx, word [edi + 0xc]
mov word [esi + eax*8 + 6], cx
cmp dword [edi], 0
jne 0x47edb0
mov byte [esi + eax*8 + 5], 0
jmp 0x47edb0
push esi
push dword [0x59d970]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, dword [0x59b038]
mov ecx, dword fs:[0x2c]
mov eax, dword [ecx + eax*4]
mov dword [eax + 0x90], esi
mov ecx, dword [esp + 0x28]
xor ecx, ebp
call fcn.00528e13
mov eax, esi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
lea eax, [esp + 0xf]
push eax
push 0x4000
push dword [esp + 0xc]
push 2
mov ebx, dword [ebp + 8]
push ebx
call fcn.004acbc0
test eax, eax
je 0x47ee99
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 0x47eccc
pcmpeqd xmm0, xmm0
movdqa xmmword [esp + 0x10], xmm0
lea esi, [esp + 0x10]
mov ecx, esi
push 0
push ebx
push str.first
call fcn.00470390
push esi
call fcn.0042a7c0
add esp, 4
mov ecx, dword [esp]
call fcn.0047f280
xor esi, esi
jmp 0x47ecef
int3