//
// sub_1006A2FF4 from 0x1006a2ff4 to 0x1006a31e8 (500 bytes)
//
// 1 xrefs:
// > sub_100676448 @ 0x100676504
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 11:11:40 +0000
//
__int64 __fastcall sub_1006A2FF4(_QWORD *a1, int a2)
{
__int64 v4; // x0
void **v5; // x9
const char **v6; // x10
const char **v7; // x11
int *v8; // x12
void **v9; // x14
const char **v10; // x15
const char **v11; // x16
int *v12; // x8
void **v13; // x21
const char **v14; // x9
const char **v15; // x10
int *v16; // x20
__int64 v17; // x22
const char *v18; // x8
const char *v19; // x9
const char *v20; // x1
const char *v21; // x2
int v22; // w8
__int64 result; // x0
const char *v24; // x8
const char *v25; // x8
__int64 v26; // [xsp+10h] [xbp-40h] BYREF
void *v27; // [xsp+18h] [xbp-38h] BYREF
v26 = 0;
v27 = nullptr;
v4 = *a1;
v5 = (void **)(a1 + 107);
v6 = (const char **)(a1 + 46);
v7 = (const char **)(a1 + 47);
v8 = (int *)(a1 + 122);
v9 = (void **)(a1 + 104);
v10 = (const char **)(a1 + 50);
v11 = (const char **)(a1 + 51);
v12 = (int *)(a1 + 126);
if ( a2 )
v13 = v9;
else
v13 = v5;
if ( a2 )
v14 = v10;
else
v14 = v6;
if ( a2 )
v15 = v11;
else
v15 = v7;
if ( a2 )
v16 = v12;
else
v16 = v8;
if ( a2 )
v17 = v4 + 35416;
else
v17 = v4 + 35384;
v18 = *v15;
v19 = *v14;
*(_BYTE *)(v17 + 24) = 0;
if ( v19 )
v20 = v19;
else
v20 = "";
if ( v18 )
v21 = v18;
else
v21 = "";
v22 = *v16;
if ( *v16 == 2 )
{
result = sub_1006A45A8();
if ( (_DWORD)result )
return result;
if ( !v27 )
return 0;
off_1009E5FD8(*v13);
v24 = "Proxy-";
if ( !a2 )
v24 = "";
*v13 = sub_100688A44("%sAuthorization: NTLM %s\r\n", v24, (const char *)v27);
off_1009E5FD8(v27);
if ( !*v13 )
return 27;
*v16 = 3;
goto LABEL_33;
}
if ( v22 == 3 )
{
*v16 = 4;
LABEL_32:
off_1009E5FD8(*v13);
*v13 = nullptr;
LABEL_33:
*(_BYTE *)(v17 + 24) = 1;
return 0;
}
if ( v22 == 4 )
goto LABEL_32;
result = sub_1006A44D4(v20, v21, v16, &v27, &v26);
if ( !(_DWORD)result )
{
if ( v27 )
{
off_1009E5FD8(*v13);
v25 = "Proxy-";
if ( !a2 )
v25 = "";
*v13 = sub_100688A44("%sAuthorization: NTLM %s\r\n", v25, (const char *)v27);
off_1009E5FD8(v27);
if ( !*v13 )
return 27;
}
return 0;
}
return result;
}