// // sub_1006A4B0C from 0x1006a4b0c to 0x1006a533c (2096 bytes) // // 1 xrefs: // > sub_1006A68E8 @ 0x1006a6ba8 // // 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:41 +0000 // __int64 __fastcall sub_1006A4B0C(__int64 a1, const char *a2, const char *a3, const char *a4, const char *a5) { __int64 v9; // x26 char *v10; // x25 char *v11; // x0 __int64 v12; // x8 int v13; // w9 __int64 v14; // x12 char *v15; // x10 char *v16; // x0 __int64 v17; // x8 int v18; // w9 __int64 v19; // x12 char *v20; // x10 char *v21; // x0 __int64 v22; // x8 int v23; // w9 __int64 v24; // x12 char *v25; // x10 char *v26; // x0 __int64 v27; // x8 int v28; // w9 __int64 v29; // x12 char *v30; // x10 char *v31; // x0 unsigned __int8 *v32; // x25 int i; // w26 int v34; // w25 int v35; // w26 int v36; // w28 int v37; // w0 void **v38; // x25 void **v39; // x0 void **v40; // x24 __int64 v41; // x28 char *v42; // x24 char *v43; // x23 void **v44; // x24 __int64 v45; // x28 char *v46; // x24 void **v47; // x0 void **v48; // x24 __int64 v49; // x28 char *v50; // x24 char *v51; // x22 char *v53; // [xsp+48h] [xbp-268h] char v54[8]; // [xsp+50h] [xbp-260h] BYREF size_t v55; // [xsp+58h] [xbp-258h] BYREF char *__s1; // [xsp+60h] [xbp-250h] BYREF char v57[16]; // [xsp+68h] [xbp-248h] BYREF char v58[45]; // [xsp+78h] [xbp-238h] BYREF char v59[64]; // [xsp+A5h] [xbp-20Bh] BYREF char v60[64]; // [xsp+E5h] [xbp-1CBh] BYREF char __s[128]; // [xsp+125h] [xbp-18Bh] BYREF char v62[64]; // [xsp+1A5h] [xbp-10Bh] BYREF char v63[33]; // [xsp+1E5h] [xbp-CBh] BYREF char v64; // [xsp+206h] [xbp-AAh] BYREF char v65; // [xsp+227h] [xbp-89h] BYREF _BYTE v66[16]; // [xsp+248h] [xbp-68h] BYREF __s1 = nullptr; strcpy(v58, "00000001"); strcpy(v57, "AUTHENTICATE"); strcpy(v54, "auth"); v55 = 0; v9 = 61; if ( *a2 ) { if ( *a2 != 61 ) { v9 = sub_10066F114(a2, &__s1, &v55); if ( !(_DWORD)v9 ) { v10 = __s1; if ( __s1 ) { v11 = strstr(__s1, "nonce=\""); if ( !v11 ) goto LABEL_37; v12 = 0; v13 = (unsigned __int8)v11[7]; if ( v11[7] && v13 != 34 ) { v14 = 0; v15 = v11 + 8; do { v62[v14] = v13; v12 = v14 + 1; if ( (unsigned __int64)(v14 + 1) > 0x3E ) break; v13 = (unsigned __int8)v15[v14]; if ( !v15[v14] ) break; ++v14; } while ( v13 != 34 ); } v62[v12] = 0; v16 = strstr(v10, "realm=\""); if ( v16 ) { v17 = 0; v18 = (unsigned __int8)v16[7]; if ( v16[7] && v18 != 34 ) { v19 = 0; v20 = v16 + 8; do { __s[v19] = v18; v17 = v19 + 1; if ( (unsigned __int64)(v19 + 1) > 0x7E ) break; v18 = (unsigned __int8)v20[v19]; if ( !v20[v19] ) break; ++v19; } while ( v18 != 34 ); } __s[v17] = 0; } else { __s[0] = 0; } v21 = strstr(v10, "algorithm="); if ( v21 ) { v22 = 0; v23 = (unsigned __int8)v21[10]; if ( v21[10] && v23 != 44 ) { v24 = 0; v25 = v21 + 11; do { v60[v24] = v23; v22 = v24 + 1; if ( (unsigned __int64)(v24 + 1) > 0x3E ) break; v23 = (unsigned __int8)v25[v24]; if ( !v25[v24] ) break; ++v24; } while ( v23 != 44 ); } v60[v22] = 0; v26 = strstr(v10, "qop=\""); if ( v26 ) { v27 = 0; v28 = (unsigned __int8)v26[5]; if ( v26[5] && v28 != 34 ) { v29 = 0; v30 = v26 + 6; do { v59[v29] = v28; v27 = v29 + 1; if ( (unsigned __int64)(v29 + 1) > 0x3E ) break; v28 = (unsigned __int8)v30[v29]; if ( !v30[v29] ) break; ++v29; } while ( v28 != 34 ); } v9 = 0; v59[v27] = 0; } else { v9 = 61; } off_1009E5FD8(v10); if ( !(_DWORD)v9 ) { if ( !strcmp(v60, "md5-sess") ) { v31 = off_1009E5FE8(v59); if ( v31 ) { v53 = v31; v32 = (unsigned __int8 *)strtok_r(v31, ",", &__s1); for ( i = 0; v32; v32 = (unsigned __int8 *)strtok_r(nullptr, ",", &__s1) ) { if ( sub_10069A120(v32, "auth") ) { i |= 1u; } else if ( sub_10069A120(v32, "auth-int") ) { i |= 2u; } else if ( sub_10069A120(v32, "auth-conf") ) { i |= 4u; } } off_1009E5FD8(v53); if ( (i & 1) != 0 ) { v34 = sub_1006AD0E4(a1); v35 = sub_1006AD0E4(a1); v36 = sub_1006AD0E4(a1); v37 = sub_1006AD0E4(a1); sub_1006889EC(&v58[12], 33, "%08x%08x%08x%08x", v34, v35, v36, v37); v38 = (void **)sub_1006961B8((__int64)&off_1009B1708); if ( v38 ) { strlen(a3); nullsub_1(); sub_100696238(v38); sub_100696238(v38); strlen(__s); nullsub_1(); sub_100696238(v38); sub_100696238(v38); strlen(a4); nullsub_1(); sub_100696238(v38); sub_100696258(v38, (__int64)v66); v39 = (void **)sub_1006961B8((__int64)&off_1009B1708); v40 = v39; if ( v39 ) { sub_100696238(v39); sub_100696238(v40); strlen(v62); nullsub_1(); sub_100696238(v40); sub_100696238(v40); strlen(&v58[12]); nullsub_1(); sub_100696238(v40); sub_100696258(v40, (__int64)v66); v41 = 0; v42 = &v65; do { sub_1006889EC(v42, 3, "%02x", (unsigned __int8)v66[v41++]); v42 += 2; } while ( v41 != 16 ); v43 = sub_100688A44("%s/%s", a5, __s); if ( v43 ) { v44 = (void **)sub_1006961B8((__int64)&off_1009B1708); if ( !v44 ) goto LABEL_69; strlen(v57); nullsub_1(); sub_100696238(v44); sub_100696238(v44); strlen(v43); nullsub_1(); sub_100696238(v44); sub_100696258(v44, (__int64)v66); v45 = 0; v46 = &v64; do { sub_1006889EC(v46, 3, "%02x", (unsigned __int8)v66[v45++]); v46 += 2; } while ( v45 != 16 ); v47 = (void **)sub_1006961B8((__int64)&off_1009B1708); v48 = v47; if ( v47 ) { sub_100696238(v47); sub_100696238(v48); strlen(v62); nullsub_1(); sub_100696238(v48); sub_100696238(v48); strlen(v58); nullsub_1(); sub_100696238(v48); sub_100696238(v48); strlen(&v58[12]); nullsub_1(); sub_100696238(v48); sub_100696238(v48); strlen(v54); nullsub_1(); sub_100696238(v48); sub_100696238(v48); sub_100696238(v48); sub_100696258(v48, (__int64)v66); v49 = 0; v50 = v63; do { sub_1006889EC(v50, 3, "%02x", (unsigned __int8)v66[v49++]); v50 += 2; } while ( v49 != 16 ); v51 = sub_100688A44( "username=\"%s\",realm=\"%s\",nonce=\"%s\",cnonce=\"%s\",nc=\"%s\",digest-uri=\"%s\"," "response=%s,qop=%s", a3, __s, v62, &v58[12], v58, v43, v63, v54); off_1009E5FD8(v43); if ( v51 ) { v9 = sub_10066F410(a1, v51); off_1009E5FD8(v51); } else { return 27; } } else { LABEL_69: off_1009E5FD8(v43); return 27; } } else { return 27; } } else { return 27; } } else { return 27; } } else { return 61; } } else { return 27; } } else { return 61; } } } else { LABEL_37: off_1009E5FD8(v10); return 61; } } else { return 61; } } } } return v9; }
GD Web Decomp Icon

GD Web Decomp

Raw Source