ecrecover

See: https://docs.soliditylang.org/en/v0.8.6/units-and-global-variables.html#mathematical-and-cryptographic-functions

Given a signature, you can derive r, s, v values:

r = sig.signature.slice(0, 32)
s = sig.signature.slice(32, 64)
v = sig.recovery + 27

This is passed to ecrecover, along with a message. It returns the address it was sent from.