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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xb5c
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov eax, 1
mov dword [esp + 0x10], ecx
mov ecx, edi
and ecx, 0x3f
mov dword [esp + 0x18], edx
shl eax, cl
and eax, 0xfffffffe
mov dword [esp + 0xc], eax
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 0x1000a301
mov ecx, 0x950
call fcn.10033a20
mov ebx, eax
test ebx, ebx
je 0x1000ab1f
xorps xmm0, xmm0
mov byte [ebx], 0
xor eax, eax
movlpd qword [esp + 0xa8], xmm0
movlpd qword [esp + 0xb0], xmm0
movlpd qword [esp + 0xb8], xmm0
movlpd qword [esp + 0xc0], xmm0
movlpd qword [esp + 0xc8], xmm0
movlpd qword [esp + 0xd0], xmm0
movlpd qword [esp + 0xd8], xmm0
movlpd qword [esp + 0xe0], xmm0
movlpd qword [esp + 0xe8], xmm0
movlpd qword [esp + 0xf0], xmm0
movlpd qword [esp + 0xf8], xmm0
movlpd qword [esp + 0x100], xmm0
movlpd qword [esp + 0x110], xmm0
movlpd qword [esp + 0x118], xmm0
movlpd qword [esp + 0x120], xmm0
movaps xmm0, xmmword [0x1004e200]
push 0x8c
push eax
mov word [esp + 0x165], ax
mov byte [esp + 0x167], al
mov dword [esp + 0x168], eax
mov dword [esp + 0x16c], eax
mov byte [esp + 0x170], al
mov dword [esp + 0x188], eax
mov dword [esp + 0x18c], eax
mov dword [esp + 0x190], eax
mov dword [esp + 0x194], eax
lea eax, [esp + 0x198]
movups xmmword [esp + 0x130], xmm0
mov word [esp + 0xa8], 0
xorps xmm0, xmm0
mov byte [esp + 0xaa], 0
push eax
mov dword [esp + 0x114], 0
mov word [esp + 0x144], 0xffff
movups xmmword [esp + 0x146], xmm0
mov word [esp + 0x166], 0
movups xmmword [esp + 0x156], xmm0
mov byte [esp + 0x168], 0
movlpd qword [esp + 0x17c], xmm0
movlpd qword [esp + 0x184], xmm0
call fcn.10036180
add esp, 0xc
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
mov dword [esp + 0x238], 0
mov dword [esp + 0x23c], 1
mov dword [esp + 0x240], 0
mov dword [esp + 0x244], 1
mov dword [esp + 0x248], 0
mov dword [esp + 0x24c], 1
mov dword [esp + 0x250], 0
mov dword [esp + 0x254], 1
mov dword [esp + 0x258], 0
mov dword [esp + 0x25c], 1
mov dword [esp + 0x260], 0
mov dword [esp + 0x264], 1
mov dword [esp + 0x268], 0
mov dword [esp + 0x26c], 1
mov dword [esp + 0x270], 0
mov dword [esp + 0x274], 1
mov dword [esp + 0x278], 0
mov dword [esp + 0x27c], 1
mov dword [esp + 0x280], 0
mov dword [esp + 0x284], 1
mov dword [esp + 0x288], 0
mov dword [esp + 0x28c], 1
mov dword [esp + 0x290], 0
mov dword [esp + 0x294], 1
mov dword [esp + 0x298], 0
mov dword [esp + 0x29c], 1
mov dword [esp + 0x2a0], 0
mov dword [esp + 0x2a4], 1
xor eax, eax
mov dword [esp + 0x2a8], 0
push 0x6d8
xorps xmm0, xmm0
mov word [esp + 0x2e1], ax
push eax
mov byte [esp + 0x2e7], al
mov dword [esp + 0x308], eax
lea eax, [esp + 0x310]
push eax
mov dword [esp + 0x2b8], 1
mov dword [esp + 0x2bc], 0
mov dword [esp + 0x2c0], 1
mov dword [esp + 0x2c4], 0
mov dword [esp + 0x2c8], 1
mov dword [esp + 0x2cc], 0
mov dword [esp + 0x2d0], 1
mov dword [esp + 0x2d4], 0
mov dword [esp + 0x2d8], 1
mov dword [esp + 0x2dc], 0
mov dword [esp + 0x2e0], 1
mov dword [esp + 0x2e4], 0
mov byte [esp + 0x2e8], 6
movlpd qword [esp + 0x2ec], xmm0
movlpd qword [esp + 0x2f4], xmm0
movlpd qword [esp + 0x2fc], xmm0
movlpd qword [esp + 0x304], xmm0
call fcn.10036180
add esp, 0xc
mov dword [esp + 0x9e0], 0
lea edi, [ebx + 8]
mov byte [esp + 0x9e4], 0
mov ecx, 0x252
lea esi, [esp + 0xa0]
rep movsd dword es:[edi], dword [esi]
push ebx
push dword [0x10056a08]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x1000ab2e
mov edi, dword [ebp + 8]
add ebx, 8
mov dword [esp + 0x20], ebx
cmp byte [ebx + 0x23c], 0
je 0x1000a320
xor dl, dl
mov ecx, ebx
call fcn.10032cd0
mov ebx, eax
mov dword [esp + 0x20], eax
mov eax, edi
shr eax, 6
and al, 1
mov byte [esp + 0x28], al
test edi, 0xfff00000
je 0x1000a375
mov esi, edi
shr esi, 0x14
dec esi
cmp esi, 0xffffffff
je 0x1000a375
push 1
mov edx, esi
mov ecx, ebx
call fcn.100014b0
mov ecx, eax
add esp, 4
mov dword [esp + 0x30], ecx
test ecx, ecx
jne 0x1000a37d
cmp esi, dword [0x100582b8]
jb 0x1000a37d
cmp byte [ebp + 0xc], 0
je 0x1000a36c
push 0xc
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [esp + 0x30], 0
mov eax, edi
and eax, 0xfff00
je 0x1000a3e5
cmp eax, 0x100
je 0x1000a3ca
mov ecx, edi
shr ecx, 8
and ecx, 0xfff
sub ecx, 2
cmp ecx, 0xfffffffe
je 0x1000a3e5
cmp ecx, 0xffffffff
je 0x1000a3ca
mov eax, dword [0x10056a14]
mov edi, dword [eax + ecx*4]
lea esi, [eax + ecx*4]
test edi, edi
je 0x1000ab3d
cmp edi, 1
jne 0x1000a3cc
mov ecx, ebx
call fcn.10031c90
mov edi, eax
mov dword [esi], edi
jmp 0x1000a3cc
xor edi, edi
test ebx, ebx
jne 0x1000a3f4
lea ecx, [esp + 0x9e8]
call fcn.1002afe0
lea eax, [esp + 0x9e8]
jmp 0x1000a3fa
cmp byte [ebx], 0
jne 0x1000a3ee
xor edi, edi
jmp 0x1000a3f4
lea edi, [ebx + 0x260]
lea eax, [ebx + 0x17c]
push dword [esp + 0x10]
mov edx, 0x10057260
mov dword [esp + 0x18], edi
push eax
lea eax, [esp + 0x88]
mov ecx, ebx
push eax
call fcn.100012a0
mov esi, dword [esp + 0x24]
add esp, 0xc
movq xmm0, qword [eax]
movq qword [esp + 0x74], xmm0
mov eax, dword [esp + 0x74]
mov eax, dword [eax*4 + 0x10055e80]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0xc]
test eax, eax
jne 0x1000a4a5
cmp esi, 0x1000
ja 0x1000a464
lea eax, [esi + 7]
shr eax, 3
movzx eax, byte [eax + 0x10056040]
mov eax, dword [eax*4 + 0x10055e80]
mov dword [esp + 0x1c], eax
jmp 0x1000a5b3
cmp esi, 0x70000000
ja 0x1000a5ab
lea ecx, [esi*2 - 1]
call fcn.10001000
mov ecx, 4
cmp eax, 7
jb 0x1000a489
lea ecx, [eax - 3]
mov edi, dword [esp + 0x14]
mov eax, 1
shl eax, cl
dec eax
lea ecx, [eax + esi]
not eax
and ecx, eax
mov dword [esp + 0x1c], ecx
jmp 0x1000a5b3
cmp esi, 0x3800
ja 0x1000a52b
cmp eax, 0x1000
ja 0x1000a52b
lea ecx, [esi - 1]
add ecx, eax
neg eax
and ecx, eax
mov dword [esp + 0x2c], ecx
cmp ecx, 0x1000
ja 0x1000a4df
lea eax, [ecx + 7]
shr eax, 3
movzx eax, byte [eax + 0x10056040]
mov ecx, dword [eax*4 + 0x10055e80]
jmp 0x1000a51a
cmp ecx, 0x70000000
jbe 0x1000a4eb
xor ecx, ecx
jmp 0x1000a51a
lea ecx, [ecx*2 - 1]
call fcn.10001000
mov ecx, 4
cmp eax, 7
jb 0x1000a504
lea ecx, [eax - 3]
mov edi, dword [esp + 0x14]
mov eax, 1
shl eax, cl
mov ecx, dword [esp + 0x2c]
dec ecx
add ecx, eax
neg eax
and ecx, eax
mov dword [esp + 0x1c], ecx
cmp ecx, 0x4000
jae 0x1000a540
jmp 0x1000a5b3
cmp eax, 0x70000000
ja 0x1000a5ab
mov eax, dword [esp + 0x14]
mov edi, eax
cmp esi, 0x4000
ja 0x1000a547
mov ecx, 0x4000
jmp 0x1000a581
cmp esi, 0x70000000
ja 0x1000a5a9
lea ecx, [esi*2 - 1]
call fcn.10001000
mov ecx, 4
cmp eax, 7
jb 0x1000a568
lea ecx, [eax - 3]
mov eax, 1
shl eax, cl
dec eax
lea ecx, [esi + eax]
not eax
and ecx, eax
mov eax, dword [esp + 0x14]
mov edi, eax
cmp ecx, esi
jb 0x1000a5a9
mov eax, dword [esp + 0xc]
xor edx, edx
add eax, 0xfff
and eax, 0xfffff000
add eax, 0xfffff000
add eax, dword [0x10056a18]
add eax, ecx
cmp eax, ecx
cmovb ecx, edx
mov dword [esp + 0x1c], ecx
jmp 0x1000a5b3
mov edi, eax
mov dword [esp + 0x1c], 0
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x34], edi
test eax, eax
je 0x1000a35e
cmp eax, 0x70000000
ja 0x1000a35e
mov cl, byte [ebp + 0xc]
cmp eax, 0x3800
mov byte [esp + 0x38], cl
mov ecx, dword [esp + 0x10]
setbe byte [esp + 0x2c]
mov dword [esp + 0x3c], ecx
mov ecx, dword [ebp + 8]
mov dword [esp + 0x40], esi
mov dword [esp + 0x44], ecx
mov dword [esp + 0x48], 0
test ebx, ebx
jne 0x1000a60c
lea eax, [ebx + 0x940]
xor ecx, ecx
mov dword [esp + 0x18], eax
jmp 0x1000a616
lea ecx, [ebx + 0x940]
mov dword [esp + 0x18], ecx
push 0
mov edx, 0xe
call fcn.100010c0
mov ecx, dword [esp + 0x10]
add esp, 4
test ecx, ecx
je 0x1000aa1d
lea eax, [ecx - 1]
test dword [esp + 0x10], eax
je 0x1000aa1d
mov ecx, dword [esp + 0x18]
xor eax, eax
test ebx, ebx
push eax
cmove ecx, eax
lea edx, [eax + 0xe]
call fcn.100010c0
mov eax, dword [esp + 0x10]
add esp, 4
cmp esi, 0x3800
ja 0x1000a6df
cmp eax, 0x1000
ja 0x1000a6df
lea ecx, [eax - 1]
neg eax
add ecx, esi
and ecx, eax
mov dword [esp + 0x14], ecx
cmp ecx, 0x1000
ja 0x1000a693
lea eax, [ecx + 7]
shr eax, 3
movzx eax, byte [eax + 0x10056040]
mov ecx, dword [eax*4 + 0x10055e80]
jmp 0x1000a6ce
cmp ecx, 0x70000000
jbe 0x1000a69f
xor ecx, ecx
jmp 0x1000a6ce
lea ecx, [ecx*2 - 1]
call fcn.10001000
mov ecx, 4
cmp eax, 7
jb 0x1000a6b8
lea ecx, [eax - 3]
mov edi, dword [esp + 0x34]
mov edx, 1
shl edx, cl
mov ecx, dword [esp + 0x14]
dec ecx
add ecx, edx
neg edx
and ecx, edx
mov dword [esp + 0x14], ecx
cmp ecx, 0x4000
jae 0x1000a6f8
jmp 0x1000a761
cmp eax, 0x70000000
ja 0x1000a7ab
mov eax, dword [esp + 0x34]
mov edi, eax
cmp esi, 0x4000
ja 0x1000a703
mov ecx, 0x4000
mov dword [esp + 0x14], ecx
jmp 0x1000a742
mov edi, eax
cmp esi, 0x70000000
ja 0x1000a7ab
lea ecx, [esi*2 - 1]
call fcn.10001000
mov ecx, 4
cmp eax, 7
jb 0x1000a72a
lea ecx, [eax - 3]
mov eax, 1
shl eax, cl
lea ecx, [eax - 1]
neg eax
add ecx, esi
and ecx, eax
mov dword [esp + 0x14], ecx
cmp ecx, esi
jb 0x1000a7ab
mov eax, dword [esp + 0xc]
add eax, 0xfff
and eax, 0xfffff000
add eax, 0xfffff000
add eax, dword [0x10056a18]
add eax, ecx
cmp eax, ecx
jb 0x1000a7ab
test ecx, ecx
je 0x1000a7ab
cmp ecx, 0x70000000
ja 0x1000a7ab
mov ecx, dword [esp + 0x18]
xor eax, eax
test ebx, ebx
push eax
cmove ecx, eax
lea edx, [eax + 0xe]
call fcn.100010c0
mov edx, dword [esp + 0x34]
add esp, 4
mov ecx, ebx
push edi
push dword [esp + 0x30]
push dword [esp + 0x30]
push dword [esp + 0x18]
push dword [esp + 0x24]
call fcn.100113f0
add esp, 0x14
mov dword [esp + 0xc], eax
test eax, eax
jne 0x1000a7b2
xor esi, esi
jmp 0x1000aa45
mov eax, dword [esp + 0x24]
cmp esi, eax
cmovb eax, esi
mov esi, dword [esp + 0xc]
push eax
push dword [esp + 0x14]
push esi
call fcn.10036c90
xor ecx, ecx
lea eax, [esp + 0x48]
add esp, 0xc
mov edx, esi
cmp byte [esp + 0x38], cl
sete cl
push eax
push esi
add ecx, 8
call fcn.100248b0
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x44]
xor ecx, ecx
cmp byte [esp + 0x40], cl
push eax
sete cl
add ecx, 3
call fcn.10024930
mov eax, dword [esp + 0x24]
xor ecx, ecx
add esp, 0xc
test ebx, ebx
cmove eax, ecx
lea edx, [ecx + 0xe]
push ecx
mov ecx, eax
call fcn.100010c0
add esp, 4
test edi, edi
jne 0x1000a837
push dword [esp + 0x24]
mov edx, dword [esp + 0x14]
mov ecx, ebx
call fcn.100016d0
add esp, 4
jmp 0x1000aa49
mov eax, dword [esp + 0x24]
cmp eax, 0x1000
ja 0x1000a855
add eax, 7
shr eax, 3
movzx esi, byte [eax + 0x10056040]
mov dword [esp + 0x18], esi
jmp 0x1000a862
mov ecx, eax
call fcn.10001010
mov esi, eax
mov dword [esp + 0x18], eax
cmp esi, 0x24
jae 0x1000a905
lea ecx, [esi*2 + 1]
add ecx, esi
mov ax, word [edi + ecx*8]
lea ecx, [edi + ecx*8]
mov dword [esp + 0x28], ecx
cmp ax, word [ecx + 0x12]
je 0x1000a8ab
mov eax, dword [ecx]
mov edx, dword [esp + 0x10]
sub eax, 4
mov dword [ecx], eax
mov dword [eax], edx
movzx eax, word [ecx]
mov dx, word [ecx + 0x12]
push eax
call fcn.100010c0
mov esi, dword [esp + 0x10]
add esp, 4
jmp 0x1000aa49
mov esi, dword [edi]
call fcn.100010a0
mov ecx, esi
mov bl, al
call fcn.10001610
test bl, bl
je 0x1000a8d7
mov ebx, dword [esp + 0x20]
mov ecx, ebx
mov edx, dword [esp + 0x10]
call fcn.10011700
mov esi, dword [esp + 0xc]
jmp 0x1000aa49
mov esi, dword [esp + 0x28]
mov ecx, esi
call fcn.100010b0
mov cl, byte [0x10050988]
mov edx, edi
mov ebx, dword [esp + 0x20]
movzx eax, ax
shr eax, cl
mov ecx, ebx
push eax
push dword [esp + 0x1c]
push esi
call fcn.10030e60
jmp 0x1000a99e
mov ecx, dword [edi]
call fcn.10001610
cmp esi, eax
jae 0x1000a9d3
mov eax, dword [esp + 0x18]
mov esi, dword [edi]
lea ecx, [eax*2 + 1]
add ecx, eax
lea ecx, [edi + ecx*8]
mov dword [esp + 0x28], ecx
call fcn.100010a0
mov ecx, esi
mov bl, al
call fcn.10001610
test bl, bl
jne 0x1000a9cf
mov esi, dword [esp + 0x28]
mov ax, word [esi]
cmp ax, word [esi + 0x12]
je 0x1000a979
mov eax, dword [esi]
mov ecx, dword [esp + 0x10]
sub eax, 4
mov dword [esi], eax
mov dword [eax], ecx
mov ecx, esi
movzx eax, word [esi]
mov dx, word [esi + 0x12]
push eax
call fcn.100010c0
mov ebx, dword [esp + 0x24]
add esp, 4
mov esi, dword [esp + 0xc]
jmp 0x1000aa49
mov ecx, esi
call fcn.100010b0
mov cl, byte [0x10050984]
mov edx, edi
mov ebx, dword [esp + 0x20]
movzx eax, ax
shr eax, cl
mov ecx, ebx
push eax
push dword [esp + 0x1c]
push esi
call fcn.10031160
mov ax, word [esi]
add esp, 0xc
cmp ax, word [esi + 0x12]
je 0x1000a9c9
mov eax, dword [esi]
mov ecx, dword [esp + 0x10]
sub eax, 4
mov dword [esi], eax
mov dword [eax], ecx
mov ecx, esi
movzx eax, word [esi]
mov dx, word [esi + 0x12]
push eax
call fcn.100010c0
add esp, 4
mov esi, dword [esp + 0xc]
jmp 0x1000aa49
mov ebx, dword [esp + 0x20]
test ebx, ebx
jne 0x1000a9ec
lea ecx, [esp + 0xaa8]
call fcn.1002afe0
lea eax, [esp + 0xaa8]
jmp 0x1000a9f2
lea eax, [ebx + 0x17c]
push dword [esp + 0x10]
mov edx, 0x10057260
mov ecx, ebx
push eax
lea eax, [esp + 0x98]
push eax
call fcn.10001100
add esp, 0xc
mov ecx, ebx
mov edx, dword [eax]
call fcn.10027a90
mov esi, dword [esp + 0xc]
jmp 0x1000aa49
mov edx, dword [esp + 0x30]
lea eax, [esp + 0x38]
push eax
push edi
push dword [esp + 0x34]
push dword [esp + 0x34]
push ecx
push esi
push dword [esp + 0x3c]
mov ecx, ebx
push dword [esp + 0x2c]
call fcn.10011ef0
add esp, 0x20
mov esi, eax
mov dword [esp + 0xc], esi
test esi, esi
je 0x1000a35e
mov ecx, dword [esp + 0x1c]
lea eax, [ebx + 8]
mov dword [esp + 0x54], eax
lea edi, [ebx + 0x240]
lea eax, [ebx + 0x10]
mov byte [esp + 0x4c], 1
mov dword [esp + 0x58], eax
lea eax, [ebx + 0x248]
mov dword [esp + 0x5c], eax
xor eax, eax
mov dword [esp + 0x50], edi
mov edx, dword [edi]
add ecx, edx
mov esi, dword [edi + 4]
adc eax, esi
mov dword [edi], ecx
mov dword [edi + 4], eax
mov eax, dword [esp + 0x58]
mov ecx, dword [eax]
mov eax, dword [eax + 4]
sub ecx, edx
sbb eax, esi
xor edx, edx
cmp edx, eax
jb 0x1000aab2
ja 0x1000aaa7
cmp dword [esp + 0x1c], ecx
jb 0x1000aab2
lea edx, [esp + 0x4c]
mov ecx, ebx
call fcn.10032540
lea eax, [ebx + 0x18]
mov byte [esp + 0x60], 0
mov dword [esp + 0x68], eax
lea edi, [ebx + 0x250]
lea eax, [ebx + 0x20]
mov dword [esp + 0x64], edi
mov dword [esp + 0x6c], eax
lea eax, [ebx + 0x258]
mov dword [esp + 0x70], eax
mov edx, dword [edi]
mov ecx, edx
add ecx, dword [esp + 0x24]
mov esi, dword [edi + 4]
mov eax, esi
adc eax, 0
mov dword [edi], ecx
mov dword [edi + 4], eax
mov eax, dword [esp + 0x6c]
mov ecx, dword [eax]
mov eax, dword [eax + 4]
sub ecx, edx
sbb eax, esi
xor edx, edx
cmp edx, eax
jb 0x1000ab14
ja 0x1000ab09
cmp dword [esp + 0x24], ecx
jb 0x1000ab14
lea edx, [esp + 0x60]
mov ecx, ebx
call fcn.10032540
mov eax, dword [esp + 0xc]
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
push ecx
push str._jemalloc_:_invalid_tcache_id___u_._n
call fcn.10028f60
add esp, 8
call fcn.10038150
int3