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

멀티스레드 렌더링 (Multithreaded rendering)
멀티스레드 렌더링 (Multithreaded rendering)멀티스레드 렌더링 (Multithreaded rendering)
멀티스레드 렌더링 (Multithreaded rendering)Bongseok Cho
 
[NDC2016] TERA 서버의 Modern C++ 활용기
[NDC2016] TERA 서버의 Modern C++ 활용기[NDC2016] TERA 서버의 Modern C++ 활용기
[NDC2016] TERA 서버의 Modern C++ 활용기Sang Heon Lee
 
조정훈, 게임 프로그래머를 위한 클래스 설계, NDC2012
조정훈, 게임 프로그래머를 위한 클래스 설계, NDC2012조정훈, 게임 프로그래머를 위한 클래스 설계, NDC2012
조정훈, 게임 프로그래머를 위한 클래스 설계, NDC2012devCAT Studio, NEXON
 
[NHN_NEXT] DirectX Tutorial 강의 자료
[NHN_NEXT] DirectX Tutorial 강의 자료[NHN_NEXT] DirectX Tutorial 강의 자료
[NHN_NEXT] DirectX Tutorial 강의 자료MinGeun Park
 
임태현, 게임 서버 디자인 가이드, NDC2013
임태현, 게임 서버 디자인 가이드, NDC2013임태현, 게임 서버 디자인 가이드, NDC2013
임태현, 게임 서버 디자인 가이드, NDC2013devCAT Studio, NEXON
 
[야생의 땅: 듀랑고] 서버 아키텍처 - SPOF 없는 분산 MMORPG 서버
[야생의 땅: 듀랑고] 서버 아키텍처 - SPOF 없는 분산 MMORPG 서버[야생의 땅: 듀랑고] 서버 아키텍처 - SPOF 없는 분산 MMORPG 서버
[야생의 땅: 듀랑고] 서버 아키텍처 - SPOF 없는 분산 MMORPG 서버Heungsub Lee
 
윤석주, 신입 게임 프로그래머가 되는 법 - 넥슨 채용 프로세스 단계별 분석, NDC2019
윤석주, 신입 게임 프로그래머가 되는 법 - 넥슨 채용 프로세스 단계별 분석, NDC2019윤석주, 신입 게임 프로그래머가 되는 법 - 넥슨 채용 프로세스 단계별 분석, NDC2019
윤석주, 신입 게임 프로그래머가 되는 법 - 넥슨 채용 프로세스 단계별 분석, NDC2019devCAT Studio, NEXON
 
[NDC 2014] 던전앤파이터 클라이언트 로딩 최적화
[NDC 2014] 던전앤파이터 클라이언트 로딩 최적화[NDC 2014] 던전앤파이터 클라이언트 로딩 최적화
[NDC 2014] 던전앤파이터 클라이언트 로딩 최적화Jaeseung Ha
 
빠른 렌더링을 위한 오브젝트 제외 기술
빠른 렌더링을 위한 오브젝트 제외 기술빠른 렌더링을 위한 오브젝트 제외 기술
빠른 렌더링을 위한 오브젝트 제외 기술YEONG-CHEON YOU
 
오딘: 발할라 라이징 MMORPG의 성능 최적화 사례 공유 [카카오게임즈 - 레벨 300] - 발표자: 김문권, 팀장, 라이온하트 스튜디오...
오딘: 발할라 라이징 MMORPG의 성능 최적화 사례 공유 [카카오게임즈 - 레벨 300] - 발표자: 김문권, 팀장, 라이온하트 스튜디오...오딘: 발할라 라이징 MMORPG의 성능 최적화 사례 공유 [카카오게임즈 - 레벨 300] - 발표자: 김문권, 팀장, 라이온하트 스튜디오...
오딘: 발할라 라이징 MMORPG의 성능 최적화 사례 공유 [카카오게임즈 - 레벨 300] - 발표자: 김문권, 팀장, 라이온하트 스튜디오...Amazon Web Services Korea
 
프레임레이트 향상을 위한 공간분할 및 오브젝트 컬링 기법
프레임레이트 향상을 위한 공간분할 및 오브젝트 컬링 기법프레임레이트 향상을 위한 공간분할 및 오브젝트 컬링 기법
프레임레이트 향상을 위한 공간분할 및 오브젝트 컬링 기법YEONG-CHEON YOU
 
실시간 게임 서버 최적화 전략
실시간 게임 서버 최적화 전략실시간 게임 서버 최적화 전략
실시간 게임 서버 최적화 전략YEONG-CHEON YOU
 
