All pastes #96480 Raw Edit

Mine

public c v1 · immutable
#96480 ·published 2006-07-22 22:21 UTC
rendered paste body
typedef enum {    SIGNATURE_UI_STATUS_LABEL_SET = 0,};static FunctionSignature as_signatures[] = {    /* SIGNATURE_UI_STATUS_LABEL_SET */    {        "wcesmgr.exe",        "56"                    // push    esi        "FF 74 24 08"           // push    [esp+text]        "8B F1"                 // mov     esi, ecx        "E8 ?? ?? ?? 00"        // call    ?SetWindowTextA@CWnd@@QAEXPBD@Z ; CWnd::SetWindowTextA(char const *)        "68 C8 00 00 00"        // push    200             ; iMaxLength        "FF 74 24 0C"           // push    dword ptr [esp+4+text] ; lpString2        "8D 46 54"              // lea     eax, [esi+54h]        "50"                    // push    eax             ; lpString1        "FF 15 ?? ?? ?? 00"     // call    ds:lstrcpynA        "6A 01"                 // push    1               ; bErase        "6A 00"                 // push    0               ; lpRect        "FF 76 20"              // push    dword ptr [esi+20h] ; hWnd        "FF 15 ?? ?? ?? 00"     // call    ds:InvalidateRect        "FF 76 20"              // push    dword ptr [esi+20h] ; hWnd        "FF 15 ?? ?? ?? 00"     // call    ds:UpdateWindow        "5E"                    // pop     esi        "C2 04 00",             // retn    4    },};voidhook_activesync(){    if (cur_process_is("wcesmgr.exe"))    {        char *error;        if (!override_function_by_signature(&as_signatures[SIGNATURE_UI_STATUS_LABEL_SET],                                            activesync_status_label_set_text,                                            &error))        {            message_logger_log_message("hook_activesync", 0, MESSAGE_CTX_ERROR,                "override_function_by_signature failed: %s", error);            sspy_free(error);        }    }}