SlideShare a Scribd company logo
1 of 63
Download to read offline
Visual Studio를 이용한
어셈블리어 학습 part 2
유영천
https://megayuchi.com
tw: @dgtman
X64 어셈블리어 사용
주요 변경점
• 각 레지스터의 32Bits -> 64Bits 확장
• 스택 기본 단위 64Bits(8Bytes)
• 64Bits 주소 지정
• R8 – R15 레지스터 추가
• XMM8 – XMM15 레지스터 추가
• 기본 Calling convention – fastcall(x86와 x64의 fastcall은 다름)
Visual Studio 에서 x64어셈블리어 사용하기
• 슬프게도 x64모드로는 inline 어셈블리어가 지원되지 않는다.
• MASM의 64bits 버전인 ml64.exe를 혼용한다.
• 약간의 수고만 들이면 쉽게 Visual Studio IDE에 통합된다. ->
디버깅 가능!!!
Visual Studio 에서 x64어셈블리어 사용하기
• Project -> Build Customization -> masm항목에 체크
• .asm파일을 Drag & Drop, 또는 new 로 .asm파일 추가.
• .asm파일의 property -> Item Type -> Microsoft Macro Assembler
• 필요한 경우 listing file 설정
Project -> Build Customization -> masm항목에 체크
.asm파일을 Drag & Drop, 또는 new 로 .asm파일 추가.
.asm파일의 property -> Item Type -> Microsoft Macro Assembler
Listing File
• 완전한 실제 asm코드로 보여줌.
• 가상화(?)된 변수들의 실제 주소지정 코드를 확인 할 수
있다.
• Property-> Macro Assembler -> Listing File
• List All Available Information : Yes
• Enable Assembly Generated Code Listing : Yes
• Assembled Code Listing File : $(OutDir)%(Filename).asm
Visual Studio에서의 x64어셈블리어 코딩
• 함수 단위로 작성.
• Disassembly Window와 .asm코드 에디터 양쪽 모두에서 브레이크
포인트를 찍어가며 디버깅 가능.
• Cpp코드에서의 호출을 위해 .asm의 함수를 선언할때는 extern
"C" 로 선언할것.
• x86/x64/ARM64를 함께 지원하는 프로젝트일 경우
• 각 아키텍처별 코드를 각각의 .asm또는 .cpp로 작성.
• 아키텍처별로 다른 아키텍처의 .asm/.cpp 파일의 property에서
excluded from build : yes로 설정
.CODE
Add_ASM PROC
mov [rsp+8],rcx
mov [rsp+16],rdx
add rcx,rdx
mov rax,rcx
ret
Add_ASM ENDP
END
Add_ASM()함수의 시작
Add_ASM()함수의 끝
.asm파일 작성
.asm의 함수를 호출하기 위한 선언
extern "C"
{
INT64 Add_ASM(INT64 a, INT64 b);
INT64 Add_ASM_RBP(INT64 a, INT64 b);
}
masm으로 생성된 함수명을 C++코드에서 호출하기 위해서는 해당 함수명이 C타입
의 Name Decoration을 사용해야한다.
x64 레지스터와 스택
Register Status Use
RAX Volatile Return value register
RCX Volatile First integer argument
RDX Volatile Second integer argument
R8 Volatile Third integer argument
R9 Volatile Fourth integer argument
R10:R11 Volatile Must be preserved as needed by caller; used in syscall/sysret instructions
R12:R15 Nonvolatile Must be preserved by callee
RDI Nonvolatile Must be preserved by callee
RSI Nonvolatile Must be preserved by callee
RBX Nonvolatile Must be preserved by callee
RBP Nonvolatile May be used as a frame pointer; must be preserved by callee
RSP Nonvolatile Stack pointer
XMM0, YMM0 Volatile First FP argument; first vector-type argument when __vectorcall is used
XMM1, YMM1 Volatile Second FP argument; second vector-type argument when __vectorcall is used
XMM2, YMM2 Volatile Third FP argument; third vector-type argument when __vectorcall is used
XMM3, YMM3 Volatile Fourth FP argument; fourth vector-type argument when __vectorcall is used
XMM4, YMM4 Volatile Must be preserved as needed by caller; fifth vector-type argument
when __vectorcall is used
XMM5, YMM5 Volatile Must be preserved as needed by caller; sixth vector-type argument
when __vectorcall is used
XMM6:XMM15,
YMM6:YMM15
Nonvolatile (XMM), Volatile (upper half of
YMM)
Must be preserved by callee. YMM registers must be preserved as needed by
caller.
Registers
파라미터 전달
Parameter type fifth and
higher
fourth third second leftmost
floating-point stack XMM3 XMM2 XMM1 XMM0
integer stack R9 R8 RDX RCX
Aggregates (8, 16, 32, or 64 bits)
and __m64
stack R9 R8 RDX RCX
Other aggregates, as pointers stack R9 R8 RDX RCX
__m128, as a pointer stack R9 R8 RDX RCX
스택 프레임
• 베이스 포인터 레지스터(RBP) 사용이 calling convention의 일부가
아님.
• VC++의 디버그 빌드(C/C++), ml64에서 local지시어를 이용한
변수명 사용시 베이스 포인터 레지스터(RBP) 사용.
• 다른 함수를 호출할 경우 stack pointer(RSP레지스터의 값)주소가
16 Bytes align 되도록 할것!!!!
• 함수 호출 전 rsp레지스터의 값을 16으로 나눠서 나머지가 0인지 확인
• 직접 작성한 asm함수 안에서 로컬변수 할당 사이즈는 16 bytes의 배수로
맞춘다.
x64 stack usage | Microsoft Docs
함수호출
• Caller
• 파라미터를 push하는 대신 4개까지는 rcx, rdx, r8, r9 레지스터로 전달.
• 함수 호출시 home arg area 확보 32bytes -> sub rsp,32
• 4개 초과분에 대해서는 rsp레지스터를 직접 조정(sub rsp,xxx)한 후 [rsp+
xxxx] 메모리에 카피
• Callee
• 진입시 rcx,rdx,r8,r9레지스터를 arg home area에 카피 (디버거에서
파라미터 내용 확인할거 아니면 필요없음)
• 로컬변수 사용영역을 확보
• 8bytes 변수 4개 사용시 8x4 = 32 bytes - sub rsp, 32 ( 16 Bytes Align에 주의!)
void Test()
{
INT64 c = Add_C(1, 2);
}
INT64 Add_C(INT64 a, INT64 b)
{
INT64 c = a + b;
return c;
}
AsmTest64.exe!Test(void):
sub rsp,38h
mov edx,2
mov ecx,1
call Add_C (0140001050h)
mov qword ptr [c],rax
add rsp,38h
ret
AsmTest64.exe!Add_C(__int64, __int64):
mov qword ptr [rsp+10h],rdx
mov qword ptr [rsp+8],rcx
sub rsp,18h
mov rax,qword ptr [b]
mov rcx,qword ptr [a]
add rcx,rax
mov rax,rcx
mov qword ptr [rsp],rax
mov rax,qword ptr [rsp]
add rsp,18h
ret
x64 calling convention,
C/C++에서 C/C++함수 호출
rsp
0x000000000014feb8
0x000000000014feb0
0x000000000014fea8
0x000000000014fea0
0x000000000014fe98
0x000000000014fe90
0x000000000014fe88
0x000000000014fe80
0x000000000014fe78
0x000000000014ff70
0x000000000014fe68
0x000000000014fe60
0x000000000014fe58
0x000000000014fe50
AsmTest64.exe!Test(void):
AsmTest64.exe!Add_C(__int64, __int64):
rsp
0x000000000014feb8
0x000000000014feb0
0x000000000014fea8
0x000000000014fea0
0x000000000014fe98
0x000000000014fe90
0x000000000014fe88
0x000000000014fe80
0x000000000014fe78
0x000000000014ff70
0x000000000014fe68
0x000000000014fe60
0x000000000014fe58
0x000000000014fe50
AsmTest64.exe!Test(void):
sub rsp,38h
AsmTest64.exe!Add_C(__int64, __int64):
arg : b
arg : a
rsp
0x000000000014feb8
0x000000000014feb0
0x000000000014fea8
0x000000000014fea0
0x000000000014fe98
0x000000000014fe90
0x000000000014fe88
0x000000000014fe80
0x000000000014fe78
0x000000000014ff70
0x000000000014fe68
0x000000000014fe60
0x000000000014fe58
0x000000000014fe50
AsmTest64.exe!Test(void):
sub rsp,38h
mov edx,2
mov ecx,1
AsmTest64.exe!Add_C(__int64, __int64):
arg : b
arg : a
Caller
Callee
rsp
0x000000000014feb8
0x000000000014feb0
0x000000000014fea8
0x000000000014fea0
0x000000000014fe98
0x000000000014fe90
0x000000000014fe88
0x000000000014fe80
0x000000000014fe78
0x000000000014ff70
0x000000000014fe68
0x000000000014fe60
0x000000000014fe58
0x000000000014fe50
AsmTest64.exe!Test(void):
sub rsp,38h
mov edx,2
mov ecx,1
call Add_C
AsmTest64.exe!Add_C(__int64, __int64):
Return Address
arg : b
arg : a
Caller
Callee
rsp
0x000000000014feb8
0x000000000014feb0
0x000000000014fea8
0x000000000014fea0
0x000000000014fe98
0x000000000014fe90
0x000000000014fe88
0x000000000014fe80
0x000000000014fe78
0x000000000014ff70
0x000000000014fe68
0x000000000014fe60
0x000000000014fe58
0x000000000014fe50
AsmTest64.exe!Test(void):
sub rsp,38h
mov edx,2
mov ecx,1
call Add_C
AsmTest64.exe!Add_C(__int64, __int64):
mov qword ptr [rsp+10h],rdx
Return Address
arg : b
arg : a
Caller
Callee
rsp
0x000000000014feb8
0x000000000014feb0
0x000000000014fea8
0x000000000014fea0
0x000000000014fe98
0x000000000014fe90
0x000000000014fe88
0x000000000014fe80
0x000000000014fe78
0x000000000014fe70
arg : b
arg : a
0x000000000014fe68
0x000000000014fe60
0x000000000014fe58
0x000000000014fe50
AsmTest64.exe!Test(void):
sub rsp,38h
mov edx,2
mov ecx,1
call Add_C
AsmTest64.exe!Add_C(__int64, __int64):
mov qword ptr [rsp+10h],rdx
mov qword ptr [rsp+8],rcx Return Address
Caller
Callee
rsp
0x000000000014feb8
0x000000000014feb0
0x000000000014fea8
0x000000000014fea0
0x000000000014fe98
0x000000000014fe90
0x000000000014fe88
0x000000000014fe80
0x000000000014fe78
0x000000000014fe70
arg : b
arg : a
0x000000000014fe68
0x000000000014fe60
0x000000000014fe58
0x000000000014fe50
AsmTest64.exe!Test(void):
sub rsp,38h
mov edx,2
mov ecx,1
call Add_C
AsmTest64.exe!Add_C(__int64, __int64):
mov qword ptr [rsp+10h],rdx
mov qword ptr [rsp+8],rcx
sub rsp,18h
Return Address
16Bytes align
local : c
Caller
Callee
rsp
0x000000000014feb8
0x000000000014feb0
0x000000000014fea8
0x000000000014fea0
0x000000000014fe98
0x000000000014fe90
0x000000000014fe88
0x000000000014fe80
0x000000000014fe78
0x000000000014fe70
arg : b
arg : a
0x000000000014fe68
0x000000000014fe60
0x000000000014fe58
0x000000000014fe50
AsmTest64.exe!Test(void):
sub rsp,38h
mov edx,2
mov ecx,1
call Add_C
AsmTest64.exe!Add_C(__int64, __int64):
mov qword ptr [rsp+10h],rdx
mov qword ptr [rsp+8],rcx
sub rsp,18h
mov rax,qword ptr [b] ; rsp+40
mov rcx,qword ptr [a] ; rsp+32
add rcx,rax
mov rax,rcx
Return Address
local : c
Caller
Callee
rsp
0x000000000014feb8
0x000000000014feb0
0x000000000014fea8
0x000000000014fea0
0x000000000014fe98
0x000000000014fe90
0x000000000014fe88
0x000000000014fe80
0x000000000014fe78
0x000000000014fe70
arg : b
arg : a
0x000000000014fe68
0x000000000014fe60
0x000000000014fe58
0x000000000014fe50
local : c
AsmTest64.exe!Test(void):
sub rsp,38h
mov edx,2
mov ecx,1
call Add_C
AsmTest64.exe!Add_C(__int64, __int64):
mov qword ptr [rsp+10h],rdx
mov qword ptr [rsp+8],rcx
sub rsp,18h
mov rax,qword ptr [b] ; rsp+40
mov rcx,qword ptr [a] ; rsp+32
add rcx,rax
mov rax,rcx
mov qword ptr [rsp],rax
Return Address
Caller
Callee
rsp
0x000000000014feb8
0x000000000014feb0
0x000000000014fea8
0x000000000014fea0
0x000000000014fe98
0x000000000014fe90
0x000000000014fe88
0x000000000014fe80
0x000000000014fe78
0x000000000014fe70
arg : b
arg : a
0x000000000014fe68
0x000000000014fe60
0x000000000014fe58
0x000000000014fe50
local : c
AsmTest64.exe!Test(void):
sub rsp,38h
mov edx,2
mov ecx,1
call Add_C
AsmTest64.exe!Add_C(__int64, __int64):
mov qword ptr [rsp+10h],rdx
mov qword ptr [rsp+8],rcx
sub rsp,18h
mov rax,qword ptr [b] ; rsp+40
mov rcx,qword ptr [a] ; rsp+32
add rcx,rax
mov rax,rcx
mov qword ptr [rsp],rax
mov rax,qword ptr [rsp]
Return Address
Caller
Callee
rsp
0x000000000014feb8
0x000000000014feb0
0x000000000014fea8
0x000000000014fea0
0x000000000014fe98
0x000000000014fe90
0x000000000014fe88
0x000000000014fe80
0x000000000014fe78
0x000000000014fe70
arg : b
arg : a
0x000000000014fe68
0x000000000014fe60
0x000000000014fe58
0x000000000014fe50
local : c
AsmTest64.exe!Test(void):
sub rsp,38h
mov edx,2
mov ecx,1
call Add_C
AsmTest64.exe!Add_C(__int64, __int64):
mov qword ptr [rsp+10h],rdx
mov qword ptr [rsp+8],rcx
sub rsp,18h
mov rax,qword ptr [b] ; rsp+40
mov rcx,qword ptr [a] ; rsp+32
add rcx,rax
mov rax,rcx
mov qword ptr [rsp],rax
mov rax,qword ptr [rsp]
add rsp,18h
Return Address
rsp
0x000000000014feb8
0x000000000014feb0
0x000000000014fea8
0x000000000014fea0
0x000000000014fe98
0x000000000014fe90
0x000000000014fe88
0x000000000014fe80
0x000000000014fe78
0x000000000014fe70
arg : b
arg : a
0x000000000014fe68
0x000000000014fe60
0x000000000014fe58
0x000000000014fe50
AsmTest64.exe!Test(void):
sub rsp,38h
mov edx,2
mov ecx,1
call Add_C
AsmTest64.exe!Add_C(__int64, __int64):
mov qword ptr [rsp+10h],rdx
mov qword ptr [rsp+8],rcx
sub rsp,18h
mov rax,qword ptr [b] ; rsp+40
mov rcx,qword ptr [a] ; rsp+32
add rcx,rax
mov rax,rcx
mov qword ptr [rsp],rax
mov rax,qword ptr [rsp]
add rsp,18h
ret
rsp
0x000000000014feb8
0x000000000014feb0
0x000000000014fea8
0x000000000014fea0
0x000000000014fe98
0x000000000014fe90
0x000000000014fe88
0x000000000014fe80
0x000000000014fe78
0x000000000014fe70
arg : b
arg : a
0x000000000014fe68
0x000000000014fe60
0x000000000014fe58
0x000000000014fe50
local : c
AsmTest64.exe!Test(void):
sub rsp,38h
mov edx,2
mov ecx,1
call Add_C
mov qword ptr [c],rax
AsmTest64.exe!Add_C(__int64, __int64):
mov qword ptr [rsp+10h],rdx
mov qword ptr [rsp+8],rcx
sub rsp,18h
mov rax,qword ptr [b] ; rsp+40
mov rcx,qword ptr [a] ; rsp+32
add rcx,rax
mov rax,rcx
mov qword ptr [rsp],rax
mov rax,qword ptr [rsp]
add rsp,18h
ret
rsp
0x000000000014feb8
0x000000000014feb0
0x000000000014fea8
0x000000000014fea0
0x000000000014fe98
0x000000000014fe90
0x000000000014fe88
0x000000000014fe80
0x000000000014fe78
0x000000000014fe70
arg : b
arg : a
0x000000000014fe68
0x000000000014fe60
0x000000000014fe58
0x000000000014fe50
local : c
AsmTest64.exe!Test(void):
sub rsp,38h
mov edx,2
mov ecx,1
call Add_C
mov qword ptr [c],rax
AsmTest64.exe!Add_C(__int64, __int64):
mov qword ptr [rsp+10h],rdx
mov qword ptr [rsp+8],rcx
sub rsp,18h
mov rax,qword ptr [b] ; rsp+40
mov rcx,qword ptr [a] ; rsp+32
add rcx,rax
mov rax,rcx
mov qword ptr [rsp],rax
mov rax,qword ptr [rsp]
add rsp,18h
ret
rsp
0x000000000014feb8
0x000000000014feb0
0x000000000014fea8
0x000000000014fea0
0x000000000014fe98
0x000000000014fe90
0x000000000014fe88
0x000000000014fe80
0x000000000014fe78
0x000000000014fe70
0x000000000014fe68
0x000000000014fe60
0x000000000014fe58
0x000000000014fe50
AsmTest64.exe!Test(void):
sub rsp,38h
mov edx,2
mov ecx,1
call Add_C
mov qword ptr [c],rax
add rsp,38h
ret
AsmTest64.exe!Add_C(__int64, __int64):
mov qword ptr [rsp+10h],rdx
mov qword ptr [rsp+8],rcx
sub rsp,18h
mov rax,qword ptr [b] ; rsp+40
mov rcx,qword ptr [a] ; rsp+32
add rcx,rax
mov rax,rcx
mov qword ptr [rsp],rax
mov rax,qword ptr [rsp]
add rsp,18h
ret
Caller
X64어셈블리어 prologue, epilogue
• x86함수와 비교
• 베이스 포인터 사용이 기본은 아니다.
• 함수 내부에서 편리하게 사용하고 싶으면 베이스 포인터를
사용한다.
assembled code
asm code in MASM
push rbp
mov rbp,rsp
add rsp,0FFFFFFFFFFFFFFF8h
mov qword ptr [rbp+16],rcx
mov qword ptr [rbp+24],rdx
add rcx,rdx
mov qword ptr [rbp-8],rcx
mov rax,qword ptr [rbp-8]
leave
ret
Add_ASM_RBP PROC a:QWORD, b:QWORD
LOCAL c:QWORD
mov a,rcx
mov b,rdx
add rcx,rdx
mov c, rcx
mov rax,c
ret
Add_ASM_RBP ENDP
MASM에서의 Stack Frame 자동생성
void Test()
{
INT64 c = Add_ASM_RBP(1, 2);
}
AsmTest64.exe!Test(void):
sub rsp,38h
mov edx,2
mov ecx,1
call Add_ASM_RBP
mov qword ptr [c],rax
add rsp,38h
ret
AsmTest64.exe! Add_ASM_RBP(QWORD, QWORD):
push rbp
mov rbp,rsp
add rsp,0FFFFFFFFFFFFFFE0h
mov qword ptr [a],rcx
mov qword ptr [b],rdx
add rcx,rdx
mov qword ptr [c],rcx
mov rax,qword ptr [c]
leave
ret
Add_ASM_RBP PROC a:QWORD, b:QWORD
LOCAL c:QWORD
LOCAL d:QWORD
LOCAL e:QWORD
LOCAL f:QWORD
mov a,rcx
mov b,rdx
add rcx,rdx
mov c, rcx
mov rax,c
ret
Add_ASM_RBP ENDP
x64 calling convention,
C/C++에서 asm함수 호출
rsp
0x000000000014feb8
0x000000000014feb0
0x000000000014fea8
0x000000000014fea0
0x000000000014fe98
0x000000000014fe90
0x000000000014fe88
0x000000000014fe80
0x000000000014fe78
0x000000000014ff70
0x000000000014fe68
0x000000000014fe60
0x000000000014fe58
0x000000000014fe50
AsmTest64.exe!Test(void):
AsmTest64.exe! Add_ASM_RBP(QWORD, QWORD):
rsp
0x000000000014feb8
0x000000000014feb0
0x000000000014fea8
0x000000000014fea0
0x000000000014fe98
0x000000000014fe90
0x000000000014fe88
0x000000000014fe80
0x000000000014fe78
0x000000000014ff70
0x000000000014fe68
0x000000000014fe60
0x000000000014fe58
0x000000000014fe50
AsmTest64.exe!Test(void):
sub rsp,38h
AsmTest64.exe! Add_ASM_RBP(QWORD, QWORD):
arg : a
arg : b
0x000000000014feb8
0x000000000014feb0
0x000000000014fea8
0x000000000014fea0
0x000000000014fe98
0x000000000014fe90
0x000000000014fe88
0x000000000014fe80
0x000000000014fe78
0x000000000014ff70
0x000000000014fe68
0x000000000014fe60
0x000000000014fe58
0x000000000014fe50
AsmTest64.exe!Test(void):
sub rsp,38h
mov edx,2
mov ecx,1
AsmTest64.exe! Add_ASM_RBP(QWORD, QWORD): rsp
arg : a
arg : b
Caller
Callee
0x000000000014feb8
0x000000000014feb0
0x000000000014fea8
0x000000000014fea0
0x000000000014fe98
0x000000000014fe90
0x000000000014fe88
0x000000000014fe80
0x000000000014fe78
0x000000000014ff70
0x000000000014fe68
0x000000000014fe60
0x000000000014fe58
0x000000000014fe50
AsmTest64.exe!Test(void):
sub rsp,38h
mov edx,2
mov ecx,1
call Add_ASM_RBP
AsmTest64.exe! Add_ASM_RBP(QWORD, QWORD):
rsp
Return Address
arg : a
arg : b
Caller
Callee
0x000000000014feb8
0x000000000014feb0
0x000000000014fea8
0x000000000014fea0
0x000000000014fe98
0x000000000014fe90
0x000000000014fe88
0x000000000014fe80
0x000000000014fe78
0x000000000014ff70
0x000000000014fe68
0x000000000014fe60
0x000000000014fe58
0x000000000014fe50
AsmTest64.exe!Test(void):
sub rsp,38h
mov edx,2
mov ecx,1
call Add_ASM_RBP
AsmTest64.exe! Add_ASM_RBP(QWORD, QWORD):
push rbp
rsp
Return Address
backup rbp
arg : a
arg : b
Caller
Callee
0x000000000014feb8
0x000000000014feb0
0x000000000014fea8
0x000000000014fea0
0x000000000014fe98
0x000000000014fe90
0x000000000014fe88
0x000000000014fe80
0x000000000014fe78
0x000000000014ff70
0x000000000014fe68
0x000000000014fe60
0x000000000014fe58
0x000000000014fe50
AsmTest64.exe!Test(void):
sub rsp,38h
mov edx,2
mov ecx,1
call Add_ASM_RBP
AsmTest64.exe! Add_ASM_RBP(QWORD, QWORD):
push rbp
mov rbp,rsp
rsp
backup rbp
Return Address
rbp
arg : a
arg : b
Caller
Callee
0x000000000014feb8
0x000000000014feb0
0x000000000014fea8
0x000000000014fea0
0x000000000014fe98
0x000000000014fe90
0x000000000014fe88
0x000000000014fe80
0x000000000014fe78
0x000000000014ff70
0x000000000014fe68
0x000000000014fe60
0x000000000014fe58
0x000000000014fe50
AsmTest64.exe!Test(void):
sub rsp,38h
mov edx,2
mov ecx,1
call Add_ASM_RBP
AsmTest64.exe! Add_ASM_RBP(QWORD, QWORD):
push rbp
mov rbp,rsp
add rsp,0FFFFFFFFFFFFFFE0h
backup rbp
Return Address
rbp
rsp
local : c
local : d
local : e
local : f
arg : a
arg : b
Caller
Callee
AsmTest64.exe!Test(void):
sub rsp,38h
mov edx,2
mov ecx,1
call Add_ASM_RBP
AsmTest64.exe! Add_ASM_RBP(QWORD, QWORD):
push rbp
mov rbp,rsp
add rsp,0FFFFFFFFFFFFFFE0h
mov qword ptr [a],rcx ; rbp+16
0x000000000014feb8
0x000000000014feb0
0x000000000014fea8
0x000000000014fea0
0x000000000014fe98
0x000000000014fe90
0x000000000014fe88
0x000000000014fe80
0x000000000014fe78
0x000000000014ff70
0x000000000014fe68
0x000000000014fe60
0x000000000014fe58
0x000000000014fe50
backup rbp
Return Address
rbp
arg : a
rsp
local : c
local : d
local : e
local : f
arg : b
Caller
Callee
AsmTest64.exe!Test(void):
sub rsp,38h
mov edx,2
mov ecx,1
call Add_ASM_RBP
AsmTest64.exe! Add_ASM_RBP(QWORD, QWORD):
push rbp
mov rbp,rsp
add rsp,0FFFFFFFFFFFFFFE0h
mov qword ptr [a],rcx ; rbp+16
mov qword ptr [b],rdx ; rbp+24
0x000000000014feb8
0x000000000014feb0
0x000000000014fea8
0x000000000014fea0
0x000000000014fe98
0x000000000014fe90
0x000000000014fe88
0x000000000014fe80
0x000000000014fe78
0x000000000014ff70
0x000000000014fe68
0x000000000014fe60
0x000000000014fe58
0x000000000014fe50
backup rbp
Return Address
rbp
arg : a
arg : b
rsp
local : c
local : d
local : e
local : f
Caller
Callee
AsmTest64.exe!Test(void):
sub rsp,38h
mov edx,2
mov ecx,1
call Add_ASM_RBP
AsmTest64.exe! Add_ASM_RBP(QWORD, QWORD):
push rbp
mov rbp,rsp
add rsp,0FFFFFFFFFFFFFFE0h
mov qword ptr [a],rcx ; rbp+16
mov qword ptr [b],rdx ; rbp+24
add rcx,rdx
0x000000000014feb8
0x000000000014feb0
0x000000000014fea8
0x000000000014fea0
0x000000000014fe98
0x000000000014fe90
0x000000000014fe88
0x000000000014fe80
0x000000000014fe78
0x000000000014ff70
0x000000000014fe68
0x000000000014fe60
0x000000000014fe58
0x000000000014fe50
backup rbp
Return Address
rbp
arg : a
arg : b
rsp
local : c
local : d
local : e
local : f
Caller
Callee
AsmTest64.exe!Test(void):
sub rsp,38h
mov edx,2
mov ecx,1
call Add_ASM_RBP
AsmTest64.exe! Add_ASM_RBP(QWORD, QWORD):
push rbp
mov rbp,rsp
add rsp,0FFFFFFFFFFFFFFE0h
mov qword ptr [a],rcx ; rbp+16
mov qword ptr [b],rdx ; rbp+24
add rcx,rdx
mov qword ptr [c],rcx ; rbp-8
0x000000000014feb8
0x000000000014feb0
0x000000000014fea8
0x000000000014fea0
0x000000000014fe98
0x000000000014fe90
0x000000000014fe88
0x000000000014fe80
0x000000000014fe78
0x000000000014ff70
0x000000000014fe68
0x000000000014fe60
0x000000000014fe58
0x000000000014fe50
backup rbp
Return Address
rbp
arg : a
arg : b
rsp
local : c
local : d
local : e
local : f
Caller
Callee
AsmTest64.exe!Test(void):
sub rsp,38h
mov edx,2
mov ecx,1
call Add_ASM_RBP
AsmTest64.exe! Add_ASM_RBP(QWORD, QWORD):
push rbp
mov rbp,rsp
add rsp,0FFFFFFFFFFFFFFE0h
mov qword ptr [a],rcx ; rbp+16
mov qword ptr [b],rdx ; rbp+24
add rcx,rdx
mov qword ptr [c],rcx ; rbp-8
mov rax,qword ptr [c]
0x000000000014feb8
0x000000000014feb0
0x000000000014fea8
0x000000000014fea0
0x000000000014fe98
0x000000000014fe90
0x000000000014fe88
0x000000000014fe80
0x000000000014fe78
0x000000000014ff70
0x000000000014fe68
0x000000000014fe60
0x000000000014fe58
0x000000000014fe50
backup rbp
Return Address
rbp
arg : a
arg : b
local : c
local : d
local : e
local : f rsp
Caller
Callee
AsmTest64.exe!Test(void):
sub rsp,38h
mov edx,2
mov ecx,1
call Add_ASM_RBP
AsmTest64.exe! Add_ASM_RBP(QWORD, QWORD):
push rbp
mov rbp,rsp
add rsp,0FFFFFFFFFFFFFFE0h
mov qword ptr [a],rcx ; rbp+16
mov qword ptr [b],rdx ; rbp+24
add rcx,rdx
mov qword ptr [c],rcx ; rbp-8
mov rax,qword ptr [c]
leave (mov rsp,rbp)
0x000000000014feb8
0x000000000014feb0
0x000000000014fea8
0x000000000014fea0
0x000000000014fe98
0x000000000014fe90
0x000000000014fe88
0x000000000014fe80
0x000000000014fe78
0x000000000014ff70
0x000000000014fe68
0x000000000014fe60
0x000000000014fe58
0x000000000014fe50
backup rbp
Return Address
arg : a
arg : b
rsp rbp
local : c
local : d
local : e
local : f
Caller
Callee
AsmTest64.exe!Test(void):
sub rsp,38h
mov edx,2
mov ecx,1
call Add_ASM_RBP
AsmTest64.exe! Add_ASM_RBP(QWORD, QWORD):
push rbp
mov rbp,rsp
add rsp,0FFFFFFFFFFFFFFE0h
mov qword ptr [a],rcx ; rbp+16
mov qword ptr [b],rdx ; rbp+24
add rcx,rdx
mov qword ptr [c],rcx ; rbp-8
mov rax,qword ptr [c]
leave (pop rbp)
0x000000000014feb8
0x000000000014feb0
0x000000000014fea8
0x000000000014fea0
0x000000000014fe98
0x000000000014fe90
0x000000000014fe88
0x000000000014fe80
0x000000000014fe78
0x000000000014ff70
0x000000000014fe68
0x000000000014fe60
0x000000000014fe58
0x000000000014fe50
Return Address
arg : a
arg : b
rsp
AsmTest64.exe!Test(void):
sub rsp,38h
mov edx,2
mov ecx,1
call Add_ASM_RBP
AsmTest64.exe! Add_ASM_RBP(QWORD, QWORD):
push rbp
mov rbp,rsp
add rsp,0FFFFFFFFFFFFFFE0h
mov qword ptr [a],rcx ; rbp+16
mov qword ptr [b],rdx ; rbp+24
add rcx,rdx
mov qword ptr [c],rcx ; rbp-8
mov rax,qword ptr [c]
leave
ret
0x000000000014feb8
0x000000000014feb0
0x000000000014fea8
0x000000000014fea0
0x000000000014fe98
0x000000000014fe90
0x000000000014fe88
0x000000000014fe80
0x000000000014fe78
0x000000000014ff70
0x000000000014fe68
0x000000000014fe60
0x000000000014fe58
0x000000000014fe50
arg : a
arg : b
rsp
AsmTest64.exe!Test(void):
sub rsp,38h
mov edx,2
mov ecx,1
call Add_ASM_RBP
mov dword ptr [c],eax
AsmTest64.exe! Add_ASM_RBP(QWORD, QWORD):
push rbp
mov rbp,rsp
add rsp,0FFFFFFFFFFFFFFE0h
mov qword ptr [a],rcx ; rbp+16
mov qword ptr [b],rdx ; rbp+24
add rcx,rdx
mov qword ptr [c],rcx ; rbp-8
mov rax,qword ptr [c]
leave
ret
0x000000000014feb8
0x000000000014feb0
0x000000000014fea8
0x000000000014fea0
0x000000000014fe98
0x000000000014fe90
0x000000000014fe88
0x000000000014fe80
0x000000000014fe78
0x000000000014ff70
0x000000000014fe68
0x000000000014fe60
0x000000000014fe58
0x000000000014fe50
arg : a
arg : b
rsp
local : c
AsmTest64.exe!Test(void):
sub rsp,38h
mov edx,2
mov ecx,1
call Add_ASM_RBP
mov dword ptr [c],eax
add rsp,38h
ret
AsmTest64.exe! Add_ASM_RBP(QWORD, QWORD):
push rbp
mov rbp,rsp
add rsp,0FFFFFFFFFFFFFFE0h
mov qword ptr [a],rcx ; rbp+16
mov qword ptr [b],rdx ; rbp+24
add rcx,rdx
mov qword ptr [c],rcx ; rbp-8
mov rax,qword ptr [c]
leave
ret
0x000000000014feb8
0x000000000014feb0
0x000000000014fea8
0x000000000014fea0
0x000000000014fe98
0x000000000014fe90
0x000000000014fe88
0x000000000014fe80
0x000000000014fe78
0x000000000014ff70
0x000000000014fe68
0x000000000014fe60
0x000000000014fe58
0x000000000014fe50
rsp
asm에서 다른 함수 호출
1. rcx,rdx,r8,r9에 4개의 파라미터 카피
2. 파라미터 개수 4개 초과일 경우
1. 추가로 전달할 파라미터 사이즈만큼 RSP레지스터의 값을 빼준다.
2. RSP의 주소로부터 높은 주소로 진행하며 파라미터를 스택에 카피
3. 파라미터 전달용 스택 메모리(arg home area)를 확보해준다.
1. arg home area를 위해 sub rsp,32
2. 호출 전 rsp레지스터의 값이 16의 배수여야 한다.
호출할 함수 선언
• CRT함수나 win32 API함수 호출시 추가적인 선언 필요
fscanf PROTO
strlen PROTO
memcpy PROTO
rand PROTO
MessageBoxA PROTO
함수호출 예제
• 16 Byte Align 규칙 위반 테스트
구조체 사용
VECTOR4 STRUCT
x REAL4 ?
y REAL4 ?
z REAL4 ?
w REAL4 ?
VECTOR4 ENDS
VECTOR4_SIZE EQU 16
코드 샘플
비교 및 치환
vector x matrix
가변인자 함수 호출
가상함수 호출 분석
Reference
• x64 소프트웨어 규칙 | Microsoft Docs
• Rules and Limitations for Naked Functions | Microsoft Docs
• Introduction to x64 Assembly (intel.com)

