Diff
checker
Text
Text
Images
Documents
Excel
Folders
Legal
Enterprise
Desktop
Pricing
Sign in
Download Diffchecker Desktop
Compare text
Find the difference between two text files
Tools
History
Real-time editor
Hide unchanged lines
Disable line wrap
Layout
Split
Unified
Diff precision
Smart
Word
Char
Syntax highlighting
Choose syntax
Ignore
Transform text
Go to first change
Edit input
Diffchecker Desktop
The most secure way to run Diffchecker. Get the Diffchecker Desktop app: your diffs never leave your computer!
Get Desktop
Linux SYS_WRITE vs Win WriteFile from kernel32.lib
Created
5 years ago
Diff never expires
Clear
Export
Share
Explain
7 removals
Lines
Total
Removed
Characters
Total
Removed
To continue using this feature, upgrade to
Diff
checker
Pro
View Pricing
12 lines
Copy
17 additions
Lines
Total
Added
Characters
Total
Added
To continue using this feature, upgrade to
Diff
checker
Pro
View Pricing
18 lines
Copy
inst_146:
inst_146:
;; native write
;; native write
Copy
Copied
Copy
Copied
sub rsp, 40 ; 32 bytes of shadow space + 8 bytes for fifth argument
mov ecx, STD_OUTPUT_HANDLE
call GetStdHandle
mov DWORD [stdout_handler], eax
xor r9, r9 ; 4 arg - r9 - lpNumberOfBytesWritten
mov r11, [stack_top]
mov r11, [stack_top]
sub r11, BM_WORD_SIZE
sub r11, BM_WORD_SIZE
Copy
Copied
Copy
Copied
mov
rdx
, [r11]
; 3 arg
mov
r8
, [r11]
; 3 arg
- r8 - buffer size
sub r11, BM_WORD_SIZE
sub r11, BM_WORD_SIZE
Copy
Copied
Copy
Copied
mov
rsi
, [r11]
mov
rdx
, [r11]
add
rsi
, memory
; 2 arg
add
rdx
, memory
; 2 arg
- rdx - buffer pointer
mov
rdi, STDOUT
; 1 arg
xor ecx, ecx
mov rax, SYS_WRITE
mov
ecx, dword [stdout_handler]
; 1 arg
- rcx - handler
mov [stack_top], r11
mov [stack_top], r11
Copy
Copied
Copy
Copied
sys
call
call
WriteFile
add rsp, 40
Saved diffs
Original text
Open file
inst_146: ;; native write mov r11, [stack_top] sub r11, BM_WORD_SIZE mov rdx, [r11] ; 3 arg sub r11, BM_WORD_SIZE mov rsi, [r11] add rsi, memory ; 2 arg mov rdi, STDOUT ; 1 arg mov rax, SYS_WRITE mov [stack_top], r11 syscall
Changed text
Open file
inst_146: ;; native write sub rsp, 40 ; 32 bytes of shadow space + 8 bytes for fifth argument mov ecx, STD_OUTPUT_HANDLE call GetStdHandle mov DWORD [stdout_handler], eax xor r9, r9 ; 4 arg - r9 - lpNumberOfBytesWritten mov r11, [stack_top] sub r11, BM_WORD_SIZE mov r8, [r11] ; 3 arg - r8 - buffer size sub r11, BM_WORD_SIZE mov rdx, [r11] add rdx, memory ; 2 arg - rdx - buffer pointer xor ecx, ecx mov ecx, dword [stdout_handler] ; 1 arg - rcx - handler mov [stack_top], r11 call WriteFile add rsp, 40
Find difference