Исходники cleo-inject событий диалога чата

Тема в разделе "CLEO", создана пользователем Владислав, 6 июл 2014.

  1. Владислав

    Владислав Member Основатель

    Регистрация:
    29 май 2014
    Сообщения:
    109
    Симпатии:
    0
    Хороший пример инжекта asm кода через cleo.
    Код:
    {$CLEO .cs}
    0000:
    0AA2: 31@ = load_library "kernel32.dll" // IF and SET
    0AA4: 30@ = get_proc_address "GetModuleHandleA" library 31@ // IF and SET
    0AA7: call_function 30@ num_params 1 pop 0 "samp.dll" 0@
    0A8E: 2@ = 0@ + 0x212AC4
    0A8D: 1@ = read_memory 2@ size 4 virtual_protect 1
    //0AB1: call_scm_func @CDXUTDialog__AddSlider 10 struct 1@ samp_base 0@ id 0x80 x 32 y 320 width 512 height 16 min 0 max 100000 value 100
    0AC6: 10@ = label @labelTEXTFormat offset
    0AC6: 3@ = label @callback offset
    0A8E: 2@ = 3@ + 12
    0A8C: write_memory 2@ size 4 value 10@ virtual_protect 1
    0A8E: 2@ = 0@ + 0x212A24 //_cSampChatInfo
    0A8D: 10@ = read_memory 2@ size 4 virtual_protect 1 //_cSampChatInfo
    0A8E: 2@ = 3@ + 18
    0A8C: write_memory 2@ size 4 value 10@ virtual_protect 1
    0A8E: 10@ = 0@ + 0x79680 //_cSampChatInfo
    0A8E: 2@ = 3@ + 24
    0A8C: write_memory 2@ size 4 value 10@ virtual_protect 1
    0AC6: 3@ = label @jmp offset
    0A8E: 2@ = 3@ + 1
    0A8E: 10@ = 0@ + 0xAD7D0 //_cSampChatInfo
    0A8C: write_memory 2@ size 4 value 10@ virtual_protect 1
    0AC6: 3@ = label @callback offset
    0A8E: 2@ = 0@ + 0x94940 // int __stdcall CDXUTDialog__SetCallback(int pCallback, int pUserContext)
    0AA6: call_method 2@ struct 1@ num_params 2 pop 0 params 0 3@
    0A93: end_custom_thread
    :callback
    hex
    {00} 60                                          //PUSHA                                    
    {10} 8B4424 18                                  //MOV EAX, [ESP+18]                                
    {14} 50                                          //PUSH EAX        
    {14} 8B4424 18                                  //MOV EAX, [ESP+18]                                
    {18} 50                                          //PUSH EAX                                
    {18} B8 11111111                                //MOV EAX, 11111111h  format                    
    {18} 50                                          //PUSH EAX                                      
    {1C} B8 11111111                                //MOV EAX, 11111111h  cSampChatInfo
    {1C} 50                                          //PUSH EAX                                  
    {20} B8 11111111                                //MOV EAX, 11111111h  func addDebugMessage
    {20} FFD0                                        //CALL EAX
    {20} 83C4 10                                    //ADD ESP, 10h
    {10} 61                                          //POPA
    end
    :jmp
    hex
    {10} B8 11111111                                //MOV EAX, 11111111h  AD7D0 CallbackDialogChat
    {10} FFE0                                        //JMP EAX
    end
    :labelTEXTFormat
    hex
    "ControlID:" 20 "0x%.8x" 20202020 "Event:" 20 "0x%.4x" 00
    end
    //example
    //0AB1: call_scm_func @CDXUTDialog__AddSlider 10 struct 1@ samp_base 0@ id 0x44 x 240 y 32 width 400 height 16 min 0 max 100 value 50
    :CDXUTDialog__AddSlider
    //A0D30 CDXUTDialog__AddSlider(int ID, int x, int y, int width, int height, int min, int max, int value, char isDefault, int ppCreated)
    0A8E: 20@ = 1@ + 0xA0D30
    0AA6: call_method 20@ struct 0@ parmas 10 pop 0 ppCreated 0 isDefault 0 value 9@ max 8@ min 7@ height 6@ width 5@ y 4@ x 3@ id 2@
    0AB2: ret 0                       
     
    #1

Поделиться этой страницей