Battery input and motor phase output are pretty obvious. The connector at the bottom of the pic is the hall sensor connector to the motor.
My guess is that the longer connector on the right has the 5v and ground, plus other functions like throttle (maybe green?), on/off, etc. I'd try to identify/confirm the 5v before other testing.