PHP:
:isDialogResponded
{
0.3.7 R1
IF 0AB1: @isDialogResponded 0 id 0@ button 1@ list_item 2@ input_text 3@
}
IF 0AA2: 31@ = "samp.dll"
THEN
0A8E: 30@ = 31@ + 0x21A0B8 // SAMP_DIALOG_INFO_OFFSET
0A8D: 30@ = read_memory 30@ size 4 virtual_protect 0
0A8E: 29@ = 30@ + 0x20 // SAMP_DIALOG_LIST_BOX_OFFSET
0A8D: 29@ = read_memory 29@ size 4 virtual_protect 0
0A8E: 28@ = 30@ + 0x24 // SAMP_DIALOG_EDIT_BOX_OFFSET
0A8D: 28@ = read_memory 28@ size 4 virtual_protect 0
0A8E: 27@ = 30@ + 0x30 // SAMP_DIALOG_ID_OFFSET
0A8D: 27@ = read_memory 27@ size 4 virtual_protect 0
// Hook_RPC_DIALOGRESPONSE
CONST
VAR1 = $2AFD
VAR2 = $2BEC
VAR3 = $2CDE
VAR4 = $2DCB
END
0AC8: VAR1 = allocate_memory_size 17
0A8C: write_memory VAR1 size 4 value 0x08458B50 virtual_protect 1
VAR1 += 4
0A8C: write_memory VAR1 size 1 value 0xA3 virtual_protect 1
VAR1 += 1
0A8C: write_memory VAR1 size 4 value 0x00000000 virtual_protect 1
VAR1 += 4
0A8C: write_memory VAR1 size 2 value 0x6458 virtual_protect 1
VAR1 += 2
0A8C: write_memory VAR1 size 1 value 0xA1 virtual_protect 1
VAR1 += 1
0A8C: write_memory VAR1 size 4 value 0x00000000 virtual_protect 1
VAR1 += 4
0A8C: write_memory VAR1 size 1 value 0xC3 virtual_protect 1
VAR1 -= 16
0A8E: VAR2 = 31@ + 0x6C04D // SAMP_DIALOG_RESPONSE_OFFSET + 0xD
VAR1 += 0x5
0AC7: VAR4 = var VAR3 offset
0A8C: write_memory VAR1 size 4 value VAR4 virtual_protect 1
VAR1 -= 0x5
// asm_call_hook
0A8C: write_memory VAR2 size 1 value 0xE8 virtual_protect 1
0062: VAR1 -= VAR2 // (int)
000E: VAR1 -= 5
VAR2 += 1
0A8C: write_memory VAR2 size 4 value VAR1 virtual_protect 1
//
VAR2 += 0x4
0A8C: write_memory VAR2 size 1 value 0x90 virtual_protect 1 // NOP
// END
0A8E: 26@ = 31@ + 0x84850 // SAMP_GET_DIALOG_LIST_ITEM_OFFSET
0AA8: call_function_method 26@ struct 29@ num_params 1 pop 0 -1 _Return: 25@
0A8E: 24@ = 31@ + 0x81030 // SAMP_GET_DIALOG_EDIT_BOX_TEXT_OFFSET
0AA8: call_function_method 24@ struct 28@ num_params 0 pop 0 _Returned: Input Text 23@
IF OR
27@ > -1
VAR3 > -1
25@ > -1
23@ > 0
THEN 0485: return_true
ELSE 059A: return_false
END
END
0AB2: ret 4 27@ VAR3 25@ 23@
PHP:
:isDialogResponded
{
0.3.7 R2
IF 0AB1: @isDialogResponded 0 id 0@ button 1@ list_item 2@ input_text 3@
}
IF 0AA2: 31@ = "samp.dll"
THEN
0A8E: 30@ = 31@ + 0x21A0C0 // SAMP_DIALOG_INFO_OFFSET
0A8D: 30@ = read_memory 30@ size 4 virtual_protect 0
0A8E: 29@ = 30@ + 0x20 // SAMP_DIALOG_LIST_BOX_OFFSET
0A8D: 29@ = read_memory 29@ size 4 virtual_protect 0
0A8E: 28@ = 30@ + 0x24 // SAMP_DIALOG_EDIT_BOX_OFFSET
0A8D: 28@ = read_memory 28@ size 4 virtual_protect 0
0A8E: 27@ = 30@ + 0x30 // SAMP_DIALOG_ID_OFFSET
0A8D: 27@ = read_memory 27@ size 4 virtual_protect 0
// Hook_RPC_DIALOGRESPONSE
CONST
VAR1 = $2AFD
VAR2 = $2BEC
VAR3 = $2CDE
VAR4 = $2DCB
END
0AC8: VAR1 = allocate_memory_size 17
0A8C: write_memory VAR1 size 4 value 0x08458B50 virtual_protect 1
VAR1 += 4
0A8C: write_memory VAR1 size 1 value 0xA3 virtual_protect 1
VAR1 += 1
0A8C: write_memory VAR1 size 4 value 0x00000000 virtual_protect 1
VAR1 += 4
0A8C: write_memory VAR1 size 2 value 0x6458 virtual_protect 1
VAR1 += 2
0A8C: write_memory VAR1 size 1 value 0xA1 virtual_protect 1
VAR1 += 1
0A8C: write_memory VAR1 size 4 value 0x00000000 virtual_protect 1
VAR1 += 4
0A8C: write_memory VAR1 size 1 value 0xC3 virtual_protect 1
VAR1 -= 16
0A8E: VAR2 = 31@ + 0x6C0FD // SAMP_DIALOG_RESPONSE_OFFSET + 0xD
VAR1 += 0x5
0AC7: VAR4 = var VAR3 offset
0A8C: write_memory VAR1 size 4 value VAR4 virtual_protect 1
VAR1 -= 0x5
// asm_call_hook
0A8C: write_memory VAR2 size 1 value 0xE8 virtual_protect 1
0062: VAR1 -= VAR2 // (int)
000E: VAR1 -= 5
VAR2 += 1
0A8C: write_memory VAR2 size 4 value VAR1 virtual_protect 1
//
VAR2 += 0x4
0A8C: write_memory VAR2 size 1 value 0x90 virtual_protect 1 // NOP
// END
0A8E: 26@ = 31@ + 0x848F0 // SAMP_GET_DIALOG_LIST_ITEM_OFFSET
0AA8: call_function_method 26@ struct 29@ num_params 1 pop 0 -1 _Return: 25@
0A8E: 24@ = 31@ + 0x810D0 // SAMP_GET_DIALOG_EDIT_BOX_TEXT_OFFSET
0AA8: call_function_method 24@ struct 28@ num_params 0 pop 0 _Returned: Input Text 23@
IF OR
27@ > -1
VAR3 > -1
25@ > -1
23@ > 0
THEN 0485: return_true
ELSE 059A: return_false
END
END
0AB2: ret 4 27@ VAR3 25@ 23@