diff --git a/src/core.c b/src/core.c index 54df1e67b..3cc5caec6 100644 --- a/src/core.c +++ b/src/core.c @@ -2263,7 +2263,7 @@ int initialize(int argc, const char **argv, char** env, x64emu_t** emulator, elf } // check if file exist if(!my_context->argv[0] || !FileExist(my_context->argv[0], IS_FILE)) { - printf_log(LOG_NONE, "Error: File is not found. (check BOX64_PATH)\n"); + printf_log(LOG_NONE, "Error: File is not found. (%s)\n", my_context->argv[0]); free_contextargv(); FreeBox64Context(&my_context); FreeCollection(&ld_preload); diff --git a/src/emu/x86syscall_32.c b/src/emu/x86syscall_32.c index 2a118d652..20a149ba2 100644 --- a/src/emu/x86syscall_32.c +++ b/src/emu/x86syscall_32.c @@ -37,6 +37,7 @@ #include "x64tls.h" #include "box32.h" #include "converter32.h" +#include "custommem.h" // Syscall table for x86_64 can be found @@ -54,7 +55,9 @@ static const scwrap_t syscallwrap[] = { //{ 4, __NR_write, 3 }, // same //{ 5, __NR_open, 3 }, // flags need transformation //{ 6, __NR_close, 1 }, // wrapped so SA_RESTART can be handled by libc - //{ 7, __NR_waitpid, 3 }, + #ifdef __NR_waitpid + { 7, __NR_waitpid, 3 }, + #endif //{ 10, __NR_unlink, 1 }, //{ 12, __NR_chdir, 1 }, //{ 13, __NR_time, 1 }, @@ -68,7 +71,9 @@ static const scwrap_t syscallwrap[] = { //{ 39, __NR_mkdir, 2 }, //{ 40, __NR_rmdir, 1 }, //{ 41, __NR_dup, 1 }, - //{ 42, __NR_pipe, 1 }, + #ifdef __NR_pipe + { 42, __NR_pipe, 1 }, + #endif //{ 45, __NR_brk, 1 }, //{ 47, __NR_getgid, 0 }, //{ 49, __NR_geteuid, 0 }, @@ -124,7 +129,7 @@ static const scwrap_t syscallwrap[] = { //{ 162, __NR_nanosleep, 2 }, //{ 164, __NR_setresuid, 3 }, //{ 168, __NR_poll, 3 }, // wrapped to allow SA_RESTART wrapping by libc - //{ 172, __NR_prctl, 5 }, + { 172, __NR_prctl, 5 }, //{ 173, __NR_rt_sigreturn, 0 }, //{ 175, __NR_rt_sigprocmask, 4 }, //{ 179, __NR_rt_sigsuspend, 2 }, @@ -254,11 +259,25 @@ ssize_t my32_read(int fd, void* buf, size_t count); void* my32_mmap64(x64emu_t* emu, void *addr, size_t length, int prot, int flags, int fd, int64_t offset); int my32_munmap(x64emu_t* emu, void* addr, unsigned long length); int my32_sigaltstack(x64emu_t* emu, const i386_stack_t* ss, i386_stack_t* oss); +pid_t my_vfork(x64emu_t* emu); #ifndef FUTEX_LOCK_PI2 #define FUTEX_LOCK_PI2 13 #endif +static int clone32_fn(void* arg) +{ + x64emu_t *emu = (x64emu_t*)arg; + thread_set_emu(emu); + R_EAX = 0; + DynaRun(emu); + int ret = S_EAX; + FreeX64Emu(&emu); + my_context->stack_clone_used = 0; + return ret; +} + + void EXPORT x86Syscall(x64emu_t *emu) { uint32_t s = R_EAX; @@ -317,6 +336,20 @@ void EXPORT x86Syscall(x64emu_t *emu) case 6: // sys_close S_EAX = close((int)R_EBX); break; +#ifndef __NR_waitpid + case 7: //sys_waitpid + S_EAX = waitpid((pid_t)R_EBX, (int*)from_ptrv(R_ECX), S_EDX); + if(S_EAX==-1 && errno>0) + S_EAX = -errno; + break; +#endif + #ifndef __NR_fork + case 42: + S_EAX = pipe(from_ptrv(R_EBX)); + if(S_EAX==-1) + S_EAX = -errno; + break; + #endif case 90: // old_mmap { struct mmap_arg_struct *st = from_ptrv(R_EBX); @@ -330,7 +363,61 @@ void EXPORT x86Syscall(x64emu_t *emu) if(S_EAX==-1 && errno>0) S_EAX = -errno; break; - /*case 123: // SYS_modify_ldt + case 120: // sys_clone + // x86 raw syscall is long clone(unsigned long flags, void *stack, int *parent_tid, unsigned long tls, int *child_tid); + // so flags=R_EBX, stack=R_ECX, parent_tid=R_EDX, child_tid=R_ESI, tls=R_EDI + if((R_EBX&~0xff)==0x4100) { + // this is a case of vfork... + S_RAX = my_vfork(emu); + if(S_RAX==-1) + S_RAX = -errno; + } else { + if(R_ECX) + { + void* stack_base = from_ptrv(R_ECX); + int stack_size = 0; + uintptr_t sp = R_ECX; + if(!R_RSI) { + // allocate a new stack... + int currstack = 0; + if((R_ESP>=(uintptr_t)emu->init_stack) && (R_ESP<=((uintptr_t)emu->init_stack+emu->size_stack))) + currstack = 1; + stack_size = (currstack && emu->size_stack)?emu->size_stack:(1024*1024); + stack_base = mmap(NULL, stack_size, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_32BIT, -1, 0); + // copy value from old stack to new stack + if(currstack) { + memcpy(stack_base, emu->init_stack, stack_size); + sp = (uintptr_t)emu->init_stack + R_ESP - (uintptr_t)stack_base; + } else { + int size_to_copy = (uintptr_t)emu->init_stack + emu->size_stack - (R_ESP); + memcpy(stack_base+stack_size-size_to_copy, from_ptrv(R_ESP), size_to_copy); + sp = (uintptr_t)stack_base+stack_size-size_to_copy; + } + } + x64emu_t * newemu = NewX64Emu(emu->context, R_EIP, (uintptr_t)stack_base, stack_size, (R_ECX)?0:1); + SetupX64Emu(newemu, emu); + CloneEmu(newemu, emu); + newemu->regs[_SP].q[0] = sp; // setup new stack pointer + void* mystack = NULL; + if(my_context->stack_clone_used) { + mystack = box_malloc(1024*1024); // stack for own process... memory leak, but no practical way to remove it + } else { + if(!my_context->stack_clone) + my_context->stack_clone = box_malloc(1024*1024); + mystack = my_context->stack_clone; + my_context->stack_clone_used = 1; + } + int64_t ret = clone(clone32_fn, (void*)((uintptr_t)mystack+1024*1024), R_EBX, newemu, R_EDX, R_EDI, R_ESI); + S_RAX = ret; + } + else + #ifdef NOALIGN + S_RAX = syscall(__NR_clone, R_EBX, R_ECX, R_EDX, R_ESI, R_EDI); + #else + S_RAX = syscall(__NR_clone, R_EBX, R_ECX, R_EDX, R_EDI, R_ESI); // invert R_ESI/R_EDI on Aarch64 and most other + #endif + } + break; /*case 123: // SYS_modify_ldt R_EAX = my32_modify_ldt(emu, R_EBX, (thread_area_t*)(uintptr_t)R_ECX, R_EDX); if(R_EAX==0xffffffff && errno>0) R_EAX = (uint32_t)-errno; @@ -469,6 +556,13 @@ uint32_t EXPORT my32_syscall(x64emu_t *emu, uint32_t s, ptr_t* b) return (uint32_t)close(i32(0)); case 11: // execve return (uint32_t)my32_execve(emu, p(0), p(4), p(8)); + #ifndef __NR_fork + case 42: + S_EAX = pipe(p(0)); + if(S_EAX==-1) + S_EAX = -errno; + break; + #endif case 91: // munmap return (uint32_t)my32_munmap(emu, p(0), u32(4)); #if 0 diff --git a/src/wrapped32/generated/functions_list.txt b/src/wrapped32/generated/functions_list.txt index f688ba699..915596502 100644 --- a/src/wrapped32/generated/functions_list.txt +++ b/src/wrapped32/generated/functions_list.txt @@ -909,6 +909,7 @@ #() iFpCCC -> iFpCCC #() iFpWWu -> iFpWWu #() iEpuiL -> iEpuiL +#() iFpuip -> iFpuip #() iFpuuU -> iFpuuU #() iFpuLp -> iFpuLp #() iFpupi -> iFpupi @@ -1221,6 +1222,7 @@ #() iEpppLi -> iEpppLi #() iEpppLp -> iEpppLp #() iFppppi -> iFppppi +#() iFppppL -> iFppppL #() iFppppp -> iFppppp #() iFXiiii -> iFXiiii #() iFXiiip -> iFXiiip @@ -1729,6 +1731,7 @@ #() iFXLpppppppppp -> iFXLpppppppppp #() pFEXLiiuuLipii -> pFEXLiiuuLipii #() vFXiLLrLiiuL_Liiiipi -> vFXiLLBLiiiipi +#() iFXiLbL_bL_ppppbip_pp -> iFXiLBBppppBpp #() vFuiiiiiiiiiuup -> vFuiiiiiiiiiuup #() vFuuuuuuuuuuuuu -> vFuuuuuuuuuuuuu #() vFuUuuuuuuuuuuu -> vFuUuuuuuuuuuuu diff --git a/src/wrapped32/generated/wrapper32.c b/src/wrapped32/generated/wrapper32.c index 259f55519..193028563 100644 --- a/src/wrapped32/generated/wrapper32.c +++ b/src/wrapped32/generated/wrapper32.c @@ -1000,6 +1000,7 @@ typedef int32_t (*iFpipp_t)(void*, int32_t, void*, void*); typedef int32_t (*iFpCCC_t)(void*, uint8_t, uint8_t, uint8_t); typedef int32_t (*iFpWWu_t)(void*, uint16_t, uint16_t, uint32_t); typedef int32_t (*iEpuiL_t)(void*, uint32_t, int32_t, uintptr_t); +typedef int32_t (*iFpuip_t)(void*, uint32_t, int32_t, void*); typedef int32_t (*iFpuuU_t)(void*, uint32_t, uint32_t, uint64_t); typedef int32_t (*iFpuLp_t)(void*, uint32_t, uintptr_t, void*); typedef int32_t (*iFpupi_t)(void*, uint32_t, void*, int32_t); @@ -1312,6 +1313,7 @@ typedef int32_t (*iFpppip_t)(void*, void*, void*, int32_t, void*); typedef int32_t (*iEpppLi_t)(void*, void*, void*, uintptr_t, int32_t); typedef int32_t (*iEpppLp_t)(void*, void*, void*, uintptr_t, void*); typedef int32_t (*iFppppi_t)(void*, void*, void*, void*, int32_t); +typedef int32_t (*iFppppL_t)(void*, void*, void*, void*, uintptr_t); typedef int32_t (*iFppppp_t)(void*, void*, void*, void*, void*); typedef int32_t (*iFXiiii_t)(void*, int32_t, int32_t, int32_t, int32_t); typedef int32_t (*iFXiiip_t)(void*, int32_t, int32_t, int32_t, void*); @@ -1820,6 +1822,7 @@ typedef int32_t (*iFEXLppiiiiuui_t)(x64emu_t*, void*, uintptr_t, void*, void*, i typedef int32_t (*iFXLpppppppppp_t)(void*, uintptr_t, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*); typedef void* (*pFEXLiiuuLipii_t)(x64emu_t*, void*, uintptr_t, int32_t, int32_t, uint32_t, uint32_t, uintptr_t, int32_t, void*, int32_t, int32_t); typedef void (*vFXiLLrLiiuL_Liiiipi_t)(void*, int32_t, uintptr_t, uintptr_t, struct_LiiuL_t*, uintptr_t, int32_t, int32_t, int32_t, int32_t, void*, int32_t); +typedef int32_t (*iFXiLbL_bL_ppppbip_pp_t)(void*, int32_t, uintptr_t, struct_L_t*, struct_L_t*, void*, void*, void*, void*, struct_ip_t*, void*, void*); typedef void (*vFuiiiiiiiiiuup_t)(uint32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, uint32_t, uint32_t, void*); typedef void (*vFuuuuuuuuuuuuu_t)(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t); typedef void (*vFuUuuuuuuuuuuu_t)(uint32_t, uint64_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t); @@ -2770,6 +2773,7 @@ void iFpipp_32(x64emu_t *emu, uintptr_t fcn) { iFpipp_t fn = (iFpipp_t)fcn; R_EA void iFpCCC_32(x64emu_t *emu, uintptr_t fcn) { iFpCCC_t fn = (iFpCCC_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptri(uint8_t, R_ESP + 8), from_ptri(uint8_t, R_ESP + 12), from_ptri(uint8_t, R_ESP + 16)); } void iFpWWu_32(x64emu_t *emu, uintptr_t fcn) { iFpWWu_t fn = (iFpWWu_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptri(uint16_t, R_ESP + 8), from_ptri(uint16_t, R_ESP + 12), from_ptri(uint32_t, R_ESP + 16)); } void iEpuiL_32(x64emu_t *emu, uintptr_t fcn) { iEpuiL_t fn = (iEpuiL_t)fcn; errno = emu->libc_err; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12), from_ulong(from_ptri(ulong_t, R_ESP + 16))); emu->libc_err = errno; } +void iFpuip_32(x64emu_t *emu, uintptr_t fcn) { iFpuip_t fn = (iFpuip_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12), from_ptriv(R_ESP + 16)); } void iFpuuU_32(x64emu_t *emu, uintptr_t fcn) { iFpuuU_t fn = (iFpuuU_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptri(uint32_t, R_ESP + 12), from_ptri(uint64_t, R_ESP + 16)); } void iFpuLp_32(x64emu_t *emu, uintptr_t fcn) { iFpuLp_t fn = (iFpuLp_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ulong(from_ptri(ulong_t, R_ESP + 12)), from_ptriv(R_ESP + 16)); } void iFpupi_32(x64emu_t *emu, uintptr_t fcn) { iFpupi_t fn = (iFpupi_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptriv(R_ESP + 12), from_ptri(int32_t, R_ESP + 16)); } @@ -3082,6 +3086,7 @@ void iFpppip_32(x64emu_t *emu, uintptr_t fcn) { iFpppip_t fn = (iFpppip_t)fcn; R void iEpppLi_32(x64emu_t *emu, uintptr_t fcn) { iEpppLi_t fn = (iEpppLi_t)fcn; errno = emu->libc_err; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12), from_ulong(from_ptri(ulong_t, R_ESP + 16)), from_ptri(int32_t, R_ESP + 20)); emu->libc_err = errno; } void iEpppLp_32(x64emu_t *emu, uintptr_t fcn) { iEpppLp_t fn = (iEpppLp_t)fcn; errno = emu->libc_err; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12), from_ulong(from_ptri(ulong_t, R_ESP + 16)), from_ptriv(R_ESP + 20)); emu->libc_err = errno; } void iFppppi_32(x64emu_t *emu, uintptr_t fcn) { iFppppi_t fn = (iFppppi_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12), from_ptriv(R_ESP + 16), from_ptri(int32_t, R_ESP + 20)); } +void iFppppL_32(x64emu_t *emu, uintptr_t fcn) { iFppppL_t fn = (iFppppL_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12), from_ptriv(R_ESP + 16), from_ulong(from_ptri(ulong_t, R_ESP + 20))); } void iFppppp_32(x64emu_t *emu, uintptr_t fcn) { iFppppp_t fn = (iFppppp_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12), from_ptriv(R_ESP + 16), from_ptriv(R_ESP + 20)); } void iFXiiii_32(x64emu_t *emu, uintptr_t fcn) { iFXiiii_t fn = (iFXiiii_t)fcn; R_EAX = fn(getDisplay(from_ptriv(R_ESP + 4)), from_ptri(int32_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12), from_ptri(int32_t, R_ESP + 16), from_ptri(int32_t, R_ESP + 20)); } void iFXiiip_32(x64emu_t *emu, uintptr_t fcn) { iFXiiip_t fn = (iFXiiip_t)fcn; R_EAX = fn(getDisplay(from_ptriv(R_ESP + 4)), from_ptri(int32_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12), from_ptri(int32_t, R_ESP + 16), from_ptriv(R_ESP + 20)); } @@ -3590,6 +3595,7 @@ void iFEXLppiiiiuui_32(x64emu_t *emu, uintptr_t fcn) { iFEXLppiiiiuui_t fn = (iF void iFXLpppppppppp_32(x64emu_t *emu, uintptr_t fcn) { iFXLpppppppppp_t fn = (iFXLpppppppppp_t)fcn; R_EAX = fn(getDisplay(from_ptriv(R_ESP + 4)), from_ulong(from_ptri(ulong_t, R_ESP + 8)), from_ptriv(R_ESP + 12), from_ptriv(R_ESP + 16), from_ptriv(R_ESP + 20), from_ptriv(R_ESP + 24), from_ptriv(R_ESP + 28), from_ptriv(R_ESP + 32), from_ptriv(R_ESP + 36), from_ptriv(R_ESP + 40), from_ptriv(R_ESP + 44), from_ptriv(R_ESP + 48)); } void pFEXLiiuuLipii_32(x64emu_t *emu, uintptr_t fcn) { pFEXLiiuuLipii_t fn = (pFEXLiiuuLipii_t)fcn; R_EAX = to_ptrv(fn(emu, getDisplay(from_ptriv(R_ESP + 4)), from_ulong(from_ptri(ulong_t, R_ESP + 8)), from_ptri(int32_t, R_ESP + 12), from_ptri(int32_t, R_ESP + 16), from_ptri(uint32_t, R_ESP + 20), from_ptri(uint32_t, R_ESP + 24), from_ulong(from_ptri(ulong_t, R_ESP + 28)), from_ptri(int32_t, R_ESP + 32), from_ptriv(R_ESP + 36), from_ptri(int32_t, R_ESP + 40), from_ptri(int32_t, R_ESP + 44))); } void vFXiLLrLiiuL_Liiiipi_32(x64emu_t *emu, uintptr_t fcn) { vFXiLLrLiiuL_Liiiipi_t fn = (vFXiLLrLiiuL_Liiiipi_t)fcn; struct_LiiuL_t arg_20={0}; if (*(ptr_t*)(from_ptr((R_ESP + 20)))) from_struct_LiiuL(&arg_20, *(ptr_t*)(from_ptr((R_ESP + 20)))); fn(getDisplay(from_ptriv(R_ESP + 4)), from_ptri(int32_t, R_ESP + 8), from_ulong(from_ptri(ulong_t, R_ESP + 12)), from_ulong(from_ptri(ulong_t, R_ESP + 16)), *(ptr_t*)(from_ptr((R_ESP + 20))) ? &arg_20 : NULL, from_ulong(from_ptri(ulong_t, R_ESP + 24)), from_ptri(int32_t, R_ESP + 28), from_ptri(int32_t, R_ESP + 32), from_ptri(int32_t, R_ESP + 36), from_ptri(int32_t, R_ESP + 40), from_ptriv(R_ESP + 44), from_ptri(int32_t, R_ESP + 48)); } +void iFXiLbL_bL_ppppbip_pp_32(x64emu_t *emu, uintptr_t fcn) { iFXiLbL_bL_ppppbip_pp_t fn = (iFXiLbL_bL_ppppbip_pp_t)fcn; struct_L_t arg_16={0}; if (*(ptr_t*)(from_ptr((R_ESP + 16)))) from_struct_L(&arg_16, *(ptr_t*)(from_ptr((R_ESP + 16)))); struct_L_t arg_20={0}; if (*(ptr_t*)(from_ptr((R_ESP + 20)))) from_struct_L(&arg_20, *(ptr_t*)(from_ptr((R_ESP + 20)))); struct_ip_t arg_40={0}; if (*(ptr_t*)(from_ptr((R_ESP + 40)))) from_struct_ip(&arg_40, *(ptr_t*)(from_ptr((R_ESP + 40)))); R_EAX = fn(getDisplay(from_ptriv(R_ESP + 4)), from_ptri(int32_t, R_ESP + 8), from_ulong(from_ptri(ulong_t, R_ESP + 12)), *(ptr_t*)(from_ptr((R_ESP + 16))) ? &arg_16 : NULL, *(ptr_t*)(from_ptr((R_ESP + 20))) ? &arg_20 : NULL, from_ptriv(R_ESP + 24), from_ptriv(R_ESP + 28), from_ptriv(R_ESP + 32), from_ptriv(R_ESP + 36), *(ptr_t*)(from_ptr((R_ESP + 40))) ? &arg_40 : NULL, from_ptriv(R_ESP + 44), from_ptriv(R_ESP + 48)); if (*(ptr_t*)(from_ptr((R_ESP + 16)))) to_struct_L(*(ptr_t*)(from_ptr((R_ESP + 16))), &arg_16); if (*(ptr_t*)(from_ptr((R_ESP + 20)))) to_struct_L(*(ptr_t*)(from_ptr((R_ESP + 20))), &arg_20); if (*(ptr_t*)(from_ptr((R_ESP + 40)))) to_struct_ip(*(ptr_t*)(from_ptr((R_ESP + 40))), &arg_40); } void vFuiiiiiiiiiuup_32(x64emu_t *emu, uintptr_t fcn) { vFuiiiiiiiiiuup_t fn = (vFuiiiiiiiiiuup_t)fcn; fn(from_ptri(uint32_t, R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12), from_ptri(int32_t, R_ESP + 16), from_ptri(int32_t, R_ESP + 20), from_ptri(int32_t, R_ESP + 24), from_ptri(int32_t, R_ESP + 28), from_ptri(int32_t, R_ESP + 32), from_ptri(int32_t, R_ESP + 36), from_ptri(int32_t, R_ESP + 40), from_ptri(uint32_t, R_ESP + 44), from_ptri(uint32_t, R_ESP + 48), from_ptriv(R_ESP + 52)); } void vFuuuuuuuuuuuuu_32(x64emu_t *emu, uintptr_t fcn) { vFuuuuuuuuuuuuu_t fn = (vFuuuuuuuuuuuuu_t)fcn; fn(from_ptri(uint32_t, R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptri(uint32_t, R_ESP + 12), from_ptri(uint32_t, R_ESP + 16), from_ptri(uint32_t, R_ESP + 20), from_ptri(uint32_t, R_ESP + 24), from_ptri(uint32_t, R_ESP + 28), from_ptri(uint32_t, R_ESP + 32), from_ptri(uint32_t, R_ESP + 36), from_ptri(uint32_t, R_ESP + 40), from_ptri(uint32_t, R_ESP + 44), from_ptri(uint32_t, R_ESP + 48), from_ptri(uint32_t, R_ESP + 52)); } void vFuUuuuuuuuuuuu_32(x64emu_t *emu, uintptr_t fcn) { vFuUuuuuuuuuuuu_t fn = (vFuUuuuuuuuuuuu_t)fcn; fn(from_ptri(uint32_t, R_ESP + 4), from_ptri(uint64_t, R_ESP + 8), from_ptri(uint32_t, R_ESP + 16), from_ptri(uint32_t, R_ESP + 20), from_ptri(uint32_t, R_ESP + 24), from_ptri(uint32_t, R_ESP + 28), from_ptri(uint32_t, R_ESP + 32), from_ptri(uint32_t, R_ESP + 36), from_ptri(uint32_t, R_ESP + 40), from_ptri(uint32_t, R_ESP + 44), from_ptri(uint32_t, R_ESP + 48), from_ptri(uint32_t, R_ESP + 52), from_ptri(uint32_t, R_ESP + 56)); } diff --git a/src/wrapped32/generated/wrapper32.h b/src/wrapped32/generated/wrapper32.h index 148089649..d2f84b24d 100644 --- a/src/wrapped32/generated/wrapper32.h +++ b/src/wrapped32/generated/wrapper32.h @@ -950,6 +950,7 @@ void iFpipp_32(x64emu_t *emu, uintptr_t fnc); void iFpCCC_32(x64emu_t *emu, uintptr_t fnc); void iFpWWu_32(x64emu_t *emu, uintptr_t fnc); void iEpuiL_32(x64emu_t *emu, uintptr_t fnc); +void iFpuip_32(x64emu_t *emu, uintptr_t fnc); void iFpuuU_32(x64emu_t *emu, uintptr_t fnc); void iFpuLp_32(x64emu_t *emu, uintptr_t fnc); void iFpupi_32(x64emu_t *emu, uintptr_t fnc); @@ -1262,6 +1263,7 @@ void iFpppip_32(x64emu_t *emu, uintptr_t fnc); void iEpppLi_32(x64emu_t *emu, uintptr_t fnc); void iEpppLp_32(x64emu_t *emu, uintptr_t fnc); void iFppppi_32(x64emu_t *emu, uintptr_t fnc); +void iFppppL_32(x64emu_t *emu, uintptr_t fnc); void iFppppp_32(x64emu_t *emu, uintptr_t fnc); void iFXiiii_32(x64emu_t *emu, uintptr_t fnc); void iFXiiip_32(x64emu_t *emu, uintptr_t fnc); @@ -1770,6 +1772,7 @@ void iFEXLppiiiiuui_32(x64emu_t *emu, uintptr_t fnc); void iFXLpppppppppp_32(x64emu_t *emu, uintptr_t fnc); void pFEXLiiuuLipii_32(x64emu_t *emu, uintptr_t fnc); void vFXiLLrLiiuL_Liiiipi_32(x64emu_t *emu, uintptr_t fnc); +void iFXiLbL_bL_ppppbip_pp_32(x64emu_t *emu, uintptr_t fnc); void vFuiiiiiiiiiuup_32(x64emu_t *emu, uintptr_t fnc); void vFuuuuuuuuuuuuu_32(x64emu_t *emu, uintptr_t fnc); void vFuUuuuuuuuuuuu_32(x64emu_t *emu, uintptr_t fnc); diff --git a/src/wrapped32/wrappedlibc_private.h b/src/wrapped32/wrappedlibc_private.h index 02634910a..22217e697 100755 --- a/src/wrapped32/wrappedlibc_private.h +++ b/src/wrapped32/wrappedlibc_private.h @@ -1305,8 +1305,8 @@ GOM(__printf_chk, iEEipV) //%% // printf_size_info // profil // Weak // __profile_frequency -//DATAM(__progname, 4) -//DATAM(__progname_full, 4) +DATAM(__progname, 4) +DATAM(__progname_full, 4) DATAM(program_invocation_name, 4) DATAM(program_invocation_short_name, 4) //GOW(pselect, iEippppp) diff --git a/src/wrapped32/wrappedlibresolv_private.h b/src/wrapped32/wrappedlibresolv_private.h index 40448c056..0659ff358 100644 --- a/src/wrapped32/wrappedlibresolv_private.h +++ b/src/wrapped32/wrappedlibresolv_private.h @@ -30,7 +30,7 @@ GO(__dn_expand, iFppppi) //GOW(ns_get16, uFp) //GO(__ns_get32, LFp) //GOW(ns_get32, LFp) -//GO(ns_initparse, iFpip) +GO(ns_initparse, iFpip) //GO(ns_makecanon, iFppL) //GO(ns_msg_getflag, //GO(ns_name_compress, iFppLpp) @@ -41,10 +41,10 @@ GO(__dn_expand, iFppppi) //GO(ns_name_pton, iFppL) //GO(ns_name_rollback, vFppp) //GO(ns_name_skip, iFpp) -//GO(ns_name_uncompress, iFppppL) +GO(ns_name_uncompress, iFppppL) //GO(__ns_name_unpack, iFppppL) //GOW(ns_name_unpack, iFppppL) -//GO(ns_parserr, iFpuip) +GO(ns_parserr, iFpuip) //GO(ns_parse_ttl, iFpp) //GO(ns_put16, vFup) //GO(ns_put32, vFLp) diff --git a/src/wrapped32/wrappedlibxi_private.h b/src/wrapped32/wrappedlibxi_private.h index 02fb13ab5..30d37ab9f 100644 --- a/src/wrapped32/wrappedlibxi_private.h +++ b/src/wrapped32/wrappedlibxi_private.h @@ -55,7 +55,7 @@ GO(XIGrabKeycode, iFXiiLiiibiip_ip) GO(XIGrabTouchBegin, iFXiLibiip_ip) //GO(XIListProperties, bL_FXip) GOM(XIQueryDevice, pFEXip) -//GO(XIQueryPointer, iFXiLbL_bL_ppppbip_pp) +GO(XIQueryPointer, iFXiLbL_bL_ppppbip_pp) GO(XIQueryVersion, iFXpp) GOM(XISelectEvents, iFEXLpi) GO(XISetClientPointer, iFXLi) diff --git a/system/box64.box64rc b/system/box64.box64rc index 3e69f181b..db4a9dea8 100644 --- a/system/box64.box64rc +++ b/system/box64.box64rc @@ -231,9 +231,9 @@ BOX64_DYNAREC_BIGBLOCK=0 BOX64_DYNAREC_STRONGMEM=2 #Likes to crash without it BOX64_PREFER_EMULATED=1 -#[steam] -#BOX64_CRASHHANDLER=1 -#BOX64_EMULATED_LIBS=libudev.so.0 +[steam] +BOX64_CRASHHANDLER=0 +BOX64_EMULATED_LIBS=libudev.so.0 #[steamwebhelper] #BOX64_NOSANDBOX=1