What is withdrawal logic ? It takes money from random addressess if only total amount allows to do its operation?
bitcoind uses stochastic approximation to select a subset of unspent outputs to spend.
(actual code : https://github.com/bitcoin/bitcoin/blob/master/src/wallet.cpp#L1043-L1185)
There is an old thread about it here: https://bitcointalk.org/index.php?topic=29207.0