// // sub_6569F0 from 0x6569f0 to 0x656b5a (362 bytes) // // 0 xrefs: // // 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 // int __fastcall sub_6569F0(int a1) { int **v2; // r10 int v3; // r8 int *v4; // r0 _DWORD *v5; // r6 int v6; // r4 int *v7; // r2 int v8; // r7 int v9; // r3 int *v10; // r4 char *v11; // r5 void *v12; // r1 int v14; // r3 bool v15; // zf size_t rowbytes; // r0 void *v17; // r5 int v18; // r0 int v19; // r4 v2 = *(int ***)a1; v3 = 0; v4 = **(int ***)a1; v5 = (_DWORD *)*v4; v6 = v4[1]; png_set_keep_unknown_chunks(*v4, 1, nullptr); png_set_keep_unknown_chunks((int)v5, 0, "bKGD"); if ( !*(_DWORD *)(a1 + 40) ) v3 = png_set_interlace_handling(v5); png_read_update_info((int)v5, v6); switch ( *(_DWORD *)(a1 + 40) ) { case 0: v14 = *(unsigned __int8 *)(v6 + 25); v15 = v14 == 3; if ( v14 != 3 ) v15 = v14 == 0; if ( !v15 || *(_BYTE *)(v6 + 24) != 8 ) goto LABEL_20; goto LABEL_7; case 1: case 2: if ( *(_WORD *)(v6 + 24) != 1032 ) goto LABEL_20; v7 = (int *)v5[147]; if ( v7 != (int *)&stru_35B5C.st_value || v2[6] != &dword_100 ) goto LABEL_20; goto LABEL_7; case 3: if ( *(_WORD *)(v6 + 24) != 520 ) goto LABEL_20; v7 = (int *)v5[147]; if ( v7 != (int *)&stru_35B5C.st_value || v2[6] != &dword_D8 ) goto LABEL_20; goto LABEL_7; case 4: if ( *(_WORD *)(v6 + 24) != 1544 ) goto LABEL_20; v7 = (int *)v5[147]; if ( v7 != (int *)&stru_35B5C.st_value || v2[6] != &dword_F4 ) goto LABEL_20; LABEL_7: v8 = *(_DWORD *)(a1 + 8); v9 = *(_DWORD *)(a1 + 4); if ( v8 < 0 ) v7 = v2[3]; *(_DWORD *)(a1 + 28) = v8; if ( v8 < 0 ) v9 += v8 * (1 - (_DWORD)v7); *(_DWORD *)(a1 + 24) = v9; if ( v3 ) { while ( --v3 >= 0 ) { while ( 1 ) { v10 = v2[3]; v11 = *(char **)(a1 + 24); if ( !v10 ) break; do { v12 = v11; v11 += v8; png_read_row((int)v5, v12, nullptr); v10 = (int *)((char *)v10 - 1); } while ( v10 ); if ( --v3 < 0 ) return 1; } } return 1; } rowbytes = png_get_rowbytes((int)v5, v6); v17 = png_malloc(v5, rowbytes); *(_DWORD *)(a1 + 20) = v17; v18 = png_safe_execute((int)v2, (int (__fastcall *)(int))sub_656B68, a1); *(_DWORD *)(a1 + 20) = 0; v19 = v18; png_free((int)v5, v17); return v19; default: LABEL_20: png_error((int)v5, "bad color-map processing (internal error)"); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source