How to Find Packets on IDA Pro

This is a simple and detailed guide on how to find packets in IDA Pro for your Brawl Stars server.

Go to the Step-by-Step Guide

Requirements

Okay, before we start, we'll need these tools:

To apply it, go to IDA Pro → File > Script File and select it.

⚡ This must be done after the autoanalysis is complete.

When you open it for the first time, you'll see this:
Wait until it looks like this.

My First Packet

Let's start with something simple.

10121: UnlockAccountMessage
ID Packet Name

Open the two files in IDA Pro and wait for the autoanalysis to finish.
Then in the lib with debug symbols (V36), run the aforementioned script.

Then press ALT + i and something like this will appear:

V36:

V36 ALT+i

Your Version:

Your Version ALT+i

Okay, we're doing well.
Double click:

V36:

V36 double click

Your Version:

Your Version double click

Now press X for Xref:

V36:

V36 Xref

Your Version:

Your Version Xref

Then go to the function: _ZN20UnlockAccountMessage6encodeEv

V36:

V36 encode

Your Version:

Your Version encode

And double click.
Now press F5.

V36:

V36 F5

Your Version:

Your Version F5

Understanding the Structure

It is possible that in your version there are more sub_ functions, so we need to identify what each one does.

sub_3D1124 = writeLong
sub_F1B90  = writeString
sub_F1B90  = writeString
sub_F1B90  = writeString
  

The subname applies to all packets in this lib (in another version of Brawl Stars, the subname will be different).

Tip for Beginners

I recommend that beginners start by porting packets from one version to another — for example, porting TeamSetLocationMessage from V15 to V22.

Future

I'd like to create a guide on how to enable offline battles and how to activate the lobby InfoMessage (IsDev).