More Related Content

What's hot

Akka.NET 으로 만드는 온라인 게임 서버 (NDC2016)
Akka.NET 으로 만드는 온라인 게임 서버 (NDC2016)Akka.NET 으로 만드는 온라인 게임 서버 (NDC2016)
Akka.NET 으로 만드는 온라인 게임 서버 (NDC2016)Esun Kim
 
양승명, 다음 세대 크로스플랫폼 MMORPG 아키텍처, NDC2012
양승명, 다음 세대 크로스플랫폼 MMORPG 아키텍처, NDC2012양승명, 다음 세대 크로스플랫폼 MMORPG 아키텍처, NDC2012
양승명, 다음 세대 크로스플랫폼 MMORPG 아키텍처, NDC2012devCAT Studio, NEXON
 
레퍼런스만 알면 언리얼 엔진이 제대로 보인다
레퍼런스만 알면 언리얼 엔진이 제대로 보인다레퍼런스만 알면 언리얼 엔진이 제대로 보인다
레퍼런스만 알면 언리얼 엔진이 제대로 보인다Lee Dustin
 
전형규, 가성비 좋은 렌더링 테크닉 10선, NDC2012
전형규, 가성비 좋은 렌더링 테크닉 10선, NDC2012전형규, 가성비 좋은 렌더링 테크닉 10선, NDC2012
전형규, 가성비 좋은 렌더링 테크닉 10선, NDC2012devCAT Studio, NEXON
 
