Function at 0x140010e00
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.14002a720
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 0x14001100b
mov rbx, rdx
test rdx, rdx
je 0x14001100b
mov rdi, r8
test r8, r8
je 0x14001100b
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 0x140010f0f
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 0x140010f0f
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 0x140010f0f
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 0x1400114ae
mov rax, qword [rbx]
test rax, rax
je 0x140011023
mov rbx, qword [rsp + 0x70]
test rbx, rbx
je 0x140011023
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 0x140011023
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 0x140011023
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 0x140011085
mov ecx, 2
call fcn.1400176b8
lea rcx, str.ERROR:_Could_not_seek_to_the_signature_block._n
mov edx, 0x2e
jmp 0x140011039
mov ecx, 2
call fcn.1400176b8
lea rcx, str.ERROR:_Invalid_parameter_specified._n
mov edx, 0x24
jmp 0x140011039
mov ecx, 2
call fcn.1400176b8
lea rcx, str.ERROR:_Could_not_load_public_key._n
mov edx, 0x22
mov r8d, 1
mov r9, rax
call fcn.140022ae0
mov ebx, 0xffffffff
mov rcx, qword [rsp + 0x80]
test rcx, rcx
je 0x14001105f
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov rcx, qword [rsp + 0x1160]
xor rcx, rsp
call fcn.140027fe0
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 0x1400110a7
mov ecx, 2
call fcn.1400176b8
lea rcx, str.ERROR:_Could_not_read_number_of_signatures._n
mov edx, 0x2c
jmp 0x140011039
mov rax, qword [rsi]
mov ecx, dword [rax + 0x10]
call qword [sym.imp.WS2_32.dll_ntohl]
cmp eax, 8
ja 0x140011625
test eax, eax
je 0x1400114d2
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 0x140011529
cmp rdi, r12
ja 0x140011529
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 0x140011544
lea rcx, [rdi + 4]
cmp rcx, rax
ja 0x140011544
mov rax, qword [rsi]
mov ecx, dword [rax + rdi + 4]
call rbx
cmp eax, 0x801
jae 0x14001155f
mov rbx, r14
mov r14d, eax
mov rcx, r14
call fcn.140023040
mov qword [rsp + r15*8 + 0xc0], rax
test rax, rax
je 0x140011572
mov r12, qword [rsi + 8]
mov rcx, r12
sub rcx, r14
jb 0x14001158d
add rdi, 8
cmp rdi, rcx
ja 0x14001158d
mov rdx, qword [rsi]
add rdx, rdi
mov rcx, rax
mov r8, r14
call fcn.140028030
cmp ebp, 2
jne 0x1400115dd
add rdi, r14
inc r15
mov r14, rbx
cmp rbx, r15
jne 0x1400110dc
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 0x14001150e
mov r12, qword [rsp + 0x68]
test r12, r12
je 0x140011649
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 0x140011649
add r14, 8
cmp rdi, r14
jne 0x1400111ff
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.140010cc0
test eax, eax
jne 0x140011047
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.140010cc0
test eax, eax
jne 0x140011047
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.140010cc0
test eax, eax
jne 0x140011047
mov ecx, dword [r14]
call qword [sym.imp.WS2_32.dll_ntohl]
mov dword [r14], eax
cmp eax, 0x801
jae 0x140011675
mov eax, eax
mov r14, qword [rsi + 8]
mov rcx, r14
sub rcx, rax
jb 0x14001165f
mov rbp, qword [rsp + 0x78]
cmp rbp, rcx
ja 0x14001165f
add rbp, rax
mov qword [rsp + 0x78], rbp
add r15, 4
cmp rdi, r15
jne 0x14001127f
cmp rbp, r14
jae 0x1400113bd
mov edi, 0x1000
lea r12, [rsp + 0x120]
mov r15, qword [sym.imp.ADVAPI32.dll_CryptHashData]
mov r13d, 0
sub r14, rbp
jbe 0x140011388
cmp r14, rdi
cmovae r14, rdi
mov rdx, qword [rsi]
add rdx, rbp
mov rcx, r12
mov r8, r14
call fcn.140028030
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 0x14001168b
inc r14
cmp rbx, r14
jne 0x14001138b
mov rbp, qword [rsp + 0x78]
mov r14, qword [rsi + 8]
cmp rbp, r14
jb 0x14001135a
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 0x1400116a6
mov r12, qword [rsp + rdi*8 + 0xc0]
test r12, r12
je 0x1400116a6
mov rcx, r13
call fcn.140023040
test rax, rax
je 0x1400116a6
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 0x140011414
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.140022acc
test ebp, ebp
je 0x1400116a6
inc rdi
cmp rdi, rsi
jne 0x1400113d2
cmp dword [rsp + 0x64], 0
je 0x1400116bc
xor edi, edi
mov rcx, qword [rsp + rdi*8 + 0xc0]
call fcn.140022acc
inc rdi
cmp rbx, rdi
jne 0x140011481
xor ebx, ebx
cmp dword [rsp + 0x64], 1
ja 0x1400116c4
je 0x14001104c
jmp 0x1400116c4
mov qword [rsp + 0x70], 0
mov ecx, 2
call fcn.1400176b8
lea rcx, str.ERROR:_Could_not_init_crytpo_library._n
mov edx, 0x26
jmp 0x140011039
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.1400176b8
lea rcx, str.ERROR:_There_must_be_at_least_one_signature._n
mov edx, 0x2d
jmp 0x140011039
mov ecx, 2
call fcn.1400176b8
lea rcx, str.ERROR:_Could_not_read_signatures_algorithm_ID._n
mov edx, 0x2f
jmp 0x140011039
mov ecx, 2
call fcn.1400176b8
lea rcx, str.ERROR:_Could_not_read_signatures_length._n
mov edx, 0x29
jmp 0x140011039
mov ecx, 2
call fcn.1400176b8
lea rcx, str.ERROR:_Signature_length_is_too_large_to_verify._n
jmp 0x140011583
mov ecx, 2
call fcn.1400176b8
lea rcx, str.ERROR:_Could_not_allocate_buffer_for_signature._n
mov edx, 0x30
jmp 0x140011039
mov ecx, 2
call fcn.1400176b8
lea rcx, str.ERROR:_Could_not_read_extracted_signature._n
mov edx, 0x2b
mov r8d, 1
mov r9, rax
call fcn.140022ae0
mov rdi, rbx
cmp rbx, 1
adc rdi, 0
xor esi, esi
mov ebx, 0xffffffff
mov rcx, qword [rsp + rsi*8 + 0xc0]
call fcn.140022acc
inc rsi
cmp rdi, rsi
jne 0x1400115c3
jmp 0x14001104c
mov ecx, 2
call fcn.1400176b8
lea rcx, str.ERROR:_Unknown_signature_algorithm_ID._n
mov edx, 0x27
mov r8d, 1
mov r9, rax
call fcn.140022ae0
xor esi, esi
mov rdi, rbx
mov ebx, 0xffffffff
mov rcx, qword [rsp + rsi*8 + 0xc0]
call fcn.140022acc
inc rsi
cmp rdi, rsi
jne 0x14001160b
jmp 0x14001104c
mov ecx, 2
call fcn.1400176b8
lea rdx, str.ERROR:_At_most__d_signatures_can_be_specified._n
mov rcx, rax
mov r8d, 8
call fcn.140037220
jmp 0x140011047
mov ecx, 2
call fcn.1400176b8
lea rcx, str.ERROR:_Could_not_initialize_signature_handle._n
jmp 0x140011004
mov ecx, 2
call fcn.1400176b8
lea rcx, str.ERROR:_Could_not_seek_past_signature._n
jmp 0x1400114c8
mov ecx, 2
call fcn.1400176b8
lea rcx, str.ERROR:_Embedded_signature_length_is_too_large._n
jmp 0x14001153a
mov ecx, 2
call fcn.1400176b8
lea rcx, str.ERROR:_Error_updating_verify_context_with_data_block._n
mov edx, 0x36
jmp 0x140011039
mov ecx, 2
call fcn.1400176b8
lea rcx, str.ERROR:_Error_verifying_signature._n
jmp 0x140011034
mov dword [rsp + 0x64], 0
mov ecx, 2
call fcn.1400176b8
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.140037220
jmp 0x140011047