// // sub_647728 from 0x647728 to 0x647810 (232 bytes) // // 4 xrefs: // > sub_646AB0 @ 0x646b5c // > sub_646AB0 @ 0x646c72 // > sub_646AB0 @ 0x646dfe // > lws_client_reset @ 0x64ab80 // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // int __fastcall sub_647728(_DWORD *a1) { _DWORD *v1; // r4 int v2; // r7 int v4; // r3 int v5; // r2 int v6; // r7 int v7; // r9 int *v8; // r1 int v9; // r0 int v10; // r1 _DWORD *v11; // r7 int v12; // r3 _DWORD v14[3]; // [sp+Ch] [bp-Ch] BYREF v1 = (_DWORD *)a1[46]; v2 = a1[57]; v4 = v1[1139]; --v1[1138]; v5 = a1[57]; v14[1] = 0; v14[0] = v2; v14[2] = 0; if ( v5 > v4 ) { lws_log(1, "Socket fd %d too high (%d)\n", v5, v4); return 1; } else { if ( (*(int (__fastcall **)(_DWORD *, int, _DWORD, _DWORD *, int))(v1[11] + 4))(a1, 35, a1[48], v14, 1) ) return -1; v6 = v1[6]; v7 = a1[59]; v8 = (int *)(v6 + 8 * v1[1138]); v9 = *v8; v10 = v8[1]; v11 = (_DWORD *)(v6 + 8 * v7); *v11 = v9; v11[1] = v10; lws_plat_delete_socket_from_fds(v1, a1, v7); *(_DWORD *)(*(_DWORD *)(v1[7] + 4 * *(_DWORD *)(v1[6] + 8 * v1[1138])) + 236) = v7; *(_DWORD *)(v1[7] + 4 * a1[57]) = 0; v12 = a1[57]; a1[59] = -1; if ( v12 < 0 ) return -((*(int (__fastcall **)(_DWORD *, int, _DWORD, _DWORD *, int))(v1[11] + 4))(a1, 36, a1[48], v14, 1) != 0); if ( (*(int (__fastcall **)(_DWORD *, int, _DWORD, _DWORD *, _DWORD))(v1[11] + 4))(a1, 33, a1[48], v14, 0) ) return -1; else return -((*(int (__fastcall **)(_DWORD *, int, _DWORD, _DWORD *, int))(v1[11] + 4))(a1, 36, a1[48], v14, 1) != 0); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source