Function at 0x561030
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 [0x64a040]
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 0x561457
mov dword [esp + 0x1c], esi
cmp byte [esi + 0x1168], 0
jne 0x561488
xor esi, esi
mov cl, 1
xor eax, eax
lock cmpxchg byte [0x65b134], cl
jne 0x5610d7
mov dword [esp + 0x10], esi
movaps xmm0, xmmword [0x63b730]
movups xmmword [esp], xmm0
call fcn.00544a40
mov dword [esp + 0x10], esi
movaps xmm0, xmmword [0x63b740]
movups xmmword [esp], xmm0
call fcn.00544a40
mov dword [esp + 0x10], esi
movaps xmm0, xmmword [0x63b750]
movups xmmword [esp], xmm0
call fcn.00544a40
mov dword [esp + 0x10], esi
movapd xmm0, xmmword [0x63b760]
movupd xmmword [esp], xmm0
call fcn.00544a40
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 0x56149a
cmp byte [ecx + 0x1428], 0
jne 0x561454
cmp byte [edx + 0x18], 1
sete byte [ecx + 0xf]
mov dword [ecx + 0x10], 0
test al, al
jne 0x561161
mov byte [ecx], 0
xorpd xmm0, xmm0
movupd xmmword [ecx + 0x1148], xmm0
movupd xmmword [ecx + 0x1158], xmm0
mov dword [ecx + 0x1148], 0x63bbb8
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 0x561226
mov eax, 4
mov dword [ecx + 8], eax
mov dword [ecx + 0x10], eax
jmp 0x561123
mov dword [esp + 0x34], ebx
mov ebx, 3
mov ecx, 0x3000
xor eax, eax
movsd xmm0, qword [0x61ca80]
movq xmm5, qword [0x62d140]
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 0x561190
cmp ax, 0x10
ja 0x56144b
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 + 0x63b788]
inc esi
cmp ebx, 1
je 0x5612b2
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.0059d670
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], 0x63bbb8
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 0x561170
mov esi, dword [esp + 0x24]
test ebx, 0xff00000
jne 0x56144e
shr ebx, 0xc
movsd xmm5, qword [0x62d140]
jmp 0x561209
cmp esi, 0x87
ja 0x56139c
movsd xmm0, qword [0x61ca80]
movdqa xmm1, xmmword [0x62d130]
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], 0x63bbb8
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 0x561320
cmp cx, 0x10
ja 0x561451
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 0x5612ce
mov dword [esp], 0x64c100
call dword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
sub esp, 4
test al, al
je 0x561465
cmp byte [0x65b18c], 0
jne 0x5613f4
cmp dword [0x65c84c], 0
jne 0x561474
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x561477
mov dword [0x65b138], eax
mov dword [0x65c850], eax
mov dword [0x65c84c], 0x44b290
mov byte [0x65b18c], 1
mov dword [esp], 0x64c100
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 0x56147a
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 [0x65b135], bl
mov ecx, dword [esp + 0x68]
xor ecx, ebp
call fcn.005810d5
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.00531150
jmp 0x561064
mov ecx, 0x64c100
call fcn.00531150
jmp 0x5613b4
int3
int3
mov dword [esp], eax
call fcn.0057bd80
mov eax, dword [esp + 0x1c]
jmp 0x561414
mov eax, dword [esp + 0x28]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
sub esp, 4
jmp 0x561436
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.005fd000
sub esp, 8
mov ecx, dword [esp + 0x20]
mov edx, ebx
call fcn.005ec1e0
mov ecx, ebx
call fcn.005fd090
cmp byte [edi + 0x18], 1
sete byte [esi + 0xf]
cmp byte [esi + 0xc], 0
mov al, byte [esi + 4]
jne 0x561501
mov ecx, dword [esp + 0x1c]
jmp 0x561118
test al, al
jne 0x561515
mov ecx, dword [esp + 0x1c]
mov dword [ecx + 0x10], 0
jmp 0x561123
int3