오딘: 발할라 라이징 MMORPG의 성능 최적화 사례 공유 [카카오게임즈 - 레벨 300] - 발표자: 김문권, 팀장, 라이온하트 스튜디오...
오딘: 발할라 라이징 MMORPG의 성능 최적화 사례 공유 [카카오게임즈 - 레벨 300] - 발표자: 김문권, 팀장, 라이온하트 스튜디오...오딘: 발할라 라이징 MMORPG의 성능 최적화 사례 공유 [카카오게임즈 - 레벨 300] - 발표자: 김문권, 팀장, 라이온하트 스튜디오...
오딘: 발할라 라이징 MMORPG의 성능 최적화 사례 공유 [카카오게임즈 - 레벨 300] - 발표자: 김문권, 팀장, 라이온하트 스튜디오...Amazon Web Services Korea
 
스마트폰 온라인 게임에서 고려해야 할 것들
스마트폰 온라인 게임에서 고려해야 할 것들스마트폰 온라인 게임에서 고려해야 할 것들
스마트폰 온라인 게임에서 고려해야 할 것들Hyunjik Bae
 
Compute shader DX11
Compute shader DX11Compute shader DX11
Compute shader DX11민웅 이
 
Tips and experience of DX12 Engine development .
Tips and experience of DX12 Engine development .Tips and experience of DX12 Engine development .
Tips and experience of DX12 Engine development .YEONG-CHEON YOU
 
