//
// GJBaseGameLayer::restoreRemap from 0x1403247c0 to 0x14032553a (3450 bytes)
//
// 1 xrefs:
// > GJBaseGameLayer::spawnObject @ 0x140322922
//
// 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:30:26 +0000
//
__int64 __fastcall GJBaseGameLayer::restoreRemap(__int64 a1, __int64 a2, _QWORD *a3)
{
__int64 v3; // r10
__int64 *v5; // rcx
__int64 v6; // rdx
__int64 v7; // rax
__int64 v8; // rcx
__int64 v9; // r10
__int64 *v10; // rcx
__int64 v11; // rax
__int64 v12; // rcx
__int64 v13; // r10
__int64 *v14; // rcx
__int64 v15; // rax
__int64 v16; // rcx
__int64 v17; // r10
__int64 *v18; // rcx
__int64 v19; // rax
__int64 v20; // rcx
__int64 v21; // r10
__int64 *v22; // rcx
__int64 v23; // rax
__int64 v24; // rcx
__int64 v25; // r10
__int64 *v26; // rcx
__int64 v27; // rax
__int64 v28; // rcx
__int64 result; // rax
_DWORD *v30; // rdx
_DWORD *i; // rcx
__int64 v32; // r10
__int64 *v33; // rcx
__int64 v34; // rax
__int64 v35; // rcx
__int64 v36; // r10
__int64 *v37; // rcx
__int64 v38; // rax
__int64 v39; // rcx
__int64 v40; // r10
__int64 *v41; // rcx
__int64 v42; // rax
__int64 v43; // rcx
__int64 v44; // r10
__int64 *v45; // rcx
__int64 v46; // rax
__int64 v47; // rcx
__int64 v48; // r10
__int64 *v49; // rcx
__int64 v50; // rcx
__int64 v51; // r10
__int64 *v52; // rcx
__int64 v53; // rcx
__int64 v54; // r10
__int64 *v55; // rcx
__int64 v56; // rax
__int64 v57; // rcx
__int64 v58; // r10
__int64 *v59; // rcx
__int64 v60; // rax
__int64 v61; // rcx
__int64 v62; // r10
__int64 *v63; // rcx
__int64 v64; // rax
__int64 v65; // rcx
__int64 v66; // r10
__int64 *v67; // rcx
__int64 v68; // rax
__int64 v69; // rcx
__int64 v70; // r10
__int64 *v71; // rcx
__int64 v72; // rcx
__int64 v73; // r10
__int64 *v74; // rcx
__int64 v75; // rax
__int64 v76; // rcx
__int64 v77; // r10
__int64 *v78; // rcx
__int64 v79; // rax
__int64 v80; // rcx
__int64 v81; // r10
__int64 *v82; // rcx
__int64 v83; // rcx
__int64 v84; // r10
__int64 *v85; // rcx
__int64 v86; // rax
__int64 v87; // rcx
__int64 v88; // r10
__int64 *v89; // rcx
__int64 v90; // rax
__int64 v91; // rcx
__int64 v92; // r10
__int64 *v93; // rcx
__int64 v94; // rax
__int64 v95; // rcx
__int64 v96; // r10
__int64 *v97; // rcx
__int64 v98; // rcx
__int64 v99; // r10
__int64 *v100; // rcx
__int64 v101; // rax
__int64 v102; // rcx
__int64 v103; // r10
__int64 *v104; // rcx
__int64 v105; // rax
__int64 v106; // rcx
__int64 v107; // r10
__int64 *v108; // rcx
__int64 v109; // rax
__int64 v110; // rcx
__int64 v111; // r10
__int64 *v112; // rcx
__int64 v113; // rax
__int64 v114; // rcx
__int64 v115; // r10
__int64 *v116; // rcx
__int64 v117; // rcx
__int64 v118; // r10
__int64 *v119; // rcx
__int64 v120; // rax
__int64 v121; // rcx
__int64 v122; // r10
__int64 *v123; // rcx
__int64 v124; // rcx
__int64 v125; // r10
__int64 *v126; // rcx
__int64 v127; // rax
__int64 v128; // rcx
__int64 v129; // r10
__int64 *v130; // rcx
__int64 v131; // rax
__int64 v132; // rcx
__int64 v133; // r10
__int64 *v134; // rcx
__int64 v135; // rcx
v3 = a3[1];
v5 = (__int64 *)(a3[3] + 16 * (a3[6] & 0xED75620290A80776uLL));
v6 = 0;
v7 = v5[1];
if ( v7 == v3 )
{
LABEL_6:
v7 = 0;
goto LABEL_7;
}
v8 = *v5;
if ( *(_DWORD *)(v7 + 16) != 51 )
{
while ( v7 != v8 )
{
v7 = *(_QWORD *)(v7 + 8);
if ( *(_DWORD *)(v7 + 16) == 51 )
goto LABEL_7;
}
goto LABEL_6;
}
LABEL_7:
if ( v7 && v7 != v3 )
*(_DWORD *)(a2 + 1480) = *(_DWORD *)(v7 + 20);
v9 = a3[1];
v10 = (__int64 *)(a3[3] + 16 * (a3[6] & 0x6BE0747C289C0282LL));
v11 = v10[1];
if ( v11 == v9 )
{
LABEL_15:
v11 = 0;
goto LABEL_16;
}
v12 = *v10;
if ( *(_DWORD *)(v11 + 16) != 71 )
{
while ( v11 != v12 )
{
v11 = *(_QWORD *)(v11 + 8);
if ( *(_DWORD *)(v11 + 16) == 71 )
goto LABEL_16;
}
goto LABEL_15;
}
LABEL_16:
if ( v11 && v11 != v9 )
*(_DWORD *)(a2 + 1484) = *(_DWORD *)(v11 + 20);
v13 = a3[1];
v14 = (__int64 *)(a3[3] + 16 * (a3[6] & 0x4B7B391A8E990145LL));
v15 = v14[1];
if ( v15 == v13 )
{
LABEL_24:
v15 = 0;
goto LABEL_25;
}
v16 = *v14;
if ( *(_DWORD *)(v15 + 16) != 80 )
{
while ( v15 != v16 )
{
v15 = *(_QWORD *)(v15 + 8);
if ( *(_DWORD *)(v15 + 16) == 80 )
goto LABEL_25;
}
goto LABEL_24;
}
LABEL_25:
if ( v15 && v15 != v13 )
*(_DWORD *)(a2 + 1696) = *(_DWORD *)(v15 + 20);
v17 = a3[1];
v18 = (__int64 *)(a3[3] + 16 * (a3[6] & 0x6B6095443DA5B01ALL));
v19 = v18[1];
if ( v19 == v17 )
{
LABEL_33:
v19 = 0;
goto LABEL_34;
}
v20 = *v18;
if ( *(_DWORD *)(v19 + 16) != 95 )
{
while ( v19 != v20 )
{
v19 = *(_QWORD *)(v19 + 8);
if ( *(_DWORD *)(v19 + 16) == 95 )
goto LABEL_34;
}
goto LABEL_33;
}
LABEL_34:
if ( v19 && v19 != v17 )
*(_DWORD *)(a2 + 1684) = *(_DWORD *)(v19 + 20);
v21 = a3[1];
v22 = (__int64 *)(a3[3] + 16 * (a3[6] & 0x1E2DD4F45E8E6139LL));
v23 = v22[1];
if ( v23 == v21 )
{
LABEL_42:
v23 = 0;
goto LABEL_43;
}
v24 = *v22;
if ( *(_DWORD *)(v23 + 16) != 534 )
{
while ( v23 != v24 )
{
v23 = *(_QWORD *)(v23 + 8);
if ( *(_DWORD *)(v23 + 16) == 534 )
goto LABEL_43;
}
goto LABEL_42;
}
LABEL_43:
if ( v23 && v23 != v21 )
*(_DWORD *)(a2 + 1688) = *(_DWORD *)(v23 + 20);
v25 = a3[1];
v26 = (__int64 *)(a3[3] + 16 * (a3[6] & 0xCBBB28B684142A79uLL));
v27 = v26[1];
if ( v27 == v25 )
{
LABEL_51:
v27 = 0;
goto LABEL_52;
}
v28 = *v26;
if ( *(_DWORD *)(v27 + 16) != 76 )
{
while ( v27 != v28 )
{
v27 = *(_QWORD *)(v27 + 8);
if ( *(_DWORD *)(v27 + 16) == 76 )
goto LABEL_52;
}
goto LABEL_51;
}
LABEL_52:
if ( v27 && v27 != v25 )
*(_DWORD *)(a2 + 1668) = *(_DWORD *)(v27 + 20);
result = *(unsigned int *)(a2 + 1036);
if ( (int)result > 2903 )
{
if ( (int)result <= 3602 )
{
if ( (_DWORD)result != 3602 )
{
LODWORD(result) = result - 3006;
switch ( (int)result )
{
case 0:
case 1:
case 2:
case 3:
case 4:
case 11:
case 12:
case 13:
case 14:
case 15:
case 17:
v73 = a3[1];
v74 = (__int64 *)(a3[3] + 16 * (a3[6] & 0xA9D64FAD292E3204uLL));
v75 = v74[1];
if ( v75 == v73 )
goto LABEL_168;
v76 = *v74;
if ( *(_DWORD *)(v75 + 16) == 225 )
goto LABEL_169;
break;
case 10:
goto LABEL_286;
default:
return (unsigned int)result;
}
while ( v75 != v76 )
{
v75 = *(_QWORD *)(v75 + 8);
if ( *(_DWORD *)(v75 + 16) == 225 )
goto LABEL_169;
}
LABEL_168:
v75 = 0;
LABEL_169:
if ( v75 && v75 != v73 )
*(_DWORD *)(a2 + 2008) = *(_DWORD *)(v75 + 20);
v77 = a3[1];
v78 = (__int64 *)(a3[3] + 16 * (a3[6] & 0x42A71E5D3B5EE722LL));
v79 = v78[1];
if ( v79 != v77 )
{
v80 = *v78;
if ( *(_DWORD *)(v79 + 16) == 344 )
goto LABEL_178;
while ( v79 != v80 )
{
v79 = *(_QWORD *)(v79 + 8);
if ( *(_DWORD *)(v79 + 16) == 344 )
goto LABEL_178;
}
}
v79 = 0;
LABEL_178:
if ( v79 && v79 != v77 )
*(_DWORD *)(a2 + 2048) = *(_DWORD *)(v79 + 20);
v81 = a3[1];
v82 = (__int64 *)(a3[3] + 16 * (a3[6] & 0x7434B00190DFCA3DLL));
result = v82[1];
if ( result != v81 )
{
v83 = *v82;
if ( *(_DWORD *)(result + 16) == 343 )
{
LABEL_185:
v6 = result;
}
else
{
while ( result != v83 )
{
result = *(_QWORD *)(result + 8);
if ( *(_DWORD *)(result + 16) == 343 )
goto LABEL_185;
}
}
}
if ( v6 && v6 != v81 )
{
result = *(unsigned __int16 *)(v6 + 20);
*(_WORD *)(a2 + 1020) = result;
}
return result;
}
LABEL_190:
v84 = a3[1];
v85 = (__int64 *)(a3[3] + 16 * (a3[6] & 0x41A75FED65724252LL));
v86 = v85[1];
if ( v86 != v84 )
{
v87 = *v85;
if ( *(_DWORD *)(v86 + 16) == 392 )
{
LABEL_196:
if ( v86 && v86 != v84 )
*(_DWORD *)(a2 + 1888) = *(_DWORD *)(v86 + 20);
v88 = a3[1];
v89 = (__int64 *)(a3[3] + 16 * (a3[6] & 0x71DFF3A7486249ADLL));
v90 = v89[1];
if ( v90 != v88 )
{
v91 = *v89;
if ( *(_DWORD *)(v90 + 16) == 455 )
{
LABEL_205:
if ( v90 && v90 != v88 )
*(_DWORD *)(a2 + 1976) = *(_DWORD *)(v90 + 20);
v92 = a3[1];
v93 = (__int64 *)(a3[3] + 16 * (a3[6] & 0xB1AAABFAA67BA757uLL));
v94 = v93[1];
if ( v94 != v92 )
{
v95 = *v93;
if ( *(_DWORD *)(v94 + 16) == 457 )
goto LABEL_214;
while ( v94 != v95 )
{
v94 = *(_QWORD *)(v94 + 8);
if ( *(_DWORD *)(v94 + 16) == 457 )
goto LABEL_214;
}
}
v94 = 0;
LABEL_214:
if ( v94 && v94 != v92 )
*(_DWORD *)(a2 + 1984) = *(_DWORD *)(v94 + 20);
v96 = a3[1];
v97 = (__int64 *)(a3[3] + 16 * (a3[6] & 0x427C7E9FED0CCBAALL));
result = v97[1];
if ( result != v96 )
{
v98 = *v97;
if ( *(_DWORD *)(result + 16) == 416 )
{
LABEL_221:
v6 = result;
}
else
{
while ( result != v98 )
{
result = *(_QWORD *)(result + 8);
if ( *(_DWORD *)(result + 16) == 416 )
goto LABEL_221;
}
}
}
if ( v6 && v6 != v96 )
{
result = *(unsigned int *)(v6 + 20);
*(_DWORD *)(a2 + 1936) = result;
}
return result;
}
while ( v90 != v91 )
{
v90 = *(_QWORD *)(v90 + 8);
if ( *(_DWORD *)(v90 + 16) == 455 )
goto LABEL_205;
}
}
v90 = 0;
goto LABEL_205;
}
while ( v86 != v87 )
{
v86 = *(_QWORD *)(v86 + 8);
if ( *(_DWORD *)(v86 + 16) == 392 )
goto LABEL_196;
}
}
v86 = 0;
goto LABEL_196;
}
result = (int)result - 3603;
switch ( (int)result )
{
case 0:
goto LABEL_190;
case 1:
v118 = a3[1];
v119 = (__int64 *)(a3[3] + 16 * (a3[6] & 0x735F914F094540E5LL));
v120 = v119[1];
if ( v120 == v118 )
goto LABEL_274;
v121 = *v119;
if ( *(_DWORD *)(v120 + 16) == 447 )
goto LABEL_275;
while ( v120 != v121 )
{
v120 = *(_QWORD *)(v120 + 8);
if ( *(_DWORD *)(v120 + 16) == 447 )
goto LABEL_275;
}
LABEL_274:
v120 = 0;
LABEL_275:
if ( v120 && v120 != v118 )
*(_DWORD *)(a2 + 1876) = *(_DWORD *)(v120 + 20);
v122 = a3[1];
v123 = (__int64 *)(a3[3] + 16 * (a3[6] & 0x3E687098AA3F46FELL));
result = v123[1];
if ( result != v122 )
{
v124 = *v123;
if ( *(_DWORD *)(result + 16) == 525 )
{
LABEL_282:
v6 = result;
}
else
{
while ( result != v124 )
{
result = *(_QWORD *)(result + 8);
if ( *(_DWORD *)(result + 16) == 525 )
goto LABEL_282;
}
}
}
if ( v6 && v6 != v122 )
{
result = *(unsigned int *)(v6 + 20);
*(_DWORD *)(a2 + 1880) = result;
}
return result;
case 2:
goto LABEL_225;
case 4:
goto LABEL_61;
case 57:
case 58:
LABEL_286:
v125 = a3[1];
v126 = (__int64 *)(a3[3] + 16 * (a3[6] & 0x3B184BC64E012D0LL));
v127 = v126[1];
if ( v127 == v125 )
goto LABEL_291;
v128 = *v126;
if ( *(_DWORD *)(v127 + 16) == 366 )
goto LABEL_292;
break;
default:
return (unsigned int)result;
}
while ( v127 != v128 )
{
v127 = *(_QWORD *)(v127 + 8);
if ( *(_DWORD *)(v127 + 16) == 366 )
goto LABEL_292;
}
LABEL_291:
v127 = 0;
LABEL_292:
if ( v127 && v127 != v125 )
*(_DWORD *)(a2 + 2084) = *(_DWORD *)(v127 + 20);
v129 = a3[1];
v130 = (__int64 *)(a3[3] + 16 * (a3[6] & 0x3C27BFFA30A24D8FLL));
v131 = v130[1];
if ( v131 != v129 )
{
v132 = *v130;
if ( *(_DWORD *)(v131 + 16) == 560 )
goto LABEL_301;
while ( v131 != v132 )
{
v131 = *(_QWORD *)(v131 + 8);
if ( *(_DWORD *)(v131 + 16) == 560 )
goto LABEL_301;
}
}
v131 = 0;
LABEL_301:
if ( v131 && v131 != v129 )
*(_DWORD *)(a2 + 1872) = *(_DWORD *)(v131 + 20);
v133 = a3[1];
v134 = (__int64 *)(a3[3] + 16 * (a3[6] & 0x3EE84FD095359966LL));
result = v134[1];
if ( result != v133 )
{
v135 = *v134;
if ( *(_DWORD *)(result + 16) == 565 )
{
LABEL_308:
v6 = result;
}
else
{
while ( result != v135 )
{
result = *(_QWORD *)(result + 8);
if ( *(_DWORD *)(result + 16) == 565 )
goto LABEL_308;
}
}
}
if ( v6 && v6 != v133 )
{
result = *(unsigned int *)(v6 + 20);
*(_DWORD *)(a2 + 1884) = result;
}
return result;
}
if ( (_DWORD)result == 2903 )
{
v54 = a3[1];
v55 = (__int64 *)(a3[3] + 16 * (a3[6] & 0xE8F6890B4DFF21CEuLL));
v56 = v55[1];
if ( v56 != v54 )
{
v57 = *v55;
if ( *(_DWORD *)(v56 + 16) == 203 )
{
LABEL_122:
if ( v56 && v56 != v54 )
*(_DWORD *)(a2 + 1868) = *(_DWORD *)(v56 + 20);
v58 = a3[1];
v59 = (__int64 *)(a3[3] + 16 * (a3[6] & 0xC9112CE19EF272F9uLL));
v60 = v59[1];
if ( v60 != v58 )
{
v61 = *v59;
if ( *(_DWORD *)(v60 + 16) == 204 )
{
LABEL_131:
if ( v60 && v60 != v58 )
*(_DWORD *)(a2 + 1872) = *(_DWORD *)(v60 + 20);
v62 = a3[1];
v63 = (__int64 *)(a3[3] + 16 * (a3[6] & 0x291680D948BCB668LL));
v64 = v63[1];
if ( v64 != v62 )
{
v65 = *v63;
if ( *(_DWORD *)(v64 + 16) == 205 )
{
LABEL_140:
if ( v64 && v64 != v62 )
*(_DWORD *)(a2 + 1876) = *(_DWORD *)(v64 + 20);
v66 = a3[1];
v67 = (__int64 *)(a3[3] + 16 * (a3[6] & 0x90684F24B5DEC1BLL));
v68 = v67[1];
if ( v68 != v66 )
{
v69 = *v67;
if ( *(_DWORD *)(v68 + 16) == 206 )
goto LABEL_149;
while ( v68 != v69 )
{
v68 = *(_QWORD *)(v68 + 8);
if ( *(_DWORD *)(v68 + 16) == 206 )
goto LABEL_149;
}
}
v68 = 0;
LABEL_149:
if ( v68 && v68 != v66 )
*(_DWORD *)(a2 + 1880) = *(_DWORD *)(v68 + 20);
v70 = a3[1];
v71 = (__int64 *)(a3[3] + 16 * (a3[6] & 0xA8D6913D53418D34uLL));
result = v71[1];
if ( result != v70 )
{
v72 = *v71;
if ( *(_DWORD *)(result + 16) == 209 )
{
LABEL_156:
v6 = result;
}
else
{
while ( result != v72 )
{
result = *(_QWORD *)(result + 8);
if ( *(_DWORD *)(result + 16) == 209 )
goto LABEL_156;
}
}
}
if ( v6 && v6 != v70 )
{
result = *(unsigned int *)(v6 + 20);
*(_DWORD *)(a2 + 1864) = result;
}
return result;
}
while ( v64 != v65 )
{
v64 = *(_QWORD *)(v64 + 8);
if ( *(_DWORD *)(v64 + 16) == 205 )
goto LABEL_140;
}
}
v64 = 0;
goto LABEL_140;
}
while ( v60 != v61 )
{
v60 = *(_QWORD *)(v60 + 8);
if ( *(_DWORD *)(v60 + 16) == 204 )
goto LABEL_131;
}
}
v60 = 0;
goto LABEL_131;
}
while ( v56 != v57 )
{
v56 = *(_QWORD *)(v56 + 8);
if ( *(_DWORD *)(v56 + 16) == 203 )
goto LABEL_122;
}
}
v56 = 0;
goto LABEL_122;
}
if ( (_DWORD)result != 901 )
{
if ( (_DWORD)result != 1346 )
{
if ( (_DWORD)result != 1934 )
{
if ( (_DWORD)result == 2068 )
{
LABEL_61:
v30 = *(_DWORD **)(a2 + 1864);
for ( i = *(_DWORD **)(a2 + 1856); i != v30; i += 4 )
{
result = (unsigned int)i[1];
*i = result;
}
}
return result;
}
LABEL_225:
v99 = a3[1];
v100 = (__int64 *)(a3[3] + 16 * (a3[6] & 0x41A75FED65724252LL));
v101 = v100[1];
if ( v101 != v99 )
{
v102 = *v100;
if ( *(_DWORD *)(v101 + 16) == 392 )
{
LABEL_231:
if ( v101 && v101 != v99 )
*(_DWORD *)(a2 + 1888) = *(_DWORD *)(v101 + 20);
v103 = a3[1];
v104 = (__int64 *)(a3[3] + 16 * (a3[6] & 0x71DFF3A7486249ADLL));
v105 = v104[1];
if ( v105 != v103 )
{
v106 = *v104;
if ( *(_DWORD *)(v105 + 16) == 455 )
{
LABEL_240:
if ( v105 && v105 != v103 )
*(_DWORD *)(a2 + 1976) = *(_DWORD *)(v105 + 20);
v107 = a3[1];
v108 = (__int64 *)(a3[3] + 16 * (a3[6] & 0xB1AAABFAA67BA757uLL));
v109 = v108[1];
if ( v109 != v107 )
{
v110 = *v108;
if ( *(_DWORD *)(v109 + 16) == 457 )
{
LABEL_249:
if ( v109 && v109 != v107 )
*(_DWORD *)(a2 + 1984) = *(_DWORD *)(v109 + 20);
v111 = a3[1];
v112 = (__int64 *)(a3[3] + 16 * (a3[6] & 0x427C7E9FED0CCBAALL));
v113 = v112[1];
if ( v113 != v111 )
{
v114 = *v112;
if ( *(_DWORD *)(v113 + 16) == 416 )
goto LABEL_258;
while ( v113 != v114 )
{
v113 = *(_QWORD *)(v113 + 8);
if ( *(_DWORD *)(v113 + 16) == 416 )
goto LABEL_258;
}
}
v113 = 0;
LABEL_258:
if ( v113 && v113 != v111 )
*(_DWORD *)(a2 + 1936) = *(_DWORD *)(v113 + 20);
v115 = a3[1];
v116 = (__int64 *)(a3[3] + 16 * (a3[6] & 0x42273F25506894BALL));
result = v116[1];
if ( result != v115 )
{
v117 = *v116;
if ( *(_DWORD *)(result + 16) == 432 )
{
LABEL_265:
v6 = result;
}
else
{
while ( result != v117 )
{
result = *(_QWORD *)(result + 8);
if ( *(_DWORD *)(result + 16) == 432 )
goto LABEL_265;
}
}
}
if ( v6 && v6 != v115 )
{
result = *(unsigned int *)(v6 + 20);
*(_DWORD *)(a2 + 2060) = result;
}
return result;
}
while ( v109 != v110 )
{
v109 = *(_QWORD *)(v109 + 8);
if ( *(_DWORD *)(v109 + 16) == 457 )
goto LABEL_249;
}
}
v109 = 0;
goto LABEL_249;
}
while ( v105 != v106 )
{
v105 = *(_QWORD *)(v105 + 8);
if ( *(_DWORD *)(v105 + 16) == 455 )
goto LABEL_240;
}
}
v105 = 0;
goto LABEL_240;
}
while ( v101 != v102 )
{
v101 = *(_QWORD *)(v101 + 8);
if ( *(_DWORD *)(v101 + 16) == 392 )
goto LABEL_231;
}
}
v101 = 0;
goto LABEL_231;
}
v32 = a3[1];
v33 = (__int64 *)(a3[3] + 16 * (a3[6] & 0xB2D50A27CABA679FuLL));
v34 = v33[1];
if ( v34 != v32 )
{
v35 = *v33;
if ( *(_DWORD *)(v34 + 16) == 401 )
{
LABEL_70:
if ( v34 && v34 != v32 )
*(_DWORD *)(a2 + 1572) = *(_DWORD *)(v34 + 20);
v36 = a3[1];
v37 = (__int64 *)(a3[3] + 16 * (a3[6] & 0xBBE7D05E3B27245BuLL));
v38 = v37[1];
if ( v38 != v36 )
{
v39 = *v37;
if ( *(_DWORD *)(v38 + 16) == 516 )
{
LABEL_79:
if ( v38 && v38 != v36 )
*(_DWORD *)(a2 + 1856) = *(_DWORD *)(v38 + 20);
v40 = a3[1];
v41 = (__int64 *)(a3[3] + 16 * (a3[6] & 0x3E931055F8916276LL));
v42 = v41[1];
if ( v42 != v40 )
{
v43 = *v41;
if ( *(_DWORD *)(v42 + 16) == 517 )
{
LABEL_88:
if ( v42 && v42 != v40 )
*(_DWORD *)(a2 + 1860) = *(_DWORD *)(v42 + 20);
v44 = a3[1];
v45 = (__int64 *)(a3[3] + 16 * (a3[6] & 0x1E83146EFB329829LL));
v46 = v45[1];
if ( v46 != v44 )
{
v47 = *v45;
if ( *(_DWORD *)(v46 + 16) == 518 )
goto LABEL_97;
while ( v46 != v47 )
{
v46 = *(_QWORD *)(v46 + 8);
if ( *(_DWORD *)(v46 + 16) == 518 )
goto LABEL_97;
}
}
v46 = 0;
LABEL_97:
if ( v46 && v46 != v44 )
*(_DWORD *)(a2 + 1864) = *(_DWORD *)(v46 + 20);
v48 = a3[1];
v49 = (__int64 *)(a3[3] + 16 * (a3[6] & 0x5BE27C66915CE0ECLL));
result = v49[1];
if ( result != v48 )
{
v50 = *v49;
if ( *(_DWORD *)(result + 16) == 519 )
{
LABEL_104:
v6 = result;
}
else
{
while ( result != v50 )
{
result = *(_QWORD *)(result + 8);
if ( *(_DWORD *)(result + 16) == 519 )
goto LABEL_104;
}
}
}
if ( v6 && v6 != v48 )
{
result = *(unsigned int *)(v6 + 20);
*(_DWORD *)(a2 + 1868) = result;
}
return result;
}
while ( v42 != v43 )
{
v42 = *(_QWORD *)(v42 + 8);
if ( *(_DWORD *)(v42 + 16) == 517 )
goto LABEL_88;
}
}
v42 = 0;
goto LABEL_88;
}
while ( v38 != v39 )
{
v38 = *(_QWORD *)(v38 + 8);
if ( *(_DWORD *)(v38 + 16) == 516 )
goto LABEL_79;
}
}
v38 = 0;
goto LABEL_79;
}
while ( v34 != v35 )
{
v34 = *(_QWORD *)(v34 + 8);
if ( *(_DWORD *)(v34 + 16) == 401 )
goto LABEL_70;
}
}
v34 = 0;
goto LABEL_70;
}
v51 = a3[1];
v52 = (__int64 *)(a3[3] + 16 * (a3[6] & 0xF2F501F5C577FC39uLL));
result = v52[1];
if ( result != v51 )
{
v53 = *v52;
if ( *(_DWORD *)(result + 16) == 395 )
{
LABEL_112:
v6 = result;
}
else
{
while ( result != v53 )
{
result = *(_QWORD *)(result + 8);
if ( *(_DWORD *)(result + 16) == 395 )
goto LABEL_112;
}
}
}
if ( v6 && v6 != v51 )
{
result = *(unsigned int *)(v6 + 20);
*(_DWORD *)(a2 + 1544) = result;
}
return result;
}