// // sub_644E50 from 0x644e50 to 0x644f92 (322 bytes) // // 1 xrefs: // > sub_645454 @ 0x645492 // // 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_644E50(size_t *a1, int a2) { int v2; // r9 size_t *v3; // r10 _DWORD *v4; // r7 size_t *v5; // r3 int v6; // r8 size_t *v7; // r4 size_t v10; // r3 size_t *v11; // r4 int result; // r0 int v13; // r3 int v14; // r2 bool v15; // zf int v16; // r0 int v17; // r0 _DWORD *v18; // r0 v2 = 2 * a2; v3 = &a1[a2]; v4 = (_DWORD *)*a1; v5 = &a1[6 * a2]; v6 = v3[104]; if ( v5[114] == 2 ) return 0; v7 = v5 + 114; v10 = v5[115]; if ( !v10 ) { if ( sub_62D584((_DWORD *)*a1, nullptr, 1) < 0 ) { LABEL_16: sub_6180F8((int)v4, "SSL connection timeout"); return 28; } result = sub_643938((int)a1, a2); if ( result ) return result; v10 = v7[1]; } v11 = &a1[2 * v2 + 2 * a2]; while ( v10 - 1 <= 2 ) { v13 = sub_62D584(v4, nullptr, 1); if ( v13 < 0 ) goto LABEL_16; v14 = v11[115]; if ( (unsigned int)(v14 - 2) <= 1 ) { v15 = v14 == 3; if ( v14 == 3 ) { v16 = -1; v14 = v6; } else { v16 = v6; } if ( !v15 ) v14 = -1; v17 = sub_632D88(v16, -1, v14, v13); if ( v17 < 0 ) { v18 = (_DWORD *)_errno(); sub_6180F8((int)v4, "select/poll on SSL socket, errno: %d", *v18); return 35; } if ( !v17 ) goto LABEL_16; } result = sub_641F78((int)a1, a2); if ( result ) return result; v10 = v11[115]; } if ( v10 != 4 ) goto LABEL_18; result = sub_642BAC(a1, a2); if ( !result ) { v10 = a1[2 * v2 + 115 + 2 * a2]; LABEL_18: if ( v10 == 5 ) { a1[2 * v2 + 114 + 2 * a2] = 2; v3[109] = (size_t)sub_641BFC; v3[111] = (size_t)sub_645094; } a1[2 * a2 + 115 + 2 * v2] = 0; return 0; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source