Contrat/pancake

Does anyone know how the smart contract pulls the pancakeswap purchase BNBs to the distribution portfolios at the time of purchase or sale?