Last active
February 19, 2017 18:00
-
-
Save RhodiumToad/39aeafb6020517aa057452bf9db03645 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mcp: @ @mcp | |
.fnstart | |
@ BB#0: | |
.save {r4, r5, r6, lr} | |
push {r4, r5, r6, lr} | |
mov r2, r1 | |
ldrb r12, [r2, #4]! | |
ldrb lr, [r1] | |
ldrb r6, [r2, #2] | |
ldrb r2, [r2, #3] | |
ldrb r3, [r1, #1] | |
ldrb r4, [r1, #2] | |
ldrb r5, [r1, #3] | |
ldrb r1, [r1, #5] | |
strb r1, [r0, #5] | |
strb r5, [r0, #3] | |
strb r4, [r0, #2] | |
orr r1, r12, r1, lsl #8 | |
strb r3, [r0, #1] | |
orr r3, r6, r2, lsl #8 | |
strb lr, [r0] | |
orr r1, r1, r3, lsl #16 | |
strb r1, [r0, #4]! | |
strb r2, [r0, #3] | |
strb r6, [r0, #2] | |
mov r0, #1 | |
pop {r4, r5, r6, pc} | |
.Lfunc_end0: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <string.h> | |
#include <stdlib.h> | |
int mcp(unsigned char *dst, unsigned char *src) | |
{ | |
memcpy(dst, src, 8); | |
return 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment