Function at 0x546180
Capabilities:
Allocate thread local storage

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x70
mov esi, ecx
mov eax, dword [0x644040]
xor eax, ebp
mov dword [esp + 0x68], eax
lea eax, [ecx + 0x40]
mov dword [esp + 0x28], eax
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
sub esp, 4
test al, al
je 0x5465a7
mov dword [esp + 0x1c], esi
cmp byte [esi + 0x1168], 0
jne 0x5465d8
xor esi, esi
mov cl, 1
xor eax, eax
lock cmpxchg byte [0x655150], cl
jne 0x546227
mov dword [esp + 0x10], esi
movaps xmm0, xmmword [0x6357e0]
movups xmmword [esp], xmm0
call fcn.0052e160
mov dword [esp + 0x10], esi
movaps xmm0, xmmword [0x6357f0]
movups xmmword [esp], xmm0
call fcn.0052e160
mov dword [esp + 0x10], esi
movaps xmm0, xmmword [0x635800]
movups xmmword [esp], xmm0
call fcn.0052e160
mov dword [esp + 0x10], esi
movapd xmm0, xmmword [0x635810]
movupd xmmword [esp], xmm0
call fcn.0052e160
lea edx, [ebp + 8]
cmp byte [edx + 2], 1
mov ecx, dword [esp + 0x1c]
sete byte [ecx + 4]
sete al
mov byte [ecx + 0xc], 0
cmp byte [edx + 0xc], 1
sete byte [ecx + 0xd]
cmp byte [edx + 4], 1
sete byte [ecx + 0xe]
je 0x5465ea
cmp byte [ecx + 0x1428], 0
jne 0x5465a4
cmp byte [edx + 0x18], 1
sete byte [ecx + 0xf]
mov dword [ecx + 0x10], 0
test al, al
jne 0x5462b1
mov byte [ecx], 0
xorpd xmm0, xmm0
movupd xmmword [ecx + 0x1148], xmm0
movupd xmmword [ecx + 0x1158], xmm0
mov dword [ecx + 0x1148], 0x635c68
mov eax, ecx
not eax
mov dword [ecx + 0x13cc], eax
lea edi, [ecx + 0x48]
xor esi, esi
mov ebx, 8
mov dword [esp + 0x2c], edi
jmp 0x546376
mov eax, 4
mov dword [ecx + 8], eax
mov dword [ecx + 0x10], eax
jmp 0x546273
mov dword [esp + 0x34], ebx
mov ebx, 3
mov ecx, 0x3000
xor eax, eax
movsd xmm0, qword [0x616a80]
movq xmm5, qword [0x6271a0]
mov dword [esp + 0x20], eax
mov edi, ebx
and edi, 3
lea eax, [edi*4]
mov esi, 0x10
sub esi, eax
mov eax, ecx
xor edx, edx
div dword [esp + 0x34]
mov eax, dword [esp + 0x20]
test edi, edi
cmove esi, edi
add esi, edx
movd xmm1, esi
por xmm1, xmm5
subsd xmm1, xmm5
movd xmm2, ecx
por xmm2, xmm5
subsd xmm2, xmm5
divsd xmm1, xmm2
ucomisd xmm0, xmm1
minsd xmm1, xmm0
cmova eax, ebx
inc ebx
add ecx, 0x1000
movapd xmm0, xmm1
cmp ecx, 0x11000
jne 0x5462e0
cmp ax, 0x10
ja 0x54659b
movzx ebx, ax
mov edi, dword [esp + 0x2c]
mov esi, dword [esp + 0x24]
mov ecx, dword [esp + 0x30]
add ecx, edi
movzx eax, bl
mov dword [ecx + 0x10], eax
mov ebx, dword [esi*4 + 0x635838]
inc esi
cmp ebx, 1
je 0x546402
mov dword [esp + 0x24], esi
shl esi, 5
mov dword [edi + esi + 0xc], ebx
mov dword [esp + 8], ebx
mov dword [esp + 0xc], 0
mov dword [esp + 4], 0x3ff
mov dword [esp], 0xffffffff
call fcn.005848d0
sub esp, 0x10
add eax, 1
adc edx, 0
mov dword [edi + esi + 0x18], eax
mov dword [edi + esi + 0x1c], edx
mov dword [edi + esi], 0x635c68
mov dword [edi + esi + 4], 0
mov dword [edi + esi + 8], 0
movzx eax, byte [edi + esi + 0x10]
mov dword [esp + 0x30], esi
mov dword [edi + esi + 0x10], eax
cmp ebx, 0x10000
jbe 0x5462c0
mov esi, dword [esp + 0x24]
test ebx, 0xff00000
jne 0x54659e
shr ebx, 0xc
movsd xmm5, qword [0x6271a0]
jmp 0x546359
cmp esi, 0x87
ja 0x5464ec
movsd xmm0, qword [0x616a80]
movdqa xmm1, xmmword [0x627190]
mov dword [esp + 0x24], esi
mov edx, esi
shl edx, 5
lea ecx, [edi + edx]
mov dword [esp + 0x20], ecx
mov dword [edi + edx + 0xc], 1
xor ecx, ecx
mov dword [edi + edx + 0x18], ecx
mov dword [edi + edx + 0x1c], 0x400
mov dword [edi + edx], 0x635c68
mov dword [edi + edx + 4], ecx
mov dword [edi + edx + 8], ecx
movzx esi, byte [edi + edx + 0x10]
mov dword [edi + edx + 0x10], esi
mov edx, 3
mov esi, 0x3000
movapd xmm2, xmm0
nop word [eax + eax]
mov edi, edx
and edi, 3
lea ebx, [edi*4]
mov eax, 0x10
sub eax, ebx
test edi, edi
cmove eax, edi
xorps xmm3, xmm3
cvtsi2sd xmm3, eax
movd xmm4, esi
por xmm4, xmm1
subsd xmm4, xmm5
divsd xmm3, xmm4
ucomisd xmm2, xmm3
minsd xmm3, xmm2
cmova ecx, edx
inc edx
add esi, 0x1000
movapd xmm2, xmm3
cmp esi, 0x11000
jne 0x546470
cmp cx, 0x10
ja 0x5465a1
movzx eax, cx
mov ecx, dword [esp + 0x20]
mov dword [ecx + 0x10], eax
mov dword [ecx], 0
mov esi, dword [esp + 0x24]
inc esi
cmp esi, 0x88
mov edi, dword [esp + 0x2c]
jne 0x54641e
mov dword [esp], 0x646108
call dword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
sub esp, 4
test al, al
je 0x5465b5
cmp byte [0x6551a8], 0
jne 0x546544
cmp dword [0x65684c], 0
jne 0x5465c4
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x5465c7
mov dword [0x655154], eax
mov dword [0x656850], eax
mov dword [0x65684c], 0x43cb20
mov byte [0x6551a8], 1
mov dword [esp], 0x646108
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
sub esp, 4
lea eax, [ebp + 8]
cmp byte [eax], 1
mov eax, dword [esp + 0x1c]
sete byte [eax + 3]
je 0x5465ca
mov bl, 1
mov byte [eax + 0x1168], bl
mov eax, dword [esp + 0x28]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
sub esp, 4
xor eax, eax
lock cmpxchg byte [0x655151], bl
mov ecx, dword [esp + 0x68]
xor ecx, ebp
call fcn.00568175
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret 0x1c
int3
int3
int3
int3
mov ecx, dword [esp + 0x28]
call fcn.0051aca0
jmp 0x5461b4
mov ecx, 0x646108
call fcn.0051aca0
jmp 0x546504
int3
int3
mov dword [esp], eax
call fcn.00563a00
mov eax, dword [esp + 0x1c]
jmp 0x546564
mov eax, dword [esp + 0x28]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
sub esp, 4
jmp 0x546586
lea edi, [ebp + 8]
mov eax, dword [edi + 8]
mov dword [ecx + 0x13d8], eax
mov esi, ecx
add ecx, 0x13dc
mov dword [esi + 0x13e0], eax
lea eax, [esi + 0x13f8]
mov dword [esp + 0x20], eax
lea ebx, [esp + 0x38]
mov dword [esp], ebx
mov dword [esp + 4], 1
call fcn.005de410
sub esp, 8
mov ecx, dword [esp + 0x20]
mov edx, ebx
call fcn.005ca940
mov ecx, ebx
call fcn.005de4a0
cmp byte [edi + 0x18], 1
sete byte [esi + 0xf]
cmp byte [esi + 0xc], 0
mov al, byte [esi + 4]
jne 0x546651
mov ecx, dword [esp + 0x1c]
jmp 0x546268
test al, al
jne 0x546665
mov ecx, dword [esp + 0x1c]
mov dword [ecx + 0x10], 0
jmp 0x546273
int3