If you have to abandon a game, for whatever reason: RETURN WHEN YOU CAN!! If you return on time there's nothing to worry about. There should be plenty of time to return to the game (to even reboot your system once or twice). If you return in time, the game will still count for the ranking and you won't be reported as a quitter.
If you enter a ranking game from the start (so, on the ranking server a game without bots) and you don't return in time after you abandon a game, you will be automatically reported as a quitter. The time and score of the moment you quit is stored in the log, so in some cases we can look at it case by case and remove the case when necessary.
If you have played less then 50% of the total game time, you are reported as a quitter. The first time there is no penalty. The 2nd time -2pt, 3rd time, -4pts, 4th time -6pts. This penalty will aply to your ranking score, not your game final score.
You abandoned the game at 45% of the game time for the 3rd time in a month. A bot will finish your game and the end score is: Winner: 15, You/bot: 8, 3rd player: 10. Your ranking points for monthly ranking could be -5. Add the penalty of -4 points your ranking points for monthly ranking will be -9.
If you quit for the 4th time in one month, you will be banned from the ranking lobbies until you have 2 quits left (could be 10 days, could be 20 days).