임태현, 게임 서버 디자인 가이드, NDC2013
임태현, 게임 서버 디자인 가이드, NDC2013임태현, 게임 서버 디자인 가이드, NDC2013
임태현, 게임 서버 디자인 가이드, NDC2013devCAT Studio, NEXON
 
Windows Registered I/O (RIO) vs IOCP
Windows Registered I/O (RIO) vs IOCPWindows Registered I/O (RIO) vs IOCP
Windows Registered I/O (RIO) vs IOCPSeungmo Koo
 
게임서버프로그래밍 #8 - 성능 평가
게임서버프로그래밍 #8 - 성능 평가게임서버프로그래밍 #8 - 성능 평가
게임서버프로그래밍 #8 - 성능 평가Seungmo Koo
 
실시간 게임 서버 최적화 전략
실시간 게임 서버 최적화 전략실시간 게임 서버 최적화 전략
실시간 게임 서버 최적화 전략YEONG-CHEON YOU
 
홍성우, 게임 서버의 목차 - 시작부터 출시까지, NDC2019
홍성우, 게임 서버의 목차 - 시작부터 출시까지, NDC2019홍성우, 게임 서버의 목차 - 시작부터 출시까지, NDC2019
홍성우, 게임 서버의 목차 - 시작부터 출시까지, NDC2019devCAT Studio, NEXON
 
