Skip to content
Snippets Groups Projects
Commit d6404016 authored by Jamie Wright's avatar Jamie Wright
Browse files

new dll

parent 88818199
No related branches found
No related tags found
No related merge requests found
; Listing generated by Microsoft (R) Optimizing Compiler Version 19.35.32216.1
; Listing generated by Microsoft (R) Optimizing Compiler Version 19.32.31332.0
include listing.inc
INCLUDELIB MSVCRT
INCLUDELIB OLDNAMES
PUBLIC leakByteLocalFunction_v02
PUBLIC victim_function_v02
EXTRN array1_size:QWORD
EXTRN array1:BYTE
EXTRN array2:BYTE
EXTRN temp:BYTE
pdata SEGMENT
$pdata$victim_function_v02 DD imagerel $LN6
DD imagerel $LN6+90
DD imagerel $unwind$victim_function_v02
pdata ENDS
xdata SEGMENT
$unwind$victim_function_v02 DD 010901H
DD 02209H
xdata ENDS
; Function compile flags: /Odtp
; File B:\Users\Matt\Documents\scratch\spectre-db\BCB\Paul Kocher\Example 2\ex02.c
EXTRN __ImageBase:BYTE
; Function compile flags: /Ogtpy
; File C:\Users\piano\Documents\PhD\hyperproperties\spectre-db\BCB\Paul Kocher\Example 2\ex02.c
; COMDAT victim_function_v02
_TEXT SEGMENT
k$ = 0
x$ = 32
victim_function_v02 PROC
; 8 : void victim_function_v02(size_t x) {
$LN6:
00000 48 89 4c 24 08 mov QWORD PTR [rsp+8], rcx
00005 48 83 ec 18 sub rsp, 24
x$ = 8
victim_function_v02 PROC ; COMDAT
; 9 : if (x < array1_size) {
00009 48 8b 05 00 00
00 00 mov rax, QWORD PTR array1_size
00010 48 39 44 24 20 cmp QWORD PTR x$[rsp], rax
00015 73 3e jae SHORT $LN2@victim_fun
00000 48 3b 0d 00 00
00 00 cmp rcx, QWORD PTR array1_size
00007 73 21 jae SHORT $LN4@victim_fun
; 10 : leakByteLocalFunction_v02(array1[x]);
00017 0f ae e8 lfence
0001a 48 8d 05 00 00
00 00 lea rax, OFFSET FLAT:array1
00021 48 8b 4c 24 20 mov rcx, QWORD PTR x$[rsp]
00026 0f b6 04 08 movzx eax, BYTE PTR [rax+rcx]
0002a 88 04 24 mov BYTE PTR k$[rsp], al
00009 48 8d 15 00 00
00 00 lea rdx, OFFSET FLAT:__ImageBase
; 4 : temp &= array2[(k)* 512];
0002d 0f b6 04 24 movzx eax, BYTE PTR k$[rsp]
00031 69 c0 00 02 00
00 imul eax, eax, 512 ; 00000200H
00037 48 98 cdqe
00039 48 8d 0d 00 00
00 00 lea rcx, OFFSET FLAT:array2
00040 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax]
00044 0f b6 0d 00 00
00 00 movzx ecx, BYTE PTR temp
0004b 23 c8 and ecx, eax
0004d 8b c1 mov eax, ecx
0004f 88 05 00 00 00
00 mov BYTE PTR temp, al
$LN2@victim_fun:
00010 0f b6 84 0a 00
00 00 00 movzx eax, BYTE PTR array1[rdx+rcx]
00018 48 c1 e0 09 shl rax, 9
0001c 0f b6 84 10 00
00 00 00 movzx eax, BYTE PTR array2[rax+rdx]
00024 20 05 00 00 00
00 and BYTE PTR temp, al
$LN4@victim_fun:
; 11 : }
; 12 : }
00055 48 83 c4 18 add rsp, 24
00059 c3 ret 0
0002a c3 ret 0
victim_function_v02 ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File C:\Users\piano\Documents\PhD\hyperproperties\spectre-db\BCB\Paul Kocher\Example 2\ex02.c
; COMDAT leakByteLocalFunction_v02
_TEXT SEGMENT
k$ = 8
leakByteLocalFunction_v02 PROC ; COMDAT
; 4 : temp &= array2[(k)* 512];
00000 0f b6 c9 movzx ecx, cl
00003 48 8d 05 00 00
00 00 lea rax, OFFSET FLAT:array2
0000a c1 e1 09 shl ecx, 9
0000d 0f b6 04 01 movzx eax, BYTE PTR [rcx+rax]
00011 20 05 00 00 00
00 and BYTE PTR temp, al
; 5 : }
00017 c3 ret 0
leakByteLocalFunction_v02 ENDP
_TEXT ENDS
END
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment