Okay so if I'm understanding you right, you wait until the client has completely loaded and you could log in, and then you would run the injection?
No. The Client unpacks itself "slowly" (I quote this because it's quite fast, but it does it byte by byte I believe?). You should be able to tell the approximate timing based off of..
[07/21/16 22:58:11] - Source created by Blade3575 and Plonecakes for MabiMods[07/21/16 22:58:11] - Credits: kotarou3, spr33 and whoever made mod_kirisame.
[07/21/16 22:58:11] - Initialization successful.
[07/21/16 22:58:11] - ijl hook installation successful.
[07/21/16 22:58:11] - Applying unpack detection hooks..
[07/21/16 22:58:11] - Finished applying unpack detection hooks.
[07/21/16 22:58:11] - Client unpacked.[07/21/16 22:58:11] - Reverting unpack detection hooks..
As you can see, it's quite quick. The trick is the timing of when it happens. As long as you wait a second or two before running the function, it would probably be fine.