終わる => to finish; to end N4
~ぶんには(~分には) => as long as ~ N1
場合(は) => in the event of; in the case that ~ N4
[終「お」]わる => To finish A; A ends N4
Secondary Verb
最中に => while; during; in the middle of ~ N3
〜がさいご(が最後) => if you do... negative result N1
Decisive (resolute decision)
[最中「さいちゅう」] => In the middle of A N3
Time, Situation
たが[最後「さいご」] => Once A occurs, B happens N1
Information, Report