// // lws_get_addresses from 0x8567e8 to 0x856918 (304 bytes) // // 1 xrefs: // > lws_get_peer_addresses @ 0x856970 // // 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:36 +0000 // int __fastcall lws_get_addresses(int a1, struct sockaddr *a2, char *a3, size_t a4, char *buf, socklen_t len) { int v9; // r2 size_t v10; // r0 int v11; // r4 _BOOL4 v13; // r3 struct addrinfo *v14; // r3 struct sockaddr *ai_addr; // r3 int *v16; // r0 char *v17; // r0 struct addrinfo *v18; // [sp+14h] [bp-34h] BYREF __int16 v19; // [sp+18h] [bp-30h] _DWORD cp[3]; // [sp+1Ch] [bp-2Ch] BYREF struct addrinfo v21; // [sp+28h] [bp-20h] BYREF if ( buf ) *buf = 0; *a3 = 0; v9 = *(_DWORD *)(a1 + 4588); v19 = 0; if ( (v9 & 0x20) == 0 ) { if ( lws_plat_inet_ntop(10, &a2->sa_data[6], buf, len) ) { if ( !strncmp(buf, "::ffff:", 7u) ) { v10 = strlen(buf); memmove(buf, buf + 7, v10 - 6); } v11 = 0; getnameinfo(a2, 28, a3, a4, nullptr, 0, 0); } else { v16 = (int *)_errno(); v11 = -1; v17 = strerror(*v16); lws_log(1, "inet_ntop", v17); } return v11; } v21.ai_family = 0; memset(&v21.ai_protocol, 0, 20); v21.ai_socktype = 1; v21.ai_flags = 2; v11 = getnameinfo(a2, 16, a3, a4, nullptr, 0, 0); if ( v11 ) return -1; if ( !buf ) return v11; if ( getaddrinfo(a3, nullptr, &v21, &v18) ) return -1; v13 = v19 == 0; if ( !v18 ) v13 = 0; if ( v13 ) { v14 = v18; while ( v14->ai_family != 2 ) { v14 = v14->ai_next; if ( !v14 ) goto LABEL_18; } ai_addr = v14->ai_addr; v19 = 2; cp[0] = *(_DWORD *)&ai_addr->sa_data[2]; } LABEL_18: freeaddrinfo(v18); if ( !v19 ) return -1; lws_plat_inet_ntop(2, cp, buf, len); return 0; }
GD Web Decomp Icon

GD Web Decomp

Raw Source