//
// sub_852304 from 0x852304 to 0x85238a (134 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:02:32 +0000
//
int __fastcall sub_852304(int a1, _DWORD *a2, _BYTE *a3, int a4, unsigned int a5, size_t *a6)
{
int v9; // r10
if ( a5 <= 7 )
{
LABEL_6:
sub_8280FC(*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_8280FC(*a6, "NPN, negotiated HTTP1.1\n");
a6[316] = 2;
return 0;
}
}