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

Disassembly:
sub esp, 0x970
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
push esi
push edi
push 0x10056444
call ebx
test al, al
jne 0x1000531b
mov ecx, 0x10056400
call fcn.10028fc0
mov byte [0x10056440], 1
mov eax, dword [0x10050928]
test eax, eax
je 0x100058ea
cmp byte [0x100563ad], 0
je 0x1000533a
cmp eax, 1
je 0x100058ea
cmp eax, 2
je 0x10005366
call fcn.100048c0
test al, al
je 0x10005366
push 0x10056444
mov byte [0x10056440], 0
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov al, 1
pop edi
pop esi
pop ebx
add esp, 0x970
ret
mov edi, dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
push 0x10056444
mov byte [0x10056440], 0
call edi
call fcn.10033f50
mov esi, eax
test esi, esi
je 0x100058de
lea eax, [esp + 0xc]
mov dword [0x10050928], 1
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [esp + 0x20]
mov eax, 1
cmp ecx, 0xffffffff
cmove ecx, eax
cmp byte [0x10051dd2], 0
mov dword [0x100582b0], ecx
je 0x100053d5
push str._jemalloc_:_option_background_thread_currently_supports_pthread_only_n
call fcn.10028f60
add esp, 4
mov al, 1
pop edi
pop esi
pop ebx
add esp, 0x970
ret
push 0x10056444
call ebx
test al, al
jne 0x100053f1
mov ecx, 0x10056400
call fcn.10028fc0
mov byte [0x10056440], 1
inc byte [esi + 1]
cmp byte [esi + 0x23c], 0
jne 0x10005404
mov ecx, esi
call fcn.10032ab0
call fcn.10005110
test al, al
jne 0x100058c3
mov ecx, dword [0x10050930]
cmp ecx, 2
mov dword [0x10050928], 0
lea eax, [ecx + 3]
cmove eax, ecx
mov cl, byte [0x10051dcc]
neg cl
mov dword [0x10050930], eax
mov al, byte [0x10051dc3]
sbb cl, cl
and cl, 0x10
neg al
sbb al, al
and al, 8
or cl, al
mov al, byte [0x10051dce]
neg al
sbb al, al
and al, 4
or cl, al
mov al, byte [0x10051dc2]
neg al
sbb al, al
and al, 2
or cl, al
cmp byte [0x10051dcd], 0
setne al
or cl, al
or byte [0x100563ae], cl
setne byte [0x10050904]
add byte [esi + 1], 0xff
jne 0x10005489
mov ecx, esi
call fcn.10032ab0
push 0x10056444
mov byte [0x10056440], 0
call edi
call fcn.10034460
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [0x10056a08]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push esi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
test ebx, ebx
jne 0x100058a5
mov ecx, 0x950
call fcn.10033a20
mov ebx, eax
test ebx, ebx
je 0x10005908
xorps xmm0, xmm0
mov byte [ebx], 0
xor eax, eax
movlpd qword [esp + 0x38], xmm0
movlpd qword [esp + 0x40], xmm0
movlpd qword [esp + 0x48], xmm0
movlpd qword [esp + 0x50], xmm0
movlpd qword [esp + 0x58], xmm0
movlpd qword [esp + 0x60], xmm0
movlpd qword [esp + 0x68], xmm0
movlpd qword [esp + 0x70], xmm0
movlpd qword [esp + 0x78], xmm0
movlpd qword [esp + 0x80], xmm0
movlpd qword [esp + 0x88], xmm0
movlpd qword [esp + 0x90], xmm0
movlpd qword [esp + 0xa0], xmm0
movlpd qword [esp + 0xa8], xmm0
movlpd qword [esp + 0xb0], xmm0
movaps xmm0, xmmword [0x1004e200]
push 0x8c
push eax
mov word [esp + 0xf5], ax
mov byte [esp + 0xf7], al
mov dword [esp + 0xf8], eax
mov dword [esp + 0xfc], eax
mov byte [esp + 0x100], al
mov dword [esp + 0x118], eax
mov dword [esp + 0x11c], eax
mov dword [esp + 0x120], eax
mov dword [esp + 0x124], eax
lea eax, [esp + 0x128]
movups xmmword [esp + 0xc0], xmm0
mov word [esp + 0x38], 0
xorps xmm0, xmm0
mov byte [esp + 0x3a], 0
push eax
mov dword [esp + 0xa4], 0
mov word [esp + 0xd4], 0xffff
movups xmmword [esp + 0xd6], xmm0
mov word [esp + 0xf6], 0
movups xmmword [esp + 0xe6], xmm0
mov byte [esp + 0xf8], 0
movlpd qword [esp + 0x10c], xmm0
movlpd qword [esp + 0x114], xmm0
call fcn.10036180
add esp, 0xc
mov dword [esp + 0x1ac], 1
mov dword [esp + 0x1b0], 0
mov dword [esp + 0x1b4], 1
mov dword [esp + 0x1b8], 0
mov dword [esp + 0x1bc], 1
mov dword [esp + 0x1c0], 0
mov dword [esp + 0x1c4], 1
mov dword [esp + 0x1c8], 0
mov dword [esp + 0x1cc], 1
mov dword [esp + 0x1d0], 0
mov dword [esp + 0x1d4], 1
mov dword [esp + 0x1d8], 0
mov dword [esp + 0x1dc], 1
mov dword [esp + 0x1e0], 0
mov dword [esp + 0x1e4], 1
mov dword [esp + 0x1e8], 0
mov dword [esp + 0x1ec], 1
mov dword [esp + 0x1f0], 0
mov dword [esp + 0x1f4], 1
mov dword [esp + 0x1f8], 0
mov dword [esp + 0x1fc], 1
mov dword [esp + 0x200], 0
mov dword [esp + 0x204], 1
mov dword [esp + 0x208], 0
mov dword [esp + 0x20c], 1
mov dword [esp + 0x210], 0
mov dword [esp + 0x214], 1
mov dword [esp + 0x218], 0
mov dword [esp + 0x21c], 1
mov dword [esp + 0x220], 0
mov dword [esp + 0x224], 1
mov dword [esp + 0x228], 0
mov dword [esp + 0x22c], 1
mov dword [esp + 0x230], 0
mov dword [esp + 0x234], 1
xor eax, eax
mov dword [esp + 0x238], 0
push 0x6d8
xorps xmm0, xmm0
mov word [esp + 0x271], ax
push eax
mov byte [esp + 0x277], al
mov dword [esp + 0x298], eax
lea eax, [esp + 0x2a0]
push eax
mov dword [esp + 0x248], 1
mov dword [esp + 0x24c], 0
mov dword [esp + 0x250], 1
mov dword [esp + 0x254], 0
mov dword [esp + 0x258], 1
mov dword [esp + 0x25c], 0
mov dword [esp + 0x260], 1
mov dword [esp + 0x264], 0
mov dword [esp + 0x268], 1
mov dword [esp + 0x26c], 0
mov dword [esp + 0x270], 1
mov dword [esp + 0x274], 0
mov byte [esp + 0x278], 6
movlpd qword [esp + 0x27c], xmm0
movlpd qword [esp + 0x284], xmm0
movlpd qword [esp + 0x28c], xmm0
movlpd qword [esp + 0x294], xmm0
call fcn.10036180
add esp, 0xc
mov dword [esp + 0x970], 0
lea edi, [ebx + 8]
mov byte [esp + 0x974], 0
mov ecx, 0x252
lea esi, [esp + 0x30]
rep movsd dword es:[edi], dword [esi]
push ebx
push dword [0x10056a08]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x10005917
cmp byte [ebx + 0x244], 0
lea ecx, [ebx + 8]
je 0x100058b8
xor dl, dl
call fcn.10032cd0
cmp byte [0x10051dd2], 0
jne 0x10005926
jmp 0x100058fc
push 0x10056444
mov byte [0x10056440], 0
call edi
add byte [esi + 1], 0xff
jne 0x100058de
mov ecx, esi
call fcn.10032ab0
mov al, 1
pop edi
pop esi
pop ebx
add esp, 0x970
ret
push 0x10056444
mov byte [0x10056440], 0
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
pop edi
pop esi
xor al, al
pop ebx
add esp, 0x970
ret
mov ecx, str._jemalloc_:_Error_allocating_TSD_n
call fcn.10027c00
call fcn.10038150
mov ecx, str._jemalloc_:_Error_setting_TSD_n
call fcn.10027c00
call fcn.10038150
call fcn.10012a30
int3