Function at 0x549ec0
Capabilities:
Allocate thread local storage

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0xa8
mov ebx, ecx
mov eax, dword [0x646040]
xor eax, ebp
mov dword [esp + 0xa0], eax
lea edi, [ecx + 0x40]
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
sub esp, 4
test al, al
je 0x54a3fa
cmp byte [ebx + 0x1168], 0
jne 0x54a41f
lea esi, [ebp + 8]
xor edx, edx
mov cl, 1
xor eax, eax
lock cmpxchg byte [0x6571a0], cl
jne 0x549f6e
mov dword [esp + 0x10], edx
movaps xmm0, xmmword [0x637510]
movups xmmword [esp], xmm0
call fcn.005344c0
xor eax, eax
mov dword [esp + 0x10], eax
movaps xmm0, xmmword [0x637520]
movups xmmword [esp], xmm0
call fcn.005344c0
xor eax, eax
mov dword [esp + 0x10], eax
movaps xmm0, xmmword [0x637530]
movups xmmword [esp], xmm0
call fcn.005344c0
xor eax, eax
mov dword [esp + 0x10], eax
movapd xmm0, xmmword [0x637540]
movupd xmmword [esp], xmm0
call fcn.005344c0
mov al, byte [esi + 2]
cmp al, 1
sete byte [ebx + 4]
mov byte [ebx + 0xc], 0
cmp byte [esi + 0xc], 1
sete byte [ebx + 0xd]
cmp byte [esi + 4], 1
sete byte [ebx + 0xe]
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x24], edi
je 0x54a433
cmp byte [ebx + 0x1430], 0
jne 0x54a3f7
cmp byte [esi + 0x18], 1
sete byte [ebx + 0xf]
mov dword [ebx + 0x10], 0
cmp al, 1
je 0x549ff8
mov byte [ebx], 0
xorpd xmm0, xmm0
movupd xmmword [ebx + 0x1148], xmm0
movupd xmmword [ebx + 0x1158], xmm0
mov dword [ebx + 0x1148], 0x6375d2
mov eax, ebx
not eax
mov dword [ebx + 0x13cc], eax
lea esi, [ebx + 0x60]
mov ecx, 0xffffff78
mov ebx, 8
xor edi, edi
jmp 0x54a2af
mov eax, 4
mov dword [ebx + 8], eax
mov dword [ebx + 0x10], eax
jmp 0x549fb9
mov eax, 0x10000
xor edx, edx
div ebx
xorps xmm0, xmm0
cvtsi2sd xmm0, edx
mulsd xmm0, qword [0x637550]
movsd qword [esp + 0x58], xmm0
mov eax, 0xf000
xor edx, edx
div ebx
add edx, 4
xorps xmm0, xmm0
cvtsi2sd xmm0, edx
divsd xmm0, qword [0x637558]
movsd qword [esp + 0x50], xmm0
mov eax, 0xe000
xor edx, edx
div ebx
add edx, 8
xorps xmm0, xmm0
cvtsi2sd xmm0, edx
divsd xmm0, qword [0x637560]
movsd qword [esp + 0x48], xmm0
mov eax, 0xd000
xor edx, edx
div ebx
add edx, 0xc
xorps xmm0, xmm0
cvtsi2sd xmm0, edx
divsd xmm0, qword [0x637568]
movsd qword [esp + 0x40], xmm0
mov eax, 0xc000
xor edx, edx
div ebx
xorps xmm0, xmm0
cvtsi2sd xmm0, edx
divsd xmm0, qword [0x637570]
movsd qword [esp + 0x38], xmm0
mov eax, 0xb000
xor edx, edx
div ebx
add edx, 4
xorps xmm0, xmm0
cvtsi2sd xmm0, edx
divsd xmm0, qword [0x637578]
movsd qword [esp + 0x30], xmm0
mov eax, 0xa000
xor edx, edx
div ebx
add edx, 8
xorps xmm0, xmm0
cvtsi2sd xmm0, edx
divsd xmm0, qword [0x637580]
movsd qword [esp + 0x28], xmm0
mov eax, 0x9000
xor edx, edx
div ebx
add edx, 0xc
cvtsi2sd xmm7, edx
divsd xmm7, qword [0x637588]
mov eax, 0x8000
xor edx, edx
div ebx
cvtsi2sd xmm5, edx
mulsd xmm5, qword [0x637590]
mov eax, 0x7000
xor edx, edx
div ebx
add edx, 4
cvtsi2sd xmm4, edx
divsd xmm4, qword [0x637598]
mov eax, 0x6000
xor edx, edx
div ebx
add edx, 8
cvtsi2sd xmm3, edx
divsd xmm3, qword [0x6375a0]
mov eax, 0x5000
xor edx, edx
div ebx
add edx, 0xc
cvtsi2sd xmm2, edx
divsd xmm2, qword [0x6375a8]
mov eax, 0x4000
xor edx, edx
div ebx
cvtsi2sd xmm1, edx
mulsd xmm1, qword [0x6375b0]
mov eax, 0x3000
xor edx, edx
div ebx
add edx, 4
xorps xmm0, xmm0
cvtsi2sd xmm0, edx
divsd xmm0, qword [0x6375b8]
xor eax, eax
movsd xmm6, qword [0x617a88]
ucomisd xmm6, xmm0
seta al
minsd xmm0, xmm6
ucomisd xmm0, xmm1
lea ebx, [eax + eax*2]
mov eax, 4
cmova ebx, eax
minsd xmm1, xmm0
ucomisd xmm1, xmm2
mov eax, 5
cmova ebx, eax
minsd xmm2, xmm1
ucomisd xmm2, xmm3
mov eax, 6
cmova ebx, eax
minsd xmm3, xmm2
ucomisd xmm3, xmm4
mov eax, 7
cmova ebx, eax
minsd xmm4, xmm3
ucomisd xmm4, xmm5
mov eax, 8
cmova ebx, eax
minsd xmm5, xmm4
ucomisd xmm5, xmm7
mov eax, 9
cmova ebx, eax
minsd xmm7, xmm5
movsd xmm1, qword [esp + 0x28]
ucomisd xmm7, xmm1
mov eax, 0xa
cmova ebx, eax
minsd xmm1, xmm7
movsd xmm0, qword [esp + 0x30]
ucomisd xmm1, xmm0
mov eax, 0xb
cmova ebx, eax
minsd xmm0, xmm1
movsd xmm1, qword [esp + 0x38]
ucomisd xmm0, xmm1
mov eax, 0xc
cmova ebx, eax
minsd xmm1, xmm0
movsd xmm0, qword [esp + 0x40]
ucomisd xmm1, xmm0
mov eax, 0xd
cmova ebx, eax
minsd xmm0, xmm1
movsd xmm1, qword [esp + 0x48]
ucomisd xmm0, xmm1
mov eax, 0xe
cmova ebx, eax
minsd xmm1, xmm0
movsd xmm0, qword [esp + 0x50]
ucomisd xmm1, xmm0
mov eax, 0xf
cmova ebx, eax
minsd xmm0, xmm1
ucomisd xmm0, qword [esp + 0x58]
mov eax, 0x10
cmova ebx, eax
mov ecx, dword [esp + 0x20]
movzx eax, bl
mov dword [esi - 8], eax
mov ebx, dword [ecx*4 + 0x633ba8]
add esi, 0x20
inc ecx
cmp ebx, 1
je 0x54a310
mov dword [esp + 0x20], ecx
mov dword [esi - 0xc], ebx
mov dword [esp + 0xc], edi
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x3ff
mov dword [esp], 0xffffffff
call fcn.00583a70
sub esp, 0x10
add eax, 1
adc edx, edi
mov dword [esi], eax
mov dword [esi + 4], edx
mov dword [esi - 0x18], 0x6375d2
mov dword [esi - 0x14], edi
mov dword [esi - 0x10], edi
movzx eax, byte [esi - 8]
mov dword [esi - 8], eax
cmp ebx, 0x10001
jb 0x54a005
test ebx, 0xff00000
jne 0x54a3f4
shr ebx, 0xc
jmp 0x54a295
mov eax, ecx
add eax, 0x88
jae 0x54a342
neg ecx
movapd xmm0, xmmword [0x630010]
mov dword [esi + 4], 0x400
mov dword [esi], 0
mov dword [esi - 8], 4
movupd xmmword [esi - 0x18], xmm0
add esi, 0x20
dec ecx
jne 0x54a323
mov dword [esp], 0x648120
call dword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
sub esp, 4
test al, al
mov esi, dword [esp + 0x1c]
je 0x54a406
cmp byte [0x6571f8], 0
jne 0x54a39e
cmp dword [0x659cdc], 0
jne 0x54a42d
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x54a430
mov dword [0x6571a4], eax
mov dword [0x659ce0], eax
mov dword [0x659cdc], 0x441f00
mov byte [0x6571f8], 1
mov dword [esp], 0x648120
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
sub esp, 4
lea eax, [ebp + 8]
cmp byte [eax], 1
sete byte [esi + 3]
je 0x54a415
mov bl, 1
mov byte [esi + 0x1168], bl
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
sub esp, 4
xor eax, eax
lock cmpxchg byte [0x6571a1], bl
mov ecx, dword [esp + 0xa0]
xor ecx, ebp
call fcn.00567335
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret 0x1c
int3
int3
mov ecx, edi
call fcn.00520a70
jmp 0x549ef6
mov ecx, 0x648120
call fcn.00520a70
jmp 0x54a35e
mov dword [esp], esi
call fcn.004f25d0
jmp 0x54a3ba
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
sub esp, 4
jmp 0x54a3dc
int3
int3
lea eax, [esp + 0x98]
mov dword [eax], 0xffffff01
mov ecx, dword [esi + 8]
mov dword [eax + 4], ecx
mov dword [ebx + 0x13d8], ecx
lea esi, [ebx + 0x13f8]
lea ecx, [ebx + 0x13dc]
mov dword [esp + 4], eax
lea edi, [esp + 0x60]
mov dword [esp], edi
call fcn.005df360
sub esp, 8
cmp byte [ebx + 0x1430], 1
jne 0x54a47f
mov eax, dword [esp + 0x1c]
mov byte [eax + 0x1430], 0
mov dword [esp], edi
mov ecx, esi
call fcn.005df3a0
sub esp, 4
mov esi, dword [esp + 0x1c]
mov byte [esi + 0x1430], 1
mov ecx, edi
call fcn.005df400
lea eax, [ebp + 8]
cmp byte [eax + 0x18], 1
mov al, byte [esi + 4]
sete byte [esi + 0xf]
test byte [esi + 0xc], 1
jne 0x54a4ca
mov ebx, dword [esp + 0x1c]
mov dword [ebx + 0x10], 0
test al, 1
je 0x549fb9
jmp 0x549ff8
test al, 1
jne 0x54a4de
mov ebx, dword [esp + 0x1c]
mov dword [ebx + 0x10], 0
jmp 0x549fb9
int3