Has acyl-CoA thioesterase activity towards medium and long- chain (C14 to C18) fatty acyl-CoA substrates, and probably plays a role in mitochondrial fatty acid metabolism. Plays a role in the apoptotic process, possibly via its regulation of AKT1 activity. According to PubMed:11598301, inhibits AKT1 phosphorylation and activity. According to PubMed:17615157, enhances AKT1 activity by favoring its phosphorylation and translocation to plasma membrane. {ECO:0000269|PubMed:11598301, ECO:0000269|PubMed:17615157, ECO:0000269|PubMed:19168129, ECO:0000269|PubMed:19421406, ECO:0000269|PubMed:19453107, ECO:0000269|PubMed:22871024}. This is the function of THEM4 (thioesterase superfamily member 4, ENSG00000159445).