[IGC 2017] 펄어비스 민경인 - Mmorpg를 위한 voxel 기반 네비게이션 라이브러리 개발기
[IGC 2017] 펄어비스 민경인 - Mmorpg를 위한 voxel 기반 네비게이션 라이브러리 개발기[IGC 2017] 펄어비스 민경인 - Mmorpg를 위한 voxel 기반 네비게이션 라이브러리 개발기
[IGC 2017] 펄어비스 민경인 - Mmorpg를 위한 voxel 기반 네비게이션 라이브러리 개발기강 민우
 
Ndc2010 전형규 마비노기2 캐릭터 렌더링 기술
Ndc2010 전형규   마비노기2 캐릭터 렌더링 기술Ndc2010 전형규   마비노기2 캐릭터 렌더링 기술
Ndc2010 전형규 마비노기2 캐릭터 렌더링 기술henjeon
 
리플렉션과 가비지 컬렉션
리플렉션과 가비지 컬렉션리플렉션과 가비지 컬렉션
리플렉션과 가비지 컬렉션QooJuice
 
NDC 11 자이언트 서버의 비밀
NDC 11 자이언트 서버의 비밀NDC 11 자이언트 서버의 비밀
NDC 11 자이언트 서버의 비밀승명 양
 
온라인 게임 처음부터 끝까지 동적언어로 만들기
온라인 게임 처음부터 끝까지 동적언어로 만들기온라인 게임 처음부터 끝까지 동적언어로 만들기
온라인 게임 처음부터 끝까지 동적언어로 만들기Seungjae Lee
 
유니티 + Nodejs를 활용한 멀티플레이어 게임 개발하기
유니티 + Nodejs를 활용한 멀티플레이어 게임 개발하기유니티 + Nodejs를 활용한 멀티플레이어 게임 개발하기
유니티 + Nodejs를 활용한 멀티플레이어 게임 개발하기Kiyoung Moon
 
[KGC2014] DX9에서DX11로의이행경험공유
[KGC2014] DX9에서DX11로의이행경험공유[KGC2014] DX9에서DX11로의이행경험공유
[KGC2014] DX9에서DX11로의이행경험공유Hwan Min
 
NDC12_Lockless게임서버설계와구현
NDC12_Lockless게임서버설계와구현NDC12_Lockless게임서버설계와구현
NDC12_Lockless게임서버설계와구현noerror
 

What's hot (20)

멀티스레드 렌더링 (Multithreaded rendering)
멀티스레드 렌더링 (Multithreaded rendering)멀티스레드 렌더링 (Multithreaded rendering)
멀티스레드 렌더링 (Multithreaded rendering)
 
[NDC2016] TERA 서버의 Modern C++ 활용기
[NDC2016] TERA 서버의 Modern C++ 활용기[NDC2016] TERA 서버의 Modern C++ 활용기
[NDC2016] TERA 서버의 Modern C++ 활용기
 
조정훈, 게임 프로그래머를 위한 클래스 설계, NDC2012
조정훈, 게임 프로그래머를 위한 클래스 설계, NDC2012조정훈, 게임 프로그래머를 위한 클래스 설계, NDC2012
조정훈, 게임 프로그래머를 위한 클래스 설계, NDC2012
 
[NHN_NEXT] DirectX Tutorial 강의 자료
[NHN_NEXT] DirectX Tutorial 강의 자료[NHN_NEXT] DirectX Tutorial 강의 자료
[NHN_NEXT] DirectX Tutorial 강의 자료
 
임태현, 게임 서버 디자인 가이드, NDC2013
임태현, 게임 서버 디자인 가이드, NDC2013임태현, 게임 서버 디자인 가이드, NDC2013
임태현, 게임 서버 디자인 가이드, NDC2013
 
[야생의 땅: 듀랑고] 서버 아키텍처 - SPOF 없는 분산 MMORPG 서버
[야생의 땅: 듀랑고] 서버 아키텍처 - SPOF 없는 분산 MMORPG 서버[야생의 땅: 듀랑고] 서버 아키텍처 - SPOF 없는 분산 MMORPG 서버
[야생의 땅: 듀랑고] 서버 아키텍처 - SPOF 없는 분산 MMORPG 서버
 
윤석주, 신입 게임 프로그래머가 되는 법 - 넥슨 채용 프로세스 단계별 분석, NDC2019
윤석주, 신입 게임 프로그래머가 되는 법 - 넥슨 채용 프로세스 단계별 분석, NDC2019윤석주, 신입 게임 프로그래머가 되는 법 - 넥슨 채용 프로세스 단계별 분석, NDC2019
윤석주, 신입 게임 프로그래머가 되는 법 - 넥슨 채용 프로세스 단계별 분석, NDC2019
 
