// // TXT_DB_write from 0xde1388 to 0xde152c (420 bytes) // // 1 xrefs: // > @ 0x78be8 // // 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 TXT_DB_write(__int64 a1, unsigned int **a2) { size_t *v4; // x23 __int64 v5; // x24 int v6; // w0 __int64 v7; // d8 int v8; // s10 signed __int64 v9; // x20 __int64 v10; // x22 __int64 v11; // x26 int v12; // w28 __int64 i; // x19 const char *v14; // x2 _BYTE *v15; // x4 __int64 j; // x1 char *v17; // x3 char v18; // t1 _BYTE *v19; // x2 __int64 v20; // x1 _BYTE *v21; // x19 int v22; // w0 v4 = (size_t *)BUF_MEM_new(); if ( v4 ) { v5 = 0; v6 = OPENSSL_sk_num(a2[1]); v7 = v6; v8 = *(_DWORD *)a2; v9 = *(int *)a2; if ( v6 > 0 ) { v10 = 0; do { v11 = OPENSSL_sk_value((__int64)a2[1], v10); if ( v9 <= 0 ) { if ( !BUF_MEM_grow_clean(v4, v9) ) goto LABEL_23; v15 = (_BYTE *)v4[1]; } else { v12 = 0; for ( i = 0; i != v9; ++i ) { v14 = *(const char **)(v11 + 8 * i); if ( v14 ) v12 += strlen(v14); } if ( !BUF_MEM_grow_clean(v4, v8 + 2 * v12) ) goto LABEL_23; v15 = (_BYTE *)v4[1]; for ( j = 0; j != v9; ++j ) { v17 = *(char **)(v11 + 8 * j); if ( v17 ) { while ( *v17 ) { v19 = v15; if ( *v17 == 9 ) { *v15 = 92; v19 = v15 + 1; } v18 = *v17++; v15 = v19 + 1; *v19 = v18; } } *v15++ = 9; } } *(v15 - 1) = 10; v20 = v4[1]; v21 = &v15[-v20]; v22 = BIO_write(a1, v20, (int)v15 - (int)v20); if ( (_BYTE *)v22 != v21 ) goto LABEL_23; v5 += v22; ++v10; } while ( v7 != v10 ); } } else { LABEL_23: v5 = -1; } BUF_MEM_free((__int64)v4); return v5; }
GD Web Decomp Icon

GD Web Decomp

Raw Source