// // sub_CB6B6C from 0xcb6b6c to 0xcb6d54 (488 bytes) // // 9 xrefs: // > sub_CB08E8 @ 0xcb09c8 // > sub_CB08E8 @ 0xcb09d8 // > sub_CB08E8 @ 0xcb0a10 // > sub_CB08E8 @ 0xcb0a20 // > sub_CB08E8 @ 0xcb0dc4 // > sub_CB08E8 @ 0xcb0e4c // > sub_CB08E8 @ 0xcb0e6c // > sub_CB2698 @ 0xcb2728 // > sub_CB2698 @ 0xcb27ac // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // __int64 __fastcall sub_CB6B6C(__int64 result, int a2, char a3) { unsigned int v3; // w20 __int64 v5; // x19 int v6; // w2 int v7; // w23 int v8; // w2 int v9; // w3 unsigned __int64 v10; // x28 int v11; // w2 int v12; // w0 unsigned __int64 v13; // x25 __int64 v14; // x23 unsigned __int64 v15; // x2 unsigned __int64 v16; // x25 __int64 v17; // x24 size_t v18; // x2 __int64 v19; // x2 int v20; // w0 bool v21; // cc v3 = 1 << (a3 - 1); if ( v3 ) { v5 = result; do { result = (unsigned int)(*(int *)v5 >> 1); if ( (v3 & a2) != 0 ) { v6 = *(_DWORD *)(v5 + 4) + result + 1; result = (unsigned int)(*(_DWORD *)v5 + ~(_DWORD)result); *(_DWORD *)(v5 + 4) = v6; } *(_DWORD *)v5 = result; if ( (int)result > 126 ) goto LABEL_24; v7 = *(_DWORD *)(v5 + 12); v8 = *(_DWORD *)(v5 + 4); *(_DWORD *)(v5 + 12) = v7 + 1; v9 = byte_F58980[(int)result]; result = (unsigned int)(2 * v8); *(_DWORD *)v5 = v9; *(_DWORD *)(v5 + 4) = result; if ( v7 + 1 <= 0 ) goto LABEL_24; v10 = (unsigned int)((int)result >> (v7 + 9)); *(_DWORD *)(v5 + 12) = v7 - 7; v11 = (unsigned __int8)((int)result >> (v7 + 9)); *(_DWORD *)(v5 + 4) = result - ((_DWORD)v10 << (v7 + 9)); v12 = *(_DWORD *)(v5 + 8); if ( v11 == 255 ) { result = (unsigned int)(v12 + 1); *(_DWORD *)(v5 + 8) = result; } else { v13 = *(_QWORD *)(v5 + 32); v14 = *(_QWORD *)(v5 + 24); v15 = v14 + v12 + 1; if ( v15 <= v13 ) { result = *(_QWORD *)(v5 + 16); LABEL_17: if ( ((v10 >> 8) & 1) != 0 && v14 ) { ++*(_BYTE *)(result + v14 - 1); result = *(_QWORD *)(v5 + 16); } if ( *(int *)(v5 + 8) <= 0 ) { v19 = v14; } else { do { *(_BYTE *)(result + v14) = -!(v10 & 0x100); v19 = ++v14; v20 = *(_DWORD *)(v5 + 8) - 1; *(_DWORD *)(v5 + 8) = v20; v21 = v20 <= 0; result = *(_QWORD *)(v5 + 16); } while ( !v21 ); } *(_BYTE *)(result + v19) = v10; *(_QWORD *)(v5 + 24) = v19 + 1; goto LABEL_24; } v16 = 2 * v13; if ( v15 >= v16 ) v16 = v14 + v12 + 1; if ( v16 <= 0x3FF ) v16 = 1024; result = WebPSafeMalloc(1, v16); v17 = result; if ( result ) { v18 = *(_QWORD *)(v5 + 24); if ( v18 ) memcpy((void *)result, *(const void **)(v5 + 16), v18); WebPSafeFree(*(void **)(v5 + 16)); *(_QWORD *)(v5 + 16) = v17; *(_QWORD *)(v5 + 32) = v16; result = v17; goto LABEL_17; } *(_DWORD *)(v5 + 40) = 1; } LABEL_24: v3 >>= 1; } while ( v3 ); } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source