They are not the sameR3 != R4,#0xB4becauseR3 = [R4,#0xB4] (the value in that address not the address itself)I think this struct is something like a linked list and this function allocates a chunk and updates the pointers...
Hi,Still trying to learn arm asm and this time there is a construct I don't understand :void add_chunk(somestruct* ptrSomeStruct){ unknow chunkData;__text:00015718 _add_chunk ; __text:00015718 ; __text:00015718__text:00015718 var_8 = -8__text:00015718__text:00015718 PUSH {R4,R7,LR}__text:0001571A ADD R7, SP, #0xC+var_8__text:0001571C MOV R4, R0 ; R4 = ptrSomeStruct__text:0001571E MOVS R0, #0x98 ; 'ÿ' ; size_t__text:00015720 BLX _malloc ; chunkData = malloc(0x98)__text:00015724 CBZ R0, locret_15736 ; if (!chunkData) goto locret_15736__text:00015726 MOVS R3, #0 ; R3 = 0__text:00015728 STR R3, [R0] ; chunkData->field0 = 0;__text:0001572A STR R3, [R0,#4] ; chunkData->field4 = 0;__text:0001572C LDR.W R3, [R4,#0xB4] ; R3 = ptrSomeStruct-> fieldB4;__text:00015730 STR R0, [R3] ; ptrSomeStruct->fieldB4 = chunkData;__text:00015732 STR.W R0, [R4,#0xB4] ; ptrSomeStruct->fieldB4 = chunkData;__text:00015736__text:00015736 locret_15736 _add_chunk+C j__text:00015736 POP {R4,R7,PC}__text:00015736}What I don't understand (if I didn't badly interpret last asm lines) is the fact that the 2 last linesare doing exactly the same.But maybe I forgot something simple.I should add that I don't have corresponding source code so I make some assumptions about structure.