Function at 0x180015580
Capabilities:
Allocate thread local storage
Get system information on windows
Set thread local storage value

Disassembly:
mov eax, 0x1c8
call fcn.180025560
sub rsp, rax
mov eax, dword [0x180034de0]
test eax, eax
je 0x1800155a1
xor eax, eax
add rsp, 0x1c8
ret
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
lea rcx, [rsp + 0x50]
mov dword [0x180034668], eax
call qword [sym.imp.KERNEL32.dll_GetSystemInfo]
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [rsp + 0x40]
xor edx, edx
movsxd rcx, dword [rsp + 0x54]
mov dword [0x180034c80], eax
mov eax, 0x1000
div rcx
test rdx, rdx
je 0x18001560b
call fcn.18000f380
mov rcx, rax
lea r9, [0x180029d5e]
lea r8, [0x180029d5e]
lea rdx, str.Compile_time_page_size_does_not_divide_the_runtime_one._n
call qword [sym.mozglue.dll__malloc_message]
call qword [0x18002cf60]
int3
mov rax, qword [0x180034670]
mov r8d, dword [0x180034dec]
mov qword [rsp + 0x1e0], rbx
mov qword [rsp + 0x1c0], rbp
mov qword [rsp + 0x1b8], rsi
mov qword [rsp + 0x1b0], rdi
mov qword [rsp + 0x1a8], r12
lea r12, [0x180000000]
mov qword [rsp + 0x1a0], r13
xor r13d, r13d
mov qword [rsp + 0x198], r14
mov qword [rsp + 0x190], r15
mov r15d, r13d
mov dword [rsp + 0x1d8], r13d
mov ecx, r15d
test r15d, r15d
je 0x180015948
sub ecx, 1
je 0x1800156af
cmp ecx, 1
je 0x180015691
mov byte [rsp + 0x80], r13b
jmp 0x18001585c
mov rbp, qword [sym.mozglue.dll__malloc_options]
test rbp, rbp
jne 0x1800156e1
mov byte [rsp + 0x80], r13b
lea rbp, [rsp + 0x80]
jmp 0x1800156e1
lea rcx, str.MALLOC_OPTIONS
call fcn.180015ea0
mov rbp, rax
test rax, rax
jne 0x1800156d3
mov byte [rsp + 0x80], r13b
lea rbp, [rsp + 0x80]
mov rax, qword [0x180034670]
mov r8d, dword [0x180034dec]
mov rcx, rbp
mov esi, r13d
movzx ecx, byte [rcx]
test cl, cl
je 0x18001585c
movabs r15, 0x7fffffffffffffff
movsx r9d, cl
mov edi, r13d
mov r10d, r13d
lea ecx, [r9 - 0x30]
cmp ecx, 9
ja case.default.0x18001571d
movsxd rcx, ecx
mov edx, dword [r12 + rcx*4 + 0x15adc]
add rdx, r12
jmp rdx
inc esi
lea ecx, [rdi + rdi*4]
lea edi, [r9 + rcx*2 - 0x30]
mov r10d, 1
movsx r9d, byte [rsi + rbp]
lea ecx, [r9 - 0x30]
cmp ecx, 9
jbe 0x18001570f
test r10d, r10d
je case.default.0x18001571d
test edi, edi
je 0x180015846
jmp 0x180015751
mov edi, 1
mov r14d, esi
mov ebx, edi
movsx edi, byte [r14 + rbp]
lea ecx, [rdi - 0x41]
cmp ecx, 0x2f
ja case.0x18001577e.74
movsxd rcx, ecx
movzx ecx, byte [r12 + rcx + 0x15b2c]
mov edx, dword [r12 + rcx*4 + 0x15b04]
add rdx, r12
jmp rdx
mov dword [0x180034de4], r13d
jmp case.0x18001577e.66
mov dword [0x180034de4], 1
jmp case.0x18001577e.66
shr rax, 1
mov qword [0x180034670], rax
jmp case.0x18001577e.66
test rax, rax
jne 0x1800157bd
mov eax, 1
mov qword [0x180034670], rax
jmp case.0x18001577e.66
test r15, rax
je case.0x18001577e.66
add rax, rax
mov qword [0x180034670], rax
jmp case.0x18001577e.66
dec r8d
mov dword [0x180034dec], r8d
jmp case.0x18001577e.66
inc r8d
mov dword [0x180034dec], r8d
jmp case.0x18001577e.66
mov dword [0x180034de8], r13d
jmp case.0x18001577e.66
mov dword [0x180034de8], 1
jmp case.0x18001577e.66
lea r9, [0x18002c098]
mov byte [rsp + 0x1d0], dil
lea r8, [rsp + 0x1d0]
mov byte [rsp + 0x1d1], r13b
lea rdx, str.:__malloc__Unsupported_character_in_malloc_options:_
lea rcx, [0x18002bee0]
call qword [sym.mozglue.dll__malloc_message]
mov rax, qword [0x180034670]
mov r8d, dword [0x180034dec]
sub rbx, 1
jne 0x180015756
inc esi
movzx ecx, byte [rsi + rbp]
test cl, cl
jne 0x1800156fc
mov r15d, dword [rsp + 0x1d8]
inc r15d
mov dword [rsp + 0x1d8], r15d
cmp r15d, 3
jb 0x18001566e
lea rcx, [0x180034c98]
mov qword [0x180034c88], r13
call fcn.180015b60
lea rcx, [0x180034ca0]
call fcn.18000f680
lea rcx, [0x180034ce0]
call fcn.1800135d0
lea rcx, [0x180034d20]
call fcn.180015b60
lea rcx, [0x180034d30]
call fcn.1800135d0
lea rcx, [0x180034db0]
mov qword [0x180034d28], r13
mov qword [0x180034d70], r13
mov qword [0x180034d78], r13
mov qword [0x180034d80], r13
mov qword [0x180034db8], r13
mov qword [0x180034dc0], r13
mov qword [0x180034da8], r13
call fcn.180015b60
mov edx, dword [0x180034c80]
mov r12, qword [rsp + 0x1a8]
mov ecx, dword [0x180034dec]
cmp edx, 1
jbe 0x180015913
add ecx, 2
mov dword [0x180034dec], ecx
mov dword [0x180034c84], edx
test ecx, ecx
jle 0x180015960
mov eax, edx
shl eax, cl
cmp eax, edx
jbe 0x18001592d
mov dword [0x180034c84], eax
mov edx, eax
mov eax, edx
shl rax, 3
cmp rax, 0x100000
jbe 0x180015987
mov edx, 0x20000
mov dword [0x180034c84], edx
jmp 0x180015987
inc r15d
mov byte [rsp + 0x80], r13b
mov dword [rsp + 0x1d8], r15d
jmp 0x18001566e
jns 0x180015987
neg ecx
mov eax, edx
shr eax, cl
cmp eax, edx
jae 0x180015974
mov dword [0x180034c84], eax
mov edx, eax
test edx, edx
jne 0x180015987
mov dword [0x180034c84], 1
mov edx, 1
mov ecx, edx
shl rcx, 3
mov dword [0x180034dd0], r13d
call fcn.180012a70
mov qword [0x180034dc8], rax
test rax, rax
je 0x180015a96
mov r8d, dword [0x180034c84]
xor edx, edx
shl r8, 3
mov rcx, rax
call sub.VCRUNTIME140.dll_memset
xor ecx, ecx
call fcn.1800129d0
mov rax, qword [0x180034dc8]
mov rdx, qword [rax]
test rdx, rdx
je 0x180015a96
mov ecx, dword [0x180034668]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
lea rcx, [0x180034dd8]
call fcn.180015b60
xor edx, edx
mov esi, 8
bsf eax, esi
lea ecx, [rsi - 7]
mov dword [rsp + 0x1d8], eax
mov ebp, eax
mov eax, 0x2c
div ebp
test edx, edx
mov r14d, edx
lea edi, [rax + 1]
cmove edi, eax
lea eax, [rdi - 1]
lea rdx, [rax*4 + 0x18]
mov r15d, eax
call fcn.180012b30
mov rbx, rax
test rax, rax
je 0x180015a8f
mov rcx, rax
call fcn.180015b60
mov eax, edi
mov dword [rbx + 0x10], edi
imul eax, ebp
cmp eax, 0x2c
cmovbe r14d, ebp
mov dword [rbx + 0x14], r14d
cmp edi, 1
jbe 0x180015a5e
lea rdi, [rbx + 0x18]
mov eax, ebp
mov ecx, r15d
rep stosd dword [rdi], eax
mov ecx, dword [rbx + 0x14]
shl rsi, cl
mov ecx, 1
mov rdx, rsi
call fcn.180012b30
mov qword [rbx + 8], rax
test rax, rax
je 0x180015a8f
mov qword [0x180034c90], rbx
xor eax, eax
mov dword [0x180034de0], 1
jmp 0x180015a9b
mov qword [0x180034c90], r13
mov eax, 1
mov r14, qword [rsp + 0x198]
mov r13, qword [rsp + 0x1a0]
mov rdi, qword [rsp + 0x1b0]
mov rsi, qword [rsp + 0x1b8]
mov rbp, qword [rsp + 0x1c0]
mov rbx, qword [rsp + 0x1e0]
mov r15, qword [rsp + 0x190]
add rsp, 0x1c8
ret