// // sub_1006972CC from 0x1006972cc to 0x100697454 (392 bytes) // // 4 xrefs: // > sub_100688CA0 @ 0x10068a3ec // > sub_100688CA0 @ 0x10068a4fc // > sub_10068A910 @ 0x10068aaf0 // > sub_100693620 @ 0x100693908 // // 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:35 +0000 // __int64 __fastcall sub_1006972CC(pollfd *a1, nfds_t a2, int a3) { nfds_t v4; // w19 pollfd *v5; // x20 int v6; // w8 pollfd *i; // x9 __int64 result; // x0 __darwin_time_t v9; // x22 int v10; // w1 int v11; // w23 int v12; // w24 int v13; // w8 int v14; // w8 __darwin_time_t v16; // x0 int v17; // w1 __int16 revents; // w9 v4 = a2; v5 = a1; if ( !a1 || !a2 ) return sub_100696E94(a3); v6 = 0; for ( i = a1; i->fd == -1; ++i ) { if ( ++v6 >= a2 ) return sub_100696E94(a3); } if ( a3 < 1 ) { v12 = 0; v9 = 0; v11 = 0; } else { v9 = sub_10066F074(); v11 = v10; v12 = a3; } while ( 1 ) { v13 = a3 ? v12 : 0; v12 = a3 >= 0 ? v13 : -1; result = poll(v5, v4, v12); if ( (_DWORD)result != -1 ) break; v14 = *__error(); if ( v14 ) { if ( v14 != 4 || dword_100A3B35C != 0 ) return 0xFFFFFFFFLL; } if ( a3 >= 1 ) { v16 = sub_10066F074(); v12 = a3 - sub_10066F09C(v16, v17, v9, v11); if ( v12 < 1 ) return 0; } } if ( (result & 0x80000000) != 0 ) return 0xFFFFFFFFLL; if ( !(_DWORD)result ) return 0; do { if ( v5->fd != -1 ) { revents = v5->revents; if ( (revents & 0x10) != 0 ) { revents |= 1u; v5->revents = revents; } if ( (revents & 8) != 0 ) v5->revents = revents | 5; } --v4; ++v5; } while ( v4 ); return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source