Compute shader
Compute shaderCompute shader
Compute shaderQooJuice
 
멀티스레드 렌더링 (Multithreaded rendering)
멀티스레드 렌더링 (Multithreaded rendering)멀티스레드 렌더링 (Multithreaded rendering)
멀티스레드 렌더링 (Multithreaded rendering)Bongseok Cho
 
NDC11_슈퍼클래스
NDC11_슈퍼클래스NDC11_슈퍼클래스
NDC11_슈퍼클래스noerror
 
NDC 2013, 마비노기 영웅전 개발 테크니컬 포스트-모템
NDC 2013, 마비노기 영웅전 개발 테크니컬 포스트-모템NDC 2013, 마비노기 영웅전 개발 테크니컬 포스트-모템
NDC 2013, 마비노기 영웅전 개발 테크니컬 포스트-모템tcaesvk
 
[NDC2017] 뛰는 프로그래머 나는 언리얼 엔진 - 언알못에서 커미터까지
[NDC2017] 뛰는 프로그래머 나는 언리얼 엔진 - 언알못에서 커미터까지[NDC2017] 뛰는 프로그래머 나는 언리얼 엔진 - 언알못에서 커미터까지
[NDC2017] 뛰는 프로그래머 나는 언리얼 엔진 - 언알못에서 커미터까지Minjung Ko
 
