{"type": "func", "start": 5371341488, "end": 5371342144, "name": "GJMultiplayerManager::handleIt", "pseudocode": "// \n// GJMultiplayerManager::handleIt from 0x140282ab0 to 0x140282d40 (656 bytes)\n// \n// 2 xrefs:\n// > GJMultiplayerManager::onProcessHttpRequestCompleted @ 0x140282a69\n// > <???> @ 0x1406d1490\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\n// Hidden C++ exception states: #wind=6\nvoid __fastcall GJMultiplayerManager::handleIt(GJMultiplayerManager *a1, __int64 a2, __int64 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  UploadActionDelegate *v16; // rcx\n  UploadActionDelegate *m_uploadDelegate; // 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  GJMPDelegate *m_mpDelegate; // rcx\n  _BYTE v27[32]; // [rsp+30h] [rbp-61h] BYREF\n  _BYTE v28[32]; // [rsp+50h] [rbp-41h] BYREF\n  __int64 v29; // [rsp+70h] [rbp-21h]\n  __int64 v30; // [rsp+78h] [rbp-19h]\n  __int128 Buf2; // [rsp+80h] [rbp-11h] BYREF\n  __int64 v32; // [rsp+90h] [rbp-1h]\n  __int64 v33; // [rsp+98h] [rbp+7h]\n\n  v29 = a3;\n  v30 = a4;\n  switch ( a5 )\n  {\n    case 13:\n      v8 = (const char *)sub_14003BDB0((__int64)v28, a4);\n      v9 = (const void **)sub_14003BDB0((__int64)v27, 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      v32 = 2;\n      v33 = 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        m_mpDelegate = a1->m_mpDelegate;\n        if ( m_mpDelegate )\n          m_mpDelegate->didUploadMPComment(m_mpDelegate, v22);\n      }\n      goto LABEL_32;\n    case 57:\n      v18 = sub_14003BDB0((__int64)v28, a4);\n      v19 = sub_14003BDB0((__int64)v27, a3);\n      GJMultiplayerManager::onJoinLobbyCompleted(a1, v19, v18);\n      break;\n    case 58:\n      v8 = (const char *)sub_14003BDB0((__int64)v27, a4);\n      v9 = (const void **)sub_14003BDB0((__int64)v28, 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      v32 = 2;\n      v33 = 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        m_uploadDelegate = a1->m_uploadDelegate;\n        if ( m_uploadDelegate )\n          m_uploadDelegate->uploadActionFailed(m_uploadDelegate, v12, 58);\n      }\n      else\n      {\n        v16 = a1->m_uploadDelegate;\n        if ( v16 )\n          v16->uploadActionFinished(v16, v12, 58);\n      }\nLABEL_32:\n      sub_14003A830((__int64)v9);\n      sub_14003A830((__int64)v8);\n      break;\n  }\n  sub_14003A830(a3);\n  sub_14003A830(a4);\n}", "assembly": "; \n; GJMultiplayerManager::handleIt from 0x140282ab0 to 0x140282d40 (656 bytes)\n; \n; 2 xrefs:\n; > GJMultiplayerManager::onProcessHttpRequestCompleted @ 0x140282a69\n; > <???> @ 0x1406d1490\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\nmov     [rsp-8+arg_8], rbx                                             ; +0x0, 0x140282ab0\npush    rbp                                                            ; +0x5, 0x140282ab5\npush    rsi                                                            ; +0x6, 0x140282ab6\npush    rdi                                                            ; +0x7, 0x140282ab7\npush    r12                                                            ; +0x8, 0x140282ab8\npush    r13                                                            ; +0xa, 0x140282aba\npush    r14                                                            ; +0xc, 0x140282abc\npush    r15                                                            ; +0xe, 0x140282abe\nlea     rbp, [rsp-1Fh]                                                 ; +0x10, 0x140282ac0\nsub     rsp, 0B0h                                                      ; +0x15, 0x140282ac5\nmov     rax, cs:__security_cookie                                      ; +0x1c, 0x140282acc\nxor     rax, rsp                                                       ; +0x23, 0x140282ad3\nmov     [rbp+4Fh+var_40], rax                                          ; +0x26, 0x140282ad6\nmov     r12, r9                                                        ; +0x2a, 0x140282ada\nmov     r15, r8                                                        ; +0x2d, 0x140282add\nmov     rdi, rcx                                                       ; +0x30, 0x140282ae0\nmov     [rbp+4Fh+var_70], r8                                           ; +0x33, 0x140282ae3\nmov     [rbp+4Fh+var_68], r9                                           ; +0x37, 0x140282ae7\nmov     ecx, [rbp+4Fh+arg_20]                                          ; +0x3b, 0x140282aeb\nsub     ecx, 0Dh                                                       ; +0x3e, 0x140282aee\njz      loc_140282C34                                                  ; +0x41, 0x140282af1\nsub     ecx, 2Ch ; ','                                                 ; +0x47, 0x140282af7\njz      loc_140282BFD                                                  ; +0x4a, 0x140282afa\ncmp     ecx, 1                                                         ; +0x50, 0x140282b00\njnz     loc_140282D08                                                  ; +0x53, 0x140282b03\nlea     rax, [rbp+4Fh+var_B0]                                          ; +0x59, 0x140282b09\nmov     [rbp+4Fh+var_C0], rax                                          ; +0x5d, 0x140282b0d\nmov     rdx, r9                                                        ; +0x61, 0x140282b11\nlea     rcx, [rbp+4Fh+var_B0]                                          ; +0x64, 0x140282b14\ncall    sub_14003BDB0                                                  ; +0x68, 0x140282b18\nmov     rbx, rax                                                       ; +0x6d, 0x140282b1d\nmov     [rbp+4Fh+var_B8], rax                                          ; +0x70, 0x140282b20\nmov     rdx, r15                                                       ; +0x74, 0x140282b24\nlea     rcx, [rbp+4Fh+var_90]                                          ; +0x77, 0x140282b27\ncall    sub_14003BDB0                                                  ; +0x7b, 0x140282b2b\nmov     rsi, rax                                                       ; +0x80, 0x140282b30\nmov     [rbp+4Fh+var_C0], rax                                          ; +0x83, 0x140282b33\nmov     rdx, rbx                                                       ; +0x87, 0x140282b37\ncmp     qword ptr [rbx+18h], 0Fh                                       ; +0x8a, 0x140282b3a\njbe     short loc_140282B44                                            ; +0x8f, 0x140282b3f\nmov     rdx, [rbx]                                                     ; +0x91, 0x140282b41\nmov     rcx, rdi                                                       ; +0x94, 0x140282b44\ncall    GJMultiplayerManager__removeDLFromActive                       ; +0x97, 0x140282b47\nmov     rcx, rbx                                                       ; +0x9c, 0x140282b4c\ncmp     qword ptr [rbx+18h], 0Fh                                       ; +0x9f, 0x140282b4f\njbe     short loc_140282B59                                            ; +0xa4, 0x140282b54\nmov     rcx, [rbx]; String                                             ; +0xa6, 0x140282b56\ncall    cs:atoi                                                        ; +0xa9, 0x140282b59\nmov     r13d, eax                                                      ; +0xaf, 0x140282b5f\nxorps   xmm0, xmm0                                                     ; +0xb2, 0x140282b62\nmovups  [rbp+4Fh+Buf2], xmm0                                           ; +0xb5, 0x140282b65\nmov     edx, 2                                                         ; +0xb9, 0x140282b69\nmov     [rbp+4Fh+var_50], rdx                                          ; +0xbe, 0x140282b6e\nmov     [rbp+4Fh+var_48], 0Fh                                          ; +0xc2, 0x140282b72\nmov     ecx, 312Dh                                                     ; +0xca, 0x140282b7a\nmov     word ptr [rbp+4Fh+Buf2], cx                                    ; +0xcf, 0x140282b7f\nmov     byte ptr [rbp+4Fh+Buf2+2], 0                                   ; +0xd3, 0x140282b83\nmov     rcx, rsi                                                       ; +0xd7, 0x140282b87\ncmp     qword ptr [rsi+18h], 0Fh                                       ; +0xda, 0x140282b8a\njbe     short loc_140282B94                                            ; +0xdf, 0x140282b8f\nmov     rcx, [rsi]; Buf1                                               ; +0xe1, 0x140282b91\nmov     r14, [rsi+10h]                                                 ; +0xe4, 0x140282b94\nmov     r8, r14                                                        ; +0xe8, 0x140282b98\ncmp     r14, rdx                                                       ; +0xeb, 0x140282b9b\ncmova   r8, rdx; Size                                                  ; +0xee, 0x140282b9e\nlea     rdx, [rbp+4Fh+Buf2]; Buf2                                      ; +0xf2, 0x140282ba2\ncall    memcmp                                                         ; +0xf6, 0x140282ba6\ntest    eax, eax                                                       ; +0xfb, 0x140282bab\njnz     short loc_140282BB7                                            ; +0xfd, 0x140282bad\ncmp     r14, 2                                                         ; +0xff, 0x140282baf\njb      short loc_140282BB7                                            ; +0x103, 0x140282bb3\njbe     short loc_140282BD3                                            ; +0x105, 0x140282bb5\nmov     rcx, [rdi+168h]                                                ; +0x107, 0x140282bb7\ntest    rcx, rcx                                                       ; +0x10e, 0x140282bbe\njz      short loc_140282BEF                                            ; +0x111, 0x140282bc1\nmov     rax, [rcx]                                                     ; +0x113, 0x140282bc3\nmov     r8d, 3Ah ; ':'                                                 ; +0x116, 0x140282bc6\nmov     edx, r13d                                                      ; +0x11c, 0x140282bcc\ncall    qword ptr [rax]                                                ; +0x11f, 0x140282bcf\njmp     short loc_140282BEF                                            ; +0x121, 0x140282bd1\nmov     rcx, [rdi+168h]                                                ; +0x123, 0x140282bd3\ntest    rcx, rcx                                                       ; +0x12a, 0x140282bda\njz      short loc_140282BEF                                            ; +0x12d, 0x140282bdd\nmov     rax, [rcx]                                                     ; +0x12f, 0x140282bdf\nmov     r8d, 3Ah ; ':'                                                 ; +0x132, 0x140282be2\nmov     edx, r13d                                                      ; +0x138, 0x140282be8\ncall    qword ptr [rax+8]                                              ; +0x13b, 0x140282beb\nnop                                                                    ; +0x13e, 0x140282bee\nmov     rcx, rsi                                                       ; +0x13f, 0x140282bef\ncall    sub_14003A830                                                  ; +0x142, 0x140282bf2\nnop                                                                    ; +0x147, 0x140282bf7\njmp     loc_140282CFF                                                  ; +0x148, 0x140282bf8\nlea     rax, [rbp+4Fh+var_90]                                          ; +0x14d, 0x140282bfd\nmov     [rbp+4Fh+var_B8], rax                                          ; +0x151, 0x140282c01\nmov     rdx, r12                                                       ; +0x155, 0x140282c05\nlea     rcx, [rbp+4Fh+var_90]                                          ; +0x158, 0x140282c08\ncall    sub_14003BDB0                                                  ; +0x15c, 0x140282c0c\nmov     rbx, rax                                                       ; +0x161, 0x140282c11\nmov     rdx, r15                                                       ; +0x164, 0x140282c14\nlea     rcx, [rbp+4Fh+var_B0]                                          ; +0x167, 0x140282c17\ncall    sub_14003BDB0                                                  ; +0x16b, 0x140282c1b\nnop                                                                    ; +0x170, 0x140282c20\nmov     r8, rbx                                                        ; +0x171, 0x140282c21\nmov     rdx, rax                                                       ; +0x174, 0x140282c24\nmov     rcx, rdi                                                       ; +0x177, 0x140282c27\ncall    GJMultiplayerManager__onJoinLobbyCompleted                     ; +0x17a, 0x140282c2a\njmp     loc_140282D08                                                  ; +0x17f, 0x140282c2f\nlea     rax, [rbp+4Fh+var_90]                                          ; +0x184, 0x140282c34\nmov     [rbp+4Fh+var_B8], rax                                          ; +0x188, 0x140282c38\nmov     rdx, r12                                                       ; +0x18c, 0x140282c3c\nlea     rcx, [rbp+4Fh+var_90]                                          ; +0x18f, 0x140282c3f\ncall    sub_14003BDB0                                                  ; +0x193, 0x140282c43\nmov     rbx, rax                                                       ; +0x198, 0x140282c48\nmov     [rbp+4Fh+var_C0], rax                                          ; +0x19b, 0x140282c4b\nmov     rdx, r15                                                       ; +0x19f, 0x140282c4f\nlea     rcx, [rbp+4Fh+var_B0]                                          ; +0x1a2, 0x140282c52\ncall    sub_14003BDB0                                                  ; +0x1a6, 0x140282c56\nmov     rsi, rax                                                       ; +0x1ab, 0x140282c5b\nmov     [rbp+4Fh+var_B8], rax                                          ; +0x1ae, 0x140282c5e\nmov     rdx, rbx                                                       ; +0x1b2, 0x140282c62\ncmp     qword ptr [rbx+18h], 0Fh                                       ; +0x1b5, 0x140282c65\njbe     short loc_140282C6F                                            ; +0x1ba, 0x140282c6a\nmov     rdx, [rbx]                                                     ; +0x1bc, 0x140282c6c\nmov     rcx, rdi                                                       ; +0x1bf, 0x140282c6f\ncall    GJMultiplayerManager__removeDLFromActive                       ; +0x1c2, 0x140282c72\nmov     rcx, rbx                                                       ; +0x1c7, 0x140282c77\ncmp     qword ptr [rbx+18h], 0Fh                                       ; +0x1ca, 0x140282c7a\njbe     short loc_140282C84                                            ; +0x1cf, 0x140282c7f\nmov     rcx, [rbx]; String                                             ; +0x1d1, 0x140282c81\ncall    cs:atoi                                                        ; +0x1d4, 0x140282c84\nmov     r13d, eax                                                      ; +0x1da, 0x140282c8a\nxorps   xmm0, xmm0                                                     ; +0x1dd, 0x140282c8d\nmovups  [rbp+4Fh+Buf2], xmm0                                           ; +0x1e0, 0x140282c90\nmov     edx, 2                                                         ; +0x1e4, 0x140282c94\nmov     [rbp+4Fh+var_50], rdx                                          ; +0x1e9, 0x140282c99\nmov     [rbp+4Fh+var_48], 0Fh                                          ; +0x1ed, 0x140282c9d\nmov     ecx, 312Dh                                                     ; +0x1f5, 0x140282ca5\nmov     word ptr [rbp+4Fh+Buf2], cx                                    ; +0x1fa, 0x140282caa\nmov     byte ptr [rbp+4Fh+Buf2+2], 0                                   ; +0x1fe, 0x140282cae\nmov     rcx, rsi                                                       ; +0x202, 0x140282cb2\ncmp     qword ptr [rsi+18h], 0Fh                                       ; +0x205, 0x140282cb5\njbe     short loc_140282CBF                                            ; +0x20a, 0x140282cba\nmov     rcx, [rsi]; Buf1                                               ; +0x20c, 0x140282cbc\nmov     r14, [rsi+10h]                                                 ; +0x20f, 0x140282cbf\nmov     r8, r14                                                        ; +0x213, 0x140282cc3\ncmp     r14, rdx                                                       ; +0x216, 0x140282cc6\ncmova   r8, rdx; Size                                                  ; +0x219, 0x140282cc9\nlea     rdx, [rbp+4Fh+Buf2]; Buf2                                      ; +0x21d, 0x140282ccd\ncall    memcmp                                                         ; +0x221, 0x140282cd1\ntest    eax, eax                                                       ; +0x226, 0x140282cd6\njnz     short loc_140282CE0                                            ; +0x228, 0x140282cd8\ncmp     r14, 2                                                         ; +0x22a, 0x140282cda\njz      short loc_140282CF6                                            ; +0x22e, 0x140282cde\nmov     rcx, [rdi+160h]                                                ; +0x230, 0x140282ce0\ntest    rcx, rcx                                                       ; +0x237, 0x140282ce7\njz      short loc_140282CF6                                            ; +0x23a, 0x140282cea\nmov     rax, [rcx]                                                     ; +0x23c, 0x140282cec\nmov     edx, r13d                                                      ; +0x23f, 0x140282cef\ncall    qword ptr [rax+10h]                                            ; +0x242, 0x140282cf2\nnop                                                                    ; +0x245, 0x140282cf5\nmov     rcx, rsi                                                       ; +0x246, 0x140282cf6\ncall    sub_14003A830                                                  ; +0x249, 0x140282cf9\nnop                                                                    ; +0x24e, 0x140282cfe\nmov     rcx, rbx                                                       ; +0x24f, 0x140282cff\ncall    sub_14003A830                                                  ; +0x252, 0x140282d02\nnop                                                                    ; +0x257, 0x140282d07\nmov     rcx, r15                                                       ; +0x258, 0x140282d08\ncall    sub_14003A830                                                  ; +0x25b, 0x140282d0b\nnop                                                                    ; +0x260, 0x140282d10\nmov     rcx, r12                                                       ; +0x261, 0x140282d11\ncall    sub_14003A830                                                  ; +0x264, 0x140282d14\nmov     rcx, [rbp+4Fh+var_40]                                          ; +0x269, 0x140282d19\nxor     rcx, rsp; StackCookie                                          ; +0x26d, 0x140282d1d\ncall    __security_check_cookie                                        ; +0x270, 0x140282d20\nmov     rbx, [rsp+0E0h+arg_8]                                          ; +0x275, 0x140282d25\nadd     rsp, 0B0h                                                      ; +0x27d, 0x140282d2d\npop     r15                                                            ; +0x284, 0x140282d34\npop     r14                                                            ; +0x286, 0x140282d36\npop     r13                                                            ; +0x288, 0x140282d38\npop     r12                                                            ; +0x28a, 0x140282d3a\npop     rdi                                                            ; +0x28c, 0x140282d3c\npop     rsi                                                            ; +0x28d, 0x140282d3d\npop     rbp                                                            ; +0x28e, 0x140282d3e\nretn                                                                   ; +0x28f, 0x140282d3f", "xrefs": ["GJMultiplayerManager::onProcessHttpRequestCompleted @ 0x140282a69", "<???> @ 0x1406d1490"], "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"}