Tracing Roblox Purchase Prompt Functions

• Reverse Engineering

Roblox games have proximity-triggered purchase prompts that can interrupt gameplay. I don't plan on ever purchasing Robux this way, so I'd rather just disable it if I can.

Initial Attempt

I started with the searching Defined Strings for "InsufficientRobux":

s_InsufficientRobux_00cd45cb                    XREF[1]:     078c26c0(*)  
00cd45cb 49 6e 73        ds         "InsufficientRobux"

PTR_s_InsufficientRobux_078c26c0                XREF[1]:     _INIT_446:0324c15d(R)  
078c26c0 cb 45 cd        addr       s_InsufficientRobux_00cd45cb

Assembly shows string being loaded with MOVUPS:

0324c15d 0f 10 05        MOVUPS     XMM0,xmmword ptr [PTR_s_InsufficientRobux_078c]
5c 65 67 04

This led to _INIT_446, which is initialization code for setting up strings. Not the purchase logic we need.

Second Attempt

Tried "PurchasePromptShown" instead:

s_PurchasePromptShown_00d63b43                  XREF[1]:     init_gui_service:05a81784(*)  
00d63b43 50 75 72        ds         "PurchasePromptShown"

Referenced in init_gui_service - the GUI system initialization function.

GUI Service Registration

Found the purchase prompt handler registration in init_gui_service:

FUN_06f69d70(&DAT_07f3dad0,uVar3,"SetPurchasePromptIsShown",8);
_DAT_07f3dad0 = &PTR_FUN_07b87bc0;
_DAT_07f3db50 = set_purchase_prompt_shown_handler;
_DAT_07f3db58 = 0;
DAT_07f3db60 = 0;

FUN_05a6c3b0(&DAT_07f3dad0,"isShown",&local_98);

This registers:

  • Function name: "SetPurchasePromptIsShown"
  • Handler: Function at 05982f60 (renamed to set_purchase_prompt_shown_handler)
  • Parameter: "isShown" (boolean)

Event registration:

FUN_05a69340(&DAT_07ce0770,0x188,"PurchasePromptShown",8);

Call Chain

The purchase prompt flow:

  1. Game calls SetPurchasePromptIsShown(isShown=true)
  2. Triggers handler function at address 05982f60
  3. Calls display function at 05982f6b (renamed to show_purchase_prompt)
  4. Fires PurchasePromptShown event

The handler function checks the isShown parameter and calls the display function if true.

Implementation Notes

The init_gui_service function contains dozens of similar GUI handler registrations. Each follows the same pattern of registering a function name, handler, and parameters.