Function at 0x10005520
Capabilities:
Allocate thread local storage

Disassembly:
push 0x14
mov eax, 0x10024e44
call fcn.100247fe
xor ecx, ecx
xor ebx, ebx
mov dword [ebp - 0x10], ecx
mov esi, ecx
inc ebx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], esi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 4], ecx
sub eax, ecx
je 0x100056c9
sub eax, ebx
je 0x10005561
dec eax
sub eax, ebx
jne 0x10005761
call fcn.10008bbe
jmp 0x10005761
mov dword [0x1002a7c0], ecx
mov dword [0x1002a7b0], ecx
mov dword [0x1002a7c8], 1
mov dword [0x1002a7cc], ecx
mov dword [0x1002a7d8], 0x10002538
mov dword [section..data], 0x1002a7b0
call fcn.100054c6
call fcn.10005d27
mov ecx, eax
call fcn.1000836c
mov ebx, eax
test ebx, ebx
jne 0x100055e6
mov ecx, dword [section..data]
cmp ecx, section..data
je 0x10005761
test byte [ecx + 0x1c], 4
je 0x10005761
cmp byte [ecx + 0x19], 2
jb 0x10005761
push dword [ecx + 0x14]
push dword [ecx + 0x10]
push 0xa
mov edx, 0x1000259c
pop ecx
call fcn.10004d9d
jmp 0x10005761
push 0x10
mov byte [ebp - 4], 1
call fcn.10023e76
mov esi, eax
mov dword [ebp - 0x10], esi
pop ecx
test esi, esi
je 0x10005613
xor eax, eax
mov dword [esi], fcn.100047a0
inc eax
mov dword [esi + 4], eax
mov dword [esi + 8], eax
mov dword [esi + 0xc], 0x10001550
jmp 0x10005615
xor esi, esi
mov dword [ebp - 0x14], esi
lea edx, [esi + 0xc]
mov dword [ebp - 0x18], edx
mov byte [ebp - 4], 0
test esi, esi
je 0x1000562f
lea eax, [esi + 4]
lock inc dword [eax]
lock inc dword [eax]
mov ecx, dword [0x1002a7f8]
mov dword [0x1002a7f8], esi
mov dword [0x1002a7f4], edx
test ecx, ecx
je 0x1000564a
call fcn.1000595b
test esi, esi
je 0x10005655
mov ecx, esi
call fcn.1000595b
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x1002a2b0], eax
cmp eax, 0xffffffff
jne 0x10005698
xor ebx, ebx
mov eax, dword [section..data]
cmp eax, section..data
je 0x10005761
test byte [eax + 0x1c], 4
je 0x10005761
cmp byte [eax + 0x19], 2
jb 0x10005761
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0xb
jmp 0x100055d6
mov eax, dword [section..data]
cmp eax, section..data
je 0x10005761
test byte [eax + 0x1c], 4
je 0x10005761
cmp byte [eax + 0x19], 5
jb 0x10005761
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0xc
jmp 0x100055d6
push ecx
call fcn.10005cc2
mov ecx, eax
call fcn.1000a92e
mov eax, dword [0x1002a2b0]
cmp eax, 0xffffffff
je 0x100056ec
cmp eax, 0x40
je 0x100056ec
push eax
call dword [sym.imp.KERNEL32.dll_TlsFree]
call fcn.10005d27
mov ecx, eax
call fcn.10008639
mov edi, dword [section..data]
cmp edi, section..data
je 0x10005761
test byte [edi + 0x1c], 4
je 0x1000572b
cmp byte [edi + 0x19], 5
jb 0x1000572b
push dword [edi + 0x14]
mov edx, 0x1000259c
push dword [edi + 0x10]
push 0xd
pop ecx
call fcn.10004d9d
mov edi, dword [section..data]
cmp edi, section..data
je 0x10005761
jmp 0x10005753
mov eax, dword [edi + 8]
or eax, dword [edi + 0xc]
je 0x10005751
push dword [edi + 0xc]
push dword [edi + 8]
call dword [sym.imp.ADVAPI32.dll_UnregisterTraceGuids]
and dword [edi + 8], 0
and dword [edi + 0xc], 0
mov edi, dword [edi]
test edi, edi
jne 0x10005735
mov dword [section..data], 0x1002a000
or dword [ebp - 4], 0xffffffff
test esi, esi
je 0x10005770
mov ecx, esi
call fcn.1000595b
mov eax, ebx
call fcn.100247cc
ret 0xc