L00401068( _unknown_ __esp, // r7 char _a3918, // _cfa_f4e char _a9642, // _cfa_25aa char _a28386 // _cfa_6ee2 ) { char _v23394; // _cfa_ffffa49e char _v40268; // _cfa_ffff62b4 char _v44830; // _cfa_ffff50e2 _unknown_ _t27; // _t27 _unknown_ _t30; // _t30 _unknown_ _t31; // _t31 _unknown_ _t34; // _t34 _unknown_ _t36; // _t36 _unknown_ _t38; // _t38 _unknown_ _t40; // _t40 _unknown_ _t41; // _t41 _unknown_ _t42; // _t42 _unknown_ _t43; // _t43 _unknown_ _t49; // _t49 _unknown_ _t50; // _t50 _unknown_ _t51; // _t51 _unknown_ _t52; // _t52 _unknown_ _t53; // _t53 _unknown_ _t54; // _t54 _unknown_ _t56; // _t56 _unknown_ _t57; // _t57 __esp = __esp; _t30 = 0x407000; *((intOrPtr*)(0x402000)) = *((intOrPtr*)(_t30 + 0x74)); *((intOrPtr*)( &_v44830 + 44826)) = 0; __esp = __esp - 4; *((intOrPtr*)( &_a28386 + -28394)) = 0; __esp = __esp; *((intOrPtr*)( &_a3918 + -3930)) = 1; __esp = __esp + -4; *((intOrPtr*)(0x401014))(); _push( *((intOrPtr*)(0x402000))); *((intOrPtr*)( &_a9642 + -9662)) = 8; __esp = __esp + -4; *((intOrPtr*)( &_v23394 + 23370)) = 0; __esp = __esp + -4; *((intOrPtr*)(0x401010))(); *((intOrPtr*)(0x402008)) = 0; *((intOrPtr*)(0x40200c)) = 0 + *((intOrPtr*)(0x402000)); _push( *((intOrPtr*)(0x402000))); *((intOrPtr*)( &_v40268 + 40236)) = _t30 + -41814 - -41950; __esp = __esp - 4; _push( *((intOrPtr*)(0x402008))); *((intOrPtr*)(0x4016a5))(); _push( *((intOrPtr*)(0x402000))); _push( *((intOrPtr*)(0x402008))); *((intOrPtr*)(0x4011a2))(); return; }
L004017A8( signed int __ebx, // r1 _unknown_ __edx, // r3 _unknown_ __edi, // r4 signed int __esi // r5 ) { intOrPtr _v84; // _cfa_ffffffac signed int _v140; // _cfa_ffffff74 _unknown_ __ebp; // r6 _unknown_ _t7; // _t7 _unknown_ _t8; // _t8 void* _t9; // _t9 _unknown_ _t10; // _t10 signed int _t11; // _t11 _unknown_ _t12; // _t12 _unknown_ _t13; // _t13 _unknown_ _t14; // _t14 _unknown_ _t15; // _t15 _unknown_ _t16; // _t16 _unknown_ _t17; // _t17 _unknown_ _t18; // _t18 __esi = __esi; __edi = __edi; _t15 = __edx; _t11 = __ebx; _push(_t17); _t18 = __esp; __esp = __esp - 264; _push(4208748); _t8 = L00401530(4208748, _t11, _t13, _t15, __edi, __esi, *((intOrPtr*)(0x403a34))); _pop(__eax); _v84 = 1632523144; _push(_t8); _t9 = GetCurrentProcess(); _pop(__eax); _t14 = 0; while(1) { _t15 = _t15 + __esi; __esi = __esi & _v140; _t14 = _t14 + 1; if(_t14 == 5) { break; } } _t9[0x33] = _t9[0x33] | __esi; _push(_t9); GetCommandLineA(); _pop(__eax); __esp = _t18; _pop(__ebp); return; }
static bool exchange_with_empty(object_depot* depot, DepotMagazine*& magazine, DepotMagazine*& freeMagazine) { ASSERT(magazine == NULL || magazine->IsFull()); SpinLocker _(depot->inner_lock); if (depot->empty == NULL) return false; depot->empty_count--; if (magazine != NULL) { if (depot->full_count < depot->max_count) { _push(depot->full, magazine); depot->full_count++; freeMagazine = NULL; } else freeMagazine = magazine; } magazine = _pop(depot->empty); return true; }
unsigned CShuangpinSegmentor::deleteAt (unsigned idx, bool backward) { unsigned pyIdx, segIdx; if (!backward) idx += 1; _locateSegment (idx, pyIdx, segIdx); m_inputBuf.erase (idx, 1); m_pystr.erase (idx, 1); std::string new_pystr = m_pystr.substr (pyIdx); m_pystr.resize (pyIdx); TSegmentVec tmp_segs (m_segs.begin()+segIdx+1, m_segs.end()); m_segs.erase (m_segs.begin()+segIdx, m_segs.end()); if (m_nLastValidPos + 1 < idx) { //del invalid ch, and do not effect current status. m_pystr.insert(idx, new_pystr); m_segs.insert (m_segs.end(), tmp_segs.begin(), tmp_segs.end()); return m_inputBuf.size() -1; } else { m_hasInvalid = false; m_nAlpha = _getNumberOfNonAlpha(); } m_updatedFrom = UINT_MAX; std::string::const_iterator it = new_pystr.begin(); for (; it!= new_pystr.end(); ++it) { unsigned tmp = _push ((*it) & 0x7f); if (tmp < m_updatedFrom) m_updatedFrom = tmp; } return m_updatedFrom; }
json_parser* json_parser_alloc(int depth, json_parser_config config) { /* json_parser_alloc starts the checking process by constructing a json_parser object. It takes a depth parameter that restricts the level of maximum nesting. To continue the process, call json_parser_char for each character in the JSON text, and then call json_parser_done to obtain the final result. These functions are fully reentrant. */ json_parser *parser; assert(depth > 1); parser = (json_parser*)malloc(sizeof(json_parser)); if (!parser) return NULL; parser->depth = depth; memcpy(&parser->config, &config, sizeof(json_parser_config)); if (!parser->config.alloc_func) parser->config.alloc_func = json_default_alloc_func; parser->state = GO; parser->char_index = 0; parser->top = -1; parser->stack = (json_parser_stack_item*)calloc(depth, sizeof(json_parser_stack_item)); if (!parser->stack) { free(parser); return NULL; } _push(parser, MODE_DONE); return parser; }
unsigned CShuangpinSegmentor::_clear (unsigned from) { unsigned i, j; _locateSegment (from, i, j); std::string new_pystr = m_pystr.substr (i, from-i); m_pystr.resize (i); m_nAlpha = _getNumberOfNonAlpha(); m_segs.erase (m_segs.begin()+j, m_segs.end()); if (m_nLastValidPos + 1 >= from) { m_hasInvalid = false; } m_updatedFrom = from; for (std::string::const_iterator it = new_pystr.begin(); it!= new_pystr.end(); ++it) { unsigned tmp = _push ((*it) & 0x7f); if (tmp < m_updatedFrom) m_updatedFrom = tmp; } return m_updatedFrom; }
size_t BufferProtocol::printf(const char *pformat, ...) { va_list args; int result; size_t count; if(!flush() || !output || !pformat) return 0; va_start(args, pformat); result = vsnprintf(output, bufsize, pformat, args); va_end(args); if(result < 1) return 0; if((size_t)result > bufsize) result = bufsize; count = _push(output, result); if(count < (size_t)result) { output = NULL; end = true; } return count; }
L004018EC( _unknown_ __eax // r0 ) { intOrPtr _v44; // _cfa_ffffffd4 _unknown_ __ebp; // r6 _unknown_ _t11; // _t11 _unknown_ _t13; // _t13 _unknown_ _t16; // _t16 _unknown_ _t17; // _t17 __ebx = 4208156; _push(4208156); L0040159C(__edi, _t13 + -1424449641, __eax, _t16, *((intOrPtr*)(__ebx + 276))); _pop(__ebx); GetDriveTypeA(0); _v44 = 3; while(_v44 != 0) { _v44 = _v44 - 1; asm("adc edi, [ebp-0x10]"); asm("sbb ecx, edx"); } _v44 = _v44 + __edi; __esi = __ebx + -1564; while(1) { asm("stc "); asm("invalid "); if(LoadLibraryA(__esi) == 0) { break; } } return; }
object_t open(String path,int mode){ object_t o = 0; void *buff = _push(path,strlen(path) + 1); o = run(FS_PID,OPEN,.mode = mode,.buffer = buff); _pop(buff); return o; }
L00401608( _unknown_ __ecx, // r2 _unknown_ __edx // r3 ) { _unknown_ _v256; // _cfa_ffffff00 _unknown_ __ebp; // r6 _unknown_ _t2; // _t2 _unknown_ _t5; // _t5 _unknown_ _t6; // _t6 _unknown_ _t7; // _t7 _unknown_ _t10; // _t10 _unknown_ _t11; // _t11 _unknown_ _t12; // _t12 _unknown_ _t14; // _t14 _unknown_ _t15; // _t15 _unknown_ _t20; // _t20 _unknown_ _t21; // _t21 _unknown_ _t22; // _t22 _push(_t21); _t22 = __esp; __esp = __esp - 784; IsWindow(1706949468); OpenThreadToken(0, &_v256 & 0, 0, _t3); ResumeThread(6); __esp = _t22; _pop(__ebp); return; }
static void push_empty_magazine(object_depot* depot, DepotMagazine* magazine) { SpinLocker _(depot->inner_lock); _push(depot->empty, magazine); depot->empty_count++; }
bool BytesChannel::push(const char* p, const int64_t s){ if(_push(p, s)){ return signal(); } else{ return false; } }
L003E1000( _unknown_ __ecx, // r2 intOrPtr _a4 // _cfa_4 ) { intOrPtr _v8; // _cfa_fffffff8 intOrPtr _v12; // _cfa_fffffff4 _unknown_ __ebp; // r6 _unknown_ _t11; // _t11 _t11 = __ecx; _push(_t11); _push(_t11); _v12 = _a4; _v8 = _v12 + *((intOrPtr*)(_v12 + 60)); return _v8; }
int main(){ Stack *topo; topo=NULL; system("clear"); _push(&topo,1); _push(&topo,2); _push(&topo,3); printf("\n\n %i \n\n",sizeofStack(topo)); printStack(topo); __pause(); _pop(&topo); printStack(topo); printf("\n\n %i \n\n",sizeofStack(topo)); __pause(); return 1; }
L004010D5( _unknown_ __eax // r0 ) { __eax = __eax; _push(__eax); return; }
void VCPU::_call( TokenList& insVector ) { dword label = (dword)GetConst( insVector[ 1 ] ); _push( eip ); // 保存PC eip = *(dword_pointer)label; }
void Lua::Var :: reg_object(const int index, Object* obj) { if(lua_type(st->vm, ind) == LUA_TTABLE) { _push(st->vm, index); void** udata = (void**)lua_newuserdata(st->vm, sizeof(void*)); *udata = obj; lua_settable(st->vm, ind); } }
DWORD CondVarImpl::wait(DWORD dwMillisecondsTimeout/* = INFINITE*/, BOOL bAlertable/* = FALSE */) { if(! _lockHeldByCallingThread()) { ::SetLastError(ERROR_INVALID_FUNCTION); // for the lack of better... return WAIT_FAILED; } // Enter a new event handle into the wait set. HANDLE hWaitEvent = _push(); if(NULL == hWaitEvent) return WAIT_FAILED; // Store the current lock count for re-acquisition. int nThisThreadsLockCount = _nLockCount; _nLockCount = 0; // Release the synchronization lock the appropriate number of times. // Win32 allows no error checking here. for(int i = 0; i < nThisThreadsLockCount; ++i) LeaveCriticalSection(&_condVarLock); // NOTE: Conceptually, releasing the lock and entering the wait // state is done in one atomic step. Technically, that is not // true here, because we first leave the critical section and // then, in a separate line of code, call WaitForSingleObjectEx. // The reason why this code is correct is that our thread is placed // in the wait set *before* the lock is released. Therefore, if // we get preempted right here and another thread notifies us, then // that notification will *not* be missed: the wait operation below // will find the event signalled. // Wait for the event to become signalled. DWORD dwWaitResult = ::WaitForSingleObjectEx(hWaitEvent, dwMillisecondsTimeout, bAlertable); // If the wait failed, store the last error because it will get // overwritten when acquiring the lock. DWORD dwLastError; if(WAIT_FAILED == dwWaitResult) dwLastError = ::GetLastError(); // Acquire the synchronization lock the appropriate number of times. // Win32 allows no error checking here. for(int j = 0; j < nThisThreadsLockCount; ++j) EnterCriticalSection(&_condVarLock); // Restore lock count. _nLockCount = nThisThreadsLockCount; // Close event handle if(! CloseHandle(hWaitEvent)) return WAIT_FAILED; if(WAIT_FAILED == dwWaitResult) ::SetLastError(dwLastError); return dwWaitResult; }
L004017FC() { intOrPtr _v44; // _cfa_ffffffd4 _unknown_ __ebp; // r6 struct HINSTANCE__* _t8; // _t8 _unknown_ _t9; // _t9 signed int _t10; // _t10 signed int _t11; // _t11 _unknown_ _t12; // _t12 _unknown_ _t13; // _t13 _unknown_ _t14; // _t14 _unknown_ _t15; // _t15 _unknown_ _t16; // _t16 _push(_t15); _t16 = __esp; __esp = __esp - 132; _t8 = 4208056; asm("adc dword [ebp-0x68], 0xbefbafe0"); _push(_t8); L0040129C(__ebx, _t10, __edi, _t13); _pop(__eax); _t11 = _t10 | -352470273; _push(_t8); while(1) { _t8 = LoadLibraryA(_t8 + -1464); if(_t8 == 0) { break; } } _pop(__eax); _push(3); _pop(_v44); while(_v44 != 0) { _v44 = _v44 - 1; __edi = __edi ^ _t11; *((intOrPtr*)(_t8 + 416)) = *((intOrPtr*)(_t8 + 416)) + -442950007; } _push(_t8); GetCurrentProcess(); _pop(__eax); __esp = _t16; _pop(__ebp); return; }
void object_depot_make_empty(object_depot* depot, uint32 flags) { WriteLocker writeLocker(depot->outer_lock); // collect the store magazines DepotMagazine* storeMagazines = NULL; int cpuCount = smp_get_num_cpus(); for (int i = 0; i < cpuCount; i++) { depot_cpu_store& store = depot->stores[i]; if (store.loaded) { _push(storeMagazines, store.loaded); store.loaded = NULL; } if (store.previous) { _push(storeMagazines, store.previous); store.previous = NULL; } } // detach the depot's full and empty magazines DepotMagazine* fullMagazines = depot->full; depot->full = NULL; DepotMagazine* emptyMagazines = depot->empty; depot->empty = NULL; writeLocker.Unlock(); // free all magazines while (storeMagazines != NULL) empty_magazine(depot, _pop(storeMagazines), flags); while (fullMagazines != NULL) empty_magazine(depot, _pop(fullMagazines), flags); while (emptyMagazines) free_magazine(_pop(emptyMagazines), flags); }
slab* ObjectCache::InitSlab(slab* slab, void* pages, size_t byteCount, uint32 flags) { TRACE_CACHE(this, "construct (%p, %p .. %p, %lu)", slab, pages, ((uint8*)pages) + byteCount, byteCount); slab->pages = pages; slab->count = slab->size = byteCount / object_size; slab->free = NULL; size_t spareBytes = byteCount - (slab->size * object_size); if ((this->flags & CACHE_ALIGN_ON_SIZE) != 0) { slab->offset = cache_color_cycle; if (slab->offset > spareBytes) cache_color_cycle = slab->offset = 0; else cache_color_cycle += kCacheColorPeriod; } else slab->offset = 0; TRACE_CACHE(this, " %lu objects, %lu spare bytes, offset %lu", slab->size, spareBytes, slab->offset); uint8* data = ((uint8*)pages) + slab->offset; CREATE_PARANOIA_CHECK_SET(slab, "slab"); for (size_t i = 0; i < slab->size; i++) { status_t status = B_OK; if (constructor) status = constructor(cookie, data); if (status != B_OK) { data = ((uint8*)pages) + slab->offset; for (size_t j = 0; j < i; j++) { if (destructor) destructor(cookie, data); data += object_size; } DELETE_PARANOIA_CHECK_SET(slab); return NULL; } _push(slab->free, object_to_link(data, object_size)); ADD_PARANOIA_CHECK(PARANOIA_SUSPICIOUS, slab, &object_to_link(data, object_size)->next, sizeof(void*)); data += object_size; } return slab; }
_fini( _unknown_ __ebx, // r1 _unknown_ __edx // r3 ) {// addr = 0x080483AC _unknown_ _v8; // _cfa_fffffff8 _unknown_ __ebp; // r6 _unknown_ _t3; // _t3 _unknown_ _t4; // _t4 __edx = __edx; _push(__ebx); _push(__edx); L1(); _pop(__ebx); __do_global_dtors_aux(); return; }
int tsrb_add(tsrb_t *rb, const char *src, size_t n) { size_t tmp = n; while (tmp && !tsrb_full(rb)) { _push(rb, *src++); tmp--; } return (n - tmp); }
unsigned CHunpinSegmentor::push (unsigned ch) { m_inputBuf.push_back (ch); m_updatedFrom = _push (ch); return m_updatedFrom; }
__libc_csu_fini( _unknown_ __eax, // r0 _unknown_ __ebx, // r1 signed int __edx // r3 ) {// addr = 0x08048388 intOrPtr _v8; // _cfa_fffffff8 _unknown_ _v12; // _cfa_fffffff4 _unknown_ __ebp; // r6 _unknown_ _t7; // _t7 signed int _t9; // _t9 signed int _t11; // _t11 intOrPtr _t12; // _t12 _unknown_ _t13; // _t13 _unknown_ _t14; // _t14 _unknown_ _t15; // _t15 _unknown_ _t16; // _t16 __edx = __edx; _push(__ebx); _push(__eax); _t9 = 0 >> 2; _t11 = _t9 - 1; if(_t9 != 0) { while(1) { *((intOrPtr*)(134517780 + _t11 * 4))(); __edx = _t11; _t11 = _t11 - 1; if(__edx == 0) { break; } } } _t12 = _v8; __esp = _t15; _pop(__ebp); _push(_t15); _push(_t12); _push(__edx); L5(); _pop(__ebx); __do_global_dtors_aux(); return; }
L00401864( signed int __eax, // r0 signed int __ebx, // r1 _unknown_ __esi, // r5 intOrPtr _a1794209216 // _cfa_6af175c0 ) { _unknown_ _v140; // _cfa_ffffff74 _unknown_ _v156; // _cfa_ffffff64 intOrPtr _v228; // _cfa_ffffff1c _unknown_ __ebp; // r6 signed int _t36; // _t36 signed int _t37; // _t37 signed int _t38; // _t38 _unknown_ _t39; // _t39 _unknown_ _t40; // _t40 _unknown_ _t42; // _t42 _unknown_ _t43; // _t43 __esi = __esi; _t38 = __ebx; _t36 = __eax; while(1) { __ebp = __esp; __esp = __esp - 256; __edi = 4209068; *(__edi + -440) = *(__edi + -440) & _t36; _push(__edi); L00401674(_t38, __ecx, *((intOrPtr*)(__edi + 320)), *((intOrPtr*)(__edi + 1060)), _v228, *((intOrPtr*)(__edi + 136))); _pop(__edi); if(__edi > 47463) { break; } } while(1) { asm("xchg edi, eax"); _push(__esp); _t37 = _t36 / (_t38 & 255); *((intOrPtr*)(_t36 % (_t38 & 255) - 24))(); asm("clc "); *_t37 = *_t37 + _t37; _a1794209216 = _a1794209216 + (_t37 & 255); } }
int tsrb_add_one(tsrb_t *rb, char c) { if (!tsrb_full(rb)) { _push(rb, c); return 0; } else { return -1; } }
L004160FA( _unknown_ __ebx, // r1 _unknown_ __ecx, // r2 _unknown_ __edx // r3 ) { _unknown_ _t49; // _t49 _unknown_ _t51; // _t51 intOrPtr _t52; // _t52 _unknown_ _t54; // _t54 _unknown_ _t55; // _t55 __edx = __edx; __ecx = __ecx; _pop(__ebp); _t52 = *((intOrPtr*)(_t55 - 190 + 24)); __esi = _t52 + 77286; asm("cld "); while(1) { asm("lodsd "); __eflags = _t49; if(__eflags == 0) { break; } _push(_t49); __ecx = _t49; asm("lodsd "); _push(__esi); _push(_t52 + _t49); _t54 = __esi; L00416290(_t49, __eflags); _pop(__edi); _pop(__esi); _t49 = L00416186(_t54, __esp); _pop(__eax); __esi = __esi + _t49; } *((intOrPtr*)(_t52 + 52712))(); asm("popad "); _push(4199026); return; }
ssize_t write(int fd,const void *buffer,size_t count){ ssize_t len; void *buff = _push(buffer,count); len = run(fd,IF_WRITE,buff,count,0); if(len < 0) { errno = -len; len = -1; } _pop(buff); return len; }
unsigned CHunpinSegmentor::_updateWith (const std::string& new_pystr, unsigned from) { unsigned minUpdatedFrom = from; std::string::const_iterator it = new_pystr.begin(); for (; it != new_pystr.end(); ++it) { unsigned updatedFrom = _push(*it & 0x7f); if (updatedFrom < minUpdatedFrom) minUpdatedFrom = updatedFrom; } return minUpdatedFrom; }