Function at 0x10009650
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0x10
push esi
mov esi, dword [esp + 0x18]
push edi
xor edi, edi
mov dword [esp + 8], edi
cmp esi, edi
jne 0x1000967c
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
push eax
push ecx
push edi
call fcn.100094a0
add esp, 0xc
pop edi
pop esi
add esp, 0x10
ret
push ebx
mov ebx, dword [esp + 0x28]
push ebp
mov dword [esp + 0x18], 1
test ebx, ebx
js 0x10009699
mov edx, esi
call fcn.10008a40
test eax, eax
je 0x10009717
mov eax, dword [esi - 4]
test al, 3
mov edx, edi
sete dl
and eax, 0xfffffff8
mov dword [esp + 0x18], edi
lea edx, [edx*4 + 8]
sub eax, edx
mov ebp, eax
cmp ebp, edi
jne 0x1000971b
push str.nedmalloc:_nedprealloc___called_with_a_block_not_created_by_nedmalloc__n
call fcn.1000cf92
add eax, 0x40
push eax
call fcn.1000d147
add esp, 8
call fcn.1000cf2c
mov edi, dword [esp + 0x28]
cmp edi, 0x14
jae 0x100096e9
mov dword [esp + 0x28], 0x14
mov edi, dword [esp + 0x28]
lea eax, [esp + 0x10]
call fcn.10009420
mov esi, dword [esp + 0x10]
mov ecx, dword [esi + 0x454]
push ecx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
jle 0x10009736
mov eax, dword [esi + eax*4 + 0x50]
mov edx, dword [eax]
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], edx
jmp 0x10009757
xor ebp, ebp
jmp 0x100096b9
mov edi, dword [esp + 0x28]
cmp edi, ebp
ja 0x100096d8
sub eax, edi
cmp eax, 0x400
jae 0x100096d8
pop ebp
pop ebx
pop edi
mov eax, esi
pop esi
add esp, 0x10
ret
lea edi, [esp + 0x1c]
lea esi, [esp + 0x14]
lea ebx, [esp + 0x10]
call fcn.10009450
mov esi, dword [esp + 0x10]
mov ebx, dword [esp + 0x2c]
mov edi, dword [esp + 0x28]
mov eax, dword [esp + 0x14]
test ebx, 0xfffe
jne 0x10009828
test eax, eax
je 0x10009828
test edi, edi
je 0x10009828
cmp edi, 0x2000
ja 0x10009828
lea ecx, [esp + 0x28]
push ecx
mov edi, eax
call fcn.10008e10
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x10009820
mov esi, dword [esp + 0x28]
mov eax, ebp
cmp ebp, esi
jb 0x100097a4
mov eax, esi
mov edi, dword [esp + 0x24]
push eax
push edi
push ebx
call fcn.10010660
add esp, 0xc
test byte [esp + 0x2c], 1
je 0x100097cf
cmp esi, ebp
jbe 0x100097cf
sub esi, ebp
push esi
lea edx, [ebx + ebp]
push 0
push edx
call fcn.10012d20
add esp, 0xc
cmp dword [esp + 0x18], 0
jne 0x100097fb
lea eax, [ebp - 0x14]
cmp eax, 0x1ff4
ja 0x1000980f
push 0
mov esi, edi
mov edi, dword [esp + 0x18]
push ebp
call fcn.10008ee0
add esp, 8
pop ebp
mov eax, ebx
pop ebx
pop edi
pop esi
add esp, 0x10
ret
push edi
call dword [0x1001bec4]
add esp, 4
pop ebp
mov eax, ebx
pop ebx
pop edi
pop esi
add esp, 0x10
ret
mov eax, edi
call fcn.10008300
pop ebp
mov eax, ebx
pop ebx
pop edi
pop esi
add esp, 0x10
ret
mov ebx, dword [esp + 0x2c]
mov edi, dword [esp + 0x28]
cmp dword [esp + 0x18], 0
mov ecx, dword [esp + 0x1c]
mov esi, dword [esi + ecx*4 + 0x458]
mov eax, esi
je 0x100098d9
push ebx
push edi
call fcn.10007fd0
add esp, 8
test eax, eax
je 0x100098cb
mov ecx, dword [eax - 4]
test cl, 3
mov edx, 0
sete dl
and ecx, 0xfffffff8
lea edx, [edx*4 + 8]
sub ecx, edx
mov edx, dword [0x1001cdcc]
test edx, edx
je 0x10009877
cmp dword [esi + 0x10], edx
jae 0x10009880
mov edx, dword [esi + 0x10]
mov dword [0x1001cdcc], edx
mov edx, dword [0x1001d26c]
test edx, edx
je 0x1000988e
cmp ecx, edx
jbe 0x100098a1
mov edx, dword [0x1001d2c0]
add ecx, edx
dec edx
not edx
and ecx, edx
mov dword [0x1001d26c], ecx
mov esi, eax
cmp ebp, edi
jb 0x100098a9
mov ebp, edi
mov edi, dword [esp + 0x24]
push ebp
push edi
push eax
call fcn.10010660
push edi
call dword [0x1001bec4]
add esp, 0x10
mov ebx, esi
pop ebp
mov eax, ebx
pop ebx
pop edi
pop esi
add esp, 0x10
ret
xor esi, esi
mov ebx, esi
pop ebp
mov eax, ebx
pop ebx
pop edi
pop esi
add esp, 0x10
ret
mov ecx, dword [esp + 0x24]
push edi
call fcn.10008990
add esp, 4
test eax, eax
je 0x10009947
mov ecx, dword [eax - 4]
test cl, 3
mov edx, 0
sete dl
and ecx, 0xfffffff8
lea edx, [edx*4 + 8]
sub ecx, edx
mov edx, dword [0x1001cdcc]
test edx, edx
je 0x10009913
cmp dword [esi + 0x10], edx
jae 0x1000991c
mov edx, dword [esi + 0x10]
mov dword [0x1001cdcc], edx
mov edx, dword [0x1001d26c]
test edx, edx
je 0x1000992a
cmp ecx, edx
jbe 0x1000993d
mov edx, dword [0x1001d2c0]
add ecx, edx
dec edx
not edx
and ecx, edx
mov dword [0x1001d26c], ecx
pop ebp
mov ebx, eax
pop ebx
pop edi
pop esi
add esp, 0x10
ret
xor ebx, ebx
pop ebp
mov eax, ebx
pop ebx
pop edi
pop esi
add esp, 0x10
ret