Function at 0x14000bb80
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.14002a220
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 + 0x78], 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 0x14000be24
mov rbx, rcx
test rcx, rcx
je 0x14000be24
mov rbp, rdx
test rdx, rdx
je 0x14000be24
mov rdi, r8
test r8, r8
je 0x14000be24
cmp qword [rbx], 0
je 0x14000be6f
mov dword [rsp + 0x20], 0xf0000000
lea r8, str.Microsoft_Enhanced_RSA_and_AES_Cryptographic_Provider
lea rcx, [rsp + 0x78]
xor edx, edx
mov r9d, 0x18
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x14000bcb3
mov dword [rsp + 0x20], 0xf0000008
lea r8, str.Microsoft_Enhanced_RSA_and_AES_Cryptographic_Provider
lea rcx, [rsp + 0x78]
xor edx, edx
mov r9d, 0x18
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x14000bcb3
mov dword [rsp + 0x20], 0xf0000000
lea rcx, [rsp + 0x78]
xor edx, edx
xor r8d, r8d
mov r9d, 0x18
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x14000bcb3
mov dword [rsp + 0x20], 0xf0000008
lea rcx, [rsp + 0x78]
xor edx, edx
xor r8d, r8d
mov r9d, 0x18
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
je 0x14000bf6d
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 0x14000be3c
mov rbx, qword [rsp + 0x78]
test rbx, rbx
je 0x14000be3c
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 0x14000be3c
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 0x14000be3c
add r13, 1
add rsi, 8
cmp r12, r13
jne 0x14000bce0
mov rdi, qword [rsp + 0x78]
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 0x14000bef8
mov rcx, rbx
xor edx, edx
mov r8d, 2
call fcn.14001bd20
test eax, eax
je 0x14000bf13
mov ecx, 2
call fcn.140016828
lea rcx, str.ERROR:_Could_not_seek_to_the_end_of_the_MAR_file._n
mov edx, 0x32
jmp 0x14000be52
mov ecx, 2
call fcn.140016828
lea rcx, str.ERROR:_Invalid_parameter_specified._n
mov edx, 0x24
jmp 0x14000be85
mov ecx, 2
call fcn.140016828
lea rcx, str.ERROR:_Could_not_load_public_key._n
mov edx, 0x22
mov r8d, 1
mov r9, rax
call fcn.1400210f8
mov ebp, 0xffffffff
mov esi, dword [rsp + 0x68]
test esi, esi
jne 0x14000be9c
jmp 0x14000beca
mov ecx, 2
call fcn.140016828
lea rcx, str.ERROR:_MAR_file_is_not_open._n
mov edx, 0x1d
mov r8d, 1
mov r9, rax
call fcn.1400210f8
mov ebp, 0xffffffff
test esi, esi
je 0x14000beca
mov esi, esi
xor edi, edi
mov rbx, qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x14000beb9
add rdi, 1
cmp rsi, rdi
je 0x14000beca
mov rcx, qword [rsp + rdi*8 + 0x80]
test rcx, rcx
je 0x14000beb0
call rbx
jmp 0x14000beb0
mov rcx, qword [rsp + 0x1188]
xor rcx, rsp
call fcn.140023e80
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.140016828
lea rcx, str.ERROR:_Invalid_file_pointer_passed._n
mov edx, 0x24
jmp 0x14000be52
mov rcx, rbx
call fcn.14001c850
cmp rax, 0x1f400001
jl 0x14000bf3e
mov ecx, 2
call fcn.140016828
lea rcx, str.ERROR:_MAR_file_is_too_large_to_be_verified._n
mov edx, 0x2d
jmp 0x14000be52
mov edx, 0x10
mov rcx, rbx
xor r8d, r8d
call fcn.14001bd20
test eax, eax
je 0x14000bf91
mov ecx, 2
call fcn.140016828
lea rcx, str.ERROR:_Could_not_seek_to_the_signature_block._n
mov edx, 0x2e
jmp 0x14000be52
mov qword [rsp + 0x78], 0
mov ecx, 2
call fcn.140016828
lea rcx, str.ERROR:_Could_not_init_crytpo_library._n
mov edx, 0x26
jmp 0x14000be85
lea rcx, [rsp + 0x74]
mov edx, 4
mov r8d, 1
mov r9, rbx
call fcn.140020e34
cmp rax, 1
jne 0x14000c18f
mov ecx, dword [rsp + 0x74]
call qword [sym.imp.WSOCK32.dll_ntohl]
mov dword [rsp + 0x74], eax
cmp eax, 8
ja 0x14000c2d3
mov dword [rsp + 0x6c], eax
test eax, eax
je 0x14000c0b7
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.140020e34
cmp rax, 1
jne 0x14000c1e0
mov ecx, dword [rbp]
call r13
mov esi, eax
mov dword [rbp], eax
mov edx, 4
mov r8d, 1
lea rcx, [rsp + 0x70]
mov r9, rbx
call fcn.140020e34
cmp rax, 1
jne 0x14000c1fb
mov ecx, dword [rsp + 0x70]
mov r12, r13
call r13
mov dword [rsp + 0x70], eax
cmp eax, 0x801
jae 0x14000c216
mov ebp, eax
mov rcx, rbp
call fcn.1400215bc
mov qword [rsp + r14*2 + 0xc0], rax
test rax, rax
je 0x14000c231
mov r8d, 1
mov rcx, rax
mov rdx, rbp
mov r9, rbx
call fcn.140020e34
cmp rax, 1
jne 0x14000c247
cmp esi, 2
jne 0x14000c28d
add r14, 4
cmp qword [rsp + 0x60], r14
mov r13, r12
jne 0x14000bff2
mov rcx, rbx
call fcn.14001c850
mov ebp, 0xffffffff
cmp rax, 0xffffffffffffffff
je 0x14000be65
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 0x14000c1c5
test rdi, rdi
lea rsi, [rsp + 0x1140]
je 0x14000c1aa
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 0x14000c1aa
add rsi, 8
add rbp, 0xffffffffffffffff
jne 0x14000c134
mov rcx, rbx
xor edx, edx
xor r8d, r8d
call fcn.14001bd20
test eax, eax
je 0x14000c2f7
mov ecx, 2
call fcn.140016828
lea rcx, str.ERROR:_Could_not_seek_to_start_of_the_file_n
mov edx, 0x2b
jmp 0x14000be52
mov ecx, 2
call fcn.140016828
lea rcx, str.ERROR:_Could_not_read_number_of_signatures._n
mov edx, 0x2c
jmp 0x14000be52
mov ecx, 2
call fcn.140016828
lea rcx, str.ERROR:_Could_not_initialize_signature_handle._n
mov edx, 0x2e
jmp 0x14000be52
mov ecx, 2
call fcn.140016828
lea rcx, str.ERROR:_There_must_be_at_least_one_signature._n
mov edx, 0x2d
jmp 0x14000be52
mov ecx, 2
call fcn.140016828
lea rcx, str.ERROR:_Could_not_read_signatures_algorithm_ID._n
mov edx, 0x2f
jmp 0x14000be52
mov ecx, 2
call fcn.140016828
lea rcx, str.ERROR:_Could_not_read_signatures_length._n
mov edx, 0x29
jmp 0x14000be52
mov ecx, 2
call fcn.140016828
lea rcx, str.ERROR:_Signature_length_is_too_large_to_verify._n
mov edx, 0x30
jmp 0x14000be52
mov ecx, 2
call fcn.140016828
lea rcx, str.ERROR:_Could_allocate_buffer_for_signature._n
jmp 0x14000c1a0
mov ecx, 2
call fcn.140016828
lea rcx, str.ERROR:_Could_not_read_extracted_signature._n
mov edx, 0x2b
mov r8d, 1
mov r9, rax
call fcn.1400210f8
xor esi, esi
mov ebp, 0xffffffff
mov rcx, qword [rsp + rsi*8 + 0xc0]
call fcn.1400210e4
add rsi, 1
cmp r15, rsi
jne 0x14000c272
jmp 0x14000be65
mov ecx, 2
call fcn.140016828
lea rcx, str.ERROR:_Unknown_signature_algorithm_ID._n
mov edx, 0x27
mov r8d, 1
mov r9, rax
call fcn.1400210f8
xor esi, esi
mov ebp, 0xffffffff
mov rcx, qword [rsp + rsi*8 + 0xc0]
call fcn.1400210e4
add rsi, 1
cmp r15, rsi
jne 0x14000c2b8
jmp 0x14000be65
mov ecx, 2
call fcn.140016828
lea rdx, str.ERROR:_At_most__d_signatures_can_be_specified._n
mov rcx, rax
mov r8d, 8
call fcn.140005c50
jmp 0x14000be60
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.14000ba70
test eax, eax
jne 0x14000be60
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.14000ba70
test eax, eax
jne 0x14000be60
mov qword [rsp + 0x28], r12
mov dword [rsp + 0x20], r15d
mov rcx, rbx
mov rdx, rsi
mov r8d, 4
mov r9, rbp
call fcn.14000ba70
test eax, eax
jne 0x14000be60
mov ecx, dword [rsi]
call qword [sym.imp.WSOCK32.dll_ntohl]
mov dword [rsi], eax
cmp eax, 0x801
jae 0x14000c72b
mov edx, eax
mov rcx, rbx
mov r8d, 1
call fcn.14001bd20
test eax, eax
jne 0x14000c746
add rsi, 4
add r14, 0xffffffffffffffff
jne 0x14000c350
mov rcx, rbx
call fcn.14002095c
test eax, eax
je 0x14000c777
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 0x14000c761
mov rbp, qword [rsp + r12*8 + 0xc0]
test rbp, rbp
je 0x14000c761
mov rcx, qword [rsp + 0x60]
call fcn.1400215bc
test rax, rax
je 0x14000c761
mov r14, rax
cmp dword [rsp + 0x60], 0x20
jae 0x14000c4ff
xor r9d, r9d
xor eax, eax
mov rcx, r9
not rcx
test byte [rsp + 0x60], 1
je 0x14000c469
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 0x14000c4ac
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 0x14000c48a
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.1400210e4
test esi, esi
je 0x14000c761
add r12d, 1
cmp r12d, r15d
jne 0x14000c3f5
jmp 0x14000c7fe
mov rax, qword [rsp + 0x60]
mov rcx, rax
add rax, 0xffffffffffffffff
add ecx, 0xffffffff
xor r9d, r9d
cmp ecx, eax
jb 0x14000c443
shr rax, 0x20
mov eax, 0
jne 0x14000c445
mov rax, qword [rsp + 0x60]
add eax, 0xffffffff
lea rcx, [rax + rbp]
add rcx, 1
cmp r14, rcx
jae 0x14000c559
mov rdx, qword [rsp + 0x60]
lea rcx, [r14 + rdx]
sub rax, rdx
add rax, rbp
add rax, 1
cmp rax, rcx
jb 0x14000c440
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 0x14000c694
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 0x14000c591
jmp 0x14000c696
xor ecx, ecx
test r8, r8
je 0x14000c718
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 0x14000c445
jmp 0x14000c4ac
mov ecx, 2
call fcn.140016828
lea rcx, str.ERROR:_Embedded_signature_length_is_too_large._n
mov edx, 0x2f
jmp 0x14000be52
mov ecx, 2
call fcn.140016828
lea rcx, str.ERROR:_Could_not_seek_past_signature._n
mov edx, 0x26
jmp 0x14000be52
mov ecx, 2
call fcn.140016828
lea rcx, str.ERROR:_Error_verifying_signature._n
jmp 0x14000be4d
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.140020e34
mov rdi, rax
mov rcx, rbx
call fcn.140020988
test eax, eax
jne 0x14000c847
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 0x14000c7e3
add rbp, 1
cmp r13, rbp
jne 0x14000c7b1
mov rcx, rbx
call fcn.14002095c
test eax, eax
je 0x14000c786
jmp 0x14000c3ee
mov ecx, 2
call fcn.140016828
lea rcx, str.ERROR:_Error_updating_verify_context_with_data_block._n
mov edx, 0x36
jmp 0x14000be52
xor esi, esi
mov rcx, qword [rsp + rsi*8 + 0xc0]
call fcn.1400210e4
add rsi, 1
cmp r13, rsi
jne 0x14000c800
xor ebp, ebp
cmp r15d, dword [rsp + 0x68]
je 0x14000be65
mov ecx, 2
call fcn.140016828
lea rdx, str.ERROR:_Only__d_of__d_signatures_were_verified._n
mov rcx, rax
mov r8d, r15d
mov r9d, r15d
call fcn.140005c50
jmp 0x14000be60
mov ecx, 2
call fcn.140016828
lea rcx, str.ERROR:_Error_reading_data_block._n
mov edx, 0x21
jmp 0x14000be52