'MASM SHA256 running from C#

I received a task in college to compare execution time for calculating SHA256 in C# and assembly.
It is supposed to be a simple WPF app with file input and 2 buttons.
After selecting the file via input and clicking the 1st button the code is calculating SHA256 of the provided file and measures the execution time - this part works as expected.

Clicking the 2nd button is supposed to call function from imported DLL (I used [DllImport] attribute) and calculate SHA256 with assembly. Here I got completely stuck. I have no idea how to create a function which will calculate this hash from assembly (here I want to point out that I don't have to write this function by my own, but it was also not provided).

After hours of searching through the internet and looking for some simple MASM SHA256 implementation I gave up and decided to try another angle. Found some simple implementation in C and tried to compile it to MASM, but with no luck there as well. I am getting a lot of different compilation errors from VS and I have no idea if I am even heading in the correct direction. That's why I decided to ask here for some guidance.

Here is the code sample of assembly I am currently working with, and a screenshot of errors I am getting.


.code
sha256 proc

k:
        DWORD    1116352408
        DWORD    1899447441
        DWORD    -1245643825
        DWORD    -373957723
        DWORD    961987163
        DWORD    1508970993
        DWORD    -1841331548
        DWORD    -1424204075
        DWORD    -670586216
        DWORD    310598401
        DWORD    607225278
        DWORD    1426881987
        DWORD    1925078388
        DWORD    -2132889090
        DWORD    -1680079193
        DWORD    -1046744716
        DWORD    -459576895
        DWORD    -272742522
        DWORD    264347078
        DWORD    604807628
        DWORD    770255983
        DWORD    1249150122
        DWORD    1555081692
        DWORD    1996064986
        DWORD    -1740746414
        DWORD    -1473132947
        DWORD    -1341970488
        DWORD    -1084653625
        DWORD    -958395405
        DWORD    -710438585
        DWORD    113926993
        DWORD    338241895
        DWORD    666307205
        DWORD    773529912
        DWORD    1294757372
        DWORD    1396182291
        DWORD    1695183700
        DWORD    1986661051
        DWORD    -2117940946
        DWORD    -1838011259
        DWORD    -1564481375
        DWORD    -1474664885
        DWORD    -1035236496
        DWORD    -949202525
        DWORD    -778901479
        DWORD    -694614492
        DWORD    -200395387
        DWORD    275423344
        DWORD    430227734
        DWORD    506948616
        DWORD    659060556
        DWORD    883997877
        DWORD    958139571
        DWORD    1322822218
        DWORD    1537002063
        DWORD    1747873779
        DWORD    1955562222
        DWORD    2024104815
        DWORD    -2067236844
        DWORD    -1933114872
        DWORD    -1866530822
        DWORD    -1538233109
        DWORD    -1090935817
        DWORD    -965641998
memsetOur:
        push    rbp
        mov     rbp, rsp
        mov     QWORD PTR [rbp-24], rdi
        mov     DWORD PTR [rbp-28], esi
        mov     QWORD PTR [rbp-40], rdx
        mov     rax, QWORD PTR [rbp-24]
        mov     QWORD PTR [rbp-8], rax
        jmp     L2
L3:
        mov     rax, QWORD PTR [rbp-8]
        lea     rdx, [rax+1]
        mov     QWORD PTR [rbp-8], rdx
        mov     edx, DWORD PTR [rbp-28]
        mov     BYTE PTR [rax], dl
L2:
        mov     rax, QWORD PTR [rbp-40]
        lea     rdx, [rax-1]
        mov     QWORD PTR [rbp-40], rdx
        test    rax, rax
        jne     L3
        mov     rax, QWORD PTR [rbp-24]
        pop     rbp
        ret
memcpyOwn:
        push    rbp
        mov     rbp, rsp
        mov     QWORD PTR [rbp-24], rdi
        mov     QWORD PTR [rbp-32], rsi
        mov     QWORD PTR [rbp-40], rdx
        mov     rax, QWORD PTR [rbp-24]
        mov     QWORD PTR [rbp-8], rax
        mov     rax, QWORD PTR [rbp-32]
        mov     QWORD PTR [rbp-16], rax
        jmp     L6
L7:
        mov     rdx, QWORD PTR [rbp-16]
        lea     rax, [rdx+1]
        mov     QWORD PTR [rbp-16], rax
        mov     rax, QWORD PTR [rbp-8]
        lea     rcx, [rax+1]
        mov     QWORD PTR [rbp-8], rcx
        movzx   edx, BYTE PTR [rdx]
        mov     BYTE PTR [rax], dl
L6:
        mov     rax, QWORD PTR [rbp-40]
        lea     rdx, [rax-1]
        mov     QWORD PTR [rbp-40], rdx
        test    rax, rax
        jne     L7
        mov     rax, QWORD PTR [rbp-24]
        pop     rbp
        ret
right_rot:
        push    rbp
        mov     rbp, rsp
        mov     DWORD PTR [rbp-4], edi
        mov     DWORD PTR [rbp-8], esi
        mov     eax, DWORD PTR [rbp-8]
        mov     edx, DWORD PTR [rbp-4]
        mov     ecx, eax
        ror     edx, cl
        mov     eax, edx
        pop     rbp
        ret
init_buf_state:
        push    rbp
        mov     rbp, rsp
        mov     QWORD PTR [rbp-8], rdi
        mov     QWORD PTR [rbp-16], rsi
        mov     QWORD PTR [rbp-24], rdx
        mov     rax, QWORD PTR [rbp-8]
        mov     rdx, QWORD PTR [rbp-16]
        mov     QWORD PTR [rax], rdx
        mov     rax, QWORD PTR [rbp-8]
        mov     rdx, QWORD PTR [rbp-24]
        mov     QWORD PTR [rax+8], rdx
        mov     rax, QWORD PTR [rbp-8]
        mov     rdx, QWORD PTR [rbp-24]
        mov     QWORD PTR [rax+16], rdx
        mov     rax, QWORD PTR [rbp-8]
        mov     DWORD PTR [rax+24], 0
        mov     rax, QWORD PTR [rbp-8]
        mov     DWORD PTR [rax+28], 0
        nop
        pop     rbp
        ret
calc_chunk:
        push    rbp
        mov     rbp, rsp
        sub     rsp, 48
        mov     QWORD PTR [rbp-40], rdi
        mov     QWORD PTR [rbp-48], rsi
        mov     rax, QWORD PTR [rbp-48]
        mov     eax, DWORD PTR [rax+28]
        test    eax, eax
        je      L13
        mov     eax, 0
        jmp     L14
L13:
        mov     rax, QWORD PTR [rbp-48]
        mov     rax, QWORD PTR [rax+8]
        cmp     rax, 63
        jbe     L15
        mov     rax, QWORD PTR [rbp-48]
        mov     rcx, QWORD PTR [rax]
        mov     rax, QWORD PTR [rbp-40]
        mov     edx, 64
        mov     rsi, rcx
        mov     rdi, rax
        call    memcpyOwn
        mov     rax, QWORD PTR [rbp-48]
        mov     rax, QWORD PTR [rax]
        lea     rdx, [rax+64]
        mov     rax, QWORD PTR [rbp-48]
        mov     QWORD PTR [rax], rdx
        mov     rax, QWORD PTR [rbp-48]
        mov     rax, QWORD PTR [rax+8]
        lea     rdx, [rax-64]
        mov     rax, QWORD PTR [rbp-48]
        mov     QWORD PTR [rax+8], rdx
        mov     eax, 1
        jmp     L14
L15:
        mov     rax, QWORD PTR [rbp-48]
        mov     rdx, QWORD PTR [rax+8]
        mov     rax, QWORD PTR [rbp-48]
        mov     rcx, QWORD PTR [rax]
        mov     rax, QWORD PTR [rbp-40]
        mov     rsi, rcx
        mov     rdi, rax
        call    memcpyOwn
        mov     rax, QWORD PTR [rbp-48]
        mov     rax, QWORD PTR [rax+8]
        add     QWORD PTR [rbp-40], rax
        mov     rax, QWORD PTR [rbp-48]
        mov     rdx, QWORD PTR [rax+8]
        mov     eax, 64
        sub     rax, rdx
        mov     QWORD PTR [rbp-8], rax
        mov     rax, QWORD PTR [rbp-48]
        mov     rdx, QWORD PTR [rax]
        mov     rax, QWORD PTR [rbp-48]
        mov     rax, QWORD PTR [rax+8]
        add     rdx, rax
        mov     rax, QWORD PTR [rbp-48]
        mov     QWORD PTR [rax], rdx
        mov     rax, QWORD PTR [rbp-48]
        mov     QWORD PTR [rax+8], 0
        mov     rax, QWORD PTR [rbp-48]
        mov     eax, DWORD PTR [rax+24]
        test    eax, eax
        jne     L16
        mov     rax, QWORD PTR [rbp-40]
        lea     rdx, [rax+1]
        mov     QWORD PTR [rbp-40], rdx
        mov     BYTE PTR [rax], -128
        sub     QWORD PTR [rbp-8], 1
        mov     rax, QWORD PTR [rbp-48]
        mov     DWORD PTR [rax+24], 1
L16:
        cmp     QWORD PTR [rbp-8], 7
        jbe     L17
        mov     rax, QWORD PTR [rbp-8]
        sub     rax, 8
        mov     QWORD PTR [rbp-16], rax
        mov     rax, QWORD PTR [rbp-48]
        mov     rax, QWORD PTR [rax+16]
        sal     rax, 3
        mov     QWORD PTR [rbp-24], rax
        mov     rdx, QWORD PTR [rbp-16]
        mov     rax, QWORD PTR [rbp-40]
        mov     esi, 0
        mov     rdi, rax
        call    memsetOur
        mov     rax, QWORD PTR [rbp-16]
        add     QWORD PTR [rbp-40], rax
        mov     rax, QWORD PTR [rbp-24]
        shr     rax, 56
        mov     edx, eax
        mov     rax, QWORD PTR [rbp-40]
        mov     BYTE PTR [rax], dl
        mov     rax, QWORD PTR [rbp-24]
        shr     rax, 48
        mov     rdx, rax
        mov     rax, QWORD PTR [rbp-40]
        add     rax, 1
        mov     BYTE PTR [rax], dl
        mov     rax, QWORD PTR [rbp-24]
        shr     rax, 40
        mov     rdx, rax
        mov     rax, QWORD PTR [rbp-40]
        add     rax, 2
        mov     BYTE PTR [rax], dl
        mov     rax, QWORD PTR [rbp-24]
        shr     rax, 32
        mov     rdx, rax
        mov     rax, QWORD PTR [rbp-40]
        add     rax, 3
        mov     BYTE PTR [rax], dl
        mov     rax, QWORD PTR [rbp-24]
        shr     rax, 24
        mov     rdx, rax
        mov     rax, QWORD PTR [rbp-40]
        add     rax, 4
        mov     BYTE PTR [rax], dl
        mov     rax, QWORD PTR [rbp-24]
        shr     rax, 16
        mov     rdx, rax
        mov     rax, QWORD PTR [rbp-40]
        add     rax, 5
        mov     BYTE PTR [rax], dl
        mov     rax, QWORD PTR [rbp-24]
        shr     rax, 8
        mov     rdx, rax
        mov     rax, QWORD PTR [rbp-40]
        add     rax, 6
        mov     BYTE PTR [rax], dl
        mov     rax, QWORD PTR [rbp-40]
        add     rax, 7
        mov     rdx, QWORD PTR [rbp-24]
        mov     BYTE PTR [rax], dl
        mov     rax, QWORD PTR [rbp-48]
        mov     DWORD PTR [rax+28], 1
        jmp     L18
L17:
        mov     rdx, QWORD PTR [rbp-8]
        mov     rax, QWORD PTR [rbp-40]
        mov     esi, 0
        mov     rdi, rax
        call    memsetOur
L18:
        mov     eax, 1
L14:
        leave
        ret
calc_sha_256:
        push    rbp
        mov     rbp, rsp
        push    rbx
        sub     rsp, 504
        mov     QWORD PTR [rbp-488], rdi
        mov     QWORD PTR [rbp-496], rsi
        mov     QWORD PTR [rbp-504], rdx
        mov     DWORD PTR [rbp-20], 1779033703
        mov     DWORD PTR [rbp-24], -1150833019
        mov     DWORD PTR [rbp-28], 1013904242
        mov     DWORD PTR [rbp-32], -1521486534
        mov     DWORD PTR [rbp-36], 1359893119
        mov     DWORD PTR [rbp-40], -1694144372
        mov     DWORD PTR [rbp-44], 528734635
        mov     DWORD PTR [rbp-48], 1541459225
        mov     rdx, QWORD PTR [rbp-504]
        mov     rcx, QWORD PTR [rbp-496]
        lea     rax, [rbp-224]
        mov     rsi, rcx
        mov     rdi, rax
        call    init_buf_state
        jmp     L20
L27:
        lea     rax, [rbp-192]
        mov     QWORD PTR [rbp-88], rax
        lea     rax, [rbp-480]
        mov     edx, 256
        mov     esi, 0
        mov     rdi, rax
        call    memsetOur
        mov     DWORD PTR [rbp-92], 0
        jmp     L21
L22:
        mov     rax, QWORD PTR [rbp-88]
        movzx   eax, BYTE PTR [rax]
        movzx   eax, al
        sal     eax, 24
        mov     edx, eax
        mov     rax, QWORD PTR [rbp-88]
        add     rax, 1
        movzx   eax, BYTE PTR [rax]
        movzx   eax, al
        sal     eax, 16
        or      edx, eax
        mov     rax, QWORD PTR [rbp-88]
        add     rax, 2
        movzx   eax, BYTE PTR [rax]
        movzx   eax, al
        sal     eax, 8
        or      edx, eax
        mov     rax, QWORD PTR [rbp-88]
        add     rax, 3
        movzx   eax, BYTE PTR [rax]
        movzx   eax, al
        or      edx, eax
        mov     eax, DWORD PTR [rbp-92]
        cdqe
        mov     DWORD PTR [rbp-480+rax*4], edx
        add     QWORD PTR [rbp-88], 4
        add     DWORD PTR [rbp-92], 1
L21:
        cmp     DWORD PTR [rbp-92], 15
        jle     L22
        mov     DWORD PTR [rbp-92], 16
        jmp     L23
L24:
        mov     eax, DWORD PTR [rbp-92]
        sub     eax, 15
        cdqe
        mov     eax, DWORD PTR [rbp-480+rax*4]
        mov     esi, 7
        mov     edi, eax
        call    right_rot
        mov     ebx, eax
        mov     eax, DWORD PTR [rbp-92]
        sub     eax, 15
        cdqe
        mov     eax, DWORD PTR [rbp-480+rax*4]
        mov     esi, 18
        mov     edi, eax
        call    right_rot
        xor     ebx, eax
        mov     edx, ebx
        mov     eax, DWORD PTR [rbp-92]
        sub     eax, 15
        cdqe
        mov     eax, DWORD PTR [rbp-480+rax*4]
        shr     eax, 3
        xor     eax, edx
        mov     DWORD PTR [rbp-120], eax
        mov     eax, DWORD PTR [rbp-92]
        sub     eax, 2
        cdqe
        mov     eax, DWORD PTR [rbp-480+rax*4]
        mov     esi, 17
        mov     edi, eax
        call    right_rot
        mov     ebx, eax
        mov     eax, DWORD PTR [rbp-92]
        sub     eax, 2
        cdqe
        mov     eax, DWORD PTR [rbp-480+rax*4]
        mov     esi, 19
        mov     edi, eax
        call    right_rot
        xor     ebx, eax
        mov     edx, ebx
        mov     eax, DWORD PTR [rbp-92]
        sub     eax, 2
        cdqe
        mov     eax, DWORD PTR [rbp-480+rax*4]
        shr     eax, 10
        xor     eax, edx
        mov     DWORD PTR [rbp-124], eax
        mov     eax, DWORD PTR [rbp-92]
        sub     eax, 16
        cdqe
        mov     edx, DWORD PTR [rbp-480+rax*4]
        mov     eax, DWORD PTR [rbp-120]
        add     edx, eax
        mov     eax, DWORD PTR [rbp-92]
        sub     eax, 7
        cdqe
        mov     eax, DWORD PTR [rbp-480+rax*4]
        add     edx, eax
        mov     eax, DWORD PTR [rbp-124]
        add     edx, eax
        mov     eax, DWORD PTR [rbp-92]
        cdqe
        mov     DWORD PTR [rbp-480+rax*4], edx
        add     DWORD PTR [rbp-92], 1
L23:
        cmp     DWORD PTR [rbp-92], 63
        jle     L24
        mov     eax, DWORD PTR [rbp-20]
        mov     DWORD PTR [rbp-52], eax
        mov     eax, DWORD PTR [rbp-24]
        mov     DWORD PTR [rbp-56], eax
        mov     eax, DWORD PTR [rbp-28]
        mov     DWORD PTR [rbp-60], eax
        mov     eax, DWORD PTR [rbp-32]
        mov     DWORD PTR [rbp-64], eax
        mov     eax, DWORD PTR [rbp-36]
        mov     DWORD PTR [rbp-68], eax
        mov     eax, DWORD PTR [rbp-40]
        mov     DWORD PTR [rbp-72], eax
        mov     eax, DWORD PTR [rbp-44]
        mov     DWORD PTR [rbp-76], eax
        mov     eax, DWORD PTR [rbp-48]
        mov     DWORD PTR [rbp-80], eax
        mov     DWORD PTR [rbp-92], 0
        jmp     L25
L26:
        mov     eax, DWORD PTR [rbp-68]
        mov     esi, 6
        mov     edi, eax
        call    right_rot
        mov     ebx, eax
        mov     eax, DWORD PTR [rbp-68]
        mov     esi, 11
        mov     edi, eax
        call    right_rot
        xor     ebx, eax
        mov     eax, DWORD PTR [rbp-68]
        mov     esi, 25
        mov     edi, eax
        call    right_rot
        xor     eax, ebx
        mov     DWORD PTR [rbp-96], eax
        mov     eax, DWORD PTR [rbp-68]
        and     eax, DWORD PTR [rbp-72]
        mov     edx, eax
        mov     eax, DWORD PTR [rbp-68]
        not     eax
        and     eax, DWORD PTR [rbp-76]
        xor     eax, edx
        mov     DWORD PTR [rbp-100], eax
        mov     edx, DWORD PTR [rbp-80]
        mov     eax, DWORD PTR [rbp-96]
        add     edx, eax
        mov     eax, DWORD PTR [rbp-100]
        add     edx, eax
        mov     eax, DWORD PTR [rbp-92]
        cdqe
        mov     eax, DWORD PTR k[0+rax*4]
        add     edx, eax
        mov     eax, DWORD PTR [rbp-92]
        cdqe
        mov     eax, DWORD PTR [rbp-480+rax*4]
        add     eax, edx
        mov     DWORD PTR [rbp-104], eax
        mov     eax, DWORD PTR [rbp-52]
        mov     esi, 2
        mov     edi, eax
        call    right_rot
        mov     ebx, eax
        mov     eax, DWORD PTR [rbp-52]
        mov     esi, 13
        mov     edi, eax
        call    right_rot
        xor     ebx, eax
        mov     eax, DWORD PTR [rbp-52]
        mov     esi, 22
        mov     edi, eax
        call    right_rot
        xor     eax, ebx
        mov     DWORD PTR [rbp-108], eax
        mov     eax, DWORD PTR [rbp-56]
        xor     eax, DWORD PTR [rbp-60]
        and     eax, DWORD PTR [rbp-52]
        mov     edx, eax
        mov     eax, DWORD PTR [rbp-56]
        and     eax, DWORD PTR [rbp-60]
        xor     eax, edx
        mov     DWORD PTR [rbp-112], eax
        mov     edx, DWORD PTR [rbp-108]
        mov     eax, DWORD PTR [rbp-112]
        add     eax, edx
        mov     DWORD PTR [rbp-116], eax
        mov     eax, DWORD PTR [rbp-76]
        mov     DWORD PTR [rbp-80], eax
        mov     eax, DWORD PTR [rbp-72]
        mov     DWORD PTR [rbp-76], eax
        mov     eax, DWORD PTR [rbp-68]
        mov     DWORD PTR [rbp-72], eax
        mov     edx, DWORD PTR [rbp-64]
        mov     eax, DWORD PTR [rbp-104]
        add     eax, edx
        mov     DWORD PTR [rbp-68], eax
        mov     eax, DWORD PTR [rbp-60]
        mov     DWORD PTR [rbp-64], eax
        mov     eax, DWORD PTR [rbp-56]
        mov     DWORD PTR [rbp-60], eax
        mov     eax, DWORD PTR [rbp-52]
        mov     DWORD PTR [rbp-56], eax
        mov     edx, DWORD PTR [rbp-104]
        mov     eax, DWORD PTR [rbp-116]
        add     eax, edx
        mov     DWORD PTR [rbp-52], eax
        add     DWORD PTR [rbp-92], 1
L25:
        cmp     DWORD PTR [rbp-92], 63
        jle     L26
        mov     eax, DWORD PTR [rbp-52]
        add     DWORD PTR [rbp-20], eax
        mov     eax, DWORD PTR [rbp-56]
        add     DWORD PTR [rbp-24], eax
        mov     eax, DWORD PTR [rbp-60]
        add     DWORD PTR [rbp-28], eax
        mov     eax, DWORD PTR [rbp-64]
        add     DWORD PTR [rbp-32], eax
        mov     eax, DWORD PTR [rbp-68]
        add     DWORD PTR [rbp-36], eax
        mov     eax, DWORD PTR [rbp-72]
        add     DWORD PTR [rbp-40], eax
        mov     eax, DWORD PTR [rbp-76]
        add     DWORD PTR [rbp-44], eax
        mov     eax, DWORD PTR [rbp-80]
        add     DWORD PTR [rbp-48], eax
L20:
        lea     rdx, [rbp-224]
        lea     rax, [rbp-192]
        mov     rsi, rdx
        mov     rdi, rax
        call    calc_chunk
        test    eax, eax
        jne     L27
        mov     eax, DWORD PTR [rbp-20]
        shr     eax, 24
        mov     edx, eax
        mov     rax, QWORD PTR [rbp-488]
        mov     BYTE PTR [rax], dl
        mov     eax, DWORD PTR [rbp-20]
        shr     eax, 16
        mov     edx, eax
        mov     rax, QWORD PTR [rbp-488]
        add     rax, 1
        mov     BYTE PTR [rax], dl
        mov     eax, DWORD PTR [rbp-20]
        shr     eax, 8
        mov     edx, eax
        mov     rax, QWORD PTR [rbp-488]
        add     rax, 2
        mov     BYTE PTR [rax], dl
        mov     rax, QWORD PTR [rbp-488]
        add     rax, 3
        mov     edx, DWORD PTR [rbp-20]
        mov     BYTE PTR [rax], dl
        mov     eax, DWORD PTR [rbp-24]
        shr     eax, 24
        mov     edx, eax
        mov     rax, QWORD PTR [rbp-488]
        add     rax, 4
        mov     BYTE PTR [rax], dl
        mov     eax, DWORD PTR [rbp-24]
        shr     eax, 16
        mov     edx, eax
        mov     rax, QWORD PTR [rbp-488]
        add     rax, 5
        mov     BYTE PTR [rax], dl
        mov     eax, DWORD PTR [rbp-24]
        shr     eax, 8
        mov     edx, eax
        mov     rax, QWORD PTR [rbp-488]
        add     rax, 6
        mov     BYTE PTR [rax], dl
        mov     rax, QWORD PTR [rbp-488]
        add     rax, 7
        mov     edx, DWORD PTR [rbp-24]
        mov     BYTE PTR [rax], dl
        mov     eax, DWORD PTR [rbp-28]
        shr     eax, 24
        mov     edx, eax
        mov     rax, QWORD PTR [rbp-488]
        add     rax, 8
        mov     BYTE PTR [rax], dl
        mov     eax, DWORD PTR [rbp-28]
        shr     eax, 16
        mov     edx, eax
        mov     rax, QWORD PTR [rbp-488]
        add     rax, 9
        mov     BYTE PTR [rax], dl
        mov     eax, DWORD PTR [rbp-28]
        shr     eax, 8
        mov     edx, eax
        mov     rax, QWORD PTR [rbp-488]
        add     rax, 10
        mov     BYTE PTR [rax], dl
        mov     rax, QWORD PTR [rbp-488]
        add     rax, 11
        mov     edx, DWORD PTR [rbp-28]
        mov     BYTE PTR [rax], dl
        mov     eax, DWORD PTR [rbp-32]
        shr     eax, 24
        mov     edx, eax
        mov     rax, QWORD PTR [rbp-488]
        add     rax, 12
        mov     BYTE PTR [rax], dl
        mov     eax, DWORD PTR [rbp-32]
        shr     eax, 16
        mov     edx, eax
        mov     rax, QWORD PTR [rbp-488]
        add     rax, 13
        mov     BYTE PTR [rax], dl
        mov     eax, DWORD PTR [rbp-32]
        shr     eax, 8
        mov     edx, eax
        mov     rax, QWORD PTR [rbp-488]
        add     rax, 14
        mov     BYTE PTR [rax], dl
        mov     rax, QWORD PTR [rbp-488]
        add     rax, 15
        mov     edx, DWORD PTR [rbp-32]
        mov     BYTE PTR [rax], dl
        mov     eax, DWORD PTR [rbp-36]
        shr     eax, 24
        mov     edx, eax
        mov     rax, QWORD PTR [rbp-488]
        add     rax, 16
        mov     BYTE PTR [rax], dl
        mov     eax, DWORD PTR [rbp-36]
        shr     eax, 16
        mov     edx, eax
        mov     rax, QWORD PTR [rbp-488]
        add     rax, 17
        mov     BYTE PTR [rax], dl
        mov     eax, DWORD PTR [rbp-36]
        shr     eax, 8
        mov     edx, eax
        mov     rax, QWORD PTR [rbp-488]
        add     rax, 18
        mov     BYTE PTR [rax], dl
        mov     rax, QWORD PTR [rbp-488]
        add     rax, 19
        mov     edx, DWORD PTR [rbp-36]
        mov     BYTE PTR [rax], dl
        mov     eax, DWORD PTR [rbp-40]
        shr     eax, 24
        mov     edx, eax
        mov     rax, QWORD PTR [rbp-488]
        add     rax, 20
        mov     BYTE PTR [rax], dl
        mov     eax, DWORD PTR [rbp-40]
        shr     eax, 16
        mov     edx, eax
        mov     rax, QWORD PTR [rbp-488]
        add     rax, 21
        mov     BYTE PTR [rax], dl
        mov     eax, DWORD PTR [rbp-40]
        shr     eax, 8
        mov     edx, eax
        mov     rax, QWORD PTR [rbp-488]
        add     rax, 22
        mov     BYTE PTR [rax], dl
        mov     rax, QWORD PTR [rbp-488]
        add     rax, 23
        mov     edx, DWORD PTR [rbp-40]
        mov     BYTE PTR [rax], dl
        mov     eax, DWORD PTR [rbp-44]
        shr     eax, 24
        mov     edx, eax
        mov     rax, QWORD PTR [rbp-488]
        add     rax, 24
        mov     BYTE PTR [rax], dl
        mov     eax, DWORD PTR [rbp-44]
        shr     eax, 16
        mov     edx, eax
        mov     rax, QWORD PTR [rbp-488]
        add     rax, 25
        mov     BYTE PTR [rax], dl
        mov     eax, DWORD PTR [rbp-44]
        shr     eax, 8
        mov     edx, eax
        mov     rax, QWORD PTR [rbp-488]
        add     rax, 26
        mov     BYTE PTR [rax], dl
        mov     rax, QWORD PTR [rbp-488]
        add     rax, 27
        mov     edx, DWORD PTR [rbp-44]
        mov     BYTE PTR [rax], dl
        mov     eax, DWORD PTR [rbp-48]
        shr     eax, 24
        mov     edx, eax
        mov     rax, QWORD PTR [rbp-488]
        add     rax, 28
        mov     BYTE PTR [rax], dl
        mov     eax, DWORD PTR [rbp-48]
        shr     eax, 16
        mov     edx, eax
        mov     rax, QWORD PTR [rbp-488]
        add     rax, 29
        mov     BYTE PTR [rax], dl
        mov     eax, DWORD PTR [rbp-48]
        shr     eax, 8
        mov     edx, eax
        mov     rax, QWORD PTR [rbp-488]
        add     rax, 30
        mov     BYTE PTR [rax], dl
        mov     rax, QWORD PTR [rbp-488]
        add     rax, 31
        mov     edx, DWORD PTR [rbp-48]
        mov     BYTE PTR [rax], dl
        nop
        mov     rbx, QWORD PTR [rbp-8]
        leave
        ret

        sha256 endp
        end 

Visual studio errors



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source