{"type": "func", "start": 9972484, "end": 9973052, "name": "GJMultiplayerManager::onProcessHttpRequestCompleted", "pseudocode": "// \n// GJMultiplayerManager::onProcessHttpRequestCompleted from 0x982b04 to 0x982d3c (568 bytes)\n// \n// 3 xrefs:\n// > <???> @ 0x76500\n// > GJMultiplayerManager::ProcessHttpRequest @ 0x9810cc\n// > <???> @ 0x122bf18\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\nvoid GJMultiplayerManager::onProcessHttpRequestCompleted(\n        GJMultiplayerManager *a1,\n        cocos2d::extension::CCHttpClient *a2,\n        cocos2d::extension::CCHttpResponse *a3)\n{\n  cocos2d::extension::CCHttpRequest *pHttpRequest; // x2\n  char *m_data; // x24\n  int requestTypeGJ; // w22\n  void *v8; // x0\n  void *v9; // x0\n  char *v10; // x0\n  unsigned int *v11; // x1\n  int v12; // w2\n  unsigned int *v13; // x1\n  int v14; // w2\n  unsigned int *v15; // x1\n  int v16; // w2\n  char *v17; // [xsp+60h] [xbp+60h] BYREF\n  __int64 v18; // [xsp+68h] [xbp+68h] BYREF\n  __int64 v19; // [xsp+70h] [xbp+70h] BYREF\n\n  pHttpRequest = a3->_pHttpRequest;\n  m_data = (char *)pHttpRequest->_tag.m_data.m_data;\n  requestTypeGJ = pHttpRequest->_requestTypeGJ;\n  GameToolbox::getResponse((GameToolbox *)a3, &v17);\n  sub_D18D28(&v18);\n  sub_D153B8((int)&v19, m_data);\n  GJMultiplayerManager::handleIt(a1, 1, (__int64)&v18, (__int64)&v19, requestTypeGJ);\n  v8 = (void *)(v19 - 24);\n  if ( (__int64 *)(v19 - 24) != &qword_124B6B0 )\n  {\n    if ( &pthread_create )\n    {\n      v11 = (unsigned int *)(v19 - 8);\n      do\n        v12 = __ldaxr(v11);\n      while ( __stlxr(v12 - 1, v11) );\n    }\n    else\n    {\n      v12 = *(_DWORD *)(v19 - 8);\n      *(_DWORD *)(v19 - 8) = v12 - 1;\n    }\n    if ( v12 <= 0 )\n      operator delete(v8);\n  }\n  v9 = (void *)(v18 - 24);\n  if ( (__int64 *)(v18 - 24) != &qword_124B6B0 )\n  {\n    if ( &pthread_create )\n    {\n      v13 = (unsigned int *)(v18 - 8);\n      do\n        v14 = __ldaxr(v13);\n      while ( __stlxr(v14 - 1, v13) );\n    }\n    else\n    {\n      v14 = *(_DWORD *)(v18 - 8);\n      *(_DWORD *)(v18 - 8) = v14 - 1;\n    }\n    if ( v14 <= 0 )\n      operator delete(v9);\n  }\n  v10 = v17 - 24;\n  if ( v17 - 24 != (char *)&qword_124B6B0 )\n  {\n    if ( &pthread_create )\n    {\n      v15 = (unsigned int *)(v17 - 8);\n      do\n        v16 = __ldaxr(v15);\n      while ( __stlxr(v16 - 1, v15) );\n    }\n    else\n    {\n      v16 = *((_DWORD *)v17 - 2);\n      *((_DWORD *)v17 - 2) = v16 - 1;\n    }\n    if ( v16 <= 0 )\n      operator delete(v10);\n  }\n}", "assembly": "; \n; GJMultiplayerManager::onProcessHttpRequestCompleted from 0x982b04 to 0x982d3c (568 bytes)\n; \n; 3 xrefs:\n; > <???> @ 0x76500\n; > GJMultiplayerManager::ProcessHttpRequest @ 0x9810cc\n; > <???> @ 0x122bf18\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\nSTP             X29, X30, [SP,#var_80]!                                ; +0x0, 0x982b04\nMOV             X29, SP                                                ; +0x4, 0x982b08\nSTP             X19, X20, [SP,#0x80+var_70]                            ; +0x8, 0x982b0c\nADRP            X20, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0x982b10\nADD             X1, X29, #0x80+var_20; cocos2d::extension::CCHttpResponse * ; +0x10, 0x982b14\nSTP             X23, X24, [SP,#0x80+var_50]                            ; +0x14, 0x982b18\nMOV             X23, X0                                                ; +0x18, 0x982b1c\nMOV             X0, X2; this                                           ; +0x1c, 0x982b20\nLDR             X3, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x20, 0x982b24\nMOV             X8, X1                                                 ; +0x24, 0x982b28\nLDR             X2, [X2,#0x38]                                         ; +0x28, 0x982b2c\nADD             X19, X29, #0x80+var_18                                 ; +0x2c, 0x982b30\nSTP             X21, X22, [SP,#0x80+var_60]                            ; +0x30, 0x982b34\nLDR             X3, [X3]                                               ; +0x34, 0x982b38\nSTR             X1, [X29,#0x80+var_38]                                 ; +0x38, 0x982b3c\nSTR             X3, [X29,#0x80+var_8]                                  ; +0x3c, 0x982b40\nLDR             X24, [X2,#0x60]                                        ; +0x40, 0x982b44\nLDR             W22, [X2,#0xA0]                                        ; +0x44, 0x982b48\nBL              _ZN11GameToolbox11getResponseEPN7cocos2d9extension14CCHttpResponseE; GameToolbox::getResponse(cocos2d::extension::CCHttpResponse *) ; +0x48, 0x982b4c\nLDR             X1, [X29,#0x80+var_38]                                 ; +0x4c, 0x982b50\nMOV             X0, X19                                                ; +0x50, 0x982b54\nBL              sub_D18D28                                             ; +0x54, 0x982b58\nADD             X21, X29, #0x80+var_10                                 ; +0x58, 0x982b5c\nMOV             X1, X24; char *                                        ; +0x5c, 0x982b60\nMOV             X0, X21; int                                           ; +0x60, 0x982b64\nADD             X2, X29, #0x80+var_30                                  ; +0x64, 0x982b68\nBL              sub_D153B8                                             ; +0x68, 0x982b6c\nMOV             X0, X23                                                ; +0x6c, 0x982b70\nMOV             W1, #1                                                 ; +0x70, 0x982b74\nMOV             X2, X19                                                ; +0x74, 0x982b78\nMOV             X3, X21                                                ; +0x78, 0x982b7c\nMOV             W4, W22                                                ; +0x7c, 0x982b80\nBL              _ZN20GJMultiplayerManager8handleItEbSsSs10GJHttpType; GJMultiplayerManager::handleIt(bool,std::string,std::string,GJHttpType) ; +0x80, 0x982b84\nADRP            X19, #off_122EFE8@PAGE                                 ; +0x84, 0x982b88\nLDR             X1, [X29,#0x80+var_10]                                 ; +0x88, 0x982b8c\nSUB             X0, X1, #0x18; p                                       ; +0x8c, 0x982b90\nLDR             X2, [X19,#off_122EFE8@PAGEOFF]; qword_124B6B0          ; +0x90, 0x982b94\nCMP             X0, X2                                                 ; +0x94, 0x982b98\nB.NE            loc_982BF0                                             ; +0x98, 0x982b9c\nLDR             X1, [X29,#0x80+var_18]                                 ; +0x9c, 0x982ba0\nLDR             X2, [X19,#off_122EFE8@PAGEOFF]; qword_124B6B0          ; +0xa0, 0x982ba4\nSUB             X0, X1, #0x18; p                                       ; +0xa4, 0x982ba8\nCMP             X0, X2                                                 ; +0xa8, 0x982bac\nB.NE            loc_982C24                                             ; +0xac, 0x982bb0\nLDR             X1, [X29,#0x80+var_20]                                 ; +0xb0, 0x982bb4\nLDR             X19, [X19,#off_122EFE8@PAGEOFF]; qword_124B6B0         ; +0xb4, 0x982bb8\nSUB             X0, X1, #0x18; p                                       ; +0xb8, 0x982bbc\nCMP             X0, X19                                                ; +0xbc, 0x982bc0\nB.NE            loc_982C58                                             ; +0xc0, 0x982bc4\nLDR             X0, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0xc4, 0x982bc8\nLDR             X1, [X29,#0x80+var_8]                                  ; +0xc8, 0x982bcc\nLDR             X0, [X0]                                               ; +0xcc, 0x982bd0\nCMP             X1, X0                                                 ; +0xd0, 0x982bd4\nB.NE            loc_982CBC                                             ; +0xd4, 0x982bd8\nLDP             X19, X20, [SP,#0x80+var_70]                            ; +0xd8, 0x982bdc\nLDP             X21, X22, [SP,#0x80+var_60]                            ; +0xdc, 0x982be0\nLDP             X23, X24, [SP,#0x80+var_50]                            ; +0xe0, 0x982be4\nLDP             X29, X30, [SP+0x80+var_80],#0x80                       ; +0xe4, 0x982be8\nRET                                                                    ; +0xe8, 0x982bec\nADRP            X2, #pthread_create_ptr_0@PAGE                         ; +0xec, 0x982bf0\nLDR             X2, [X2,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0xf0, 0x982bf4\nCBZ             X2, loc_982C8C                                         ; +0xf4, 0x982bf8\nSUB             X1, X1, #8                                             ; +0xf8, 0x982bfc\nLDAXR           W2, [X1]                                               ; +0xfc, 0x982c00\nSUB             W3, W2, #1                                             ; +0x100, 0x982c04\nSTLXR           W4, W3, [X1]                                           ; +0x104, 0x982c08\nCBNZ            W4, loc_982C00                                         ; +0x108, 0x982c0c\nCMP             W2, WZR                                                ; +0x10c, 0x982c10\nB.GT            loc_982BA0                                             ; +0x110, 0x982c14\nADD             X1, X29, #0x80+var_28                                  ; +0x114, 0x982c18\nBL              j__ZdlPv; operator delete(void *)                      ; +0x118, 0x982c1c\nB               loc_982BA0                                             ; +0x11c, 0x982c20\nADRP            X2, #pthread_create_ptr_0@PAGE                         ; +0x120, 0x982c24\nLDR             X2, [X2,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0x124, 0x982c28\nCBZ             X2, loc_982CAC                                         ; +0x128, 0x982c2c\nSUB             X1, X1, #8                                             ; +0x12c, 0x982c30\nLDAXR           W2, [X1]                                               ; +0x130, 0x982c34\nSUB             W3, W2, #1                                             ; +0x134, 0x982c38\nSTLXR           W4, W3, [X1]                                           ; +0x138, 0x982c3c\nCBNZ            W4, loc_982C34                                         ; +0x13c, 0x982c40\nCMP             W2, WZR                                                ; +0x140, 0x982c44\nB.GT            loc_982BB4                                             ; +0x144, 0x982c48\nMOV             X1, X21                                                ; +0x148, 0x982c4c\nBL              j__ZdlPv; operator delete(void *)                      ; +0x14c, 0x982c50\nB               loc_982BB4                                             ; +0x150, 0x982c54\nADRP            X2, #pthread_create_ptr_0@PAGE                         ; +0x154, 0x982c58\nLDR             X2, [X2,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0x158, 0x982c5c\nCBZ             X2, loc_982C9C                                         ; +0x15c, 0x982c60\nSUB             X1, X1, #8                                             ; +0x160, 0x982c64\nLDAXR           W2, [X1]                                               ; +0x164, 0x982c68\nSUB             W3, W2, #1                                             ; +0x168, 0x982c6c\nSTLXR           W4, W3, [X1]                                           ; +0x16c, 0x982c70\nCBNZ            W4, loc_982C68                                         ; +0x170, 0x982c74\nCMP             W2, WZR                                                ; +0x174, 0x982c78\nB.GT            loc_982BC8                                             ; +0x178, 0x982c7c\nMOV             X1, X21                                                ; +0x17c, 0x982c80\nBL              j__ZdlPv; operator delete(void *)                      ; +0x180, 0x982c84\nB               loc_982BC8                                             ; +0x184, 0x982c88\nLDUR            W2, [X1,#-8]                                           ; +0x188, 0x982c8c\nSUB             W3, W2, #1                                             ; +0x18c, 0x982c90\nSTUR            W3, [X1,#-8]                                           ; +0x190, 0x982c94\nB               loc_982C10                                             ; +0x194, 0x982c98\nLDUR            W2, [X1,#-8]                                           ; +0x198, 0x982c9c\nSUB             W3, W2, #1                                             ; +0x19c, 0x982ca0\nSTUR            W3, [X1,#-8]                                           ; +0x1a0, 0x982ca4\nB               loc_982C78                                             ; +0x1a4, 0x982ca8\nLDUR            W2, [X1,#-8]                                           ; +0x1a8, 0x982cac\nSUB             W3, W2, #1                                             ; +0x1ac, 0x982cb0\nSTUR            W3, [X1,#-8]                                           ; +0x1b0, 0x982cb4\nB               loc_982C44                                             ; +0x1b4, 0x982cb8\nBL              .__stack_chk_fail                                      ; +0x1b8, 0x982cbc\nMOV             X20, X0                                                ; +0x1bc, 0x982cc0\nADRP            X19, #off_122EFE8@PAGE                                 ; +0x1c0, 0x982cc4\nLDR             X0, [X29,#0x80+var_20]                                 ; +0x1c4, 0x982cc8\nLDR             X19, [X19,#off_122EFE8@PAGEOFF]; qword_124B6B0         ; +0x1c8, 0x982ccc\nSUB             X0, X0, #0x18                                          ; +0x1cc, 0x982cd0\nCMP             X0, X19                                                ; +0x1d0, 0x982cd4\nB.EQ            loc_982CE4                                             ; +0x1d4, 0x982cd8\nADD             X1, X29, #0x80+var_28                                  ; +0x1d8, 0x982cdc\nBL              sub_4DD360                                             ; +0x1dc, 0x982ce0\nMOV             X0, X20                                                ; +0x1e0, 0x982ce4\nBL              _Unwind_Resume                                         ; +0x1e4, 0x982ce8\nADRP            X19, #off_122EFE8@PAGE                                 ; +0x1e8, 0x982cec\nMOV             X20, X0                                                ; +0x1ec, 0x982cf0\nLDR             X0, [X29,#0x80+var_10]                                 ; +0x1f0, 0x982cf4\nLDR             X1, [X19,#off_122EFE8@PAGEOFF]; qword_124B6B0          ; +0x1f4, 0x982cf8\nSUB             X0, X0, #0x18                                          ; +0x1f8, 0x982cfc\nCMP             X0, X1                                                 ; +0x1fc, 0x982d00\nB.EQ            loc_982D10                                             ; +0x200, 0x982d04\nADD             X1, X29, #0x80+var_28                                  ; +0x204, 0x982d08\nBL              sub_4DD360                                             ; +0x208, 0x982d0c\nLDR             X0, [X29,#0x80+var_18]                                 ; +0x20c, 0x982d10\nLDR             X1, [X19,#off_122EFE8@PAGEOFF]; qword_124B6B0          ; +0x210, 0x982d14\nSUB             X0, X0, #0x18                                          ; +0x214, 0x982d18\nCMP             X0, X1                                                 ; +0x218, 0x982d1c\nB.EQ            loc_982CC8                                             ; +0x21c, 0x982d20\nADD             X1, X29, #0x80+var_28                                  ; +0x220, 0x982d24\nBL              sub_4DD360                                             ; +0x224, 0x982d28\nB               loc_982CC8                                             ; +0x228, 0x982d2c\nMOV             X20, X0                                                ; +0x22c, 0x982d30\nADRP            X19, #off_122EFE8@PAGE                                 ; +0x230, 0x982d34\nB               loc_982D10                                             ; +0x234, 0x982d38", "xrefs": ["<???> @ 0x76500", "GJMultiplayerManager::ProcessHttpRequest @ 0x9810cc", "<???> @ 0x122bf18"], "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"}