Function at 0x14000bc50
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.14002a380
sub rsp, rax
movdqa xmmword [rsp + 0x1190], xmm6
mov esi, r9d
mov rax, qword [0x140045010]
xor rax, rsp
mov qword [rsp + 0x1188], rax
mov qword [rsp + 0x70], 0
pxor xmm0, xmm0
movdqa xmmword [rsp + 0xb0], xmm0
movdqa xmmword [rsp + 0xa0], xmm0
movdqa xmmword [rsp + 0x90], xmm0
movdqa xmmword [rsp + 0x80], xmm0
test r9d, r9d
je 0x14000bef4
mov rbx, rcx
test rcx, rcx
je 0x14000bef4
mov rbp, rdx
test rdx, rdx
je 0x14000bef4
mov rdi, r8
test r8, r8
je 0x14000bef4
cmp qword [rbx], 0
je 0x14000bf3f
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 0x14000bd83
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 0x14000bd83
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 0x14000bd83
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 0x14000c03d
mov qword [rsp + 0x60], rbx
mov dword [rsp + 0x68], esi
mov r12d, esi
lea rsi, [rsp + 0x80]
xor r13d, r13d
pxor xmm6, xmm6
mov r14, qword [sym.imp.CRYPT32.dll_CryptQueryObject]
mov r15, qword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
nop dword [rax]
mov rax, qword [rbp + r13*8]
test rax, rax
je 0x14000bf0c
mov rbx, qword [rsp + 0x70]
test rbx, rbx
je 0x14000bf0c
mov ecx, dword [rdi + r13*4]
mov dword [rsp + 0x140], ecx
mov qword [rsp + 0x148], rax
lea rax, [rsp + 0x1140]
mov qword [rsp + 0x50], rax
movdqu xmmword [rsp + 0x38], xmm6
movdqu 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 0x14000bf0c
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 0x14000bf0c
add r13, 1
add rsi, 8
cmp r12, r13
jne 0x14000bdb0
mov rdi, qword [rsp + 0x70]
mov rax, qword [rsp + 0x60]
mov rbx, qword [rax]
pxor xmm0, xmm0
movdqa xmmword [rsp + 0x100], xmm0
movdqa xmmword [rsp + 0x110], xmm0
movdqa xmmword [rsp + 0xc0], xmm0
movdqa xmmword [rsp + 0xd0], xmm0
movdqa xmmword [rsp + 0xe0], xmm0
movdqa xmmword [rsp + 0xf0], xmm0
test rbx, rbx
je 0x14000bfc8
mov rcx, rbx
xor edx, edx
mov r8d, 2
call fcn.14001be80
test eax, eax
je 0x14000bfe3
mov ecx, 2
call fcn.140016988
lea rcx, str.ERROR:_Could_not_seek_to_the_end_of_the_MAR_file._n
mov edx, 0x32
jmp 0x14000bf22
mov ecx, 2
call fcn.140016988
lea rcx, str.ERROR:_Invalid_parameter_specified._n
mov edx, 0x24
jmp 0x14000bf55
mov ecx, 2
call fcn.140016988
lea rcx, str.ERROR:_Could_not_load_public_key._n
mov edx, 0x22
mov r8d, 1
mov r9, rax
call fcn.140021258
mov ebp, 0xffffffff
mov esi, dword [rsp + 0x68]
test esi, esi
jne 0x14000bf6c
jmp 0x14000bf9a
mov ecx, 2
call fcn.140016988
lea rcx, str.ERROR:_MAR_file_is_not_open._n
mov edx, 0x1d
mov r8d, 1
mov r9, rax
call fcn.140021258
mov ebp, 0xffffffff
test esi, esi
je 0x14000bf9a
mov esi, esi
xor edi, edi
mov rbx, qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x14000bf89
add rdi, 1
cmp rsi, rdi
je 0x14000bf9a
mov rcx, qword [rsp + rdi*8 + 0x80]
test rcx, rcx
je 0x14000bf80
call rbx
jmp 0x14000bf80
mov rcx, qword [rsp + 0x1188]
xor rcx, rsp
call fcn.140023fe0
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.140016988
lea rcx, str.ERROR:_Invalid_file_pointer_passed._n
mov edx, 0x24
jmp 0x14000bf22
mov rcx, rbx
call fcn.14001c9b0
cmp rax, 0x1f400001
jl 0x14000c00e
mov ecx, 2
call fcn.140016988
lea rcx, str.ERROR:_MAR_file_is_too_large_to_be_verified._n
mov edx, 0x2d
jmp 0x14000bf22
mov edx, 0x10
mov rcx, rbx
xor r8d, r8d
call fcn.14001be80
test eax, eax
je 0x14000c061
mov ecx, 2
call fcn.140016988
lea rcx, str.ERROR:_Could_not_seek_to_the_signature_block._n
mov edx, 0x2e
jmp 0x14000bf22
mov qword [rsp + 0x70], 0
mov ecx, 2
call fcn.140016988
lea rcx, str.ERROR:_Could_not_init_crytpo_library._n
mov edx, 0x26
jmp 0x14000bf55
lea rcx, [rsp + 0x7c]
mov edx, 4
mov r8d, 1
mov r9, rbx
call fcn.140020f94
cmp rax, 1
jne 0x14000c25f
mov ecx, dword [rsp + 0x7c]
call qword [sym.imp.WSOCK32.dll_ntohl]
mov dword [rsp + 0x7c], eax
cmp eax, 8
ja 0x14000c3a3
mov dword [rsp + 0x6c], eax
test eax, eax
je 0x14000c187
mov r15d, dword [rsp + 0x6c]
lea rax, [r15*4]
mov qword [rsp + 0x60], rax
xor r14d, r14d
mov r13, qword [sym.imp.WSOCK32.dll_ntohl]
lea rbp, [rsp + r14]
add rbp, 0x100
mov edx, 4
mov r8d, 1
mov rcx, rbp
mov r9, rbx
call fcn.140020f94
cmp rax, 1
jne 0x14000c2b0
mov ecx, dword [rbp]
call r13
mov esi, eax
mov dword [rbp], eax
mov edx, 4
mov r8d, 1
lea rcx, [rsp + 0x78]
mov r9, rbx
call fcn.140020f94
cmp rax, 1
jne 0x14000c2cb
mov ecx, dword [rsp + 0x78]
mov r12, r13
call r13
mov dword [rsp + 0x78], eax
cmp eax, 0x801
jae 0x14000c2e6
mov ebp, eax
mov rcx, rbp
call fcn.14002171c
mov qword [rsp + r14*2 + 0xc0], rax
test rax, rax
je 0x14000c301
mov r8d, 1
mov rcx, rax
mov rdx, rbp
mov r9, rbx
call fcn.140020f94
cmp rax, 1
jne 0x14000c317
cmp esi, 2
jne 0x14000c35d
add r14, 4
cmp qword [rsp + 0x60], r14
mov r13, r12
jne 0x14000c0c2
mov rcx, rbx
call fcn.14001c9b0
mov ebp, 0xffffffff
cmp rax, 0xffffffffffffffff
je 0x14000bf35
pxor xmm0, xmm0
movdqa xmmword [rsp + 0x1140], xmm0
movdqa xmmword [rsp + 0x1150], xmm0
movdqa xmmword [rsp + 0x1160], xmm0
movdqa xmmword [rsp + 0x1170], xmm0
movdqa xmmword [rsp + 0x120], xmm0
movdqa xmmword [rsp + 0x130], xmm0
mov r15d, dword [rsp + 0x6c]
test r15d, r15d
je 0x14000c295
test rdi, rdi
lea rsi, [rsp + 0x1140]
je 0x14000c27a
mov r13d, r15d
mov r14, qword [sym.imp.ADVAPI32.dll_CryptCreateHash]
mov rbp, r13
mov qword [rsi], 0
mov qword [rsp + 0x20], rsi
mov rcx, rdi
mov edx, 0x800d
xor r8d, r8d
xor r9d, r9d
call r14
test eax, eax
je 0x14000c27a
add rsi, 8
add rbp, 0xffffffffffffffff
jne 0x14000c204
mov rcx, rbx
xor edx, edx
xor r8d, r8d
call fcn.14001be80
test eax, eax
je 0x14000c3c7
mov ecx, 2
call fcn.140016988
lea rcx, str.ERROR:_Could_not_seek_to_start_of_the_file_n
mov edx, 0x2b
jmp 0x14000bf22
mov ecx, 2
call fcn.140016988
lea rcx, str.ERROR:_Could_not_read_number_of_signatures._n
mov edx, 0x2c
jmp 0x14000bf22
mov ecx, 2
call fcn.140016988
lea rcx, str.ERROR:_Could_not_initialize_signature_handle._n
mov edx, 0x2e
jmp 0x14000bf22
mov ecx, 2
call fcn.140016988
lea rcx, str.ERROR:_There_must_be_at_least_one_signature._n
mov edx, 0x2d
jmp 0x14000bf22
mov ecx, 2
call fcn.140016988
lea rcx, str.ERROR:_Could_not_read_signatures_algorithm_ID._n
mov edx, 0x2f
jmp 0x14000bf22
mov ecx, 2
call fcn.140016988
lea rcx, str.ERROR:_Could_not_read_signatures_length._n
mov edx, 0x29
jmp 0x14000bf22
mov ecx, 2
call fcn.140016988
lea rcx, str.ERROR:_Signature_length_is_too_large_to_verify._n
mov edx, 0x30
jmp 0x14000bf22
mov ecx, 2
call fcn.140016988
lea rcx, str.ERROR:_Could_allocate_buffer_for_signature._n
jmp 0x14000c270
mov ecx, 2
call fcn.140016988
lea rcx, str.ERROR:_Could_not_read_extracted_signature._n
mov edx, 0x2b
mov r8d, 1
mov r9, rax
call fcn.140021258
xor esi, esi
mov ebp, 0xffffffff
mov rcx, qword [rsp + rsi*8 + 0xc0]
call fcn.140021244
add rsi, 1
cmp r15, rsi
jne 0x14000c342
jmp 0x14000bf35
mov ecx, 2
call fcn.140016988
lea rcx, str.ERROR:_Unknown_signature_algorithm_ID._n
mov edx, 0x27
mov r8d, 1
mov r9, rax
call fcn.140021258
xor esi, esi
mov ebp, 0xffffffff
mov rcx, qword [rsp + rsi*8 + 0xc0]
call fcn.140021244
add rsi, 1
cmp r15, rsi
jne 0x14000c388
jmp 0x14000bf35
mov ecx, 2
call fcn.140016988
lea rdx, str.ERROR:_At_most__d_signatures_can_be_specified._n
mov rcx, rax
mov r8d, 8
call fcn.140005d20
jmp 0x14000bf30
lea rax, str.signature_block
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], r15d
lea rdx, [rsp + 0x140]
lea r9, [rsp + 0x1140]
mov rcx, rbx
mov r8d, 0x14
call fcn.14000bb40
test eax, eax
jne 0x14000bf30
lea rsi, [rsp + 0x120]
lea rdi, [rsp + 0x140]
lea rbp, [rsp + 0x1140]
lea r12, str.signature_length
mov r14, r13
lea rax, str.signature_algorithm_ID
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], r15d
mov rcx, rbx
mov rdx, rdi
mov r8d, 4
mov r9, rbp
call fcn.14000bb40
test eax, eax
jne 0x14000bf30
mov qword [rsp + 0x28], r12
mov dword [rsp + 0x20], r15d
mov rcx, rbx
mov rdx, rsi
mov r8d, 4
mov r9, rbp
call fcn.14000bb40
test eax, eax
jne 0x14000bf30
mov ecx, dword [rsi]
call qword [sym.imp.WSOCK32.dll_ntohl]
mov dword [rsi], eax
cmp eax, 0x801
jae 0x14000c7fb
mov edx, eax
mov rcx, rbx
mov r8d, 1
call fcn.14001be80
test eax, eax
jne 0x14000c816
add rsi, 4
add r14, 0xffffffffffffffff
jne 0x14000c420
mov rcx, rbx
call fcn.140020abc
test eax, eax
je 0x14000c847
xor r12d, r12d
pxor xmm6, xmm6
mov r12d, r12d
mov eax, dword [rsp + r12*4 + 0x120]
mov qword [rsp + 0x60], rax
test rax, rax
je 0x14000c831
mov rbp, qword [rsp + r12*8 + 0xc0]
test rbp, rbp
je 0x14000c831
mov rcx, qword [rsp + 0x60]
call fcn.14002171c
test rax, rax
je 0x14000c831
mov r14, rax
cmp dword [rsp + 0x60], 0x20
jae 0x14000c5cf
xor r9d, r9d
xor eax, eax
mov rcx, r9
not rcx
test byte [rsp + 0x60], 1
je 0x14000c539
mov edx, eax
not edx
add edx, dword [rsp + 0x60]
mov dl, byte [rbp + rdx]
mov byte [r14 + r9], dl
or r9, 1
add eax, 1
add rcx, qword [rsp + 0x60]
je 0x14000c57c
mov rsi, qword [rsp + 0x60]
mov rcx, rsi
sub rcx, r9
lea rdx, [r14 + r9]
add rdx, 1
sub esi, eax
add esi, 0xfffffffe
xor eax, eax
lea edi, [rsi + 1]
movzx ebx, byte [rbp + rdi]
mov byte [rdx + rax - 1], bl
mov ebx, esi
movzx ebx, byte [rbp + rbx]
mov byte [rdx + rax], bl
add rax, 2
add esi, 0xfffffffe
cmp rcx, rax
jne 0x14000c55a
mov r9, qword [rsp + r12*8 + 0x80]
mov rcx, qword [rsp + r12*8 + 0x1140]
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov rdx, r14
mov r8, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_CryptVerifySignatureA]
mov esi, eax
mov rcx, r14
call fcn.140021244
test esi, esi
je 0x14000c831
add r12d, 1
cmp r12d, r15d
jne 0x14000c4c5
jmp 0x14000c8ce
mov rax, qword [rsp + 0x60]
mov rcx, rax
add rax, 0xffffffffffffffff
add ecx, 0xffffffff
xor r9d, r9d
cmp ecx, eax
jb 0x14000c513
shr rax, 0x20
mov eax, 0
jne 0x14000c515
mov rax, qword [rsp + 0x60]
add eax, 0xffffffff
lea rcx, [rax + rbp]
add rcx, 1
cmp r14, rcx
jae 0x14000c629
mov rdx, qword [rsp + 0x60]
lea rcx, [r14 + rdx]
sub rax, rdx
add rax, rbp
add rax, 1
cmp rax, rcx
jb 0x14000c510
mov r9, qword [rsp + 0x60]
and r9d, 0xffffffe0
lea rax, [r9 - 0x20]
mov rcx, rax
shr rcx, 5
add rcx, 1
mov r8d, ecx
and r8d, 1
test rax, rax
je 0x14000c764
mov rax, qword [rsp + 0x60]
lea edx, [rax - 0x21]
mov rax, r8
sub rax, rcx
xor ecx, ecx
lea esi, [rdx + 0x20]
movdqu xmm0, xmmword [rbp + rsi - 0x1f]
movdqu xmm1, xmmword [rbp + rsi - 0xf]
movdqa xmm2, xmm1
punpcklbw xmm2, xmm6
pshufd xmm2, xmm2, 0x4e
pshuflw xmm2, xmm2, 0x1b
pshufhw xmm2, xmm2, 0x1b
punpckhbw xmm1, xmm6
pshufd xmm1, xmm1, 0x4e
pshuflw xmm1, xmm1, 0x1b
pshufhw xmm1, xmm1, 0x1b
packuswb xmm1, xmm2
movdqa xmm2, xmm0
punpcklbw xmm2, xmm6
pshufd xmm2, xmm2, 0x4e
pshuflw xmm2, xmm2, 0x1b
pshufhw xmm2, xmm2, 0x1b
punpckhbw xmm0, xmm6
pshufd xmm0, xmm0, 0x4e
pshuflw xmm0, xmm0, 0x1b
pshufhw xmm0, xmm0, 0x1b
packuswb xmm0, xmm2
movdqu xmmword [r14 + rcx], xmm1
movdqu xmmword [r14 + rcx + 0x10], xmm0
mov esi, edx
movdqu xmm0, xmmword [rbp + rsi - 0x1f]
movdqu xmm1, xmmword [rbp + rsi - 0xf]
movdqa xmm2, xmm1
punpcklbw xmm2, xmm6
pshufd xmm2, xmm2, 0x4e
pshuflw xmm2, xmm2, 0x1b
pshufhw xmm2, xmm2, 0x1b
punpckhbw xmm1, xmm6
pshufd xmm1, xmm1, 0x4e
pshuflw xmm1, xmm1, 0x1b
pshufhw xmm1, xmm1, 0x1b
packuswb xmm1, xmm2
movdqa xmm2, xmm0
punpcklbw xmm2, xmm6
pshufd xmm2, xmm2, 0x4e
pshuflw xmm2, xmm2, 0x1b
pshufhw xmm2, xmm2, 0x1b
punpckhbw xmm0, xmm6
pshufd xmm0, xmm0, 0x4e
pshuflw xmm0, xmm0, 0x1b
pshufhw xmm0, xmm0, 0x1b
packuswb xmm0, xmm2
movdqu xmmword [r14 + rcx + 0x20], xmm1
movdqu xmmword [r14 + rcx + 0x30], xmm0
add rcx, 0x40
add edx, 0xffffffc0
add rax, 2
jne 0x14000c661
jmp 0x14000c766
xor ecx, ecx
test r8, r8
je 0x14000c7e8
mov eax, ecx
not eax
add eax, dword [rsp + 0x60]
movdqu xmm0, xmmword [rbp + rax - 0x1f]
movdqu xmm1, xmmword [rbp + rax - 0xf]
movdqa xmm2, xmm1
punpcklbw xmm2, xmm6
pshufd xmm2, xmm2, 0x4e
pshuflw xmm2, xmm2, 0x1b
pshufhw xmm2, xmm2, 0x1b
punpckhbw xmm1, xmm6
pshufd xmm1, xmm1, 0x4e
pshuflw xmm1, xmm1, 0x1b
pshufhw xmm1, xmm1, 0x1b
packuswb xmm1, xmm2
movdqa xmm2, xmm0
punpcklbw xmm2, xmm6
pshufd xmm2, xmm2, 0x4e
pshuflw xmm2, xmm2, 0x1b
pshufhw xmm2, xmm2, 0x1b
punpckhbw xmm0, xmm6
pshufd xmm0, xmm0, 0x4e
pshuflw xmm0, xmm0, 0x1b
pshufhw xmm0, xmm0, 0x1b
packuswb xmm0, xmm2
movdqu xmmword [r14 + rcx], xmm1
movdqu xmmword [r14 + rcx + 0x10], xmm0
mov eax, r9d
cmp r9, qword [rsp + 0x60]
jne 0x14000c515
jmp 0x14000c57c
mov ecx, 2
call fcn.140016988
lea rcx, str.ERROR:_Embedded_signature_length_is_too_large._n
mov edx, 0x2f
jmp 0x14000bf22
mov ecx, 2
call fcn.140016988
lea rcx, str.ERROR:_Could_not_seek_past_signature._n
mov edx, 0x26
jmp 0x14000bf22
mov ecx, 2
call fcn.140016988
lea rcx, str.ERROR:_Error_verifying_signature._n
jmp 0x14000bf1d
lea rsi, [rsp + 0x140]
mov r14, qword [sym.imp.ADVAPI32.dll_CryptHashData]
mov edx, 1
mov r8d, 0x1000
mov rcx, rsi
mov r9, rbx
call fcn.140020f94
mov rdi, rax
mov rcx, rbx
call fcn.140020ae8
test eax, eax
jne 0x14000c917
xor ebp, ebp
mov rcx, qword [rsp + rbp*8 + 0x1140]
mov rdx, rsi
mov r8d, edi
xor r9d, r9d
call r14
test eax, eax
je 0x14000c8b3
add rbp, 1
cmp r13, rbp
jne 0x14000c881
mov rcx, rbx
call fcn.140020abc
test eax, eax
je 0x14000c856
jmp 0x14000c4be
mov ecx, 2
call fcn.140016988
lea rcx, str.ERROR:_Error_updating_verify_context_with_data_block._n
mov edx, 0x36
jmp 0x14000bf22
xor esi, esi
mov rcx, qword [rsp + rsi*8 + 0xc0]
call fcn.140021244
add rsi, 1
cmp r13, rsi
jne 0x14000c8d0
xor ebp, ebp
cmp r15d, dword [rsp + 0x68]
je 0x14000bf35
mov ecx, 2
call fcn.140016988
lea rdx, str.ERROR:_Only__d_of__d_signatures_were_verified._n
mov rcx, rax
mov r8d, r15d
mov r9d, r15d
call fcn.140005d20
jmp 0x14000bf30
mov ecx, 2
call fcn.140016988
lea rcx, str.ERROR:_Error_reading_data_block._n
mov edx, 0x21
jmp 0x14000bf22