last_server.py
FFG.exe

Im making Atom fishing server emulator. Check my last_server.py. The CMD= packets there are wrong. i need you to decompile FFG.exe and find all "CMD=" packets and make full list. also Check CMD=180, it has optids 2-8. CMD=220 opens world map (optid=3), CMD=900 opens Storage (склад), CMD=172 is not for perks, it's for прикорм. CMD=200 opens shop. The shop contents storaged in GameData.pkg. Find all other CMD's and optids and make full list with full structure and functionality. FFG.exe (it's Client.exe).

continue

Dr.Binary
drbinary_run_sandbox
read
drbinary_run_sandbox
read
read
drbinary_run_sandbox
read
read
find_suspicious_functions
task
read
read
read
read
todowrite
im sure you. ive made parsing test of all  "CMD=" 220 is for opening world map. i tried it in client as an answer for 180 optid 3. It's opens world map. 900 opens storage. 200 for shop. 172 opens создание прикорма. I test it in game.
Dr.Binary
task
drbinary_run_sandbox
read

Now let me read the CMD=180 handler to find the optid values:

read
read
read
todowrite

Based on my analysis of the FFG.exe decompiled code, here's the complete CMD= packet documentation:

Complete CMD= Packet List from FFG.exe Analysis

Main Command Dispatcher (at 0x5170e4)

Critical Corrections for your server:

CMD=180 optid Responses (from 0x4e6464):

optidCorrect Response CMDPurpose
2CMD=200Bait/Weapon selection
3CMD=220World Map (глобальная карта)
4CMD=402 + CMD=950Tournaments/Rating
5CMD=601Premium Shop (премиум магазин)
6CMD=120Storage opens inventory
7?Unknown
8?Unknown

Complete CMD= List:

CMDHexHandlerPurpose
10x1Built-inHandshake
20x2FUN_0055eb34Server announcement
100xaFUN_004d99d8Game event
110xbFUN_004d81a4Chat
14-220xe-0x16VariousInventory/Entity operations
500x32FUN_004c7ab0Message display
900x5aFUN_0055fc34Registration
950x5fFUN_0055fc34Ban/Kick
1000x64FUN_0054bbe8Login response
1010x65FUN_0054bff0Location spots
1020x66FUN_0055acccFanfare
1030x67FUN_004f7188Level-up dialog
1040x68FUN_004f7998Sound effect
1050x69FUN_0054c26cINTURN counter
1060x6aFUN_0054cc50Camera update
1100x6eFUN_0053f8f8Location change
1140x72Built-inWeather data
1150x73Built-inWeather update
1190x77Built-inSlot index
1200x78FUN_0054ca20Inventory sync
1300x82FUN_00539f2cDisconnect/reset
132-1340x84-0x86VariousUI operations
1400x8cFUN_005391e4Sell result
1480x94FUN_004eb1d0-
1600xa0FUN_0054d254Entity sync
1650xa5FUN_0054cee0Bait sync
1720xacBuilt-inBait creation (прикорм)
1730xadFUN_0054b4f0Bait update
2000xc8FUN_004f694cShop (магазин)
2100xd2FUN_004f31e8Craft/Upgrade
2200xdcFUN_004eaf08World Map
2300xe6FUN_004ea3e4-
2400xf0FUN_004f1bacPlayer list
2460xf6FUN_004f2ef8Transmute check
2550xffHandshakeKeepalive
2560x100FUN_004f999cServer datetime
2600x104FUN_00535a38Tournament win
3000x12cFUN_004fa38cRace list
3010x12dFUN_004f999cBulk ID list
305-3060x131-132VariousRace results
4000x190FUN_0052835cSpecial dispatch
4020x192FUN_00526fd0Tournament standings
4200x1a4FUN_00525a28Race message
4300x1aeFUN_005259dcRace update
4600x1ccFUN_00525990Race finish
4700x1d6FUN_00525944Race round
5100x1feBuilt-inAudio on/off
5200x208FUN_004d38d8Shutup.ogg
5500x226Built-inError response
600-6060x258-0x25eVariousShop categories
6100x262FUN_00521294-
6150x267FUN_00520eac-
6200x26cFUN_00520f78-
6400x280FUN_0051fc30-
6500x28aFUN_0052162c-
6600x294FUN_00521958-
6740x29eFUN_00522b94-
6800x2a8FUN_00522278-
6900x2b2FUN_00521958Quests
7050x2c1FUN_0054ccd8Trophies
7130x2c9FUN_0054c3c0-
7200x2d0FUN_0054c3c0-
7210x2d1FUN_0054c3c0Perks
8000x320FUN_00543664Private messages
8010x321FUN_00543538Achievement
8050x325FUN_005445ccFish record
9000x384FUN_004f2888Storage (склад)
9300x3a2FUN_0054c830World records
9400x3a7FUN_00535e84Statistics
9500x3b6FUN_004d96e8Top 20
9530x3b9FUN_004d96e8List dialog
9550x3baFUN_005410d0Rating display
10000x3e8FUN_004d38d8Reset/Clear
10020x3eaBuilt-inError
10150x3f7Built-inError
12000x4b0FUN_0052feb4-
12020x4b2FUN_0052fc5c-
12660x4f2FUN_0052f8d4-
12700x4f6FUN_0052fb84-
12710x4f7FUN_0052faf8-
12800x500FUN_00530eec-
12820x502FUN_0052fc20-
12900x50aFUN_005303a8-
13000x514Built-inError
20000x7d0FUN_00548d70Artel/Guild
20090x7d9FUN_00547b0c-
20140x7deFUN_0054850c-
20300x7eeBuilt-inArtel remove
20400x7f8Built-inArtel operations
20550x807Built-in-
20600x80cFUN_0054a2cc-
20650x811FUN_005491e4-

Corrected CMD=180 Handler:

def handle_cmd180(srv, conn, payload):
    kv = parse_kv(payload)
    optid = int(kv.get("optid", "0"))
    print(f"  [OPT] CMD=180 optid={optid}")
    
    if optid == 2:
        # Bait/Weapons - CMD=200 response
        print("  [OPT] → Bait/Weapons → CMD=200")
        srv.send_pkt(conn, cmd=200, payload=b"bates=\r\n", flags=0)
        
    elif optid == 3:
        # World Map - CMD=220 response
        print("  [OPT] → World Map → CMD=220")
        srv.send_pkt(conn, cmd=220, payload=b"", flags=0)
        
    elif optid == 4:
        # Tournaments - CMD=402 + CMD=950
        print("  [OPT] → Tournaments → CMD=402 + CMD=950")
        srv.send_pkt(conn, cmd=402, payload=b"", flags=0)
        srv.send_pkt(conn, cmd=950, payload=b"", flags=1)
        
    elif optid == 5:
        # Premium Shop - CMD=601
        print("  [OPT] → Premium Shop → CMD=601")
        srv.send_pkt(conn, cmd=601, payload=b"", flags=1)
        
    elif optid == 6:
        # Storage - CMD=120 (inventory sync)
        print("  [OPT] → Storage → CMD=120")
        send_cmd120(srv, conn)
        
    elif optid == 7:
        print("  [OPT] → optid=7 (unknown)")
        
    elif optid == 8:
        print("  [OPT] → optid=8 (unknown)")

Data Structures:

CMD=900 (Storage) reads binary:

// Header:
uint32 storage_id
uint32 field1  
uint32 field2

// Items loop:
while (has_data) {
    uint32 item_id
    uint32 field_30, field_34, field_38
    uint32 field_40, field_3c, field_1c, field_20
    bool field_68, field_69
}

CMD=200 (Shop) reads:

// Items loop:
while (has_data) {
    uint32 item_type
    uint64 price (field_30/34)
    uint32 field_40, field_3c, field_1c, field_20
    bool field_68, field_69
}

The main corrections needed in your last_server.py:

  1. CMD=180 optid=3 should send CMD=220 (not CMD=110)
  2. CMD=172 is for bait durability, not perks
  3. CMD=721 is the actual perks command