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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
mov eax, 0x10c0
call fcn.004267a0
mov eax, dword [0x440014]
xor eax, ebp
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x10c4], 0
xorps xmm0, xmm0
movups xmmword [ebp - 0x10a0], xmm0
movups xmmword [ebp - 0x10b0], xmm0
cmp dword [ebp + 0x14], 0
je 0x40b1e9
cmp dword [ebp + 8], 0
je 0x40b1e9
cmp dword [ebp + 0xc], 0
je 0x40b1e9
cmp dword [ebp + 0x10], 0
je 0x40b1e9
lea esi, [ebp - 0x10c4]
push 0xf0000000
push 0x18
push str.Microsoft_Enhanced_RSA_and_AES_Cryptographic_Provider
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x40b0e1
push 0xf0000008
push 0x18
push str.Microsoft_Enhanced_RSA_and_AES_Cryptographic_Provider
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x40b0e1
sub esp, 0x14
movaps xmm0, xmmword [0x437aa0]
movups xmmword [esp + 4], xmm0
mov dword [esp], esi
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x40b0e1
sub esp, 0x14
movaps xmm0, xmmword [0x437ab0]
movups xmmword [esp + 4], xmm0
mov dword [esp], esi
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
je 0x40b5fe
xor esi, esi
lea ebx, [ebp - 0x10b0]
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + esi*4]
test eax, eax
je 0x40b1ff
mov edi, dword [ebp - 0x10c4]
test edi, edi
je 0x40b1ff
mov ecx, dword [ebp + 0x10]
mov ecx, dword [ecx + esi*4]
mov dword [ebp - 0x1030], ecx
mov dword [ebp - 0x102c], eax
sub esp, 0x2c
lea eax, [ebp - 0x30]
mov dword [esp + 0x28], eax
xorps xmm0, xmm0
movups xmmword [esp + 0x18], xmm0
movaps xmm0, xmmword [0x437ac0]
movups xmmword [esp + 8], xmm0
lea eax, [ebp - 0x1030]
mov dword [esp + 4], eax
mov dword [esp], 2
call dword [sym.imp.CRYPT32.dll_CryptQueryObject]
test eax, eax
je 0x40b1ff
mov eax, dword [ebp - 0x30]
mov eax, dword [eax + 0xc]
add eax, 0x38
push ebx
push eax
push 0x10001
push edi
call dword [sym.imp.CRYPT32.dll_CryptImportPublicKeyInfo]
mov edi, eax
push dword [ebp - 0x30]
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
test edi, edi
je 0x40b1ff
inc esi
add ebx, 4
cmp dword [ebp + 0x14], esi
jne 0x40b0e9
mov edi, dword [ebp - 0x10c4]
lea ebx, [ebp - 0x10c0]
mov dword [ebx], 0
xorps xmm0, xmm0
movups xmmword [ebp - 0x1070], xmm0
movups xmmword [ebp - 0x1060], xmm0
movups xmmword [ebp - 0x1090], xmm0
movups xmmword [ebp - 0x1080], xmm0
push 0x10
push ebx
mov esi, dword [ebp + 8]
push esi
call fcn.0040bdb0
add esp, 0xc
test eax, eax
je 0x40b257
push 2
call fcn.0041552f
add esp, 4
push eax
push 1
push 0x2e
push str.ERROR:_Could_not_seek_to_the_signature_block._n
jmp 0x40b213
push 2
call fcn.0041552f
add esp, 4
push eax
push 1
push 0x24
push str.ERROR:_Invalid_parameter_specified._n
jmp 0x40b213
push 2
call fcn.0041552f
add esp, 4
push eax
push 1
push 0x22
push str.ERROR:_Could_not_load_public_key._n
call fcn.0041fc54
add esp, 0x10
xor esi, esi
dec esi
cmp dword [ebp + 0x14], 0
je 0x40b240
xor edi, edi
mov ebx, dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov eax, dword [ebp + edi*4 - 0x10b0]
test eax, eax
je 0x40b23a
push eax
call ebx
inc edi
cmp dword [ebp + 0x14], edi
jne 0x40b22c
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00412e03
mov eax, esi
add esp, 0x10c0
pop esi
pop edi
pop ebx
pop ebp
ret
lea eax, [ebp - 0x10b8]
push 4
push ebx
push eax
push esi
call fcn.0040bd30
add esp, 0x10
test eax, eax
je 0x40b284
push 2
call fcn.0041552f
add esp, 4
push eax
push 1
push 0x2c
push str.ERROR:_Could_not_read_number_of_signatures._n
jmp 0x40b213
push dword [ebp - 0x10b8]
call dword [sym.imp.WS2_32.dll_ntohl]
mov dword [ebp - 0x10b8], eax
cmp eax, 8
ja 0x40b73f
test eax, eax
je 0x40b62c
mov dword [ebp - 0x10c8], edi
xor esi, esi
xor ebx, ebx
lea eax, [esi + ebp]
add eax, 0xffffef90
push 4
lea ecx, [ebp - 0x10c0]
push ecx
push eax
mov edi, dword [ebp + 8]
push edi
call fcn.0040bd30
add esp, 0x10
test eax, eax
jne 0x40b645
mov dword [ebp - 0x10cc], esi
push dword [ebp + ebx*4 - 0x1070]
mov esi, dword [sym.imp.WS2_32.dll_ntohl]
call esi
mov dword [ebp + ebx*4 - 0x1070], eax
push 4
lea eax, [ebp - 0x10c0]
push eax
lea eax, [ebp - 0x10bc]
push eax
push edi
call fcn.0040bd30
add esp, 0x10
test eax, eax
jne 0x40b65e
push dword [ebp - 0x10bc]
call esi
mov dword [ebp - 0x10bc], eax
cmp eax, 0x801
jae 0x40b677
mov edi, eax
push eax
call fcn.00420172
add esp, 4
mov dword [ebp + ebx*4 - 0x1090], eax
test eax, eax
je 0x40b690
push edi
lea ecx, [ebp - 0x10c0]
push ecx
push eax
push dword [ebp + 8]
call fcn.0040bd30
add esp, 0x10
test eax, eax
jne 0x40b6a9
cmp dword [ebp + ebx*4 - 0x1070], 2
jne 0x40b6f4
inc ebx
mov edi, dword [ebp - 0x10b8]
mov esi, dword [ebp - 0x10cc]
add esi, 4
cmp ebx, edi
jb 0x40b2b1
mov dword [ebp - 0x10b4], 0
xorps xmm0, xmm0
movups xmmword [ebp - 0x30], xmm0
movups xmmword [ebp - 0x20], xmm0
movups xmmword [ebp - 0x1050], xmm0
movups xmmword [ebp - 0x1040], xmm0
test edi, edi
je 0x40b62c
cmp dword [ebp - 0x10c8], 0
lea eax, [ebp - 0x30]
je 0x40b75e
mov ebx, edi
mov esi, eax
xor ecx, ecx
mov dword [esi], ecx
push esi
push ecx
push ecx
push 0x800d
push dword [ebp - 0x10c8]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x40b75e
add esi, 4
dec ebx
jne 0x40b3c8
lea eax, [ebp - 0x30]
lea ebx, [ebp - 0x10b4]
mov ecx, dword [ebp + 8]
mov edx, ebx
push str.signature_block
push edi
push eax
push 0x14
lea eax, [ebp - 0x1030]
push eax
call fcn.0040af60
add esp, 0x14
test eax, eax
jne 0x40b21b
xor eax, eax
inc eax
cmp edi, 2
cmovae eax, edi
lea esi, [ebp - 0x1050]
mov dword [ebp - 0x10c8], eax
mov dword [ebp - 0x10cc], eax
mov eax, ebx
mov ecx, dword [ebp + 8]
mov ebx, eax
mov edx, eax
push str.signature_algorithm_ID
push edi
lea eax, [ebp - 0x30]
push eax
push 4
lea eax, [ebp - 0x1030]
push eax
call fcn.0040af60
add esp, 0x14
test eax, eax
jne 0x40b21b
mov ecx, dword [ebp + 8]
mov edx, ebx
push str.signature_length
push edi
lea eax, [ebp - 0x30]
push eax
push 4
push esi
call fcn.0040af60
add esp, 0x14
test eax, eax
jne 0x40b21b
push dword [esi]
call dword [sym.imp.WS2_32.dll_ntohl]
mov dword [esi], eax
cmp eax, 0x801
jae 0x40b777
push eax
push ebx
push dword [ebp + 8]
call fcn.0040bdb0
add esp, 0xc
test eax, eax
jne 0x40b790
add esi, 4
dec dword [ebp - 0x10cc]
mov eax, ebx
jne 0x40b439
mov eax, dword [ebp - 0x10b4]
mov ecx, dword [ebp + 8]
cmp eax, dword [ecx + 4]
jae 0x40b528
mov esi, dword [ebp - 0x10c8]
xor edi, edi
push 0x1000
push ebx
lea eax, [ebp - 0x1030]
push eax
push dword [ebp + 8]
call fcn.0040bd70
add esp, 0x10
mov dword [ebp - 0x10cc], eax
push 0
push dword [ebp - 0x10cc]
lea eax, [ebp - 0x1030]
push eax
push dword [ebp + edi*4 - 0x30]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x40b7a9
inc edi
cmp esi, edi
jne 0x40b4f4
mov eax, dword [ebp - 0x10b4]
mov ecx, dword [ebp + 8]
cmp eax, dword [ecx + 4]
jb 0x40b4d4
xor eax, eax
mov edi, dword [ebp + eax*4 - 0x1050]
test edi, edi
je 0x40b7c2
mov ebx, dword [ebp + eax*4 - 0x1090]
test ebx, ebx
je 0x40b7c2
push edi
mov dword [ebp - 0x10cc], eax
call fcn.00420172
mov edx, dword [ebp - 0x10cc]
add esp, 4
test eax, eax
je 0x40b7c2
mov esi, eax
dec ebx
xor eax, eax
mov cl, byte [ebx + edi]
mov byte [esi + eax], cl
inc eax
dec ebx
cmp edi, eax
jne 0x40b56a
xor eax, eax
push eax
push eax
push dword [ebp + edx*4 - 0x10b0]
push edi
push esi
push dword [ebp + edx*4 - 0x30]
call dword [sym.imp.ADVAPI32.dll_CryptVerifySignatureA]
mov edi, eax
push esi
call fcn.0041fc39
mov eax, dword [ebp - 0x10cc]
add esp, 4
test edi, edi
je 0x40b7c2
inc eax
cmp eax, dword [ebp - 0x10c8]
jne 0x40b52a
cmp dword [ebp - 0x10b8], 0
je 0x40b7db
xor esi, esi
push dword [ebp + esi*4 - 0x1090]
call fcn.0041fc39
add esp, 4
inc esi
mov edi, dword [ebp - 0x10b8]
cmp esi, edi
jb 0x40b5c2
mov eax, dword [ebp - 0x10c8]
cmp eax, dword [ebp + 0x14]
jne 0x40b7dd
xor esi, esi
cmp dword [ebp - 0x10c8], edi
je 0x40b21e
jmp 0x40b7dd
mov dword [ebp - 0x10c4], 0
push 2
call fcn.0041552f
add esp, 4
push eax
push 1
push 0x26
push str.ERROR:_Could_not_init_crytpo_library._n
call fcn.0041fc54
add esp, 0x10
xor esi, esi
dec esi
jmp 0x40b224
push 2
call fcn.0041552f
add esp, 4
push eax
push 1
push 0x2d
push str.ERROR:_There_must_be_at_least_one_signature._n
jmp 0x40b213
push 2
call fcn.0041552f
add esp, 4
push eax
push 1
push 0x2f
push str.ERROR:_Could_not_read_signatures_algorithm_ID._n
jmp 0x40b213
push 2
call fcn.0041552f
add esp, 4
push eax
push 1
push 0x29
push str.ERROR:_Could_not_read_signatures_length._n
jmp 0x40b213
push 2
call fcn.0041552f
add esp, 4
push eax
push 1
push 0x30
push str.ERROR:_Signature_length_is_too_large_to_verify._n
jmp 0x40b213
push 2
call fcn.0041552f
add esp, 4
push eax
push 1
push 0x30
push str.ERROR:_Could_not_allocate_buffer_for_signature._n
jmp 0x40b213
push 2
call fcn.0041552f
add esp, 4
push eax
push 1
push 0x2b
push str.ERROR:_Could_not_read_extracted_signature._n
call fcn.0041fc54
add esp, 0x10
xor esi, esi
dec esi
cmp dword [ebp - 0x10b8], 0
je 0x40b21e
xor edi, edi
push dword [ebp + edi*4 - 0x1090]
call fcn.0041fc39
add esp, 4
inc edi
cmp edi, dword [ebp - 0x10b8]
jb 0x40b6d7
jmp 0x40b21e
push 2
call fcn.0041552f
add esp, 4
push eax
push 1
push 0x27
push str.ERROR:_Unknown_signature_algorithm_ID._n
call fcn.0041fc54
add esp, 0x10
xor esi, esi
dec esi
cmp dword [ebp - 0x10b8], 0
je 0x40b21e
xor edi, edi
push dword [ebp + edi*4 - 0x1090]
call fcn.0041fc39
add esp, 4
inc edi
cmp edi, dword [ebp - 0x10b8]
jb 0x40b722
jmp 0x40b21e
push 2
call fcn.0041552f
add esp, 4
push 8
push str.ERROR:_At_most__d_signatures_can_be_specified._n
push eax
call fcn.00432360
add esp, 0xc
jmp 0x40b21b
push 2
call fcn.0041552f
add esp, 4
push eax
push 1
push 0x2e
push str.ERROR:_Could_not_initialize_signature_handle._n
jmp 0x40b213
push 2
call fcn.0041552f
add esp, 4
push eax
push 1
push 0x2f
push str.ERROR:_Embedded_signature_length_is_too_large._n
jmp 0x40b213
push 2
call fcn.0041552f
add esp, 4
push eax
push 1
push 0x26
push str.ERROR:_Could_not_seek_past_signature._n
jmp 0x40b213
push 2
call fcn.0041552f
add esp, 4
push eax
push 1
push 0x36
push str.ERROR:_Error_updating_verify_context_with_data_block._n
jmp 0x40b213
push 2
call fcn.0041552f
add esp, 4
push eax
push 1
push 0x22
push str.ERROR:_Error_verifying_signature._n
jmp 0x40b213
xor edi, edi
push 2
call fcn.0041552f
add esp, 4
push edi
push dword [ebp - 0x10c8]
push str.ERROR:_Only__d_of__d_signatures_were_verified._n
push eax
call fcn.00432360
jmp 0x40b218