// // sub_140275070 from 0x140275070 to 0x140275364 (756 bytes) // // 6 xrefs: // > GameLevelManager::collectPlatformerJournalKeys @ 0x140223e2a // > @ 0x1408ad254 // > @ 0x1408ad274 // > @ 0x1408ad288 // > @ 0x1408ad298 // > @ 0x14091cc40 // // 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:28:55 +0000 // _QWORD *__fastcall sub_140275070(__int64 *a1, __int64 a2, __int64 a3) { __int64 v3; // rbx __int64 v6; // r8 __int64 v7; // rdi __int64 v8; // rdx unsigned __int64 v9; // r12 unsigned __int64 v10; // rdx unsigned __int64 v11; // rcx __int64 v12; // r13 _QWORD *v13; // r14 __int64 v14; // rax _QWORD *v15; // rbp _QWORD *v16; // rdx __int64 v17; // r8 __int64 v18; // rax _QWORD *v19; // rdx int v20; // ecx _QWORD *v21; // r8 int v22; // ecx __int64 i; // rcx int v24; // eax __int64 v25; // rbx __int64 j; // rdi _QWORD *v27; // r8 v3 = a2; v6 = 0x666666666666666LL; v7 = (a2 - *a1) / 40; v8 = (a1[1] - *a1) / 40; if ( v8 == 0x666666666666666LL ) sub_14005A170(); v9 = v8 + 1; v10 = (a1[2] - *a1) / 40; if ( v10 <= 0x666666666666666LL - (v10 >> 1) ) { v11 = v9; if ( (v10 >> 1) + v10 >= v9 ) v11 = (v10 >> 1) + v10; if ( v11 > 0x666666666666666LL ) sub_140009CF0(v11, v10, 0x666666666666666LL); v6 = v11; } v12 = 5 * v6; v13 = sub_14003D460(40 * v6); v14 = 5 * v7; *(_OWORD *)&v13[v14] = 0; v13[v14 + 2] = 0; v15 = &v13[5 * v7]; v15[3] = 0; v16 = v15 + 5; *(_OWORD *)v15 = *(_OWORD *)a3; *((_OWORD *)v15 + 1) = *(_OWORD *)(a3 + 16); *(_QWORD *)(a3 + 16) = 0; *(_QWORD *)(a3 + 24) = 15; *(_BYTE *)a3 = 0; *((_DWORD *)v15 + 8) = *(_DWORD *)(a3 + 32); v17 = a1[1]; v18 = *a1; if ( v3 == v17 ) { if ( v18 != v17 ) { v19 = v13 + 3; do { *(_OWORD *)(v19 - 3) = 0; *(v19 - 1) = 0; *v19 = 0; v19 += 5; *((_OWORD *)v19 - 4) = *(_OWORD *)v18; *((_OWORD *)v19 - 3) = *(_OWORD *)(v18 + 16); *(_QWORD *)(v18 + 16) = 0; *(_QWORD *)(v18 + 24) = 15; *(_BYTE *)v18 = 0; v20 = *(_DWORD *)(v18 + 32); v18 += 40; *((_DWORD *)v19 - 8) = v20; } while ( v18 != v17 ); } } else { if ( v18 != v3 ) { v21 = v13 + 3; do { *(_OWORD *)(v21 - 3) = 0; *(v21 - 1) = 0; *v21 = 0; v21 += 5; *((_OWORD *)v21 - 4) = *(_OWORD *)v18; *((_OWORD *)v21 - 3) = *(_OWORD *)(v18 + 16); *(_QWORD *)(v18 + 16) = 0; *(_QWORD *)(v18 + 24) = 15; *(_BYTE *)v18 = 0; v22 = *(_DWORD *)(v18 + 32); v18 += 40; *((_DWORD *)v21 - 8) = v22; } while ( v18 != v3 ); } for ( i = a1[1]; v3 != i; *((_DWORD *)v16 - 2) = v24 ) { *(_OWORD *)v16 = 0; v16[2] = 0; v16[3] = 0; v16 += 5; *(_OWORD *)(v16 - 5) = *(_OWORD *)v3; *(_OWORD *)(v16 - 3) = *(_OWORD *)(v3 + 16); *(_QWORD *)(v3 + 16) = 0; *(_QWORD *)(v3 + 24) = 15; *(_BYTE *)v3 = 0; v24 = *(_DWORD *)(v3 + 32); v3 += 40; } } v25 = *a1; if ( *a1 ) { for ( j = a1[1]; v25 != j; v25 += 40 ) sub_14003D310(v25); v27 = (_QWORD *)*a1; if ( (unsigned __int64)(40 * ((a1[2] - *a1) / 40)) >= 0x1000 ) { if ( (unsigned __int64)v27 - *(v27 - 1) - 8 > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); v27 = (_QWORD *)*(v27 - 1); } j_j_free(v27); } *a1 = (__int64)v13; a1[1] = (__int64)&v13[5 * v9]; a1[2] = (__int64)&v13[v12]; return v15; }
GD Web Decomp Icon

GD Web Decomp

Raw Source