사설 서버를 막는 방법들 (프리섭, 더이상은 Naver)
사설 서버를 막는 방법들 (프리섭, 더이상은 Naver)사설 서버를 막는 방법들 (프리섭, 더이상은 Naver)
사설 서버를 막는 방법들 (프리섭, 더이상은 Naver)Seungmo Koo
 
임태현, MMO 서버 개발 포스트 모템, NDC2012
임태현, MMO 서버 개발 포스트 모템, NDC2012임태현, MMO 서버 개발 포스트 모템, NDC2012
임태현, MMO 서버 개발 포스트 모템, NDC2012devCAT Studio, NEXON
 

What's hot (20)

Akka.NET 으로 만드는 온라인 게임 서버 (NDC2016)
Akka.NET 으로 만드는 온라인 게임 서버 (NDC2016)Akka.NET 으로 만드는 온라인 게임 서버 (NDC2016)
Akka.NET 으로 만드는 온라인 게임 서버 (NDC2016)
 
양승명, 다음 세대 크로스플랫폼 MMORPG 아키텍처, NDC2012
양승명, 다음 세대 크로스플랫폼 MMORPG 아키텍처, NDC2012양승명, 다음 세대 크로스플랫폼 MMORPG 아키텍처, NDC2012
양승명, 다음 세대 크로스플랫폼 MMORPG 아키텍처, NDC2012
 
레퍼런스만 알면 언리얼 엔진이 제대로 보인다
레퍼런스만 알면 언리얼 엔진이 제대로 보인다레퍼런스만 알면 언리얼 엔진이 제대로 보인다
레퍼런스만 알면 언리얼 엔진이 제대로 보인다
 
전형규, 가성비 좋은 렌더링 테크닉 10선, NDC2012
전형규, 가성비 좋은 렌더링 테크닉 10선, NDC2012전형규, 가성비 좋은 렌더링 테크닉 10선, NDC2012
전형규, 가성비 좋은 렌더링 테크닉 10선, NDC2012
 
오딘: 발할라 라이징 MMORPG의 성능 최적화 사례 공유 [카카오게임즈 - 레벨 300] - 발표자: 김문권, 팀장, 라이온하트 스튜디오...
오딘: 발할라 라이징 MMORPG의 성능 최적화 사례 공유 [카카오게임즈 - 레벨 300] - 발표자: 김문권, 팀장, 라이온하트 스튜디오...오딘: 발할라 라이징 MMORPG의 성능 최적화 사례 공유 [카카오게임즈 - 레벨 300] - 발표자: 김문권, 팀장, 라이온하트 스튜디오...
오딘: 발할라 라이징 MMORPG의 성능 최적화 사례 공유 [카카오게임즈 - 레벨 300] - 발표자: 김문권, 팀장, 라이온하트 스튜디오...
 
스마트폰 온라인 게임에서 고려해야 할 것들
스마트폰 온라인 게임에서 고려해야 할 것들스마트폰 온라인 게임에서 고려해야 할 것들
스마트폰 온라인 게임에서 고려해야 할 것들
 
Compute shader DX11
Compute shader DX11Compute shader DX11
Compute shader DX11
 
Tips and experience of DX12 Engine development .
Tips and experience of DX12 Engine development .Tips and experience of DX12 Engine development .
Tips and experience of DX12 Engine development .
 
임태현, 게임 서버 디자인 가이드, NDC2013
임태현, 게임 서버 디자인 가이드, NDC2013임태현, 게임 서버 디자인 가이드, NDC2013
임태현, 게임 서버 디자인 가이드, NDC2013
 
Windows Registered I/O (RIO) vs IOCP
Windows Registered I/O (RIO) vs IOCPWindows Registered I/O (RIO) vs IOCP
Windows Registered I/O (RIO) vs IOCP
 
게임서버프로그래밍 #8 - 성능 평가
게임서버프로그래밍 #8 - 성능 평가게임서버프로그래밍 #8 - 성능 평가
게임서버프로그래밍 #8 - 성능 평가
 
실시간 게임 서버 최적화 전략
실시간 게임 서버 최적화 전략실시간 게임 서버 최적화 전략
실시간 게임 서버 최적화 전략
 
홍성우, 게임 서버의 목차 - 시작부터 출시까지, NDC2019
홍성우, 게임 서버의 목차 - 시작부터 출시까지, NDC2019홍성우, 게임 서버의 목차 - 시작부터 출시까지, NDC2019
홍성우, 게임 서버의 목차 - 시작부터 출시까지, NDC2019
 
Compute shader
Compute shaderCompute shader
Compute shader
 
멀티스레드 렌더링 (Multithreaded rendering)
멀티스레드 렌더링 (Multithreaded rendering)멀티스레드 렌더링 (Multithreaded rendering)
멀티스레드 렌더링 (Multithreaded rendering)
 
NDC11_슈퍼클래스
NDC11_슈퍼클래스NDC11_슈퍼클래스
NDC11_슈퍼클래스
 
NDC 2013, 마비노기 영웅전 개발 테크니컬 포스트-모템
NDC 2013, 마비노기 영웅전 개발 테크니컬 포스트-모템NDC 2013, 마비노기 영웅전 개발 테크니컬 포스트-모템
NDC 2013, 마비노기 영웅전 개발 테크니컬 포스트-모템
 
[NDC2017] 뛰는 프로그래머 나는 언리얼 엔진 - 언알못에서 커미터까지
[NDC2017] 뛰는 프로그래머 나는 언리얼 엔진 - 언알못에서 커미터까지[NDC2017] 뛰는 프로그래머 나는 언리얼 엔진 - 언알못에서 커미터까지
[NDC2017] 뛰는 프로그래머 나는 언리얼 엔진 - 언알못에서 커미터까지
 
사설 서버를 막는 방법들 (프리섭, 더이상은 Naver)
사설 서버를 막는 방법들 (프리섭, 더이상은 Naver)사설 서버를 막는 방법들 (프리섭, 더이상은 Naver)
사설 서버를 막는 방법들 (프리섭, 더이상은 Naver)
 
임태현, MMO 서버 개발 포스트 모템, NDC2012
임태현, MMO 서버 개발 포스트 모템, NDC2012임태현, MMO 서버 개발 포스트 모템, NDC2012
임태현, MMO 서버 개발 포스트 모템, NDC2012
 

Similar to Visual Studio를 이용한 어셈블리어 학습 part 2

