// // GJSmartTemplate::rotateKey from 0x1403ba7d0 to 0x1403bab2c (860 bytes) // // 2 xrefs: // > GJSmartTemplate::scanForPrefab @ 0x1403b831b // > @ 0x140923db0 // // 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:26 +0000 // // Hidden C++ exception states: #wind=2 __int64 __fastcall GJSmartTemplate::rotateKey(__int64 a1, unsigned __int64 a2, unsigned __int64 a3, __int64 a4) { int v4; // esi unsigned __int64 *v5; // rax unsigned __int64 v7; // rcx char *v8; // r8 unsigned int v9; // edi unsigned __int64 *v10; // rcx unsigned int v11; // r14d unsigned int v12; // ebp unsigned int v13; // ebx unsigned int v14; // r15d unsigned __int64 *v15; // rcx unsigned __int64 *v16; // r9 unsigned __int64 *v17; // rdx unsigned int v18; // ebp unsigned int v19; // r14d char v20; // r13 unsigned int v21; // r11d char v22; // r12 char v23; // r15 char v24; // r14 char v25; // bp char v26; // si char v27; // di int v28; // r11d char v29; // bl int v30; // r11d char v31; // al __int64 v32; // r10 unsigned int v33; // [rsp+20h] [rbp-78h] unsigned int v34; // [rsp+24h] [rbp-74h] unsigned int v35; // [rsp+28h] [rbp-70h] int v36; // [rsp+2Ch] [rbp-6Ch] __int64 v38; // [rsp+40h] [rbp-58h] v4 = a3; v36 = a3; v5 = (unsigned __int64 *)a2; v38 = a2; if ( (_DWORD)a3 ) { v7 = *(_QWORD *)(a2 + 16); if ( !v7 ) goto LABEL_38; v8 = (char *)a2; a2 = *(_QWORD *)(a2 + 24); if ( a2 > 0xF ) v8 = (char *)*v5; a3 = (unsigned int)*v8; v33 = a3; if ( v7 <= 1 ) goto LABEL_38; a3 = (unsigned __int64)v5; if ( a2 > 0xF ) a3 = *v5; v9 = *(char *)(a3 + 1); if ( v7 <= 2 ) goto LABEL_38; v10 = v5; if ( a2 > 0xF ) v10 = (unsigned __int64 *)*v5; v11 = *((char *)v10 + 2); v7 = v5[2]; if ( v7 <= 3 ) goto LABEL_38; a3 = (unsigned __int64)v5; if ( a2 > 0xF ) a3 = *v5; v12 = *(char *)(a3 + 3); if ( v7 <= 4 ) goto LABEL_38; a3 = (unsigned __int64)v5; if ( a2 > 0xF ) a3 = *v5; v13 = *(char *)(a3 + 4); if ( v7 <= 5 ) goto LABEL_38; v7 = (unsigned __int64)v5; if ( a2 > 0xF ) v7 = *v5; v14 = *(char *)(v7 + 5); a2 = v5[2]; if ( a2 <= 6 ) goto LABEL_38; v15 = v5; a3 = v5[3]; if ( a3 > 0xF ) v15 = (unsigned __int64 *)*v5; v7 = (unsigned int)*((char *)v15 + 6); if ( a2 <= 7 ) goto LABEL_38; v16 = v5; if ( a3 > 0xF ) v16 = (unsigned __int64 *)*v5; a4 = (unsigned int)*((char *)v16 + 7); if ( a2 <= 8 ) LABEL_38: sub_14003F4D0(v7, a2, a3, a4); v17 = v5; if ( a3 > 0xF ) v17 = (unsigned __int64 *)*v5; switch ( v4 ) { case 90: v35 = v12; v34 = v13; v13 = v11; v18 = a4; v19 = v14; break; case 180: v35 = v11; v34 = v9; v9 = v12; v18 = *((char *)v17 + 8); v19 = a4; LODWORD(v7) = v14; break; case 270: v35 = v13; v34 = v12; v13 = v9; v9 = v11; v18 = v7; v19 = *((char *)v17 + 8); LODWORD(v7) = a4; break; default: v35 = v33; v34 = v33; v13 = v33; v9 = v33; v18 = v33; v19 = v33; LODWORD(v7) = v33; break; } v20 = GJSmartTemplate::rotateBlockType(v7, v4); v22 = GJSmartTemplate::rotateBlockType(v21, v4); v23 = GJSmartTemplate::rotateBlockType(v19, v4); v24 = GJSmartTemplate::rotateBlockType(v18, v4); v25 = GJSmartTemplate::rotateBlockType(v9, v4); v26 = GJSmartTemplate::rotateBlockType(v13, v4); v27 = GJSmartTemplate::rotateBlockType(v34, v36); v29 = GJSmartTemplate::rotateBlockType(v35, v28); v31 = GJSmartTemplate::rotateBlockType(v33, v30); *(_OWORD *)v32 = 0; *(_QWORD *)(v32 + 16) = 0; *(_QWORD *)(v32 + 24) = 15; *(_BYTE *)v32 = 0; sub_14003DBD0((void **)v32, v31); sub_14003DBD0((void **)a1, v29); sub_14003DBD0((void **)a1, v27); sub_14003DBD0((void **)a1, v26); sub_14003DBD0((void **)a1, v25); sub_14003DBD0((void **)a1, v24); sub_14003DBD0((void **)a1, v23); sub_14003DBD0((void **)a1, v22); sub_14003DBD0((void **)a1, v20); sub_14003D310(v38); return a1; } else { *(_OWORD *)a1 = 0; *(_QWORD *)(a1 + 16) = 0; *(_QWORD *)(a1 + 24) = 0; *(_OWORD *)a1 = *(_OWORD *)a2; *(_OWORD *)(a1 + 16) = *(_OWORD *)(a2 + 16); *(_QWORD *)(a2 + 16) = 0; *(_QWORD *)(a2 + 24) = 15; *(_BYTE *)a2 = 0; sub_14003D310(a2); return a1; } }
GD Web Decomp Icon

GD Web Decomp

Raw Source