Function at 0x1001ff30
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x95c
push ebx
push esi
push edi
mov edi, edx
mov ebx, ecx
mov dword [esp + 0x1c], edi
mov esi, dword [edi + 4]
mov dword [esp + 0x18], esi
nop
nop
cmp esi, 0x1004c768
jne 0x1001ff79
mov al, byte [0x10051dd3]
test al, al
jne 0x100207b6
mov ecx, dword [ebp + 8]
call fcn.1002a610
mov al, byte [0x10051dd3]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esi + 4], 0
jne 0x1001ff88
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test ebx, ebx
jne 0x10020353
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [0x10056a08]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
test edi, edi
jne 0x10020336
push 1
xor dl, dl
mov ecx, 0x980
call fcn.100017a0
mov esi, eax
add esp, 4
mov dword [esp + 0x14], esi
test esi, esi
je 0x100207bd
xorps xmm0, xmm0
mov byte [esi], bl
xor eax, eax
movlpd qword [esp + 0x28], xmm0
movlpd qword [esp + 0x30], xmm0
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 + 0x90], xmm0
movlpd qword [esp + 0x98], xmm0
movlpd qword [esp + 0xa0], xmm0
movaps xmm0, xmmword [0x1004e200]
push 0x8c
push eax
mov word [esp + 0xe5], ax
mov byte [esp + 0xe7], al
mov dword [esp + 0xe8], eax
mov dword [esp + 0xec], eax
mov byte [esp + 0xf0], al
mov dword [esp + 0x108], eax
mov dword [esp + 0x10c], eax
mov dword [esp + 0x110], eax
mov dword [esp + 0x114], eax
lea eax, [esp + 0x118]
movups xmmword [esp + 0xb0], xmm0
mov word [esp + 0x28], di
xorps xmm0, xmm0
mov byte [esp + 0x2a], bl
push eax
mov dword [esp + 0x94], edi
mov word [esp + 0xc4], 0xffff
movups xmmword [esp + 0xc6], xmm0
mov word [esp + 0xe6], di
movups xmmword [esp + 0xd6], xmm0
mov byte [esp + 0xe8], bl
movlpd qword [esp + 0xfc], xmm0
movlpd qword [esp + 0x104], xmm0
call fcn.10036180
add esp, 0xc
mov dword [esp + 0x19c], 1
mov dword [esp + 0x1a0], edi
mov dword [esp + 0x1a4], 1
mov dword [esp + 0x1a8], edi
mov dword [esp + 0x1ac], 1
mov dword [esp + 0x1b0], edi
mov dword [esp + 0x1b4], 1
mov dword [esp + 0x1b8], edi
mov dword [esp + 0x1bc], 1
mov dword [esp + 0x1c0], edi
mov dword [esp + 0x1c4], 1
mov dword [esp + 0x1c8], edi
mov dword [esp + 0x1cc], 1
mov dword [esp + 0x1d0], edi
mov dword [esp + 0x1d4], 1
mov dword [esp + 0x1d8], edi
mov dword [esp + 0x1dc], 1
mov dword [esp + 0x1e0], edi
mov dword [esp + 0x1e4], 1
mov dword [esp + 0x1e8], edi
mov dword [esp + 0x1ec], 1
mov dword [esp + 0x1f0], edi
mov dword [esp + 0x1f4], 1
mov dword [esp + 0x1f8], edi
mov dword [esp + 0x1fc], 1
mov dword [esp + 0x200], edi
mov dword [esp + 0x204], 1
mov dword [esp + 0x208], edi
mov dword [esp + 0x20c], 1
mov dword [esp + 0x210], edi
mov dword [esp + 0x214], 1
mov dword [esp + 0x218], edi
mov dword [esp + 0x21c], 1
mov dword [esp + 0x220], edi
mov dword [esp + 0x224], 1
xor eax, eax
mov dword [esp + 0x228], edi
push 0x6d8
xorps xmm0, xmm0
mov word [esp + 0x261], ax
push eax
mov byte [esp + 0x267], al
mov dword [esp + 0x288], eax
lea eax, [esp + 0x290]
push eax
mov dword [esp + 0x238], 1
mov dword [esp + 0x23c], edi
mov dword [esp + 0x240], 1
mov dword [esp + 0x244], edi
mov dword [esp + 0x248], 1
mov dword [esp + 0x24c], edi
mov dword [esp + 0x250], 1
mov dword [esp + 0x254], edi
mov dword [esp + 0x258], 1
mov dword [esp + 0x25c], edi
mov dword [esp + 0x260], 1
mov dword [esp + 0x264], edi
mov byte [esp + 0x268], 6
movlpd qword [esp + 0x26c], xmm0
movlpd qword [esp + 0x274], xmm0
movlpd qword [esp + 0x27c], xmm0
movlpd qword [esp + 0x284], xmm0
call fcn.10036180
mov dword [esp + 0x96c], edi
add esp, 0xc
lea edi, [esi + 8]
mov byte [esp + 0x964], bl
mov ecx, 0x252
lea esi, [esp + 0x20]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x14]
push edi
push dword [0x10056a08]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x100207cc
cmp byte [edi + 0x244], 0
lea ecx, [edi + 8]
je 0x1002034b
xor dl, dl
call fcn.10032cd0
mov ecx, eax
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x1c]
inc byte [ecx + 1]
cmp byte [ecx + 0x23c], 0
jne 0x10020364
call fcn.10032ab0
push dword [edi]
mov eax, dword [esi + 4]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push esi
call eax
add esp, 0x14
mov byte [esp + 0x13], al
test ebx, ebx
jne 0x100207a5
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 0x1002078e
push 1
xor dl, dl
mov ecx, 0x980
call fcn.100017a0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x100207bd
xorps xmm0, xmm0
mov byte [ebx], 0
xor eax, eax
movlpd qword [esp + 0x28], xmm0
movlpd qword [esp + 0x30], xmm0
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 + 0x90], xmm0
movlpd qword [esp + 0x98], xmm0
movlpd qword [esp + 0xa0], xmm0
movaps xmm0, xmmword [0x1004e200]
push 0x8c
push eax
mov word [esp + 0xe5], ax
mov byte [esp + 0xe7], al
mov dword [esp + 0xe8], eax
mov dword [esp + 0xec], eax
mov byte [esp + 0xf0], al
mov dword [esp + 0x108], eax
mov dword [esp + 0x10c], eax
mov dword [esp + 0x110], eax
mov dword [esp + 0x114], eax
lea eax, [esp + 0x118]
movups xmmword [esp + 0xb0], xmm0
mov word [esp + 0x28], 0
xorps xmm0, xmm0
mov byte [esp + 0x2a], 0
push eax
mov dword [esp + 0x94], 0
mov word [esp + 0xc4], 0xffff
movups xmmword [esp + 0xc6], xmm0
mov word [esp + 0xe6], 0
movups xmmword [esp + 0xd6], xmm0
mov byte [esp + 0xe8], 0
movlpd qword [esp + 0xfc], xmm0
movlpd qword [esp + 0x104], xmm0
call fcn.10036180
add esp, 0xc
mov dword [esp + 0x19c], 1
mov dword [esp + 0x1a0], 0
mov dword [esp + 0x1a4], 1
mov dword [esp + 0x1a8], 0
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
xor eax, eax
mov dword [esp + 0x228], 0
push 0x6d8
xorps xmm0, xmm0
mov word [esp + 0x261], ax
push eax
mov byte [esp + 0x267], al
mov dword [esp + 0x288], eax
lea eax, [esp + 0x290]
push eax
mov dword [esp + 0x238], 1
mov dword [esp + 0x23c], 0
mov dword [esp + 0x240], 1
mov dword [esp + 0x244], 0
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 byte [esp + 0x268], 6
movlpd qword [esp + 0x26c], xmm0
movlpd qword [esp + 0x274], xmm0
movlpd qword [esp + 0x27c], xmm0
movlpd qword [esp + 0x284], xmm0
call fcn.10036180
add esp, 0xc
mov dword [esp + 0x960], 0
lea edi, [ebx + 8]
mov byte [esp + 0x964], 0
mov ecx, 0x252
lea esi, [esp + 0x20]
rep movsd dword es:[edi], dword [esi]
push ebx
push dword [0x10056a08]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x100207cc
add ebx, 8
cmp byte [ebx + 0x23c], 0
je 0x100207a5
xor dl, dl
mov ecx, ebx
call fcn.10032cd0
mov ebx, eax
add byte [ebx + 1], 0xff
jne 0x100207b2
mov ecx, ebx
call fcn.10032ab0
mov al, byte [esp + 0x13]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
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
int3