// // sub_1061CBC from 0x1061cbc to 0x1061f7c (704 bytes) // // 3 xrefs: // > sub_1061F7C @ 0x1062018 // > sub_1061F7C @ 0x1062070 // > sub_1061F7C @ 0x10620bc // // 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:16:51 +0000 // __int64 __fastcall sub_1061CBC(__int64 a1, __int64 a2, int a3, int a4) { const struct sigaction *v4; // x21 struct sigaction *v9; // x20 int i; // w19 struct sigaction *v11; // x2 char *v12; // x20 int v13; // w0 int v14; // w19 int v15; // w3 int v16; // w0 int v18; // w0 int v19; // w0 bool v20; // zf int v21; // w0 char v22; // w20 char *v23; // x0 FILE *v24; // x27 char s[8]; // [xsp+78h] [xbp+78h] BYREF struct sigaction act; // [xsp+80h] [xbp+80h] BYREF v4 = (const struct sigaction *)&unk_15680E8; dword_15680C0 = 0; act.sa_handler = nullptr; dword_15680A8 = 0; v9 = (struct sigaction *)&unk_15680E8; act.sa_mask.__val[1] = 0; act.sa_mask.__val[2] = 0; act.sa_mask.__val[0] = (unsigned __int64)sub_1061BE8; for ( i = 1; i != 32; ++i ) { v11 = v9; v9 = (struct sigaction *)((char *)v9 + 32); if ( (unsigned int)(i - 9) > 1 && i != 12 ) sigaction(i, &act, v11); } signal(28, nullptr); dword_15680C0 = 1; if ( !a3 && (dword_15684E8 = dword_1568510, qword_15684C8 = qword_15684F0, qword_15684D0 = qword_15684F8, HIDWORD(qword_15684D0) = HIDWORD(qword_15684F8) & 0xFFFFFFF7, qword_15684D8 = qword_1568500, qword_15684E0 = qword_1568508, dword_1568514) && (v18 = fileno((FILE *)qword_15680B0), tcsetattr(v18, 0, (const struct termios *)&qword_15684C8) == -1) ) { if ( dword_15680A8 == 2 ) LODWORD(v12) = -1; else LODWORD(v12) = 0; } else { LOBYTE(act.sa_handler) = 0; dword_15680C0 = 2; if ( !fgets((char *)&act, 1023, (FILE *)qword_15680B0) || feof((FILE *)qword_15680B0) || (v21 = ferror((FILE *)qword_15680B0), v22 = v21, v21) ) { LODWORD(v12) = 0; } else { v23 = strchr((const char *)&act, 10); if ( v23 ) { if ( a4 ) *v23 = v22; LABEL_33: LODWORD(v12) = (int)UI_set_result(a1, a2, (char *)&act) >= 0; } else { v24 = (FILE *)qword_15680B0; while ( 1 ) { v12 = fgets(s, 4, v24); if ( !v12 ) break; if ( strchr(s, 10) ) goto LABEL_33; } } } if ( dword_15680A8 == 2 ) LODWORD(v12) = -1; if ( a3 ) { v13 = dword_15680C0; goto LABEL_15; } } fputc(10, (FILE *)qword_15680B8); v13 = dword_15680C0; if ( dword_15680C0 > 1 ) { dword_15684E8 = dword_1568510; qword_15684C8 = qword_15684F0; qword_15684D0 = qword_15684F8; HIDWORD(qword_15684D0) = HIDWORD(qword_15684F8) | 8; qword_15684D8 = qword_1568500; qword_15684E0 = qword_1568508; if ( dword_1568514 ) { v19 = fileno((FILE *)qword_15680B0); v20 = tcsetattr(v19, 0, (const struct termios *)&qword_15684C8) == -1; v13 = dword_15680C0; if ( v20 ) LODWORD(v12) = 0; } } LABEL_15: v14 = 1; if ( v13 > 0 ) { do { v15 = v14 - 10; v16 = v14++; if ( (v15 & 0xFFFFFFFD) != 0 ) sigaction(v16, v4, nullptr); v4 = (const struct sigaction *)((char *)v4 + 32); } while ( v14 != 32 ); } OPENSSL_cleanse(&act, 0x400u); return (unsigned int)v12; }
GD Web Decomp Icon

GD Web Decomp

Raw Source