PHP:
:DeleteColorCodesFromText
{
0AC8: 1@ = allocate_memory_size 260
0AB1: @DeleteColorCodesFromText 2 text 0@ memory_to_store_characters_as_text 1@
}
5@ = FALSE // inbracket
0AA7: call_function 0x718690 num_params 1 pop 1 string 0@ _Returned: length 31@ // Gta Strlen
FOR 30@ = 0 TO 31@
0085: 29@ = 0@ // copy pointer
005A: 29@ += 30@ // add offset (as the loop progresses it becomes pointers to first-last character)
0A8D: 28@ = read_memory 29@ size 1 virtual_protect 1 // 28@ is the ascii number representing character
IF 28@ == 123
THEN 5@ = TRUE // inbracket
END
IF 5@ == FALSE
THEN
0A8C: write_memory 1@ size 1 value 28@ virtual_protect 1
1@ += 1 // move to next address
END
IF 28@ == 125
THEN 5@ = FALSE // inbracket
END
END
0A8C: write_memory 1@ size 1 value 0 virtual_protect 1 // null-termination
0AB2: ret 0