{"type": "func", "start": 5372446448, "end": 5372447112, "name": "GJMultiplayerManager::handleIt", "pseudocode": "// \n// GJMultiplayerManager::handleIt from 0x1403906f0 to 0x140390988 (664 bytes)\n// \n// 2 xrefs:\n// > GJMultiplayerManager::onProcessHttpRequestCompleted @ 0x1403906a9\n// > <???> @ 0x140922fac\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:31:11 +0000\n// \n\n// Hidden C++ exception states: #wind=6\nvoid __fastcall GJMultiplayerManager::handleIt(__int64 a1, __int64 a2, char *a3, __int64 a4, int a5)\n{\n  const char *v8; // rbx\n  const void **v9; // rsi\n  const char *v10; // rdx\n  const char *v11; // rcx\n  unsigned int v12; // r13d\n  const void *v13; // rcx\n  unsigned __int64 v14; // r14\n  size_t v15; // r8\n  void (__fastcall ***v16)(_QWORD, _QWORD, __int64); // rcx\n  __int64 v17; // rcx\n  __int64 v18; // rbx\n  __int64 v19; // rax\n  const char *v20; // rdx\n  const char *v21; // rcx\n  unsigned int v22; // r13d\n  const void *v23; // rcx\n  unsigned __int64 v24; // r14\n  size_t v25; // r8\n  __int64 v26; // rcx\n  __int128 Buf2; // [rsp+30h] [rbp-61h] BYREF\n  __int64 v28; // [rsp+40h] [rbp-51h]\n  __int64 v29; // [rsp+48h] [rbp-49h]\n  _BYTE v30[32]; // [rsp+50h] [rbp-41h] BYREF\n  _BYTE v31[32]; // [rsp+70h] [rbp-21h] BYREF\n  char *v32; // [rsp+90h] [rbp-1h]\n  __int64 v33; // [rsp+98h] [rbp+7h]\n\n  v32 = a3;\n  v33 = a4;\n  GameToolbox::extractServerPopup(a3);\n  switch ( a5 )\n  {\n    case 13:\n      v8 = (const char *)sub_14003F4F0((__int64)v31, a4);\n      v9 = (const void **)sub_14003F4F0((__int64)v30, (__int64)a3);\n      v20 = v8;\n      if ( *((_QWORD *)v8 + 3) > 0xFu )\n        v20 = *(const char **)v8;\n      GJMultiplayerManager::removeDLFromActive(a1, v20);\n      v21 = v8;\n      if ( *((_QWORD *)v8 + 3) > 0xFu )\n        v21 = *(const char **)v8;\n      v22 = atoi(v21);\n      Buf2 = 0;\n      v28 = 2;\n      v29 = 15;\n      strcpy((char *)&Buf2, \"-1\");\n      v23 = v9;\n      if ( (unsigned __int64)v9[3] > 0xF )\n        v23 = *v9;\n      v24 = (unsigned __int64)v9[2];\n      v25 = v24;\n      if ( v24 > 2 )\n        v25 = 2;\n      if ( memcmp(v23, &Buf2, v25) || v24 != 2 )\n      {\n        v26 = *(_QWORD *)(a1 + 352);\n        if ( v26 )\n          (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v26 + 16LL))(v26, v22);\n      }\n      goto LABEL_32;\n    case 63:\n      v18 = sub_14003F4F0((__int64)v31, a4);\n      v19 = sub_14003F4F0((__int64)v30, (__int64)a3);\n      GJMultiplayerManager::onJoinLobbyCompleted(a1, v19, v18);\n      break;\n    case 64:\n      v8 = (const char *)sub_14003F4F0((__int64)v30, a4);\n      v9 = (const void **)sub_14003F4F0((__int64)v31, (__int64)a3);\n      v10 = v8;\n      if ( *((_QWORD *)v8 + 3) > 0xFu )\n        v10 = *(const char **)v8;\n      GJMultiplayerManager::removeDLFromActive(a1, v10);\n      v11 = v8;\n      if ( *((_QWORD *)v8 + 3) > 0xFu )\n        v11 = *(const char **)v8;\n      v12 = atoi(v11);\n      Buf2 = 0;\n      v28 = 2;\n      v29 = 15;\n      strcpy((char *)&Buf2, \"-1\");\n      v13 = v9;\n      if ( (unsigned __int64)v9[3] > 0xF )\n        v13 = *v9;\n      v14 = (unsigned __int64)v9[2];\n      v15 = v14;\n      if ( v14 > 2 )\n        v15 = 2;\n      if ( !memcmp(v13, &Buf2, v15) && v14 == 2 )\n      {\n        v17 = *(_QWORD *)(a1 + 360);\n        if ( v17 )\n          (*(void (__fastcall **)(__int64, _QWORD, __int64))(*(_QWORD *)v17 + 8LL))(v17, v12, 64);\n      }\n      else\n      {\n        v16 = *(void (__fastcall ****)(_QWORD, _QWORD, __int64))(a1 + 360);\n        if ( v16 )\n          (**v16)(v16, v12, 64);\n      }\nLABEL_32:\n      sub_14003D310((__int64)v9);\n      sub_14003D310((__int64)v8);\n      break;\n  }\n  sub_14003D310((__int64)a3);\n  sub_14003D310(a4);\n}", "assembly": "; \n; GJMultiplayerManager::handleIt from 0x1403906f0 to 0x140390988 (664 bytes)\n; \n; 2 xrefs:\n; > GJMultiplayerManager::onProcessHttpRequestCompleted @ 0x1403906a9\n; > <???> @ 0x140922fac\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:31:11 +0000\n; \nmov     [rsp-8+arg_8], rbx                                             ; +0x0, 0x1403906f0\npush    rbp                                                            ; +0x5, 0x1403906f5\npush    rsi                                                            ; +0x6, 0x1403906f6\npush    rdi                                                            ; +0x7, 0x1403906f7\npush    r12                                                            ; +0x8, 0x1403906f8\npush    r13                                                            ; +0xa, 0x1403906fa\npush    r14                                                            ; +0xc, 0x1403906fc\npush    r15                                                            ; +0xe, 0x1403906fe\nlea     rbp, [rsp-1Fh]                                                 ; +0x10, 0x140390700\nsub     rsp, 0B0h                                                      ; +0x15, 0x140390705\nmov     rax, cs:__security_cookie                                      ; +0x1c, 0x14039070c\nxor     rax, rsp                                                       ; +0x23, 0x140390713\nmov     [rbp+4Fh+var_40], rax                                          ; +0x26, 0x140390716\nmov     r12, r9                                                        ; +0x2a, 0x14039071a\nmov     r15, r8                                                        ; +0x2d, 0x14039071d\nmov     rdi, rcx                                                       ; +0x30, 0x140390720\nmov     [rbp+4Fh+var_50], r8                                           ; +0x33, 0x140390723\nmov     [rbp+4Fh+var_48], r9                                           ; +0x37, 0x140390727\nmov     rcx, r8                                                        ; +0x3b, 0x14039072b\ncall    GameToolbox__extractServerPopup                                ; +0x3e, 0x14039072e\nmov     ecx, [rbp+4Fh+arg_20]                                          ; +0x43, 0x140390733\nsub     ecx, 0Dh                                                       ; +0x46, 0x140390736\njz      loc_14039087C                                                  ; +0x49, 0x140390739\nsub     ecx, 32h ; '2'                                                 ; +0x4f, 0x14039073f\njz      loc_140390845                                                  ; +0x52, 0x140390742\ncmp     ecx, 1                                                         ; +0x58, 0x140390748\njnz     loc_140390950                                                  ; +0x5b, 0x14039074b\nlea     rax, [rbp+4Fh+var_90]                                          ; +0x61, 0x140390751\nmov     [rbp+4Fh+var_C0], rax                                          ; +0x65, 0x140390755\nmov     rdx, r12                                                       ; +0x69, 0x140390759\nlea     rcx, [rbp+4Fh+var_90]                                          ; +0x6c, 0x14039075c\ncall    sub_14003F4F0                                                  ; +0x70, 0x140390760\nmov     rbx, rax                                                       ; +0x75, 0x140390765\nmov     [rbp+4Fh+var_B8], rax                                          ; +0x78, 0x140390768\nmov     rdx, r15                                                       ; +0x7c, 0x14039076c\nlea     rcx, [rbp+4Fh+var_70]                                          ; +0x7f, 0x14039076f\ncall    sub_14003F4F0                                                  ; +0x83, 0x140390773\nmov     rsi, rax                                                       ; +0x88, 0x140390778\nmov     [rbp+4Fh+var_C0], rax                                          ; +0x8b, 0x14039077b\nmov     rdx, rbx                                                       ; +0x8f, 0x14039077f\ncmp     qword ptr [rbx+18h], 0Fh                                       ; +0x92, 0x140390782\njbe     short loc_14039078C                                            ; +0x97, 0x140390787\nmov     rdx, [rbx]                                                     ; +0x99, 0x140390789\nmov     rcx, rdi                                                       ; +0x9c, 0x14039078c\ncall    GJMultiplayerManager__removeDLFromActive                       ; +0x9f, 0x14039078f\nmov     rcx, rbx                                                       ; +0xa4, 0x140390794\ncmp     qword ptr [rbx+18h], 0Fh                                       ; +0xa7, 0x140390797\njbe     short loc_1403907A1                                            ; +0xac, 0x14039079c\nmov     rcx, [rbx]; String                                             ; +0xae, 0x14039079e\ncall    cs:atoi                                                        ; +0xb1, 0x1403907a1\nmov     r13d, eax                                                      ; +0xb7, 0x1403907a7\nxorps   xmm0, xmm0                                                     ; +0xba, 0x1403907aa\nmovups  [rbp+4Fh+Buf2], xmm0                                           ; +0xbd, 0x1403907ad\nmov     edx, 2                                                         ; +0xc1, 0x1403907b1\nmov     [rbp+4Fh+var_A0], rdx                                          ; +0xc6, 0x1403907b6\nmov     [rbp+4Fh+var_98], 0Fh                                          ; +0xca, 0x1403907ba\nmov     ecx, 312Dh                                                     ; +0xd2, 0x1403907c2\nmov     word ptr [rbp+4Fh+Buf2], cx                                    ; +0xd7, 0x1403907c7\nmov     byte ptr [rbp+4Fh+Buf2+2], 0                                   ; +0xdb, 0x1403907cb\nmov     rcx, rsi                                                       ; +0xdf, 0x1403907cf\ncmp     qword ptr [rsi+18h], 0Fh                                       ; +0xe2, 0x1403907d2\njbe     short loc_1403907DC                                            ; +0xe7, 0x1403907d7\nmov     rcx, [rsi]; Buf1                                               ; +0xe9, 0x1403907d9\nmov     r14, [rsi+10h]                                                 ; +0xec, 0x1403907dc\nmov     r8, r14                                                        ; +0xf0, 0x1403907e0\ncmp     r14, rdx                                                       ; +0xf3, 0x1403907e3\ncmova   r8, rdx; Size                                                  ; +0xf6, 0x1403907e6\nlea     rdx, [rbp+4Fh+Buf2]; Buf2                                      ; +0xfa, 0x1403907ea\ncall    memcmp                                                         ; +0xfe, 0x1403907ee\ntest    eax, eax                                                       ; +0x103, 0x1403907f3\njnz     short loc_1403907FF                                            ; +0x105, 0x1403907f5\ncmp     r14, 2                                                         ; +0x107, 0x1403907f7\njb      short loc_1403907FF                                            ; +0x10b, 0x1403907fb\njbe     short loc_14039081B                                            ; +0x10d, 0x1403907fd\nmov     rcx, [rdi+168h]                                                ; +0x10f, 0x1403907ff\ntest    rcx, rcx                                                       ; +0x116, 0x140390806\njz      short loc_140390837                                            ; +0x119, 0x140390809\nmov     rax, [rcx]                                                     ; +0x11b, 0x14039080b\nmov     r8d, 40h ; '@'                                                 ; +0x11e, 0x14039080e\nmov     edx, r13d                                                      ; +0x124, 0x140390814\ncall    qword ptr [rax]                                                ; +0x127, 0x140390817\njmp     short loc_140390837                                            ; +0x129, 0x140390819\nmov     rcx, [rdi+168h]                                                ; +0x12b, 0x14039081b\ntest    rcx, rcx                                                       ; +0x132, 0x140390822\njz      short loc_140390837                                            ; +0x135, 0x140390825\nmov     rax, [rcx]                                                     ; +0x137, 0x140390827\nmov     r8d, 40h ; '@'                                                 ; +0x13a, 0x14039082a\nmov     edx, r13d                                                      ; +0x140, 0x140390830\ncall    qword ptr [rax+8]                                              ; +0x143, 0x140390833\nnop                                                                    ; +0x146, 0x140390836\nmov     rcx, rsi                                                       ; +0x147, 0x140390837\ncall    sub_14003D310                                                  ; +0x14a, 0x14039083a\nnop                                                                    ; +0x14f, 0x14039083f\njmp     loc_140390947                                                  ; +0x150, 0x140390840\nlea     rax, [rbp+4Fh+var_70]                                          ; +0x155, 0x140390845\nmov     [rbp+4Fh+var_B8], rax                                          ; +0x159, 0x140390849\nmov     rdx, r12                                                       ; +0x15d, 0x14039084d\nlea     rcx, [rbp+4Fh+var_70]                                          ; +0x160, 0x140390850\ncall    sub_14003F4F0                                                  ; +0x164, 0x140390854\nmov     rbx, rax                                                       ; +0x169, 0x140390859\nmov     rdx, r15                                                       ; +0x16c, 0x14039085c\nlea     rcx, [rbp+4Fh+var_90]                                          ; +0x16f, 0x14039085f\ncall    sub_14003F4F0                                                  ; +0x173, 0x140390863\nnop                                                                    ; +0x178, 0x140390868\nmov     r8, rbx                                                        ; +0x179, 0x140390869\nmov     rdx, rax                                                       ; +0x17c, 0x14039086c\nmov     rcx, rdi                                                       ; +0x17f, 0x14039086f\ncall    GJMultiplayerManager__onJoinLobbyCompleted                     ; +0x182, 0x140390872\njmp     loc_140390950                                                  ; +0x187, 0x140390877\nlea     rax, [rbp+4Fh+var_70]                                          ; +0x18c, 0x14039087c\nmov     [rbp+4Fh+var_B8], rax                                          ; +0x190, 0x140390880\nmov     rdx, r12                                                       ; +0x194, 0x140390884\nlea     rcx, [rbp+4Fh+var_70]                                          ; +0x197, 0x140390887\ncall    sub_14003F4F0                                                  ; +0x19b, 0x14039088b\nmov     rbx, rax                                                       ; +0x1a0, 0x140390890\nmov     [rbp+4Fh+var_C0], rax                                          ; +0x1a3, 0x140390893\nmov     rdx, r15                                                       ; +0x1a7, 0x140390897\nlea     rcx, [rbp+4Fh+var_90]                                          ; +0x1aa, 0x14039089a\ncall    sub_14003F4F0                                                  ; +0x1ae, 0x14039089e\nmov     rsi, rax                                                       ; +0x1b3, 0x1403908a3\nmov     [rbp+4Fh+var_B8], rax                                          ; +0x1b6, 0x1403908a6\nmov     rdx, rbx                                                       ; +0x1ba, 0x1403908aa\ncmp     qword ptr [rbx+18h], 0Fh                                       ; +0x1bd, 0x1403908ad\njbe     short loc_1403908B7                                            ; +0x1c2, 0x1403908b2\nmov     rdx, [rbx]                                                     ; +0x1c4, 0x1403908b4\nmov     rcx, rdi                                                       ; +0x1c7, 0x1403908b7\ncall    GJMultiplayerManager__removeDLFromActive                       ; +0x1ca, 0x1403908ba\nmov     rcx, rbx                                                       ; +0x1cf, 0x1403908bf\ncmp     qword ptr [rbx+18h], 0Fh                                       ; +0x1d2, 0x1403908c2\njbe     short loc_1403908CC                                            ; +0x1d7, 0x1403908c7\nmov     rcx, [rbx]; String                                             ; +0x1d9, 0x1403908c9\ncall    cs:atoi                                                        ; +0x1dc, 0x1403908cc\nmov     r13d, eax                                                      ; +0x1e2, 0x1403908d2\nxorps   xmm0, xmm0                                                     ; +0x1e5, 0x1403908d5\nmovups  [rbp+4Fh+Buf2], xmm0                                           ; +0x1e8, 0x1403908d8\nmov     edx, 2                                                         ; +0x1ec, 0x1403908dc\nmov     [rbp+4Fh+var_A0], rdx                                          ; +0x1f1, 0x1403908e1\nmov     [rbp+4Fh+var_98], 0Fh                                          ; +0x1f5, 0x1403908e5\nmov     ecx, 312Dh                                                     ; +0x1fd, 0x1403908ed\nmov     word ptr [rbp+4Fh+Buf2], cx                                    ; +0x202, 0x1403908f2\nmov     byte ptr [rbp+4Fh+Buf2+2], 0                                   ; +0x206, 0x1403908f6\nmov     rcx, rsi                                                       ; +0x20a, 0x1403908fa\ncmp     qword ptr [rsi+18h], 0Fh                                       ; +0x20d, 0x1403908fd\njbe     short loc_140390907                                            ; +0x212, 0x140390902\nmov     rcx, [rsi]; Buf1                                               ; +0x214, 0x140390904\nmov     r14, [rsi+10h]                                                 ; +0x217, 0x140390907\nmov     r8, r14                                                        ; +0x21b, 0x14039090b\ncmp     r14, rdx                                                       ; +0x21e, 0x14039090e\ncmova   r8, rdx; Size                                                  ; +0x221, 0x140390911\nlea     rdx, [rbp+4Fh+Buf2]; Buf2                                      ; +0x225, 0x140390915\ncall    memcmp                                                         ; +0x229, 0x140390919\ntest    eax, eax                                                       ; +0x22e, 0x14039091e\njnz     short loc_140390928                                            ; +0x230, 0x140390920\ncmp     r14, 2                                                         ; +0x232, 0x140390922\njz      short loc_14039093E                                            ; +0x236, 0x140390926\nmov     rcx, [rdi+160h]                                                ; +0x238, 0x140390928\ntest    rcx, rcx                                                       ; +0x23f, 0x14039092f\njz      short loc_14039093E                                            ; +0x242, 0x140390932\nmov     rax, [rcx]                                                     ; +0x244, 0x140390934\nmov     edx, r13d                                                      ; +0x247, 0x140390937\ncall    qword ptr [rax+10h]                                            ; +0x24a, 0x14039093a\nnop                                                                    ; +0x24d, 0x14039093d\nmov     rcx, rsi                                                       ; +0x24e, 0x14039093e\ncall    sub_14003D310                                                  ; +0x251, 0x140390941\nnop                                                                    ; +0x256, 0x140390946\nmov     rcx, rbx                                                       ; +0x257, 0x140390947\ncall    sub_14003D310                                                  ; +0x25a, 0x14039094a\nnop                                                                    ; +0x25f, 0x14039094f\nmov     rcx, r15                                                       ; +0x260, 0x140390950\ncall    sub_14003D310                                                  ; +0x263, 0x140390953\nnop                                                                    ; +0x268, 0x140390958\nmov     rcx, r12                                                       ; +0x269, 0x140390959\ncall    sub_14003D310                                                  ; +0x26c, 0x14039095c\nmov     rcx, [rbp+4Fh+var_40]                                          ; +0x271, 0x140390961\nxor     rcx, rsp; StackCookie                                          ; +0x275, 0x140390965\ncall    __security_check_cookie                                        ; +0x278, 0x140390968\nmov     rbx, [rsp+0E0h+arg_8]                                          ; +0x27d, 0x14039096d\nadd     rsp, 0B0h                                                      ; +0x285, 0x140390975\npop     r15                                                            ; +0x28c, 0x14039097c\npop     r14                                                            ; +0x28e, 0x14039097e\npop     r13                                                            ; +0x290, 0x140390980\npop     r12                                                            ; +0x292, 0x140390982\npop     rdi                                                            ; +0x294, 0x140390984\npop     rsi                                                            ; +0x295, 0x140390985\npop     rbp                                                            ; +0x296, 0x140390986\nretn                                                                   ; +0x297, 0x140390987", "xrefs": ["GJMultiplayerManager::onProcessHttpRequestCompleted @ 0x1403906a9", "<???> @ 0x140922fac"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}