[NDC 2014] 던전앤파이터 클라이언트 로딩 최적화
[NDC 2014] 던전앤파이터 클라이언트 로딩 최적화[NDC 2014] 던전앤파이터 클라이언트 로딩 최적화
[NDC 2014] 던전앤파이터 클라이언트 로딩 최적화
 
빠른 렌더링을 위한 오브젝트 제외 기술
빠른 렌더링을 위한 오브젝트 제외 기술빠른 렌더링을 위한 오브젝트 제외 기술
빠른 렌더링을 위한 오브젝트 제외 기술
 
오딘: 발할라 라이징 MMORPG의 성능 최적화 사례 공유 [카카오게임즈 - 레벨 300] - 발표자: 김문권, 팀장, 라이온하트 스튜디오...
오딘: 발할라 라이징 MMORPG의 성능 최적화 사례 공유 [카카오게임즈 - 레벨 300] - 발표자: 김문권, 팀장, 라이온하트 스튜디오...오딘: 발할라 라이징 MMORPG의 성능 최적화 사례 공유 [카카오게임즈 - 레벨 300] - 발표자: 김문권, 팀장, 라이온하트 스튜디오...
오딘: 발할라 라이징 MMORPG의 성능 최적화 사례 공유 [카카오게임즈 - 레벨 300] - 발표자: 김문권, 팀장, 라이온하트 스튜디오...
 
프레임레이트 향상을 위한 공간분할 및 오브젝트 컬링 기법
프레임레이트 향상을 위한 공간분할 및 오브젝트 컬링 기법프레임레이트 향상을 위한 공간분할 및 오브젝트 컬링 기법
프레임레이트 향상을 위한 공간분할 및 오브젝트 컬링 기법
 
실시간 게임 서버 최적화 전략
실시간 게임 서버 최적화 전략실시간 게임 서버 최적화 전략
실시간 게임 서버 최적화 전략
 
[IGC 2017] 펄어비스 민경인 - Mmorpg를 위한 voxel 기반 네비게이션 라이브러리 개발기
[IGC 2017] 펄어비스 민경인 - Mmorpg를 위한 voxel 기반 네비게이션 라이브러리 개발기[IGC 2017] 펄어비스 민경인 - Mmorpg를 위한 voxel 기반 네비게이션 라이브러리 개발기
[IGC 2017] 펄어비스 민경인 - Mmorpg를 위한 voxel 기반 네비게이션 라이브러리 개발기
 
Ndc2010 전형규 마비노기2 캐릭터 렌더링 기술
Ndc2010 전형규   마비노기2 캐릭터 렌더링 기술Ndc2010 전형규   마비노기2 캐릭터 렌더링 기술
Ndc2010 전형규 마비노기2 캐릭터 렌더링 기술
 
리플렉션과 가비지 컬렉션
리플렉션과 가비지 컬렉션리플렉션과 가비지 컬렉션
리플렉션과 가비지 컬렉션
 
NDC 11 자이언트 서버의 비밀
NDC 11 자이언트 서버의 비밀NDC 11 자이언트 서버의 비밀
NDC 11 자이언트 서버의 비밀
 
온라인 게임 처음부터 끝까지 동적언어로 만들기
온라인 게임 처음부터 끝까지 동적언어로 만들기온라인 게임 처음부터 끝까지 동적언어로 만들기
온라인 게임 처음부터 끝까지 동적언어로 만들기
 
유니티 + Nodejs를 활용한 멀티플레이어 게임 개발하기
유니티 + Nodejs를 활용한 멀티플레이어 게임 개발하기유니티 + Nodejs를 활용한 멀티플레이어 게임 개발하기
유니티 + Nodejs를 활용한 멀티플레이어 게임 개발하기
 
[KGC2014] DX9에서DX11로의이행경험공유
[KGC2014] DX9에서DX11로의이행경험공유[KGC2014] DX9에서DX11로의이행경험공유
[KGC2014] DX9에서DX11로의이행경험공유
 
NDC12_Lockless게임서버설계와구현
NDC12_Lockless게임서버설계와구현NDC12_Lockless게임서버설계와구현
NDC12_Lockless게임서버설계와구현
 

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
 
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
 
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
 
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
 
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 .
 
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

Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
cpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.pptcpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.pptrcbcrtm
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 

Recently uploaded (20)

Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
cpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.pptcpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.ppt
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 

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