// // sub_82066C from 0x82066c to 0x820872 (518 bytes) // // 1 xrefs: // > sub_83A2F0 @ 0x83a384 // // 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:01:50 +0000 // int __fastcall sub_82066C(_DWORD *a1) { const char **v2; // r4 const char *v3; // r0 const char *v5; // r0 char *v6; // r11 int v7; // r3 bool v8; // zf char *v9; // r2 int v10; // t1 bool v11; // zf size_t v12; // r12 const char *v13; // r0 char *v14; // r6 int v15; // r3 bool v16; // zf char *v17; // r1 int v18; // t1 bool v19; // zf size_t v20; // r7 const char *v21; // r0 int v22; // r3 int v23; // [sp+10h] [bp-224h] size_t v24; // [sp+14h] [bp-220h] int v25; // [sp+14h] [bp-220h] int v26; // [sp+2Ch] [bp-208h] BYREF char v27[256]; // [sp+30h] [bp-204h] BYREF char v28[260]; // [sp+130h] [bp-104h] BYREF v2 = (const char **)a1[331]; if ( !v2 ) { LABEL_10: a1[331] = 0; return 0; } while ( 1 ) { v3 = *v2; if ( !*v2 ) goto LABEL_5; if ( *v3 != 45 ) break; if ( sscanf(v3 + 1, "%255[^:]:%d", v27, &v26) == 2 ) { v13 = (const char *)sub_837044("%s:%d", v27, v26); v14 = (char *)v13; if ( !v13 ) return 27; v15 = *(unsigned __int8 *)v13; v16 = v15 == 58; if ( v15 != 58 ) v16 = v15 == 0; if ( !v16 ) { v17 = (char *)v13; do { *v17 = *(_WORD *)(tolower_tab_ + 2 * (v15 + 1)); v18 = (unsigned __int8)*++v17; v15 = v18; v19 = v18 == 58; if ( v18 != 58 ) v19 = v15 == 0; } while ( !v19 ); } v20 = strlen(v13); if ( a1[18] ) sub_841E84(a1, 3, 2); sub_83E540(a1[14], v14, v20 + 1); if ( a1[18] ) sub_841EA4(a1, 3); off_D200B0(v14); LABEL_5: v2 = (const char **)v2[1]; if ( !v2 ) goto LABEL_10; } else { sub_8280FC(a1, "Couldn't parse CURLOPT_RESOLVE removal entry '%s'!\n", *v2); v2 = (const char **)v2[1]; if ( !v2 ) goto LABEL_10; } } if ( sscanf(v3, "%255[^:]:%d:%255s", v27, &v26, v28) != 3 ) { sub_8280FC(a1, "Couldn't parse CURLOPT_RESOLVE entry '%s'!\n", *v2); goto LABEL_5; } v23 = sub_845F08(v28); if ( !v23 ) { sub_8280FC(a1, "Address in '%s' found illegal!\n", *v2); goto LABEL_5; } v5 = (const char *)sub_837044("%s:%d", v27, v26); v6 = (char *)v5; if ( !v5 ) goto LABEL_45; v7 = *(unsigned __int8 *)v5; v8 = v7 == 58; if ( v7 != 58 ) v8 = v7 == 0; if ( !v8 ) { v9 = (char *)v5; do { *v9 = *(_WORD *)(tolower_tab_ + 2 * (v7 + 1)); v10 = (unsigned __int8)*++v9; v7 = v10; v11 = v10 == 58; if ( v10 != 58 ) v11 = v7 == 0; } while ( !v11 ); } v12 = strlen(v5); if ( a1[18] ) { v24 = v12; sub_841E84(a1, 3, 2); v12 = v24; } v25 = sub_83E594(a1[14], v6, v12 + 1); off_D200B0(v6); if ( v25 ) { sub_845B5C(v23); LABEL_25: if ( a1[18] ) sub_841EA4(a1, 3); sub_8280FC(a1, "Added %s:%d:%s to DNS cache\n", v27, v26, v28); goto LABEL_5; } v21 = sub_8201C8((int)a1, v23, v27, v26); if ( v21 ) { v22 = *((_DWORD *)v21 + 2); *((_DWORD *)v21 + 1) = 0; *((_DWORD *)v21 + 2) = v22 - 1; goto LABEL_25; } if ( a1[18] ) sub_841EA4(a1, 3); LABEL_45: sub_845B5C(v23); return 27; }
GD Web Decomp Icon

GD Web Decomp

Raw Source