//
// GJMultiplayerManager::handleIt from 0x1403906f0 to 0x140390988 (664 bytes)
//
// 2 xrefs:
// > GJMultiplayerManager::onProcessHttpRequestCompleted @ 0x1403906a9
// > ??> @ 0x140922fac
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:31:11 +0000
//
// Hidden C++ exception states: #wind=6
void __fastcall GJMultiplayerManager::handleIt(__int64 a1, __int64 a2, char *a3, __int64 a4, int a5)
{
const char *v8; // rbx
const void **v9; // rsi
const char *v10; // rdx
const char *v11; // rcx
unsigned int v12; // r13d
const void *v13; // rcx
unsigned __int64 v14; // r14
size_t v15; // r8
void (__fastcall ***v16)(_QWORD, _QWORD, __int64); // rcx
__int64 v17; // rcx
__int64 v18; // rbx
__int64 v19; // rax
const char *v20; // rdx
const char *v21; // rcx
unsigned int v22; // r13d
const void *v23; // rcx
unsigned __int64 v24; // r14
size_t v25; // r8
__int64 v26; // rcx
__int128 Buf2; // [rsp+30h] [rbp-61h] BYREF
__int64 v28; // [rsp+40h] [rbp-51h]
__int64 v29; // [rsp+48h] [rbp-49h]
_BYTE v30[32]; // [rsp+50h] [rbp-41h] BYREF
_BYTE v31[32]; // [rsp+70h] [rbp-21h] BYREF
char *v32; // [rsp+90h] [rbp-1h]
__int64 v33; // [rsp+98h] [rbp+7h]
v32 = a3;
v33 = a4;
GameToolbox::extractServerPopup(a3);
switch ( a5 )
{
case 13:
v8 = (const char *)sub_14003F4F0((__int64)v31, a4);
v9 = (const void **)sub_14003F4F0((__int64)v30, (__int64)a3);
v20 = v8;
if ( *((_QWORD *)v8 + 3) > 0xFu )
v20 = *(const char **)v8;
GJMultiplayerManager::removeDLFromActive(a1, v20);
v21 = v8;
if ( *((_QWORD *)v8 + 3) > 0xFu )
v21 = *(const char **)v8;
v22 = atoi(v21);
Buf2 = 0;
v28 = 2;
v29 = 15;
strcpy((char *)&Buf2, "-1");
v23 = v9;
if ( (unsigned __int64)v9[3] > 0xF )
v23 = *v9;
v24 = (unsigned __int64)v9[2];
v25 = v24;
if ( v24 > 2 )
v25 = 2;
if ( memcmp(v23, &Buf2, v25) || v24 != 2 )
{
v26 = *(_QWORD *)(a1 + 352);
if ( v26 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v26 + 16LL))(v26, v22);
}
goto LABEL_32;
case 63:
v18 = sub_14003F4F0((__int64)v31, a4);
v19 = sub_14003F4F0((__int64)v30, (__int64)a3);
GJMultiplayerManager::onJoinLobbyCompleted(a1, v19, v18);
break;
case 64:
v8 = (const char *)sub_14003F4F0((__int64)v30, a4);
v9 = (const void **)sub_14003F4F0((__int64)v31, (__int64)a3);
v10 = v8;
if ( *((_QWORD *)v8 + 3) > 0xFu )
v10 = *(const char **)v8;
GJMultiplayerManager::removeDLFromActive(a1, v10);
v11 = v8;
if ( *((_QWORD *)v8 + 3) > 0xFu )
v11 = *(const char **)v8;
v12 = atoi(v11);
Buf2 = 0;
v28 = 2;
v29 = 15;
strcpy((char *)&Buf2, "-1");
v13 = v9;
if ( (unsigned __int64)v9[3] > 0xF )
v13 = *v9;
v14 = (unsigned __int64)v9[2];
v15 = v14;
if ( v14 > 2 )
v15 = 2;
if ( !memcmp(v13, &Buf2, v15) && v14 == 2 )
{
v17 = *(_QWORD *)(a1 + 360);
if ( v17 )
(*(void (__fastcall **)(__int64, _QWORD, __int64))(*(_QWORD *)v17 + 8LL))(v17, v12, 64);
}
else
{
v16 = *(void (__fastcall ****)(_QWORD, _QWORD, __int64))(a1 + 360);
if ( v16 )
(**v16)(v16, v12, 64);
}
LABEL_32:
sub_14003D310((__int64)v9);
sub_14003D310((__int64)v8);
break;
}
sub_14003D310((__int64)a3);
sub_14003D310(a4);
}