Skip to content

Commit

Permalink
[BOX32] Added a few more 32bits libc symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
ptitSeb committed Oct 6, 2024
1 parent 8965d9b commit e783e3c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/wrapped32/generated/functions_list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,7 @@
#() lFpBp_i -> lFpBi
#() LFpBp_i -> LFpBi
#() pFppbp_ -> pFppB
#() pFppBp_ -> pFppB
#() pFXLbL_ -> pFXLB
#() iFXLbpp_ -> iFXLB
#() iFXbLC_i -> iFXBi
Expand Down
2 changes: 2 additions & 0 deletions src/wrapped32/generated/wrapper32.c
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,7 @@ typedef double (*dFpBp_a_t)(void*, struct_p_t*, void*);
typedef intptr_t (*lFpBp_i_t)(void*, struct_p_t*, int32_t);
typedef uintptr_t (*LFpBp_i_t)(void*, struct_p_t*, int32_t);
typedef void* (*pFppbp__t)(void*, void*, struct_p_t*);
typedef void* (*pFppBp__t)(void*, void*, struct_p_t*);
typedef void* (*pFXLbL__t)(void*, uintptr_t, struct_L_t*);
typedef int32_t (*iFXLbpp__t)(void*, uintptr_t, struct_pp_t*);
typedef int32_t (*iFXbLC_i_t)(void*, struct_LC_t*, int32_t);
Expand Down Expand Up @@ -1991,6 +1992,7 @@ void dFpBp_a_32(x64emu_t *emu, uintptr_t fcn) { dFpBp_a_t fn = (dFpBp_a_t)fcn; s
void lFpBp_i_32(x64emu_t *emu, uintptr_t fcn) { lFpBp_i_t fn = (lFpBp_i_t)fcn; struct_p_t arg_8={0}; R_EAX = to_long(fn(from_ptriv(R_ESP + 4), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL, from_ptri(int32_t, R_ESP + 12))); if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); }
void LFpBp_i_32(x64emu_t *emu, uintptr_t fcn) { LFpBp_i_t fn = (LFpBp_i_t)fcn; struct_p_t arg_8={0}; R_EAX = to_ulong(fn(from_ptriv(R_ESP + 4), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL, from_ptri(int32_t, R_ESP + 12))); if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); }
void pFppbp__32(x64emu_t *emu, uintptr_t fcn) { pFppbp__t fn = (pFppbp__t)fcn; struct_p_t arg_12={0}; if (*(ptr_t*)(from_ptr((R_ESP + 12)))) from_struct_p(&arg_12, *(ptr_t*)(from_ptr((R_ESP + 12)))); R_EAX = to_ptrv(fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), *(ptr_t*)(from_ptr((R_ESP + 12))) ? &arg_12 : NULL)); if (*(ptr_t*)(from_ptr((R_ESP + 12)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 12))), &arg_12); }
void pFppBp__32(x64emu_t *emu, uintptr_t fcn) { pFppBp__t fn = (pFppBp__t)fcn; struct_p_t arg_12={0}; R_EAX = to_ptrv(fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), *(ptr_t*)(from_ptr((R_ESP + 12))) ? &arg_12 : NULL)); if (*(ptr_t*)(from_ptr((R_ESP + 12)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 12))), &arg_12); }
void pFXLbL__32(x64emu_t *emu, uintptr_t fcn) { pFXLbL__t fn = (pFXLbL__t)fcn; struct_L_t arg_12={0}; if (*(ptr_t*)(from_ptr((R_ESP + 12)))) from_struct_L(&arg_12, *(ptr_t*)(from_ptr((R_ESP + 12)))); R_EAX = to_ptrv(fn(getDisplay(from_ptriv(R_ESP + 4)), from_ulong(from_ptri(ulong_t, R_ESP + 8)), *(ptr_t*)(from_ptr((R_ESP + 12))) ? &arg_12 : NULL)); if (*(ptr_t*)(from_ptr((R_ESP + 12)))) to_struct_L(*(ptr_t*)(from_ptr((R_ESP + 12))), &arg_12); }
void iFXLbpp__32(x64emu_t *emu, uintptr_t fcn) { iFXLbpp__t fn = (iFXLbpp__t)fcn; struct_pp_t arg_12={0}; if (*(ptr_t*)(from_ptr((R_ESP + 12)))) from_struct_pp(&arg_12, *(ptr_t*)(from_ptr((R_ESP + 12)))); R_EAX = fn(getDisplay(from_ptriv(R_ESP + 4)), from_ulong(from_ptri(ulong_t, R_ESP + 8)), *(ptr_t*)(from_ptr((R_ESP + 12))) ? &arg_12 : NULL); if (*(ptr_t*)(from_ptr((R_ESP + 12)))) to_struct_pp(*(ptr_t*)(from_ptr((R_ESP + 12))), &arg_12); }
void iFXbLC_i_32(x64emu_t *emu, uintptr_t fcn) { iFXbLC_i_t fn = (iFXbLC_i_t)fcn; struct_LC_t arg_8={0}; if (*(ptr_t*)(from_ptr((R_ESP + 8)))) from_struct_LC(&arg_8, *(ptr_t*)(from_ptr((R_ESP + 8)))); R_EAX = fn(getDisplay(from_ptriv(R_ESP + 4)), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL, from_ptri(int32_t, R_ESP + 12)); if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_LC(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); }
Expand Down
1 change: 1 addition & 0 deletions src/wrapped32/generated/wrapper32.h
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,7 @@ void dFpBp_a_32(x64emu_t *emu, uintptr_t fnc);
void lFpBp_i_32(x64emu_t *emu, uintptr_t fnc);
void LFpBp_i_32(x64emu_t *emu, uintptr_t fnc);
void pFppbp__32(x64emu_t *emu, uintptr_t fnc);
void pFppBp__32(x64emu_t *emu, uintptr_t fnc);
void pFXLbL__32(x64emu_t *emu, uintptr_t fnc);
void iFXLbpp__32(x64emu_t *emu, uintptr_t fnc);
void iFXbLC_i_32(x64emu_t *emu, uintptr_t fnc);
Expand Down
6 changes: 3 additions & 3 deletions src/wrapped32/wrappedlibc_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ GOWM(backtrace, iFEpi)
GOWM(backtrace_symbols, pFEpi)
//GO(__backtrace_symbols_fd, vFpii)
//GOW(backtrace_symbols_fd, vFpii)
//GO(basename, pFp)
GO(basename, pFp)
//GOW(bcmp, iFppL)
//GO(bcopy, vFppL)
// bdflush
Expand Down Expand Up @@ -1079,7 +1079,7 @@ GOW(mbsrtowcs, LFpbp_Lp)
// __mbsrtowcs_chk
GO(mbstowcs, LFppL)
// __mbstowcs_chk
//GO(mbtowc, iFppL)
GO(mbtowc, iFppL)
// mcheck
// mcheck_check_all
// mcheck_pedantic
Expand Down Expand Up @@ -1978,7 +1978,7 @@ GO(wcstof, fFpBp_)
// __wcstof_l
// wcstof_l // Weak
// wcstoimax
//GO(wcstok, pFppp)
GO(wcstok, pFppBp_)
GOM(wcstol, lFpBp_i) //%noE
//GO(wcstold, DFpp)
// __wcstold_internal
Expand Down

0 comments on commit e783e3c

Please sign in to comment.