{"type": "func", "start": 5309884, "end": 5310026, "name": "GJMultiplayerManager::createAndAddComment", "pseudocode": "// \n// GJMultiplayerManager::createAndAddComment from 0x5105bc to 0x51064a (142 bytes)\n// \n// 1 xrefs:\n// > GJMultiplayerManager::uploadComment @ 0x510cfc\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nint __fastcall GJMultiplayerManager::createAndAddComment(int a1, const char **a2, char *a3, int a4)\n{\n  const char *v6; // r4\n  GJAccountManager *v7; // r0\n  cocos2d::CCString *v8; // r0\n  char *CString; // r0\n  int v10; // r0\n  const char **v13; // [sp+4h] [bp-Ch] BYREF\n  char *v14; // [sp+8h] [bp-8h] BYREF\n  int v15; // [sp+Ch] [bp-4h]\n\n  v13 = a2;\n  v14 = a3;\n  v15 = a4;\n  v6 = *a2;\n  v7 = GJAccountManager::sharedState();\n  v8 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(\n                              (cocos2d::CCString *)\"2~%s~8~%i~9~7 minutes~6~-1\",\n                              v6,\n                              v7->m_accountID - v7->m_unkInt1,\n                              v7->m_unkInt1,\n                              a1,\n                              v13,\n                              v14,\n                              v15);\n  CString = (char *)cocos2d::CCString::getCString(v8);\n  sub_776584((int)&v13, CString);\n  sub_775C20(&v14);\n  GJMultiplayerManager::addComment(a1, (char *)&v14, a3);\n  sub_774008(&v14);\n  v10 = *(_DWORD *)(a1 + 280);\n  if ( v10 )\n    (*(void (__fastcall **)(int))(*(_DWORD *)v10 + 12))(v10);\n  return sub_774008(&v13);\n}", "assembly": "; \n; GJMultiplayerManager::createAndAddComment from 0x5105bc to 0x51064a (142 bytes)\n; \n; 1 xrefs:\n; > GJMultiplayerManager::uploadComment @ 0x510cfc\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nPUSH.W          {R0-R8,LR}                                             ; +0x0, 0x5105bc\nMOV             R8, R2                                                 ; +0x4, 0x5105c0\nLDR             R6, =(__stack_chk_guard_ptr - 0x5105CE)                ; +0x6, 0x5105c2\nMOV             R7, R0                                                 ; +0x8, 0x5105c4\nLDR             R4, [R1]                                               ; +0xa, 0x5105c6\nADD             R5, SP, #0x10+var_C                                    ; +0xc, 0x5105c8\nADD             R6, PC; __stack_chk_guard_ptr                          ; +0xe, 0x5105ca\nLDR             R6, [R6]; __stack_chk_guard                            ; +0x10, 0x5105cc\nLDR             R3, [R6]                                               ; +0x12, 0x5105ce\nSTR             R3, [SP,#0x10+var_4]                                   ; +0x14, 0x5105d0\nBL              _ZN16GJAccountManager11sharedStateEv; GJAccountManager::sharedState(void) ; +0x16, 0x5105d2\nMOV             R1, R4; char *                                         ; +0x1a, 0x5105d6\nADD             R4, SP, #0x10+var_8                                    ; +0x1c, 0x5105d8\nLDR.W           R3, [R0,#0x114]                                        ; +0x1e, 0x5105da\nLDR.W           R2, [R0,#0x110]                                        ; +0x22, 0x5105de\nLDR             R0, =(a2S8I97Minutes6 - 0x5105EA); \"2~%s~8~%i~9~7 minutes~6~-1\" ; +0x26, 0x5105e2\nSUBS            R2, R2, R3                                             ; +0x28, 0x5105e4\nADD             R0, PC; \"2~%s~8~%i~9~7 minutes~6~-1\"                   ; +0x2a, 0x5105e6\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0x2c, 0x5105e8\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0x30, 0x5105ec\nMOV             R2, R4                                                 ; +0x34, 0x5105f0\nMOV             R1, R0; char *                                         ; +0x36, 0x5105f2\nMOV             R0, R5; int                                            ; +0x38, 0x5105f4\nBL              sub_776584                                             ; +0x3a, 0x5105f6\nMOV             R0, R4                                                 ; +0x3e, 0x5105fa\nMOV             R1, R5                                                 ; +0x40, 0x5105fc\nBL              sub_775C20                                             ; +0x42, 0x5105fe\nMOV             R0, R7; int                                            ; +0x46, 0x510602\nMOV             R1, R4; int                                            ; +0x48, 0x510604\nMOV             R2, R8; int                                            ; +0x4a, 0x510606\nBL              _ZN20GJMultiplayerManager10addCommentESsi; GJMultiplayerManager::addComment(std::string,int) ; +0x4c, 0x510608\nMOV             R0, R4                                                 ; +0x50, 0x51060c\nBL              sub_774008                                             ; +0x52, 0x51060e\nLDR.W           R0, [R7,#0x118]                                        ; +0x56, 0x510612\nCBNZ            R0, loc_51062A                                         ; +0x5a, 0x510616\nMOV             R0, R5                                                 ; +0x5c, 0x510618\nBL              sub_774008                                             ; +0x5e, 0x51061a\nLDR             R2, [SP,#0x10+var_4]                                   ; +0x62, 0x51061e\nLDR             R3, [R6]                                               ; +0x64, 0x510620\nCMP             R2, R3                                                 ; +0x66, 0x510622\nBEQ             loc_510644                                             ; +0x68, 0x510624\nBLX             __stack_chk_fail                                       ; +0x6a, 0x510626\nLDR             R3, [R0]                                               ; +0x6e, 0x51062a\nLDR             R3, [R3,#0xC]                                          ; +0x70, 0x51062c\nBLX             R3                                                     ; +0x72, 0x51062e\nB               loc_510618                                             ; +0x74, 0x510630\nMOV             R0, R4                                                 ; +0x76, 0x510632\nBL              sub_774008                                             ; +0x78, 0x510634\nB               loc_51063A                                             ; +0x7c, 0x510638\nMOV             R0, R5                                                 ; +0x7e, 0x51063a\nBL              sub_774008                                             ; +0x80, 0x51063c\nBL              __cxa_end_cleanup                                      ; +0x84, 0x510640\nADD             SP, SP, #0x10                                          ; +0x88, 0x510644\nPOP.W           {R4-R8,PC}                                             ; +0x8a, 0x510646", "xrefs": ["GJMultiplayerManager::uploadComment @ 0x510cfc"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}