Function at 0x14000be00
Capabilities:
Create new key via cryptacquirecontext
Hash data via wincrypt
Import public key
Initialize hashing via wincrypt
Read file on windows
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
mov eax, 0x11a8
call fcn.14002a990
sub rsp, rax
movaps xmmword [rsp + 0x1190], xmm6
mov ebx, r9d
mov rax, qword [0x140047010]
xor rax, rsp
mov qword [rsp + 0x1188], rax
mov qword [rsp + 0x70], 0
xorps xmm0, xmm0
movaps xmmword [rsp + 0xb0], xmm0
movaps xmmword [rsp + 0xa0], xmm0
movaps xmmword [rsp + 0x90], xmm0
movaps xmmword [rsp + 0x80], xmm0
mov r13d, r9d
test rcx, rcx
je 0x14000c08e
mov rbp, rdx
test rdx, rdx
je 0x14000c08e
mov rdi, r8
test r8, r8
je 0x14000c08e
test ebx, ebx
je 0x14000c08e
mov rsi, rcx
cmp qword [rcx], 0
je 0x14000c0ec
mov dword [rsp + 0x20], 0xf0000000
lea r8, str.Microsoft_Enhanced_RSA_and_AES_Cryptographic_Provider
lea rcx, [rsp + 0x70]
xor edx, edx
mov r9d, 0x18
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x14000bf2f
mov dword [rsp + 0x20], 0xf0000008
lea r8, str.Microsoft_Enhanced_RSA_and_AES_Cryptographic_Provider
lea rcx, [rsp + 0x70]
xor edx, edx
mov r9d, 0x18
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x14000bf2f
mov dword [rsp + 0x20], 0xf0000000
lea rcx, [rsp + 0x70]
xor edx, edx
xor r8d, r8d
mov r9d, 0x18
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x14000bf2f
mov dword [rsp + 0x20], 0xf0000008
lea rcx, [rsp + 0x70]
xor edx, edx
xor r8d, r8d
mov r9d, 0x18
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
je 0x14000c1d8
mov qword [rsp + 0x68], rsi
mov dword [rsp + 0x58], ebx
lea rsi, [rsp + 0x80]
xor r12d, r12d
xorps xmm6, xmm6
mov r14, qword [sym.imp.CRYPT32.dll_CryptQueryObject]
mov r15, qword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
mov rax, qword [rbp + r12*8]
test rax, rax
je 0x14000c0b9
mov rbx, qword [rsp + 0x70]
test rbx, rbx
je 0x14000c0b9
mov ecx, dword [rdi + r12*4]
mov dword [rsp + 0x140], ecx
mov qword [rsp + 0x148], rax
lea rax, [rsp + 0x1140]
mov qword [rsp + 0x50], rax
movups xmmword [rsp + 0x38], xmm6
movups xmmword [rsp + 0x28], xmm6
mov qword [rsp + 0x48], 0
mov dword [rsp + 0x20], 0
mov ecx, 2
lea rdx, [rsp + 0x140]
mov r8d, 2
mov r9d, 2
call r14
test eax, eax
je 0x14000c0b9
mov rax, qword [rsp + 0x1140]
mov r8, qword [rax + 0x18]
add r8, 0x60
mov rcx, rbx
mov edx, 0x10001
mov r9, rsi
call qword [sym.imp.CRYPT32.dll_CryptImportPublicKeyInfo]
mov ebx, eax
mov rcx, qword [rsp + 0x1140]
call r15
test ebx, ebx
je 0x14000c0b9
inc r12
add rsi, 8
cmp r13, r12
jne 0x14000bf54
mov rdi, qword [rsp + 0x70]
mov rax, qword [rsp + 0x68]
mov rbx, qword [rax]
xorps xmm0, xmm0
movaps xmmword [rsp + 0x100], xmm0
movaps xmmword [rsp + 0x110], xmm0
movaps xmmword [rsp + 0xc0], xmm0
movaps xmmword [rsp + 0xd0], xmm0
movaps xmmword [rsp + 0xe0], xmm0
movaps xmmword [rsp + 0xf0], xmm0
test rbx, rbx
je 0x14000c163
mov rcx, rbx
xor edx, edx
mov r8d, 2
call fcn.14001b860
test eax, eax
je 0x14000c17e
mov ecx, 2
call fcn.1400163f8
lea rcx, str.ERROR:_Could_not_seek_to_the_end_of_the_MAR_file._n
mov edx, 0x32
jmp 0x14000c0cf
mov ecx, 2
call fcn.1400163f8
lea rcx, str.ERROR:_Invalid_parameter_specified._n
mov edx, 0x24
mov r8d, 1
mov r9, rax
call fcn.14002176c
mov ebp, 0xffffffff
jmp 0x14000c0e6
mov ecx, 2
call fcn.1400163f8
lea rcx, str.ERROR:_Could_not_load_public_key._n
mov edx, 0x22
mov r8d, 1
mov r9, rax
call fcn.14002176c
mov ebp, 0xffffffff
mov ebx, dword [rsp + 0x58]
test ebx, ebx
jne 0x14000c115
jmp 0x14000c135
mov ecx, 2
call fcn.1400163f8
lea rcx, str.ERROR:_MAR_file_is_not_open._n
mov edx, 0x1d
mov r8d, 1
mov r9, rax
call fcn.14002176c
mov ebp, 0xffffffff
xor esi, esi
mov rdi, qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov rcx, qword [rsp + rsi*8 + 0x80]
test rcx, rcx
je 0x14000c12d
call rdi
inc rsi
cmp r13, rsi
jne 0x14000c11e
mov rcx, qword [rsp + 0x1188]
xor rcx, rsp
call fcn.1400246e0
mov eax, ebp
movaps xmm6, xmmword [rsp + 0x1190]
add rsp, 0x11a8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov ecx, 2
call fcn.1400163f8
lea rcx, str.ERROR:_Invalid_file_pointer_passed._n
mov edx, 0x24
jmp 0x14000c0cf
mov rcx, rbx
call fcn.14001c478
cmp rax, 0x1f400001
jl 0x14000c1a9
mov ecx, 2
call fcn.1400163f8
lea rcx, str.ERROR:_MAR_file_is_too_large_to_be_verified._n
mov edx, 0x2d
jmp 0x14000c0cf
mov edx, 0x10
mov rcx, rbx
xor r8d, r8d
call fcn.14001b860
test eax, eax
je 0x14000c1fc
mov ecx, 2
call fcn.1400163f8
lea rcx, str.ERROR:_Could_not_seek_to_the_signature_block._n
mov edx, 0x2e
jmp 0x14000c0cf
mov qword [rsp + 0x70], 0
mov ecx, 2
call fcn.1400163f8
lea rcx, str.ERROR:_Could_not_init_crytpo_library._n
mov edx, 0x26
jmp 0x14000c102
lea rcx, [rsp + 0x7c]
mov edx, 4
mov r8d, 1
mov r9, rbx
call fcn.1400214a8
cmp rax, 1
jne 0x14000c251
mov ecx, dword [rsp + 0x7c]
call qword [sym.imp.WS2_32.dll_ntohl]
mov dword [rsp + 0x7c], eax
cmp eax, 8
jbe 0x14000c26c
mov ecx, 2
call fcn.1400163f8
lea rdx, str.ERROR:_At_most__d_signatures_can_be_specified._n
mov rcx, rax
mov r8d, 8
call fcn.140001260
jmp 0x14000c0dd
mov ecx, 2
call fcn.1400163f8
lea rcx, str.ERROR:_Could_not_read_number_of_signatures._n
mov edx, 0x2c
jmp 0x14000c0cf
mov dword [rsp + 0x5c], eax
test eax, eax
je 0x14000c35d
mov eax, dword [rsp + 0x5c]
mov qword [rsp + 0x60], rax
lea rax, [rax*4]
mov qword [rsp + 0x68], rax
xor r14d, r14d
mov r15, qword [sym.imp.WS2_32.dll_ntohl]
lea rbp, [rsp + r14]
add rbp, 0x100
mov edx, 4
mov r8d, 1
mov rcx, rbp
mov r9, rbx
call fcn.1400214a8
cmp rax, 1
jne 0x14000c460
mov ecx, dword [rbp]
call r15
mov esi, eax
mov dword [rbp], eax
mov edx, 4
mov r8d, 1
lea rcx, [rsp + 0x78]
mov r9, rbx
call fcn.1400214a8
cmp rax, 1
jne 0x14000c47b
mov ecx, dword [rsp + 0x78]
mov r12, r15
call r15
mov dword [rsp + 0x78], eax
cmp eax, 0x801
jae 0x14000c496
mov ebp, eax
mov rcx, rbp
call fcn.140021c30
mov qword [rsp + r14*2 + 0xc0], rax
test rax, rax
je 0x14000c4b1
mov r8d, 1
mov rcx, rax
mov rdx, rbp
mov r9, rbx
call fcn.1400214a8
cmp rax, 1
jne 0x14000c4c7
cmp esi, 2
jne 0x14000c515
add r14, 4
cmp qword [rsp + 0x68], r14
mov r15, r12
jne 0x14000c298
mov rcx, rbx
call fcn.14001c478
mov ebp, 0xffffffff
cmp rax, 0xffffffffffffffff
je 0x14000c0e2
xorps xmm0, xmm0
movaps xmmword [rsp + 0x1140], xmm0
movaps xmmword [rsp + 0x1150], xmm0
movaps xmmword [rsp + 0x1160], xmm0
movaps xmmword [rsp + 0x1170], xmm0
movaps xmmword [rsp + 0x120], xmm0
movaps xmmword [rsp + 0x130], xmm0
mov eax, dword [rsp + 0x5c]
test eax, eax
je 0x14000c44a
test rdi, rdi
je 0x14000c434
mov eax, eax
mov qword [rsp + 0x68], rax
lea rsi, [rax*8]
xor ebp, ebp
mov r15, qword [sym.imp.ADVAPI32.dll_CryptCreateHash]
lea rax, [rsp + rbp]
add rax, 0x1140
mov qword [rax], 0
mov qword [rsp + 0x20], rax
mov rcx, rdi
mov edx, 0x800d
xor r8d, r8d
xor r9d, r9d
call r15
test eax, eax
je 0x14000c434
add rbp, 8
cmp rsi, rbp
jne 0x14000c3d0
mov rcx, rbx
xor edx, edx
xor r8d, r8d
call fcn.14001b860
test eax, eax
je 0x14000c563
mov ecx, 2
call fcn.1400163f8
lea rcx, str.ERROR:_Could_not_seek_to_start_of_the_file_n
mov edx, 0x2b
jmp 0x14000c0cf
mov ecx, 2
call fcn.1400163f8
lea rcx, str.ERROR:_Could_not_initialize_signature_handle._n
jmp 0x14000c1ce
mov ecx, 2
call fcn.1400163f8
lea rcx, str.ERROR:_There_must_be_at_least_one_signature._n
jmp 0x14000c19f
mov ecx, 2
call fcn.1400163f8
lea rcx, str.ERROR:_Could_not_read_signatures_algorithm_ID._n
mov edx, 0x2f
jmp 0x14000c0cf
mov ecx, 2
call fcn.1400163f8
lea rcx, str.ERROR:_Could_not_read_signatures_length._n
mov edx, 0x29
jmp 0x14000c0cf
mov ecx, 2
call fcn.1400163f8
lea rcx, str.ERROR:_Signature_length_is_too_large_to_verify._n
mov edx, 0x30
jmp 0x14000c0cf
mov ecx, 2
call fcn.1400163f8
lea rcx, str.ERROR:_Could_allocate_buffer_for_signature._n
jmp 0x14000c262
mov ecx, 2
call fcn.1400163f8
lea rcx, str.ERROR:_Could_not_read_extracted_signature._n
mov edx, 0x2b
mov r8d, 1
mov r9, rax
call fcn.14002176c
xor esi, esi
mov ebx, dword [rsp + 0x58]
mov rdi, qword [rsp + 0x60]
mov ebp, 0xffffffff
mov rcx, qword [rsp + rsi*8 + 0xc0]
call fcn.140021758
inc rsi
cmp rdi, rsi
jne 0x14000c4fb
jmp 0x14000c0e6
mov ecx, 2
call fcn.1400163f8
lea rcx, str.ERROR:_Unknown_signature_algorithm_ID._n
mov edx, 0x27
mov r8d, 1
mov r9, rax
call fcn.14002176c
xor esi, esi
mov ebx, dword [rsp + 0x58]
mov rdi, qword [rsp + 0x60]
mov ebp, 0xffffffff
mov rcx, qword [rsp + rsi*8 + 0xc0]
call fcn.140021758
inc rsi
cmp rdi, rsi
jne 0x14000c549
jmp 0x14000c0e6
lea rax, str.signature_block
mov qword [rsp + 0x28], rax
mov eax, dword [rsp + 0x5c]
mov dword [rsp + 0x20], eax
lea rdx, [rsp + 0x140]
lea r9, [rsp + 0x1140]
mov rcx, rbx
mov r8d, 0x14
call fcn.14000bd00
test eax, eax
jne 0x14000c0dd
mov ecx, dword [rsp + 0x5c]
cmp ecx, 2
mov eax, 1
cmovb ecx, eax
mov qword [rsp + 0x60], rcx
lea r12, [rcx*4]
xor esi, esi
lea r14, str.signature_algorithm_ID
lea r15, [rsp + 0x140]
lea rdi, [rsp + 0x1140]
mov qword [rsp + 0x28], r14
mov eax, dword [rsp + 0x5c]
mov dword [rsp + 0x20], eax
mov rcx, rbx
mov rdx, r15
mov r8d, 4
mov r9, rdi
call fcn.14000bd00
test eax, eax
jne 0x14000c0dd
lea rbp, [rsp + rsi]
add rbp, 0x120
lea rax, str.signature_length
mov qword [rsp + 0x28], rax
mov eax, dword [rsp + 0x5c]
mov dword [rsp + 0x20], eax
mov rcx, rbx
mov rdx, rbp
mov r8d, 4
mov r9, rdi
call fcn.14000bd00
test eax, eax
jne 0x14000c0dd
mov ecx, dword [rbp]
call qword [sym.imp.WS2_32.dll_ntohl]
mov dword [rbp], eax
cmp eax, 0x801
jae 0x14000c780
mov edx, eax
mov rcx, rbx
mov r8d, 1
call fcn.14001b860
test eax, eax
jne 0x14000c796
add rsi, 4
cmp r12, rsi
jne 0x14000c5d2
mov rcx, rbx
call fcn.140020fd0
test eax, eax
je 0x14000c7c7
xor r15d, r15d
mov r15d, r15d
mov r12d, dword [rsp + r15*4 + 0x120]
test r12, r12
je 0x14000c7b1
mov rbp, qword [rsp + r15*8 + 0xc0]
test rbp, rbp
je 0x14000c7b1
mov rcx, r12
call fcn.140021c30
test rax, rax
je 0x14000c7b1
mov r14, rax
mov rdi, r12
neg rdi
lea ecx, [r12 - 1]
xor edx, edx
mov esi, ecx
mov bl, byte [rbp + rsi]
mov byte [r14 + rdx], bl
inc rdx
dec ecx
mov rax, rdi
add rax, rdx
jne 0x14000c6cb
mov r9, qword [rsp + r15*8 + 0x80]
mov rcx, qword [rsp + r15*8 + 0x1140]
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov rdx, r14
mov r8d, r12d
call qword [sym.imp.ADVAPI32.dll_CryptVerifySignatureA]
mov esi, eax
mov rcx, r14
call fcn.140021758
test esi, esi
je 0x14000c7b1
inc r15d
cmp r15d, dword [rsp + 0x60]
jne 0x14000c685
xor esi, esi
mov rcx, qword [rsp + rsi*8 + 0xc0]
call fcn.140021758
inc rsi
cmp qword [rsp + 0x68], rsi
jne 0x14000c731
xor ebp, ebp
mov ebx, dword [rsp + 0x58]
cmp dword [rsp + 0x60], ebx
je 0x14000c0e6
mov ecx, 2
call fcn.1400163f8
lea rdx, str.ERROR:_Only__d_of__d_signatures_were_verified._n
mov rcx, rax
mov r8, qword [rsp + 0x60]
mov r9d, dword [rsp + 0x5c]
call fcn.140001260
jmp 0x14000c0b2
mov ecx, 2
call fcn.1400163f8
lea rcx, str.ERROR:_Embedded_signature_length_is_too_large._n
jmp 0x14000c471
mov ecx, 2
call fcn.1400163f8
lea rcx, str.ERROR:_Could_not_seek_past_signature._n
mov edx, 0x26
jmp 0x14000c0cf
mov ecx, 2
call fcn.1400163f8
lea rcx, str.ERROR:_Error_verifying_signature._n
jmp 0x14000c0ca
lea rsi, [rsp + 0x140]
mov r15, qword [sym.imp.ADVAPI32.dll_CryptHashData]
mov edx, 1
mov r8d, 0x1000
mov rcx, rsi
mov r9, rbx
call fcn.1400214a8
mov rdi, rax
mov rcx, rbx
call fcn.140020ffc
test eax, eax
jne 0x14000c84b
xor ebp, ebp
mov rcx, qword [rsp + rbp*8 + 0x1140]
mov rdx, rsi
mov r8d, edi
xor r9d, r9d
call r15
test eax, eax
je 0x14000c830
inc rbp
cmp qword [rsp + 0x60], rbp
jne 0x14000c7fd
mov rcx, rbx
call fcn.140020fd0
test eax, eax
je 0x14000c7d6
jmp 0x14000c682
mov ecx, 2
call fcn.1400163f8
lea rcx, str.ERROR:_Error_updating_verify_context_with_data_block._n
mov edx, 0x36
jmp 0x14000c0cf
mov ecx, 2
call fcn.1400163f8
lea rcx, str.ERROR:_Error_reading_data_block._n
mov edx, 0x21
jmp 0x14000c0cf