@@ -383,7 +383,7 @@ def asm_reverse_winhttp(opts={})
383
383
384
384
ssl_cert_get_server_hash:
385
385
mov rcx, [r14] ; Cert context pointer (pCertContext)
386
- push 32 ; sha1 length, rounded to multiple of 16
386
+ push 24 ; sha1 length, rounded to multiple of 8
387
387
mov r9, rsp ; Address of length (pcbData)
388
388
mov r15, rsp ; Backup address of length
389
389
sub rsp, [r9] ; Allocate 20 bytes for the hash output
@@ -402,12 +402,12 @@ def asm_reverse_winhttp(opts={})
402
402
403
403
ssl_cert_compare_hashes:
404
404
pop rax ; get the expected hash
405
- xchg rax, rsi ; swap hash and handle for now
405
+ xchg rax, rsi ; swap hash and handle for now
406
406
mov rdi, r14 ; pointer to the retrieved hash
407
407
mov rcx, [r15] ; number of bytes to compare
408
408
repe cmpsb ; do the hash comparison
409
409
jnz failure ; Bail out if the result isn't zero
410
- xchg rax, rsi ; swap hash and handle back!
410
+ xchg rax, rsi ; swap hash and handle back!
411
411
412
412
; Our certificate hash was valid, hurray!
413
413
^
0 commit comments