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

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
mov eax, 0x1168
call fcn.14002a6a0
sub rsp, rax
mov rax, qword [0x14004c030]
xor rax, rsp
mov qword [rsp + 0x1160], 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
test rcx, rcx
je 0x140010efb
mov rbx, rdx
test rdx, rdx
je 0x140010efb
mov rdi, r8
test r8, r8
je 0x140010efb
mov rsi, rcx
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 0x140010dff
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 0x140010dff
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 0x140010dff
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 0x14001139e
mov rax, qword [rbx]
test rax, rax
je 0x140010f13
mov rbx, qword [rsp + 0x70]
test rbx, rbx
je 0x140010f13
mov ecx, dword [rdi]
lea rdx, [rsp + 0x120]
mov dword [rdx], ecx
mov qword [rdx + 8], rax
lea r13, [rsp + 0x1120]
mov qword [rsp + 0x50], r13
xorps xmm0, xmm0
movups xmmword [rsp + 0x38], xmm0
movups xmmword [rsp + 0x28], xmm0
mov qword [rsp + 0x48], 0
mov dword [rsp + 0x20], 0
mov ecx, 2
mov r8d, 2
mov r9d, 2
call qword [sym.imp.CRYPT32.dll_CryptQueryObject]
test eax, eax
je 0x140010f13
mov rax, qword [rsp + 0x1120]
mov r8, qword [rax + 0x18]
add r8, 0x60
lea r9, [rsp + 0x80]
mov rcx, rbx
mov edx, 0x10001
call qword [sym.imp.CRYPT32.dll_CryptImportPublicKeyInfo]
mov edi, eax
mov rcx, qword [rsp + 0x1120]
call qword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
test edi, edi
je 0x140010f13
mov rdi, qword [rsp + 0x70]
xorps xmm0, xmm0
movaps xmmword [rsp + 0xf0], xmm0
movaps xmmword [rsp + 0xe0], xmm0
movaps xmmword [rsp + 0xd0], xmm0
movaps xmmword [rsp + 0xc0], xmm0
mov rax, qword [rsi + 8]
cmp rax, 0xf
ja 0x140010f75
mov ecx, 2
call fcn.140017878
lea rcx, str.ERROR:_Could_not_seek_to_the_signature_block._n
mov edx, 0x2e
jmp 0x140010f29
mov ecx, 2
call fcn.140017878
lea rcx, str.ERROR:_Invalid_parameter_specified._n
mov edx, 0x24
jmp 0x140010f29
mov ecx, 2
call fcn.140017878
lea rcx, str.ERROR:_Could_not_load_public_key._n
mov edx, 0x22
mov r8d, 1
mov r9, rax
call fcn.140022c28
mov ebx, 0xffffffff
mov rcx, qword [rsp + 0x80]
test rcx, rcx
je 0x140010f4f
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov rcx, qword [rsp + 0x1160]
xor rcx, rsp
call fcn.140027f60
mov eax, ebx
add rsp, 0x1168
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
add rax, 0xfffffffffffffffc
cmp rax, 0xf
ja 0x140010f97
mov ecx, 2
call fcn.140017878
lea rcx, str.ERROR:_Could_not_read_number_of_signatures._n
mov edx, 0x2c
jmp 0x140010f29
mov rax, qword [rsi]
mov ecx, dword [rax + 0x10]
call qword [sym.imp.WS2_32.dll_ntohl]
cmp eax, 8
ja 0x140011515
test eax, eax
je 0x1400113c2
mov qword [rsp + 0x68], rdi
mov dword [rsp + 0x64], eax
mov r14d, eax
mov r12, qword [rsi + 8]
mov edi, 0x14
xor r15d, r15d
sub r12, 4
jb 0x140011419
cmp rdi, r12
ja 0x140011419
mov rax, qword [rsi]
mov ecx, dword [rax + rdi]
mov rbx, qword [sym.imp.WS2_32.dll_ntohl]
call rbx
mov ebp, eax
mov rax, qword [rsi + 8]
sub rax, 4
jb 0x140011434
lea rcx, [rdi + 4]
cmp rcx, rax
ja 0x140011434
mov rax, qword [rsi]
mov ecx, dword [rax + rdi + 4]
call rbx
cmp eax, 0x801
jae 0x14001144f
mov rbx, r14
mov r14d, eax
mov rcx, r14
call fcn.140023188
mov qword [rsp + r15*8 + 0xc0], rax
test rax, rax
je 0x140011462
mov r12, qword [rsi + 8]
mov rcx, r12
sub rcx, r14
jb 0x14001147d
add rdi, 8
cmp rdi, rcx
ja 0x14001147d
mov rdx, qword [rsi]
add rdx, rdi
mov rcx, rax
mov r8, r14
call fcn.140027fb0
cmp ebp, 2
jne 0x1400114cd
add rdi, r14
inc r15
mov r14, rbx
cmp rbx, r15
jne 0x140010fcc
mov qword [rsp + 0x78], 0
xorps xmm0, xmm0
movaps xmmword [rsp + 0x1120], xmm0
movaps xmmword [rsp + 0x1130], xmm0
movaps xmmword [rsp + 0x1140], xmm0
movaps xmmword [rsp + 0x1150], xmm0
movaps xmmword [rsp + 0x100], xmm0
movaps xmmword [rsp + 0x110], xmm0
mov ebp, dword [rsp + 0x64]
test ebp, ebp
je 0x1400113fe
mov r12, qword [rsp + 0x68]
test r12, r12
je 0x140011539
lea rdi, [rbx*8]
xor r14d, r14d
mov r15, qword [sym.imp.ADVAPI32.dll_CryptCreateHash]
lea rax, [rsp + r14]
add rax, 0x1120
mov qword [rax], 0
mov qword [rsp + 0x20], rax
mov rcx, r12
mov edx, 0x800d
xor r8d, r8d
xor r9d, r9d
call r15
test eax, eax
je 0x140011539
add r14, 8
cmp rdi, r14
jne 0x1400110ef
lea rax, str.signature_block
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], ebp
mov qword [rsp + 0x20], r13
lea rdx, [rsp + 0x78]
lea r8, [rsp + 0x120]
mov rcx, rsi
mov r9d, 0x14
call fcn.140010bb0
test eax, eax
jne 0x140010f37
lea rdi, [rbx*4]
xor r15d, r15d
lea r12, [rsp + 0x78]
lea rax, str.signature_algorithm_ID
mov qword [rsp + 0x30], rax
mov ebp, dword [rsp + 0x64]
mov dword [rsp + 0x28], ebp
mov qword [rsp + 0x20], r13
mov rcx, rsi
mov rdx, r12
lea r8, [rsp + 0x120]
mov r9d, 4
call fcn.140010bb0
test eax, eax
jne 0x140010f37
lea r14, [rsp + r15]
add r14, 0x100
lea rax, str.signature_length
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], ebp
mov qword [rsp + 0x20], r13
mov rcx, rsi
mov rdx, r12
mov r8, r14
mov r9d, 4
call fcn.140010bb0
test eax, eax
jne 0x140010f37
mov ecx, dword [r14]
call qword [sym.imp.WS2_32.dll_ntohl]
mov dword [r14], eax
cmp eax, 0x801
jae 0x140011565
mov eax, eax
mov r14, qword [rsi + 8]
mov rcx, r14
sub rcx, rax
jb 0x14001154f
mov rbp, qword [rsp + 0x78]
cmp rbp, rcx
ja 0x14001154f
add rbp, rax
mov qword [rsp + 0x78], rbp
add r15, 4
cmp rdi, r15
jne 0x14001116f
cmp rbp, r14
jae 0x1400112ad
mov edi, 0x1000
lea r12, [rsp + 0x120]
mov r15, qword [sym.imp.ADVAPI32.dll_CryptHashData]
mov r13d, 0
sub r14, rbp
jbe 0x140011278
cmp r14, rdi
cmovae r14, rdi
mov rdx, qword [rsi]
add rdx, rbp
mov rcx, r12
mov r8, r14
call fcn.140027fb0
add rbp, r14
mov qword [rsp + 0x78], rbp
mov r13d, r14d
xor r14d, r14d
mov rcx, qword [rsp + r14*8 + 0x1120]
mov rdx, r12
mov r8d, r13d
xor r9d, r9d
call r15
test eax, eax
je 0x14001157b
inc r14
cmp rbx, r14
jne 0x14001127b
mov rbp, qword [rsp + 0x78]
mov r14, qword [rsi + 8]
cmp rbp, r14
jb 0x14001124a
mov eax, dword [rsp + 0x64]
cmp eax, 1
mov esi, eax
adc esi, 0
xor edi, edi
mov r15, qword [sym.imp.ADVAPI32.dll_CryptVerifySignatureA]
mov r13d, dword [rsp + rdi*4 + 0x100]
test r13, r13
je 0x140011596
mov r12, qword [rsp + rdi*8 + 0xc0]
test r12, r12
je 0x140011596
mov rcx, r13
call fcn.140023188
test rax, rax
je 0x140011596
mov r14, rax
mov rax, r13
neg rax
lea ecx, [r13 - 1]
xor edx, edx
mov r8d, ecx
mov r8b, byte [r12 + r8]
mov byte [r14 + rdx], r8b
inc rdx
dec ecx
mov r8, rax
add r8, rdx
jne 0x140011304
mov r9, qword [rsp + rdi*8 + 0x80]
mov rcx, qword [rsp + rdi*8 + 0x1120]
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov rdx, r14
mov r8d, r13d
call r15
mov ebp, eax
mov rcx, r14
call fcn.140022c14
test ebp, ebp
je 0x140011596
inc rdi
cmp rdi, rsi
jne 0x1400112c2
cmp dword [rsp + 0x64], 0
je 0x1400115ac
xor edi, edi
mov rcx, qword [rsp + rdi*8 + 0xc0]
call fcn.140022c14
inc rdi
cmp rbx, rdi
jne 0x140011371
xor ebx, ebx
cmp dword [rsp + 0x64], 1
ja 0x1400115b4
je 0x140010f3c
jmp 0x1400115b4
mov qword [rsp + 0x70], 0
mov ecx, 2
call fcn.140017878
lea rcx, str.ERROR:_Could_not_init_crytpo_library._n
mov edx, 0x26
jmp 0x140010f29
mov qword [rsp + 0x78], 0
xorps xmm0, xmm0
movaps xmmword [rsp + 0x1120], xmm0
movaps xmmword [rsp + 0x1130], xmm0
movaps xmmword [rsp + 0x1140], xmm0
movaps xmmword [rsp + 0x1150], xmm0
movaps xmmword [rsp + 0x100], xmm0
movaps xmmword [rsp + 0x110], xmm0
mov ecx, 2
call fcn.140017878
lea rcx, str.ERROR:_There_must_be_at_least_one_signature._n
mov edx, 0x2d
jmp 0x140010f29
mov ecx, 2
call fcn.140017878
lea rcx, str.ERROR:_Could_not_read_signatures_algorithm_ID._n
mov edx, 0x2f
jmp 0x140010f29
mov ecx, 2
call fcn.140017878
lea rcx, str.ERROR:_Could_not_read_signatures_length._n
mov edx, 0x29
jmp 0x140010f29
mov ecx, 2
call fcn.140017878
lea rcx, str.ERROR:_Signature_length_is_too_large_to_verify._n
jmp 0x140011473
mov ecx, 2
call fcn.140017878
lea rcx, str.ERROR:_Could_not_allocate_buffer_for_signature._n
mov edx, 0x30
jmp 0x140010f29
mov ecx, 2
call fcn.140017878
lea rcx, str.ERROR:_Could_not_read_extracted_signature._n
mov edx, 0x2b
mov r8d, 1
mov r9, rax
call fcn.140022c28
mov rdi, rbx
cmp rbx, 1
adc rdi, 0
xor esi, esi
mov ebx, 0xffffffff
mov rcx, qword [rsp + rsi*8 + 0xc0]
call fcn.140022c14
inc rsi
cmp rdi, rsi
jne 0x1400114b3
jmp 0x140010f3c
mov ecx, 2
call fcn.140017878
lea rcx, str.ERROR:_Unknown_signature_algorithm_ID._n
mov edx, 0x27
mov r8d, 1
mov r9, rax
call fcn.140022c28
xor esi, esi
mov rdi, rbx
mov ebx, 0xffffffff
mov rcx, qword [rsp + rsi*8 + 0xc0]
call fcn.140022c14
inc rsi
cmp rdi, rsi
jne 0x1400114fb
jmp 0x140010f3c
mov ecx, 2
call fcn.140017878
lea rdx, str.ERROR:_At_most__d_signatures_can_be_specified._n
mov rcx, rax
mov r8d, 8
call fcn.1400371a0
jmp 0x140010f37
mov ecx, 2
call fcn.140017878
lea rcx, str.ERROR:_Could_not_initialize_signature_handle._n
jmp 0x140010ef4
mov ecx, 2
call fcn.140017878
lea rcx, str.ERROR:_Could_not_seek_past_signature._n
jmp 0x1400113b8
mov ecx, 2
call fcn.140017878
lea rcx, str.ERROR:_Embedded_signature_length_is_too_large._n
jmp 0x14001142a
mov ecx, 2
call fcn.140017878
lea rcx, str.ERROR:_Error_updating_verify_context_with_data_block._n
mov edx, 0x36
jmp 0x140010f29
mov ecx, 2
call fcn.140017878
lea rcx, str.ERROR:_Error_verifying_signature._n
jmp 0x140010f24
mov dword [rsp + 0x64], 0
mov ecx, 2
call fcn.140017878
lea rdx, str.ERROR:_Only__d_of__d_signatures_were_verified._n
mov rcx, rax
mov r8d, esi
mov r9d, dword [rsp + 0x64]
call fcn.1400371a0
jmp 0x140010f37