I am new and am still learning assembly languuage. In a native android app library that has been disassembled i found this function which had 1 instruction.
addres hex arm instruction function
2cc3ad 71704708 stmdaeq r7, {r0, r4, r5, r6, ip, sp, lr} ^ function0(unsigned char)
I have read in articles that arguments used to call a function are are stored on r0,r1 and r2 respectively.
I wanted to add 200 into register r0 so that the instruction can store the value into the the memory referenced by those registers.
So i inserted the the hex value of a a mov instruction at the address 2cc3ad so that in a hex editor it appeared like this.
mov ro, #200
is C800A0E3
in hex.
address Hex Instruction
2cc3ad C800A0E3 mov ro, #200
2cc3b1 71704708 stmdaeq r7, {r0, r4, r5, r6, ip, sp, lr} ^
After editing and adding those bytes i saved to the file. Before using the edited library i tried to redisassemble it but the disassembler gave an error as well as the app which used the library. In my understanding by adding that byte to the library i corrupted the whole file. Is there a way or an instruction i can use to to assign a certain value to r0 or to store the value to the memory referenced by those registers in that function without modifying the whole library?