diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-08-30 18:54:16 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-08-30 18:54:16 +0200 |
| commit | 723b94da053b15dcea48130e820a34fc8509381e (patch) | |
| tree | dfc1a78da82bd9f4b0266830fa80c4c5dbbbfc8b /src/wrapped32/generated | |
| parent | 7ecdced4860d12b8f484e0b222d08192be4a56eb (diff) | |
| download | box64-723b94da053b15dcea48130e820a34fc8509381e.tar.gz box64-723b94da053b15dcea48130e820a34fc8509381e.zip | |
[BOX32] More 32bits wrapped function and fixes
Diffstat (limited to 'src/wrapped32/generated')
| -rw-r--r-- | src/wrapped32/generated/functions_list.txt | 6 | ||||
| -rw-r--r-- | src/wrapped32/generated/wrappedlibctypes32.h | 4 | ||||
| -rw-r--r-- | src/wrapped32/generated/wrapper32.c | 8 | ||||
| -rw-r--r-- | src/wrapped32/generated/wrapper32.h | 4 |
4 files changed, 21 insertions, 1 deletions
diff --git a/src/wrapped32/generated/functions_list.txt b/src/wrapped32/generated/functions_list.txt index 3d46842c..23e13945 100644 --- a/src/wrapped32/generated/functions_list.txt +++ b/src/wrapped32/generated/functions_list.txt @@ -110,6 +110,7 @@ #() iFiII -> iFiII #() iFiuu -> iFiuu #() iFiLN -> iFiLN +#() iFipu -> iFipu #() iFipp -> iFipp #() iFuii -> iFuii #() iFuip -> iFuip @@ -120,6 +121,7 @@ #() iFpiu -> iFpiu #() iFpip -> iFpip #() iFpuu -> iFpuu +#() iFpLi -> iFpLi #() iFpLL -> iFpLL #() iFppu -> iFppu #() iFppL -> iFppL @@ -163,6 +165,7 @@ #() iFiiII -> iFiiII #() iFiuui -> iFiuui #() iFhpiL -> iFhpiL +#() lFipLi -> lFipLi #() LFpLLh -> LFpLLh #() pFEppi -> pFEppi #() pFEppp -> pFEppp @@ -174,6 +177,7 @@ #() iFEppiV -> iFEppiV #() iFEpppi -> iFEpppi #() iFEpppp -> iFEpppp +#() iFiiipu -> iFiiipu #() iFiLLLL -> iFiLLLL #() iFEBh_ppp -> iFEBppp #() iFEpippp -> iFEpippp @@ -201,6 +205,7 @@ wrappedldlinux: wrappedlibc: - vFv: - vFp: + - freeaddrinfo - iFv: - iFi: - __close_nocancel @@ -251,6 +256,7 @@ wrappedlibc: - iFLLLL: - iFppiV: - iFpppp: + - getaddrinfo - iFhvpV: - iFpippp: - iFpLppp: diff --git a/src/wrapped32/generated/wrappedlibctypes32.h b/src/wrapped32/generated/wrappedlibctypes32.h index 12cc4e30..002b0f01 100644 --- a/src/wrapped32/generated/wrappedlibctypes32.h +++ b/src/wrapped32/generated/wrappedlibctypes32.h @@ -59,6 +59,7 @@ typedef int32_t (*iFpippppp_t)(void*, int32_t, void*, void*, void*, void*, void* typedef int32_t (*iFpuvvppp_t)(void*, uint32_t, void, void, void*, void*, void*); #define SUPER() ADDED_FUNCTIONS() \ + GO(freeaddrinfo, vFp_t) \ GO(__close_nocancel, iFi_t) \ GO(__ctype_b_loc, pFv_t) \ GO(__ctype_tolower_loc, pFv_t) \ @@ -70,6 +71,7 @@ typedef int32_t (*iFpuvvppp_t)(void*, uint32_t, void, void, void*, void*, void*) GO(signal, pFip_t) \ GO(gmtime_r, pFpp_t) \ GO(localtime_r, pFpp_t) \ - GO(__libc_init, vFpppp_t) + GO(__libc_init, vFpppp_t) \ + GO(getaddrinfo, iFpppp_t) #endif // __wrappedlibcTYPES32_H_ diff --git a/src/wrapped32/generated/wrapper32.c b/src/wrapped32/generated/wrapper32.c index 0e2addd8..3a41d9e2 100644 --- a/src/wrapped32/generated/wrapper32.c +++ b/src/wrapped32/generated/wrapper32.c @@ -184,6 +184,7 @@ typedef int32_t (*iFiiO_t)(int32_t, int32_t, int32_t); typedef int32_t (*iFiII_t)(int32_t, int64_t, int64_t); typedef int32_t (*iFiuu_t)(int32_t, uint32_t, uint32_t); typedef int32_t (*iFiLN_t)(int32_t, uintptr_t, ...); +typedef int32_t (*iFipu_t)(int32_t, void*, uint32_t); typedef int32_t (*iFipp_t)(int32_t, void*, void*); typedef int32_t (*iFuii_t)(uint32_t, int32_t, int32_t); typedef int32_t (*iFuip_t)(uint32_t, int32_t, void*); @@ -194,6 +195,7 @@ typedef int32_t (*iFupp_t)(uint32_t, void*, void*); typedef int32_t (*iFpiu_t)(void*, int32_t, uint32_t); typedef int32_t (*iFpip_t)(void*, int32_t, void*); typedef int32_t (*iFpuu_t)(void*, uint32_t, uint32_t); +typedef int32_t (*iFpLi_t)(void*, uintptr_t, int32_t); typedef int32_t (*iFpLL_t)(void*, uintptr_t, uintptr_t); typedef int32_t (*iFppu_t)(void*, void*, uint32_t); typedef int32_t (*iFppL_t)(void*, void*, uintptr_t); @@ -237,6 +239,7 @@ typedef int32_t (*iFiiiN_t)(int32_t, int32_t, int32_t, ...); typedef int32_t (*iFiiII_t)(int32_t, int32_t, int64_t, int64_t); typedef int32_t (*iFiuui_t)(int32_t, uint32_t, uint32_t, int32_t); typedef int32_t (*iFhpiL_t)(uintptr_t, void*, int32_t, uintptr_t); +typedef intptr_t (*lFipLi_t)(int32_t, void*, uintptr_t, int32_t); typedef uintptr_t (*LFpLLh_t)(void*, uintptr_t, uintptr_t, uintptr_t); typedef void* (*pFEppi_t)(x64emu_t*, void*, void*, int32_t); typedef void* (*pFEppp_t)(x64emu_t*, void*, void*, void*); @@ -248,6 +251,7 @@ typedef void (*vFEpLLp_t)(x64emu_t*, void*, uintptr_t, uintptr_t, void*); typedef int32_t (*iFEppiV_t)(x64emu_t*, void*, void*, int32_t, void*); typedef int32_t (*iFEpppi_t)(x64emu_t*, void*, void*, void*, int32_t); typedef int32_t (*iFEpppp_t)(x64emu_t*, void*, void*, void*, void*); +typedef int32_t (*iFiiipu_t)(int32_t, int32_t, int32_t, void*, uint32_t); typedef int32_t (*iFiLLLL_t)(int32_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t); typedef int32_t (*iFEBh_ppp_t)(x64emu_t*, struct_h_t*, void*, void*, void*); typedef int32_t (*iFEpippp_t)(x64emu_t*, void*, int32_t, void*, void*, void*); @@ -384,6 +388,7 @@ void iFiiO_32(x64emu_t *emu, uintptr_t fcn) { iFiiO_t fn = (iFiiO_t)fcn; R_EAX = void iFiII_32(x64emu_t *emu, uintptr_t fcn) { iFiII_t fn = (iFiII_t)fcn; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), from_ptri(int64_t, R_ESP + 8), from_ptri(int64_t, R_ESP + 16)); } void iFiuu_32(x64emu_t *emu, uintptr_t fcn) { iFiuu_t fn = (iFiuu_t)fcn; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptri(uint32_t, R_ESP + 12)); } void iFiLN_32(x64emu_t *emu, uintptr_t fcn) { iFiLN_t fn = (iFiLN_t)fcn; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), to_ulong(from_ptri(ulong_t, R_ESP + 8)), from_ptriv(R_ESP + 12)); } +void iFipu_32(x64emu_t *emu, uintptr_t fcn) { iFipu_t fn = (iFipu_t)fcn; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptri(uint32_t, R_ESP + 12)); } void iFipp_32(x64emu_t *emu, uintptr_t fcn) { iFipp_t fn = (iFipp_t)fcn; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12)); } void iFuii_32(x64emu_t *emu, uintptr_t fcn) { iFuii_t fn = (iFuii_t)fcn; R_EAX = fn(from_ptri(uint32_t, R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12)); } void iFuip_32(x64emu_t *emu, uintptr_t fcn) { iFuip_t fn = (iFuip_t)fcn; R_EAX = fn(from_ptri(uint32_t, R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptriv(R_ESP + 12)); } @@ -394,6 +399,7 @@ void iFupp_32(x64emu_t *emu, uintptr_t fcn) { iFupp_t fn = (iFupp_t)fcn; R_EAX = void iFpiu_32(x64emu_t *emu, uintptr_t fcn) { iFpiu_t fn = (iFpiu_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptri(uint32_t, R_ESP + 12)); } void iFpip_32(x64emu_t *emu, uintptr_t fcn) { iFpip_t fn = (iFpip_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptriv(R_ESP + 12)); } void iFpuu_32(x64emu_t *emu, uintptr_t fcn) { iFpuu_t fn = (iFpuu_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptri(uint32_t, R_ESP + 12)); } +void iFpLi_32(x64emu_t *emu, uintptr_t fcn) { iFpLi_t fn = (iFpLi_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), to_ulong(from_ptri(ulong_t, R_ESP + 8)), from_ptri(int32_t, R_ESP + 12)); } void iFpLL_32(x64emu_t *emu, uintptr_t fcn) { iFpLL_t fn = (iFpLL_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), to_ulong(from_ptri(ulong_t, R_ESP + 8)), to_ulong(from_ptri(ulong_t, R_ESP + 12))); } void iFppu_32(x64emu_t *emu, uintptr_t fcn) { iFppu_t fn = (iFppu_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ptri(uint32_t, R_ESP + 12)); } void iFppL_32(x64emu_t *emu, uintptr_t fcn) { iFppL_t fn = (iFppL_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), to_ulong(from_ptri(ulong_t, R_ESP + 12))); } @@ -437,6 +443,7 @@ void iFiiiN_32(x64emu_t *emu, uintptr_t fcn) { iFiiiN_t fn = (iFiiiN_t)fcn; R_EA void iFiiII_32(x64emu_t *emu, uintptr_t fcn) { iFiiII_t fn = (iFiiII_t)fcn; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptri(int64_t, R_ESP + 12), from_ptri(int64_t, R_ESP + 20)); } void iFiuui_32(x64emu_t *emu, uintptr_t fcn) { iFiuui_t fn = (iFiuui_t)fcn; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptri(uint32_t, R_ESP + 12), from_ptri(int32_t, R_ESP + 16)); } void iFhpiL_32(x64emu_t *emu, uintptr_t fcn) { iFhpiL_t fn = (iFhpiL_t)fcn; R_EAX = fn(from_hash(from_ptri(ptr_t, R_ESP + 4)), from_ptriv(R_ESP + 8), from_ptri(int32_t, R_ESP + 12), to_ulong(from_ptri(ulong_t, R_ESP + 16))); } +void lFipLi_32(x64emu_t *emu, uintptr_t fcn) { lFipLi_t fn = (lFipLi_t)fcn; R_EAX = to_long(fn(from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), to_ulong(from_ptri(ulong_t, R_ESP + 12)), from_ptri(int32_t, R_ESP + 16))); } void LFpLLh_32(x64emu_t *emu, uintptr_t fcn) { LFpLLh_t fn = (LFpLLh_t)fcn; R_EAX = to_ulong(fn(from_ptriv(R_ESP + 4), to_ulong(from_ptri(ulong_t, R_ESP + 8)), to_ulong(from_ptri(ulong_t, R_ESP + 12)), from_hash(from_ptri(ptr_t, R_ESP + 16)))); } void pFEppi_32(x64emu_t *emu, uintptr_t fcn) { pFEppi_t fn = (pFEppi_t)fcn; R_EAX = to_ptrv(fn(emu, from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ptri(int32_t, R_ESP + 12))); } void pFEppp_32(x64emu_t *emu, uintptr_t fcn) { pFEppp_t fn = (pFEppp_t)fcn; R_EAX = to_ptrv(fn(emu, from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12))); } @@ -448,6 +455,7 @@ void vFEpLLp_32(x64emu_t *emu, uintptr_t fcn) { vFEpLLp_t fn = (vFEpLLp_t)fcn; f void iFEppiV_32(x64emu_t *emu, uintptr_t fcn) { iFEppiV_t fn = (iFEppiV_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ptri(int32_t, R_ESP + 12), from_ptrv(R_ESP + 16)); } void iFEpppi_32(x64emu_t *emu, uintptr_t fcn) { iFEpppi_t fn = (iFEpppi_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12), from_ptri(int32_t, R_ESP + 16)); } void iFEpppp_32(x64emu_t *emu, uintptr_t fcn) { iFEpppp_t fn = (iFEpppp_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12), from_ptriv(R_ESP + 16)); } +void iFiiipu_32(x64emu_t *emu, uintptr_t fcn) { iFiiipu_t fn = (iFiiipu_t)fcn; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12), from_ptriv(R_ESP + 16), from_ptri(uint32_t, R_ESP + 20)); } void iFiLLLL_32(x64emu_t *emu, uintptr_t fcn) { iFiLLLL_t fn = (iFiLLLL_t)fcn; R_EAX = fn(from_ptri(int32_t, R_ESP + 4), to_ulong(from_ptri(ulong_t, R_ESP + 8)), to_ulong(from_ptri(ulong_t, R_ESP + 12)), to_ulong(from_ptri(ulong_t, R_ESP + 16)), to_ulong(from_ptri(ulong_t, R_ESP + 20))); } void iFEBh_ppp_32(x64emu_t *emu, uintptr_t fcn) { iFEBh_ppp_t fn = (iFEBh_ppp_t)fcn; struct_h_t arg_4; R_EAX = fn(emu, *(ptr_t*)(from_ptr((R_ESP + 4))) ? &arg_4 : NULL, from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12), from_ptriv(R_ESP + 16)); if (*(ptr_t*)(from_ptr((R_ESP + 4)))) to_struct_h(*(ptr_t*)(from_ptr((R_ESP + 4))), &arg_4); } void iFEpippp_32(x64emu_t *emu, uintptr_t fcn) { iFEpippp_t fn = (iFEpippp_t)fcn; R_EAX = fn(emu, from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptriv(R_ESP + 12), from_ptriv(R_ESP + 16), from_ptriv(R_ESP + 20)); } diff --git a/src/wrapped32/generated/wrapper32.h b/src/wrapped32/generated/wrapper32.h index d92b89e4..2688f112 100644 --- a/src/wrapped32/generated/wrapper32.h +++ b/src/wrapped32/generated/wrapper32.h @@ -150,6 +150,7 @@ void iFiiO_32(x64emu_t *emu, uintptr_t fnc); void iFiII_32(x64emu_t *emu, uintptr_t fnc); void iFiuu_32(x64emu_t *emu, uintptr_t fnc); void iFiLN_32(x64emu_t *emu, uintptr_t fnc); +void iFipu_32(x64emu_t *emu, uintptr_t fnc); void iFipp_32(x64emu_t *emu, uintptr_t fnc); void iFuii_32(x64emu_t *emu, uintptr_t fnc); void iFuip_32(x64emu_t *emu, uintptr_t fnc); @@ -160,6 +161,7 @@ void iFupp_32(x64emu_t *emu, uintptr_t fnc); void iFpiu_32(x64emu_t *emu, uintptr_t fnc); void iFpip_32(x64emu_t *emu, uintptr_t fnc); void iFpuu_32(x64emu_t *emu, uintptr_t fnc); +void iFpLi_32(x64emu_t *emu, uintptr_t fnc); void iFpLL_32(x64emu_t *emu, uintptr_t fnc); void iFppu_32(x64emu_t *emu, uintptr_t fnc); void iFppL_32(x64emu_t *emu, uintptr_t fnc); @@ -203,6 +205,7 @@ void iFiiiN_32(x64emu_t *emu, uintptr_t fnc); void iFiiII_32(x64emu_t *emu, uintptr_t fnc); void iFiuui_32(x64emu_t *emu, uintptr_t fnc); void iFhpiL_32(x64emu_t *emu, uintptr_t fnc); +void lFipLi_32(x64emu_t *emu, uintptr_t fnc); void LFpLLh_32(x64emu_t *emu, uintptr_t fnc); void pFEppi_32(x64emu_t *emu, uintptr_t fnc); void pFEppp_32(x64emu_t *emu, uintptr_t fnc); @@ -214,6 +217,7 @@ void vFEpLLp_32(x64emu_t *emu, uintptr_t fnc); void iFEppiV_32(x64emu_t *emu, uintptr_t fnc); void iFEpppi_32(x64emu_t *emu, uintptr_t fnc); void iFEpppp_32(x64emu_t *emu, uintptr_t fnc); +void iFiiipu_32(x64emu_t *emu, uintptr_t fnc); void iFiLLLL_32(x64emu_t *emu, uintptr_t fnc); void iFEBh_ppp_32(x64emu_t *emu, uintptr_t fnc); void iFEpippp_32(x64emu_t *emu, uintptr_t fnc); |