//
// sub_BB555C from 0xbb555c to 0xbb5664 (264 bytes)
//
// 1 xrefs:
// > sub_BB78D0 @ 0xbb8084
//
// 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_BB555C(__int64 a1, _QWORD *a2, _BYTE *a3, __int64 a4, unsigned int a5, __int64 a6)
{
unsigned int v8; // w20
v8 = 0;
if ( a5 > 7 )
{
while ( memcmp((const void *)(a4 + v8 + 1), "http/1.1", 8u) )
{
v8 += *(unsigned __int8 *)(a4 + v8) + 1;
if ( a5 < v8 + 8 )
goto LABEL_6;
}
*a2 = a4 + v8 + 1;
*a3 = *(_BYTE *)(a4 + v8);
sub_B7B528(*(_QWORD *)a6, "NPN, negotiated HTTP1.1\n");
*(_DWORD *)(a6 + 1824) = 2;
return 0;
}
else
{
LABEL_6:
sub_B7B528(*(_QWORD *)a6, "NPN, no overlap, use HTTP1.1\n");
*a2 = "http/1.1";
*a3 = 8;
*(_DWORD *)(a6 + 1824) = 2;
return 0;
}
}