int modify_crypt_buffer(void *src, struct struct_crypt_infos *cryptcode_struct) { int new_length; // [email protected] signed int pos; // [email protected] unsigned char *new_cryptcode; // [email protected] new_length = 64; if ( cryptcode_struct->length > new_length ) new_length = cryptcode_struct->length; new_cryptcode = allocate_(new_length); for ( pos = 0; pos < new_length; pos++ ) new_cryptcode[pos] = pos + new_length; memcpy(new_cryptcode, src, 0x40u); for ( pos = 0; pos < cryptcode_struct->length; pos++ ) { new_cryptcode[pos] += cryptcode_struct->crypt_buffer[pos]; if ( !new_cryptcode[pos] ) new_cryptcode[pos] = pos + 0x24; } free (cryptcode_struct->crypt_buffer); cryptcode_struct->crypt_buffer = new_cryptcode; cryptcode_struct->length = new_length; cryptcode_struct->current_pos = 0; return 0; }