// // lws_plat_drop_app_privileges from 0xe38bfc to 0xe38cd4 (216 bytes) // // 2 xrefs: // > lws_create_context @ 0xe358e0 // > @ 0xa6c60 // // 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:59 +0000 // __int64 __fastcall lws_plat_drop_app_privileges(__int64 a1) { __uid_t v2; // w0 struct passwd *v3; // x0 const char **p_pw_name; // x20 int *v5; // x0 char *v6; // x0 __int64 result; // x0 int *v8; // x0 char *v9; // x0 v2 = *(_DWORD *)(a1 + 96); if ( v2 != -1 ) { v3 = getpwuid(v2); p_pw_name = (const char **)&v3->pw_name; if ( v3 ) { initgroups(v3->pw_name, *(_DWORD *)(a1 + 92)); if ( setuid(*(_DWORD *)(a1 + 96)) ) { v5 = (int *)__errno(); v6 = strerror(*v5); lws_log(2, "setuid: %s\n", v6); } else { lws_log(4, " Set privs to user '%s'\n", *p_pw_name); } } else { lws_log(2, "getpwuid: unable to find uid %d", *(_DWORD *)(a1 + 96)); } } result = *(unsigned int *)(a1 + 92); if ( (_DWORD)result != -1 ) { result = setgid(result); if ( (_DWORD)result ) { v8 = (int *)__errno(); v9 = strerror(*v8); return lws_log(2, "setgid: %s\n", v9); } } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source