// // sub_E07BE8 from 0xe07be8 to 0xe07ff0 (1032 bytes) // // 1 xrefs: // > sub_DFDF6C @ 0xdff9b8 // // 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 13:09:34 +0000 // __int64 __fastcall sub_E07BE8(__int64 a1, void **a2, void **a3, char *filename) { _BYTE *v6; // x1 _BOOL4 v8; // s11 _BOOL4 v9; // s10 FILE *v10; // d15 int v11; // w25 int v12; // w19 int v13; // s9 int v14; // s8 unsigned int v15; // w23 char *v16; // x28 int v17; // w0 int v18; // w0 char *v19; // x0 char *v20; // x0 __int64 v21; // x0 int v22; // w0 int v23; // w1 char *v24; // x19 char *v25; // x21 __uid_t v26; // w0 struct passwd *result; // [xsp+A0h] [xbp+A0h] BYREF struct passwd resultbuf; // [xsp+A8h] [xbp+A8h] BYREF char buffer[1024]; // [xsp+D8h] [xbp+D8h] BYREF v6 = *a2; if ( v6 ) { v8 = *v6 == 0; v9 = *v6 != 0; if ( filename ) { LABEL_3: v10 = fopen(filename, "r"); goto LABEL_4; } } else { v9 = 0; v8 = 1; if ( filename ) goto LABEL_3; } v24 = sub_E0165C("HOME"); if ( !v24 ) { v26 = geteuid(); if ( getpwuid_r(v26, &resultbuf, buffer, 0x400u, &result) || !result ) return 1; v24 = off_154A3D8(resultbuf.pw_dir); v21 = 27; if ( !v24 ) return v21; } v25 = sub_E05A38("%s%s%s", v24, (const char *)&word_11BA098, ".netrc"); off_154A3C8(v24); if ( !v25 ) return 0xFFFFFFFFLL; v10 = fopen(v25, "r"); off_154A3C8(v25); LABEL_4: if ( !v10 ) return 1; v11 = 0; v12 = 0; v13 = 0; v14 = 0; v15 = 1; LABEL_6: while ( fgets(buffer, 256, v10) ) { v16 = strtok_r(buffer, " \t\n", &resultbuf.pw_name); if ( v16 ) { while ( !*a2 || !*(_BYTE *)*a2 || !*a3 || !*(_BYTE *)*a3 ) { if ( v12 == 1 ) { v17 = sub_E0A69C(a1, v16); if ( v17 ) v12 = 2; else v12 = 0; if ( v17 ) v15 = 0; } else if ( v12 ) { if ( v11 ) { if ( v9 ) { v11 = 0; v13 = sub_E0A69C(*a2, v16); } else { off_154A3C8(*a2); v19 = off_154A3D8(v16); *a2 = v19; if ( !v19 ) goto LABEL_42; v11 = 0; } } else if ( v14 ) { if ( v13 || v8 ) { off_154A3C8(*a3); v20 = off_154A3D8(v16); *a3 = v20; if ( !v20 ) { LABEL_42: v15 = -1; goto LABEL_43; } v14 = 0; } else { v13 = 0; v14 = 0; } } else if ( (unsigned int)sub_E0A69C("login", v16) ) { v11 = 1; } else if ( (unsigned int)sub_E0A69C("password", v16) ) { v14 = 1; } else { v22 = sub_E0A69C("machine", v16); v23 = v13; if ( v22 ) { v23 = 0; v12 = 1; } v13 = v23; } } else { v12 = 1; if ( !(unsigned int)sub_E0A69C("machine", v16) ) { v18 = sub_E0A69C("default", v16); v12 = v18 ? 2 : 0; if ( v18 ) v15 = 0; } } v16 = strtok_r(nullptr, " \t\n", &resultbuf.pw_name); if ( !v16 ) goto LABEL_6; } break; } } LABEL_43: fclose(v10); return v15; }
GD Web Decomp Icon

GD Web Decomp

Raw Source