// // lws_plat_drop_app_privileges from 0x85c1a4 to 0x85c220 (124 bytes) // // 1 xrefs: // > lws_create_context @ 0x8596a2 // // This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False! // // 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 12:02:40 +0000 // __gid_t __fastcall lws_plat_drop_app_privileges(int a1) { __uid_t v2; // r0 struct passwd *v3; // r0 const char **p_pw_name; // r5 int *v5; // r0 char *v6; // r0 __gid_t result; // r0 int *v8; // r0 char *v9; // r0 v2 = *(_DWORD *)(a1 + 52); if ( v2 != -1 ) { v3 = getpwuid(v2); p_pw_name = (const char **)&v3->pw_name; if ( v3 ) { initgroups(v3->pw_name, *(_DWORD *)(a1 + 48)); if ( setuid(*(_DWORD *)(a1 + 52)) ) { 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 + 52)); } } result = *(_DWORD *)(a1 + 48); if ( result != -1 ) { result = setgid(result); if ( 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