Implement an MPI program to perform matrix-matrix multiplication AB .pdf
Implement an MPI program to perform matrix-matrix multiplication AB .pdfImplement an MPI program to perform matrix-matrix multiplication AB .pdf
Implement an MPI program to perform matrix-matrix multiplication AB .pdfmeerobertsonheyde608
 
Mac osx 64_rop_chains
Mac osx 64_rop_chainsMac osx 64_rop_chains
Mac osx 64_rop_chainsRahul Sasi
 
Scale17x buffer overflows
Scale17x buffer overflowsScale17x buffer overflows
Scale17x buffer overflowsjohseg
 
Analysis of Haiku Operating System (BeOS Family) by PVS-Studio. Part 2
Analysis of Haiku Operating System (BeOS Family) by PVS-Studio. Part 2Analysis of Haiku Operating System (BeOS Family) by PVS-Studio. Part 2
Analysis of Haiku Operating System (BeOS Family) by PVS-Studio. Part 2PVS-Studio
 
WCTF 2018 binja Editorial
WCTF 2018 binja EditorialWCTF 2018 binja Editorial
WCTF 2018 binja EditorialCharo_IT
 
Make ARM Shellcode Great Again - HITB2018PEK
Make ARM Shellcode Great Again - HITB2018PEKMake ARM Shellcode Great Again - HITB2018PEK
Make ARM Shellcode Great Again - HITB2018PEKSaumil Shah
 
Jumping into heaven’s gate
Jumping into heaven’s gateJumping into heaven’s gate
Jumping into heaven’s gateYarden Shafir
 
Architecture innovations in POWER ISA v3.01 and POWER10
Architecture innovations in POWER ISA v3.01 and POWER10Architecture innovations in POWER ISA v3.01 and POWER10
Architecture innovations in POWER ISA v3.01 and POWER10Ganesan Narayanasamy
 
The reasons why 64-bit programs require more stack memory
The reasons why 64-bit programs require more stack memoryThe reasons why 64-bit programs require more stack memory
The reasons why 64-bit programs require more stack memoryPVS-Studio
 
Haskell Symposium 2010: An LLVM backend for GHC
Haskell Symposium 2010: An LLVM backend for GHCHaskell Symposium 2010: An LLVM backend for GHC
Haskell Symposium 2010: An LLVM backend for GHCdterei
 
Virtual Machine for Regular Expressions
Virtual Machine for Regular ExpressionsVirtual Machine for Regular Expressions
Virtual Machine for Regular ExpressionsAlexander Yakushev
 
Hardware assited x86 emulation on godson 3
Hardware assited x86 emulation on godson 3Hardware assited x86 emulation on godson 3
Hardware assited x86 emulation on godson 3Takuya ASADA
 
LLVM Backend Porting
LLVM Backend PortingLLVM Backend Porting
LLVM Backend PortingShiva Chen
 

Similar to Visual Studio를 이용한 어셈블리어 학습 part 2 (20)

Implement an MPI program to perform matrix-matrix multiplication AB .pdf
Implement an MPI program to perform matrix-matrix multiplication AB .pdfImplement an MPI program to perform matrix-matrix multiplication AB .pdf
Implement an MPI program to perform matrix-matrix multiplication AB .pdf
 
Mac osx 64_rop_chains
Mac osx 64_rop_chainsMac osx 64_rop_chains
Mac osx 64_rop_chains
 
A Close Look at ARM Code Size
A Close Look at ARM Code SizeA Close Look at ARM Code Size
A Close Look at ARM Code Size
 
Scale17x buffer overflows
Scale17x buffer overflowsScale17x buffer overflows
Scale17x buffer overflows
 
Analysis of Haiku Operating System (BeOS Family) by PVS-Studio. Part 2
Analysis of Haiku Operating System (BeOS Family) by PVS-Studio. Part 2Analysis of Haiku Operating System (BeOS Family) by PVS-Studio. Part 2
Analysis of Haiku Operating System (BeOS Family) by PVS-Studio. Part 2
 
WCTF 2018 binja Editorial
WCTF 2018 binja EditorialWCTF 2018 binja Editorial
WCTF 2018 binja Editorial
 
80x86_2.pdf
80x86_2.pdf80x86_2.pdf
80x86_2.pdf
 
Make ARM Shellcode Great Again - HITB2018PEK
Make ARM Shellcode Great Again - HITB2018PEKMake ARM Shellcode Great Again - HITB2018PEK
Make ARM Shellcode Great Again - HITB2018PEK
 
Jumping into heaven’s gate
Jumping into heaven’s gateJumping into heaven’s gate
Jumping into heaven’s gate
 
Architecture innovations in POWER ISA v3.01 and POWER10
Architecture innovations in POWER ISA v3.01 and POWER10Architecture innovations in POWER ISA v3.01 and POWER10
Architecture innovations in POWER ISA v3.01 and POWER10
 
The reasons why 64-bit programs require more stack memory
The reasons why 64-bit programs require more stack memoryThe reasons why 64-bit programs require more stack memory
The reasons why 64-bit programs require more stack memory
 
Haskell Symposium 2010: An LLVM backend for GHC
Haskell Symposium 2010: An LLVM backend for GHCHaskell Symposium 2010: An LLVM backend for GHC
Haskell Symposium 2010: An LLVM backend for GHC
 
Embedded C programming session10
Embedded C programming  session10Embedded C programming  session10
Embedded C programming session10
 
Advance ROP Attacks
Advance ROP AttacksAdvance ROP Attacks
Advance ROP Attacks
 
R and C++
R and C++R and C++
R and C++
 
C programming session10
C programming  session10C programming  session10
C programming session10
 
Virtual Machine for Regular Expressions
Virtual Machine for Regular ExpressionsVirtual Machine for Regular Expressions
Virtual Machine for Regular Expressions
 
Hardware assited x86 emulation on godson 3
Hardware assited x86 emulation on godson 3Hardware assited x86 emulation on godson 3
Hardware assited x86 emulation on godson 3
 
swrp141.pdf
swrp141.pdfswrp141.pdf
swrp141.pdf
 
LLVM Backend Porting
LLVM Backend PortingLLVM Backend Porting
LLVM Backend Porting
 

More from YEONG-CHEON YOU

DirectStroage프로그래밍소개
DirectStroage프로그래밍소개DirectStroage프로그래밍소개
DirectStroage프로그래밍소개YEONG-CHEON YOU
 
CUDA Raytracing을 이용한 Voxel오브젝트 가시성 테스트
CUDA Raytracing을 이용한 Voxel오브젝트 가시성 테스트CUDA Raytracing을 이용한 Voxel오브젝트 가시성 테스트
CUDA Raytracing을 이용한 Voxel오브젝트 가시성 테스트YEONG-CHEON YOU
 
XDK없이 XBOX게임 개발하기(UWP on XBOX)
XDK없이 XBOX게임 개발하기(UWP on XBOX)XDK없이 XBOX게임 개발하기(UWP on XBOX)
XDK없이 XBOX게임 개발하기(UWP on XBOX)YEONG-CHEON YOU
 
Introduction to DirectX 12 Programming , Ver 1.5
Introduction to DirectX 12 Programming , Ver 1.5Introduction to DirectX 12 Programming , Ver 1.5
Introduction to DirectX 12 Programming , Ver 1.5YEONG-CHEON YOU
 
MMOG Server-Side 충돌 및 이동처리 설계와 구현
MMOG Server-Side 충돌 및 이동처리 설계와 구현MMOG Server-Side 충돌 및 이동처리 설계와 구현
MMOG Server-Side 충돌 및 이동처리 설계와 구현YEONG-CHEON YOU
 
빠른 렌더링을 위한 오브젝트 제외 기술
빠른 렌더링을 위한 오브젝트 제외 기술빠른 렌더링을 위한 오브젝트 제외 기술
빠른 렌더링을 위한 오브젝트 제외 기술YEONG-CHEON YOU
 
