Function at 0x48d920
Capabilities:
Allocate thread local storage

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x34
mov ebx, ecx
lea eax, [ecx + 0x40]
mov dword [ebp - 0x10], eax
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
sub esp, 4
test al, al
je 0x48dd44
cmp byte [ebx + 0x1168], 0
jne 0x48dd51
lea edx, [ebp + 8]
xor esi, esi
mov cl, 1
xor eax, eax
lock cmpxchg byte [0x52115d], cl
jne 0x48d9bf
mov dword [esp + 0x10], esi
movaps xmm0, xmmword [0x504200]
movups xmmword [esp], xmm0
mov edi, ebx
mov ebx, edx
call fcn.004140e0
mov dword [esp + 0x10], esi
movaps xmm0, xmmword [0x504210]
movups xmmword [esp], xmm0
call fcn.004140e0
mov dword [esp + 0x10], esi
movaps xmm0, xmmword [0x504220]
movups xmmword [esp], xmm0
call fcn.004140e0
mov dword [esp + 0x10], esi
movapd xmm0, xmmword [0x504230]
movupd xmmword [esp], xmm0
call fcn.004140e0
mov edx, ebx
mov ebx, edi
cmp byte [edx], 1
sete byte [ebx + 4]
cmp byte [edx + 3], 1
sete byte [ebx + 5]
mov al, byte [edx + 4]
cmp al, 1
sete byte [ebx + 6]
cmp byte [edx + 5], 1
sete byte [ebx + 7]
jne 0x48d9e9
cmp al, 1
jne 0x48dd7e
xor ecx, ecx
mov byte [ebx + 8], 0
mov dword [ebx + 0xc], ecx
mov dword [ebx + 0x10], ecx
cmp al, 1
je 0x48dd2c
cmp byte [edx + 2], 0
setne byte [ebx]
xorpd xmm0, xmm0
movupd xmmword [ebx + 0x1148], xmm0
movupd xmmword [ebx + 0x1158], xmm0
call fcn.0045b0c0
mov dword [ebx + 0x1148], eax
mov eax, ebx
not eax
mov dword [ebx + 0x13cc], eax
mov eax, 8
xor edi, edi
mov dword [ebp - 0x24], ebx
mov esi, edi
shl esi, 5
mov dword [ebx + esi + 0x54], eax
xor ecx, ecx
mov dword [esp + 0xc], ecx
mov dword [esp + 8], eax
mov dword [esp + 4], 0x3ff
mov dword [esp], 0xffffffff
call fcn.004b23a0
sub esp, 0x10
add eax, 1
mov ecx, 0
adc edx, ecx
mov dword [ebx + esi + 0x60], eax
mov dword [ebx + esi + 0x64], edx
call fcn.0045b0c0
mov dword [ebx + esi + 0x48], eax
xor eax, eax
mov dword [ebx + esi + 0x4c], eax
mov dword [ebx + esi + 0x50], eax
movzx eax, byte [ebx + esi + 0x58]
mov dword [ebx + esi + 0x58], eax
mov dword [ebp - 0x18], esi
mov eax, dword [ebx + esi + 0x54]
cmp eax, 0x10000
ja 0x48db5f
mov dword [ebp - 0x14], edi
mov edi, 3
mov ecx, 0x3000
xor edx, edx
movsd xmm0, qword [0x4f8448]
movq xmm3, qword [0x500408]
mov dword [ebp - 0x1c], eax
nop word cs:[eax + eax]
mov dword [ebp - 0x20], edx
mov esi, edi
and esi, 3
lea eax, [esi*4]
mov ebx, 0x10
sub ebx, eax
mov eax, ecx
xor edx, edx
div dword [ebp - 0x1c]
test esi, esi
cmove ebx, esi
add ebx, edx
mov edx, dword [ebp - 0x20]
movd xmm1, ebx
por xmm1, xmm3
subsd xmm1, xmm3
movd xmm2, ecx
por xmm2, xmm3
subsd xmm2, xmm3
divsd xmm1, xmm2
ucomisd xmm0, xmm1
minsd xmm1, xmm0
cmova edx, edi
inc edi
add ecx, 0x1000
movapd xmm0, xmm1
cmp ecx, 0x11000
jne 0x48dad0
cmp dx, 0x10
mov ebx, dword [ebp - 0x24]
mov edi, dword [ebp - 0x14]
ja 0x48dd38
mov ecx, dword [ebp - 0x18]
add ecx, ebx
movzx eax, dl
mov dword [ecx + 0x58], eax
mov eax, dword [edi*4 + 0x504250]
inc edi
cmp eax, 1
jne 0x48da37
jmp 0x48db71
test eax, 0xff00000
jne 0x48dd3b
shr eax, 0xc
mov edx, eax
jmp 0x48db41
cmp edi, 0x87
ja 0x48dc8c
mov esi, edi
shl esi, 5
mov dword [ebx + esi + 0x54], 1
xor eax, eax
mov dword [ebx + esi + 0x60], eax
mov dword [ebx + esi + 0x64], 0x400
call fcn.0045b0c0
mov dword [ebx + esi + 0x48], eax
xor eax, eax
mov dword [ebx + esi + 0x4c], eax
mov dword [ebx + esi + 0x50], eax
movzx eax, byte [ebx + esi + 0x58]
mov dword [ebx + esi + 0x58], eax
mov dword [ebp - 0x18], esi
mov eax, dword [ebx + esi + 0x54]
cmp eax, 0x10000
ja 0x48dc7a
mov dword [ebp - 0x14], edi
mov edi, 3
mov ecx, 0x3000
xor edx, edx
movsd xmm0, qword [0x4f8448]
movq xmm3, qword [0x500408]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], edx
mov esi, edi
and esi, 3
lea eax, [esi*4]
mov ebx, 0x10
sub ebx, eax
mov eax, ecx
xor edx, edx
div dword [ebp - 0x1c]
test esi, esi
cmove ebx, esi
add ebx, edx
mov edx, dword [ebp - 0x20]
movd xmm1, ebx
por xmm1, xmm3
subsd xmm1, xmm3
movd xmm2, ecx
por xmm2, xmm3
subsd xmm2, xmm3
divsd xmm1, xmm2
ucomisd xmm0, xmm1
minsd xmm1, xmm0
cmova edx, edi
inc edi
add ecx, 0x1000
movapd xmm0, xmm1
cmp ecx, 0x11000
jne 0x48dbe8
cmp dx, 0x10
mov ebx, dword [ebp - 0x24]
mov edi, dword [ebp - 0x14]
ja 0x48dd3e
mov ecx, dword [ebp - 0x18]
add ecx, ebx
movzx eax, dl
mov dword [ecx + 0x58], eax
mov dword [ecx + 0x48], 0
inc edi
cmp edi, 0x88
jne 0x48db7d
jmp 0x48dc8c
test eax, 0xff00000
jne 0x48dd41
shr eax, 0xc
mov edx, eax
jmp 0x48dc59
mov dword [esp], 0x513bb0
call dword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
sub esp, 4
test al, al
je 0x48dd62
cmp byte [0x5211b4], 0
je 0x48dcfb
mov dword [esp], 0x513bb0
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
sub esp, 4
lea eax, [ebp + 8]
cmp byte [eax + 1], 1
sete byte [ebx + 3]
mov esi, ebx
je 0x48dd71
mov bl, 1
mov byte [esi + 0x1168], bl
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
sub esp, 4
xor eax, eax
lock cmpxchg byte [0x52115c], bl
add esp, 0x34
pop esi
pop edi
pop ebx
pop ebp
ret 8
cmp dword [0x524abc], 0
jne 0x48dd81
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x48dd84
mov dword [0x521160], eax
mov dword [0x524ac0], eax
mov dword [0x524abc], 0x48f7e0
mov byte [0x5211b4], 1
jmp 0x48dcad
mov dword [ebx + 0xc], 4
jmp 0x48d9fd
int3
int3
int3
int3
mov ecx, dword [ebp - 0x10]
call fcn.0045a230
jmp 0x48d945
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
add esp, 0x30
jmp 0x48dcf4
mov ecx, 0x513bb0
call fcn.0045a230
jmp 0x48dca4
mov dword [esp], esi
call fcn.0044a710
jmp 0x48dcd0
int3
int3
int3