Function at 0x54a710
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 [0x644040]
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 0x54ac4a
cmp byte [ebx + 0x1168], 0
jne 0x54ac6f
lea esi, [ebp + 8]
xor edx, edx
mov cl, 1
xor eax, eax
lock cmpxchg byte [0x6551a0], cl
jne 0x54a7be
mov dword [esp + 0x10], edx
movaps xmm0, xmmword [0x635510]
movups xmmword [esp], xmm0
call fcn.00536d90
xor eax, eax
mov dword [esp + 0x10], eax
movaps xmm0, xmmword [0x635520]
movups xmmword [esp], xmm0
call fcn.00536d90
xor eax, eax
mov dword [esp + 0x10], eax
movaps xmm0, xmmword [0x635530]
movups xmmword [esp], xmm0
call fcn.00536d90
xor eax, eax
mov dword [esp + 0x10], eax
movapd xmm0, xmmword [0x635540]
movupd xmmword [esp], xmm0
call fcn.00536d90
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 0x54ac83
cmp byte [ebx + 0x1430], 0
jne 0x54ac47
cmp byte [esi + 0x18], 1
sete byte [ebx + 0xf]
mov dword [ebx + 0x10], 0
cmp al, 1
je 0x54a848
mov byte [ebx], 0
xorpd xmm0, xmm0
movupd xmmword [ebx + 0x1148], xmm0
movupd xmmword [ebx + 0x1158], xmm0
mov dword [ebx + 0x1148], 0x6355d2
mov eax, ebx
not eax
mov dword [ebx + 0x13cc], eax
lea esi, [ebx + 0x60]
mov ecx, 0xffffff78
mov ebx, 8
xor edi, edi
jmp 0x54aaff
mov eax, 4
mov dword [ebx + 8], eax
mov dword [ebx + 0x10], eax
jmp 0x54a809
mov eax, 0x10000
xor edx, edx
div ebx
xorps xmm0, xmm0
cvtsi2sd xmm0, edx
mulsd xmm0, qword [0x635550]
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 [0x635558]
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 [0x635560]
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 [0x635568]
movsd qword [esp + 0x40], xmm0
mov eax, 0xc000
xor edx, edx
div ebx
xorps xmm0, xmm0
cvtsi2sd xmm0, edx
divsd xmm0, qword [0x635570]
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 [0x635578]
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 [0x635580]
movsd qword [esp + 0x28], xmm0
mov eax, 0x9000
xor edx, edx
div ebx
add edx, 0xc
cvtsi2sd xmm7, edx
divsd xmm7, qword [0x635588]
mov eax, 0x8000
xor edx, edx
div ebx
cvtsi2sd xmm5, edx
mulsd xmm5, qword [0x635590]
mov eax, 0x7000
xor edx, edx
div ebx
add edx, 4
cvtsi2sd xmm4, edx
divsd xmm4, qword [0x635598]
mov eax, 0x6000
xor edx, edx
div ebx
add edx, 8
cvtsi2sd xmm3, edx
divsd xmm3, qword [0x6355a0]
mov eax, 0x5000
xor edx, edx
div ebx
add edx, 0xc
cvtsi2sd xmm2, edx
divsd xmm2, qword [0x6355a8]
mov eax, 0x4000
xor edx, edx
div ebx
cvtsi2sd xmm1, edx
mulsd xmm1, qword [0x6355b0]
mov eax, 0x3000
xor edx, edx
div ebx
add edx, 4
xorps xmm0, xmm0
cvtsi2sd xmm0, edx
divsd xmm0, qword [0x6355b8]
xor eax, eax
movsd xmm6, qword [0x615a88]
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 + 0x631ba8]
add esi, 0x20
inc ecx
cmp ebx, 1
je 0x54ab60
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.005825e0
sub esp, 0x10
add eax, 1
adc edx, edi
mov dword [esi], eax
mov dword [esi + 4], edx
mov dword [esi - 0x18], 0x6355d2
mov dword [esi - 0x14], edi
mov dword [esi - 0x10], edi
movzx eax, byte [esi - 8]
mov dword [esi - 8], eax
cmp ebx, 0x10001
jb 0x54a855
test ebx, 0xff00000
jne 0x54ac44
shr ebx, 0xc
jmp 0x54aae5
mov eax, ecx
add eax, 0x88
jae 0x54ab92
neg ecx
movapd xmm0, xmmword [0x62e010]
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 0x54ab73
mov dword [esp], 0x646120
call dword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
sub esp, 4
test al, al
mov esi, dword [esp + 0x1c]
je 0x54ac56
cmp byte [0x6551f8], 0
jne 0x54abee
cmp dword [0x657cdc], 0
jne 0x54ac7d
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x54ac80
mov dword [0x6551a4], eax
mov dword [0x657ce0], eax
mov dword [0x657cdc], 0x444190
mov byte [0x6551f8], 1
mov dword [esp], 0x646120
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
sub esp, 4
lea eax, [ebp + 8]
cmp byte [eax], 1
sete byte [esi + 3]
je 0x54ac65
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 [0x6551a1], bl
mov ecx, dword [esp + 0xa0]
xor ecx, ebp
call fcn.00565ea5
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret 0x1c
int3
int3
mov ecx, edi
call fcn.00521240
jmp 0x54a746
mov ecx, 0x646120
call fcn.00521240
jmp 0x54abae
mov dword [esp], esi
call fcn.004f35a0
jmp 0x54ac0a
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
sub esp, 4
jmp 0x54ac2c
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.005ddc60
sub esp, 8
cmp byte [ebx + 0x1430], 1
jne 0x54accf
mov eax, dword [esp + 0x1c]
mov byte [eax + 0x1430], 0
mov dword [esp], edi
mov ecx, esi
call fcn.005ddca0
sub esp, 4
mov esi, dword [esp + 0x1c]
mov byte [esi + 0x1430], 1
mov ecx, edi
call fcn.005ddd00
lea eax, [ebp + 8]
cmp byte [eax + 0x18], 1
mov al, byte [esi + 4]
sete byte [esi + 0xf]
test byte [esi + 0xc], 1
jne 0x54ad1a
mov ebx, dword [esp + 0x1c]
mov dword [ebx + 0x10], 0
test al, 1
je 0x54a809
jmp 0x54a848
test al, 1
jne 0x54ad2e
mov ebx, dword [esp + 0x1c]
mov dword [ebx + 0x10], 0
jmp 0x54a809
int3