Every time after you top up your account, the money will be directly added to your main account. And only the money in your main account can be used for withdrawing, the money in the main account can't be used to play games directly.
So when you want to place a bet, you need to top up the Main Account, then transfer the money from your Main Account to sub-account which contains the game you want to play. After that you can use the money to place your bet.
Accordingly if you want to withdraw, you need to transfer the money from sub-account to the Main Account and then withdraw deposit from your Main Account.