//
// sub_642284 from 0x642284 to 0x64230a (134 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_642284(int a1, _DWORD *a2, _BYTE *a3, int a4, unsigned int a5, size_t *a6)
{
int v9; // r10
if ( a5 <= 7 )
{
LABEL_6:
sub_61807C(*a6, "NPN, no overlap, use HTTP1.1\n");
*a2 = "http/1.1";
*a3 = 8;
a6[316] = 2;
return 0;
}
else
{
v9 = 0;
while ( memcmp((const void *)(v9 + 1 + a4), "http/1.1", 8u) )
{
v9 += *(unsigned __int8 *)(a4 + v9) + 1;
if ( a5 < v9 + 8 )
goto LABEL_6;
}
*a2 = v9 + 1 + a4;
*a3 = *(_BYTE *)(a4 + v9);
sub_61807C(*a6, "NPN, negotiated HTTP1.1\n");
a6[316] = 2;
return 0;
}
}