// // sub_B7756C from 0xb7756c to 0xb779f4 (1160 bytes) // // 3 xrefs: // > sub_B787B0 @ 0xb788d0 // > sub_BAACC0 @ 0xbaae00 // > sub_BABFB0 @ 0xbac0b0 // // 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_B7756C( __int64 a1, __int64 a2, __int64 a3, unsigned __int8 a4, int a5, int a6, int a7, int a8, char a9) { int v9; // w5 __int64 v10; // x21 __int64 v11; // x20 __int64 v12; // x4 __int64 v13; // x4 __int64 v17; // x0 __int64 v18; // x4 __int64 v19; // x24 __int64 result; // x0 __int64 v21; // x21 __int64 v22; // x0 const char *v23; // x3 const char *v24; // x4 _QWORD *v25; // x21 __int64 v26; // x21 const char *v27; // x4 const char *v28; // x3 size_t v29; // x0 const char *v30; // x3 const char *v31; // x4 __int64 v32; // x26 const char *v33; // x4 char *v34; // x25 const char *v35; // x3 size_t v36; // x0 size_t v37; // [xsp+50h] [xbp+50h] BYREF void *p; // [xsp+58h] [xbp+58h] BYREF v9 = *(unsigned __int8 *)(a1 + 958); v10 = *(_QWORD *)a1; if ( (!*(_BYTE *)(a1 + 958) || !*(_BYTE *)(a1 + 961)) && !*(_BYTE *)(a1 + 960) ) { v21 = v10 + 0x8000; result = *(unsigned __int8 *)(a1 + 960); *(_BYTE *)(v21 + 3088) = 1; *(_BYTE *)(v21 + 3120) = 1; return result; } v11 = v10 + 0x8000; v12 = *(_QWORD *)(v10 + 35832); if ( v12 && !*(_QWORD *)(v10 + 35840) ) *(_QWORD *)(v10 + 35840) = v12; v13 = *(_QWORD *)(v10 + 35864); if ( v13 && !*(_QWORD *)(v10 + 35872) ) *(_QWORD *)(v10 + 35872) = v13; if ( v9 && *(unsigned __int8 *)(a1 + 969) == a4 ) { v22 = *(_QWORD *)(v10 + 35872); switch ( v22 ) { case 8LL: result = sub_BACD74(a1, 1); if ( (_DWORD)result ) return result; v30 = "NTLM"; break; case 32LL: result = sub_BAD734(a1); if ( (_DWORD)result ) return result; v30 = "NTLM_WB"; break; case 2LL: result = sub_B9EBB4(a1, 1, a2, a3); if ( (_DWORD)result ) return result; v30 = "Digest"; break; case 1LL: if ( !*(_BYTE *)(a1 + 961) || sub_B770E8((__int64 *)a1, "Proxy-authorization:") ) { *(_WORD *)(v10 + 35888) = 1; goto LABEL_11; } v32 = *(_QWORD *)a1; v33 = *(const char **)(a1 + 400); v34 = (char *)(*(_QWORD *)a1 + 2824LL); v35 = *(const char **)(a1 + 392); p = nullptr; v37 = 0; sub_B8C278(v34, 16385, "%s:%s", v35, v33); v36 = strlen(v34); result = sub_B71094(v32, v34, v36, (const char **)&p, &v37); if ( (_DWORD)result ) return result; result = 9; if ( !p ) return result; off_1231008(*(void **)(a1 + 1056)); *(_QWORD *)(a1 + 1056) = sub_B8F880("%sAuthorization: Basic %s\r\n", "Proxy-", (const char *)p); off_1231008(p); if ( !*(_QWORD *)(a1 + 1056) ) return 27; v30 = "Basic"; *(_BYTE *)(v10 + 35888) = 1; break; default: *(_BYTE *)(v10 + 35889) = 0; goto LABEL_11; } v31 = *(const char **)(a1 + 392); if ( !v31 ) v31 = &byte_F288A0; sub_B7B528(v10, "%s auth using %s with user '%s'\n", "Proxy", v30, v31); *(_BYTE *)(v10 + 35889) = *(_BYTE *)(v10 + 35888) ^ 1; } else { *(_BYTE *)(v10 + 35888) = 1; } LABEL_11: if ( *(_BYTE *)(v10 + 35608) ) { if ( !*(_BYTE *)(a1 + 975) ) { v17 = *(_QWORD *)(v10 + 35616); if ( v17 ) { if ( !*(_BYTE *)(v10 + 1564) ) { result = sub_B944E4(v17, *(_QWORD *)(a1 + 192)); if ( !(_DWORD)result ) { *(_BYTE *)(v10 + 35856) = 1; return result; } } } } } v18 = *(_QWORD *)(v10 + 35840); v19 = *(_QWORD *)a1; switch ( v18 ) { case 8LL: result = sub_BACD74(a1, 0); if ( (_DWORD)result ) return result; v23 = "NTLM"; goto LABEL_37; case 32LL: result = sub_BAD734(a1); if ( (_DWORD)result ) return result; v23 = "NTLM_WB"; goto LABEL_37; case 2LL: result = sub_B9EBB4(a1, 0, a2, a3); if ( (_DWORD)result ) return result; v23 = "Digest"; goto LABEL_37; } if ( v18 != 1 ) { LABEL_19: *(_BYTE *)(v11 + 3089) = 0; return 0; } if ( !*(_BYTE *)(a1 + 960) ) { LABEL_34: *(_BYTE *)(v11 + 3088) = 1; goto LABEL_19; } v25 = *(_QWORD **)(v19 + 952); if ( v25 ) { while ( !(unsigned int)sub_B94674(*v25, "Authorization:", 14) ) { v25 = (_QWORD *)v25[1]; if ( !v25 ) goto LABEL_49; } if ( *v25 ) goto LABEL_34; LABEL_49: v26 = *(_QWORD *)a1; } else { v26 = *(_QWORD *)a1; } v27 = *(const char **)(a1 + 544); v28 = *(const char **)(a1 + 536); p = nullptr; v37 = 0; sub_B8C278(v26 + 2824, 16385, "%s:%s", v28, v27); v29 = strlen((const char *)(v26 + 2824)); result = sub_B71094(v26, (char *)(v26 + 2824), v29, (const char **)&p, &v37); if ( !(_DWORD)result ) { result = 9; if ( p ) { off_1231008(*(void **)(a1 + 1080)); *(_QWORD *)(a1 + 1080) = sub_B8F880("%sAuthorization: Basic %s\r\n", &byte_F288A0, (const char *)p); off_1231008(p); if ( *(_QWORD *)(a1 + 1080) ) { v23 = "Basic"; *(_BYTE *)(v11 + 3088) = 1; LABEL_37: v24 = *(const char **)(a1 + 536); if ( !v24 ) v24 = &byte_F288A0; sub_B7B528(v19, "%s auth using %s with user '%s'\n", "Server", v23, v24); *(_BYTE *)(v11 + 3089) = *(_BYTE *)(v11 + 3088) ^ 1; return 0; } return 27; } } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source