Voxel based game_optimazation_relelase
Voxel based game_optimazation_relelaseVoxel based game_optimazation_relelase
Voxel based game_optimazation_relelaseYEONG-CHEON YOU
 
CUDA를 게임 프로젝트에 적용하기
CUDA를 게임 프로젝트에 적용하기CUDA를 게임 프로젝트에 적용하기
CUDA를 게임 프로젝트에 적용하기YEONG-CHEON YOU
 
서버와 클라이언트 같은 엔진 사용하기
서버와 클라이언트 같은 엔진 사용하기서버와 클라이언트 같은 엔진 사용하기
서버와 클라이언트 같은 엔진 사용하기YEONG-CHEON YOU
 
win32 app에서 UWP API호출하기
win32 app에서 UWP API호출하기win32 app에서 UWP API호출하기
win32 app에서 UWP API호출하기YEONG-CHEON YOU
 
Azure로 MMO게임 서비스하기
Azure로 MMO게임 서비스하기Azure로 MMO게임 서비스하기
Azure로 MMO게임 서비스하기YEONG-CHEON YOU
 
Development AR App with C++ and Windows Holographic API
Development AR App with C++ and Windows Holographic APIDevelopment AR App with C++ and Windows Holographic API
Development AR App with C++ and Windows Holographic APIYEONG-CHEON YOU
 
빌드관리 및 디버깅 (2010년 자료)
빌드관리 및 디버깅 (2010년 자료)빌드관리 및 디버깅 (2010년 자료)
빌드관리 및 디버깅 (2010년 자료)YEONG-CHEON YOU
 
Tips and experience_of_dx12_engine_development._ver_1.2
Tips and experience_of_dx12_engine_development._ver_1.2Tips and experience_of_dx12_engine_development._ver_1.2
Tips and experience_of_dx12_engine_development._ver_1.2YEONG-CHEON YOU
 
Implements Cascaded Shadow Maps with using Texture Array
Implements Cascaded Shadow Maps with using Texture ArrayImplements Cascaded Shadow Maps with using Texture Array
Implements Cascaded Shadow Maps with using Texture ArrayYEONG-CHEON YOU
 
Porting direct x 11 desktop game to uwp app
Porting direct x 11 desktop game to uwp appPorting direct x 11 desktop game to uwp app
Porting direct x 11 desktop game to uwp appYEONG-CHEON YOU
 
프로그래밍 언어의 F1머신 C++을 타고 Windows 10 UWP 앱 개발의 세계로~
프로그래밍 언어의 F1머신 C++을 타고 Windows 10 UWP 앱 개발의 세계로~프로그래밍 언어의 F1머신 C++을 타고 Windows 10 UWP 앱 개발의 세계로~
프로그래밍 언어의 F1머신 C++을 타고 Windows 10 UWP 앱 개발의 세계로~YEONG-CHEON YOU
 
DirectX + C++을 이용한 WindowsStore App과 Windows Phone용 게임 개발
DirectX + C++을 이용한  WindowsStore App과 Windows Phone용 게임 개발DirectX + C++을 이용한  WindowsStore App과 Windows Phone용 게임 개발
DirectX + C++을 이용한 WindowsStore App과 Windows Phone용 게임 개발YEONG-CHEON YOU
 

More from YEONG-CHEON YOU (20)

DirectStroage프로그래밍소개
DirectStroage프로그래밍소개DirectStroage프로그래밍소개
DirectStroage프로그래밍소개
 
CUDA Raytracing을 이용한 Voxel오브젝트 가시성 테스트
CUDA Raytracing을 이용한 Voxel오브젝트 가시성 테스트CUDA Raytracing을 이용한 Voxel오브젝트 가시성 테스트
CUDA Raytracing을 이용한 Voxel오브젝트 가시성 테스트
 
XDK없이 XBOX게임 개발하기(UWP on XBOX)
XDK없이 XBOX게임 개발하기(UWP on XBOX)XDK없이 XBOX게임 개발하기(UWP on XBOX)
XDK없이 XBOX게임 개발하기(UWP on XBOX)
 
Introduction to DirectX 12 Programming , Ver 1.5
Introduction to DirectX 12 Programming , Ver 1.5Introduction to DirectX 12 Programming , Ver 1.5
Introduction to DirectX 12 Programming , Ver 1.5
 
MMOG Server-Side 충돌 및 이동처리 설계와 구현
MMOG Server-Side 충돌 및 이동처리 설계와 구현MMOG Server-Side 충돌 및 이동처리 설계와 구현
MMOG Server-Side 충돌 및 이동처리 설계와 구현
 
빠른 렌더링을 위한 오브젝트 제외 기술
빠른 렌더링을 위한 오브젝트 제외 기술빠른 렌더링을 위한 오브젝트 제외 기술
빠른 렌더링을 위한 오브젝트 제외 기술
 
Voxelizaition with GPU
Voxelizaition with GPUVoxelizaition with GPU
Voxelizaition with GPU
 
Voxel based game_optimazation_relelase
Voxel based game_optimazation_relelaseVoxel based game_optimazation_relelase
Voxel based game_optimazation_relelase
 
Sw occlusion culling
Sw occlusion cullingSw occlusion culling
Sw occlusion culling
 
CUDA를 게임 프로젝트에 적용하기
CUDA를 게임 프로젝트에 적용하기CUDA를 게임 프로젝트에 적용하기
CUDA를 게임 프로젝트에 적용하기
 
서버와 클라이언트 같은 엔진 사용하기
서버와 클라이언트 같은 엔진 사용하기서버와 클라이언트 같은 엔진 사용하기
서버와 클라이언트 같은 엔진 사용하기
 
win32 app에서 UWP API호출하기
win32 app에서 UWP API호출하기win32 app에서 UWP API호출하기
win32 app에서 UWP API호출하기
 
Azure로 MMO게임 서비스하기
Azure로 MMO게임 서비스하기Azure로 MMO게임 서비스하기
Azure로 MMO게임 서비스하기
 
Development AR App with C++ and Windows Holographic API
Development AR App with C++ and Windows Holographic APIDevelopment AR App with C++ and Windows Holographic API
Development AR App with C++ and Windows Holographic API
 
빌드관리 및 디버깅 (2010년 자료)
빌드관리 및 디버깅 (2010년 자료)빌드관리 및 디버깅 (2010년 자료)
빌드관리 및 디버깅 (2010년 자료)
 
Tips and experience_of_dx12_engine_development._ver_1.2
Tips and experience_of_dx12_engine_development._ver_1.2Tips and experience_of_dx12_engine_development._ver_1.2
Tips and experience_of_dx12_engine_development._ver_1.2
 
Implements Cascaded Shadow Maps with using Texture Array
Implements Cascaded Shadow Maps with using Texture ArrayImplements Cascaded Shadow Maps with using Texture Array
Implements Cascaded Shadow Maps with using Texture Array
 
Porting direct x 11 desktop game to uwp app
Porting direct x 11 desktop game to uwp appPorting direct x 11 desktop game to uwp app
Porting direct x 11 desktop game to uwp app
 
프로그래밍 언어의 F1머신 C++을 타고 Windows 10 UWP 앱 개발의 세계로~
프로그래밍 언어의 F1머신 C++을 타고 Windows 10 UWP 앱 개발의 세계로~프로그래밍 언어의 F1머신 C++을 타고 Windows 10 UWP 앱 개발의 세계로~
프로그래밍 언어의 F1머신 C++을 타고 Windows 10 UWP 앱 개발의 세계로~
 
DirectX + C++을 이용한 WindowsStore App과 Windows Phone용 게임 개발
DirectX + C++을 이용한  WindowsStore App과 Windows Phone용 게임 개발DirectX + C++을 이용한  WindowsStore App과 Windows Phone용 게임 개발
DirectX + C++을 이용한 WindowsStore App과 Windows Phone용 게임 개발
 

Recently uploaded

Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 

Recently uploaded (20)

Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 

Visual Studio를 이용한 어셈블리어 학습 part 2