Function at 0x40b5b0
Capabilities:
Hash data via wincrypt
Initialize hashing via wincrypt
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
mov eax, 0x10b0
call fcn.00426db0
mov eax, dword [0x43d00c]
mov edi, dword [ebp + 8]
pxor xmm0, xmm0
xor eax, ebp
test edi, edi
mov dword [esp + 0x10a8], eax
movdqa xmmword [esp + 0x50], xmm0
movdqa xmmword [esp + 0x40], xmm0
movdqa xmmword [esp + 0x30], xmm0
movdqa xmmword [esp + 0x20], xmm0
je 0x40b620
push 2
push 0
push 0
push edi
call fcn.0041a289
add esp, 0x10
test eax, eax
je 0x40b639
push 2
call fcn.00415889
add esp, 4
push eax
push 1
push 0x32
push str.ERROR:_Could_not_seek_to_the_end_of_the_MAR_file._n
jmp 0x40b6e8
push 2
call fcn.00415889
add esp, 4
push eax
push 1
push 0x24
push str.ERROR:_Invalid_file_pointer_passed._n
jmp 0x40b6e8
push edi
call fcn.0041af50
add esp, 4
cmp eax, 0x1f400001
sbb edx, 0
jl 0x40b665
push 2
call fcn.00415889
add esp, 4
push eax
push 1
push 0x2d
push str.ERROR:_MAR_file_is_too_large_to_be_verified._n
jmp 0x40b6e8
push 0
push 0
push 0x10
push edi
call fcn.0041a289
add esp, 0x10
test eax, eax
je 0x40b68e
push 2
call fcn.00415889
add esp, 4
push eax
push 1
push 0x2e
push str.ERROR:_Could_not_seek_to_the_signature_block._n
jmp 0x40b6e8
lea eax, [esp + 0x1c]
push edi
push 1
push 4
push eax
call fcn.0041f00f
add esp, 0x10
cmp eax, 1
jne 0x40b6d4
push dword [esp + 0x1c]
call dword [sym.imp.WSOCK32.dll_ntohl]
cmp eax, 8
mov dword [esp + 0x1c], eax
jbe 0x40b70d
push 2
call fcn.00415889
add esp, 4
push 8
push str.ERROR:_At_most__d_signatures_can_be_specified._n
push eax
call fcn.00405b90
add esp, 0xc
jmp 0x40b6f0
push 2
call fcn.00415889
add esp, 4
push eax
push 1
push 0x2c
push str.ERROR:_Could_not_read_number_of_signatures._n
call fcn.0041f222
add esp, 0x10
mov ebx, 0xffffffff
mov ecx, dword [esp + 0x10a8]
xor ecx, ebp
call fcn.00412bfe
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
test eax, eax
mov dword [esp + 8], eax
je 0x40b7cd
xor esi, esi
xor ebx, ebx
lea eax, [esp + esi + 0x40]
push edi
push 1
push 4
push eax
call fcn.0041f00f
add esp, 0x10
cmp eax, 1
jne 0x40b8a7
push dword [esp + ebx*4 + 0x40]
mov eax, dword [sym.imp.WSOCK32.dll_ntohl]
call eax
mov dword [esp + 0x10], eax
mov dword [esp + ebx*4 + 0x40], eax
push edi
push 1
push 4
lea eax, [esp + 0x24]
push eax
call fcn.0041f00f
add esp, 0x10
cmp eax, 1
jne 0x40b8c0
mov dword [esp + 0xc], esi
push dword [esp + 0x18]
call dword [sym.imp.WSOCK32.dll_ntohl]
cmp eax, 0x801
mov dword [esp + 0x18], eax
jae 0x40b8d9
mov esi, eax
push eax
call fcn.0041f68f
add esp, 4
test eax, eax
mov dword [esp + ebx*4 + 0x20], eax
je 0x40b8f2
push edi
push 1
push esi
push eax
call fcn.0041f00f
add esp, 0x10
cmp eax, 1
jne 0x40b90b
cmp dword [esp + 0x10], 2
jne 0x40b94f
mov esi, dword [esp + 0xc]
inc ebx
add esi, 4
cmp ebx, dword [esp + 8]
jb 0x40b71d
push edi
call fcn.0041af50
add esp, 4
and edx, eax
mov ebx, 0xffffffff
cmp edx, 0xffffffff
je 0x40b6f5
cmp dword [esp + 8], 0
pxor xmm0, xmm0
movdqa xmmword [esp + 0x1090], xmm0
movdqa xmmword [esp + 0x1080], xmm0
movdqa xmmword [esp + 0x70], xmm0
movdqa xmmword [esp + 0x60], xmm0
je 0x40b88e
cmp dword [ebp + 0xc], 0
je 0x40b875
xor ebx, ebx
lea esi, [esp + 0x1080]
mov dword [esi], 0
push esi
push 0
push 0
push 0x800d
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x40b875
inc ebx
add esi, 4
cmp ebx, dword [esp + 8]
jb 0x40b81e
push 0
push 0
push 0
push edi
call fcn.0041a289
add esp, 0x10
test eax, eax
je 0x40b993
push 2
call fcn.00415889
add esp, 4
push eax
push 1
push 0x2b
push str.ERROR:_Could_not_seek_to_start_of_the_file_n
jmp 0x40b6e8
push 2
call fcn.00415889
add esp, 4
push eax
push 1
push 0x2e
push str.ERROR:_Could_not_initialize_signature_handle._n
jmp 0x40b6e8
push 2
call fcn.00415889
add esp, 4
push eax
push 1
push 0x2d
push str.ERROR:_There_must_be_at_least_one_signature._n
jmp 0x40b6e8
push 2
call fcn.00415889
add esp, 4
push eax
push 1
push 0x2f
push str.ERROR:_Could_not_read_signatures_algorithm_ID._n
jmp 0x40b6e8
push 2
call fcn.00415889
add esp, 4
push eax
push 1
push 0x29
push str.ERROR:_Could_not_read_signatures_length._n
jmp 0x40b6e8
push 2
call fcn.00415889
add esp, 4
push eax
push 1
push 0x30
push str.ERROR:_Signature_length_is_too_large_to_verify._n
jmp 0x40b6e8
push 2
call fcn.00415889
add esp, 4
push eax
push 1
push 0x2c
push str.ERROR:_Could_allocate_buffer_for_signature._n
jmp 0x40b6e8
push 2
call fcn.00415889
add esp, 4
push eax
push 1
push 0x2b
push str.ERROR:_Could_not_read_extracted_signature._n
call fcn.0041f222
add esp, 0x10
mov edi, dword [esp + 8]
lea esi, [esp + 0x20]
mov eax, dword [esi]
sub esp, 4
mov dword [esp], eax
call fcn.0041f205
add esp, 4
add esi, 4
dec edi
mov ebx, 0xffffffff
jne 0x40b92f
jmp 0x40b6f5
push 2
call fcn.00415889
add esp, 4
push eax
push 1
push 0x27
push str.ERROR:_Unknown_signature_algorithm_ID._n
call fcn.0041f222
add esp, 0x10
mov edi, dword [esp + 8]
lea esi, [esp + 0x20]
mov eax, dword [esi]
sub esp, 4
mov dword [esp], eax
call fcn.0041f205
add esp, 4
add esi, 4
dec edi
mov ebx, 0xffffffff
jne 0x40b973
jmp 0x40b6f5
lea esi, [esp + 0x1080]
lea edx, [esp + 0x80]
mov ecx, edi
push str.signature_block
mov ebx, dword [esp + 0xc]
push ebx
push esi
push 0x14
call fcn.0040b310
add esp, 0x10
test eax, eax
jne 0x40b6f0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov ecx, edi
lea edx, [esp + 0x80]
push str.signature_algorithm_ID
push ebx
push esi
push 4
call fcn.0040b310
add esp, 0x10
test eax, eax
jne 0x40b6f0
mov eax, dword [esp + 0x10]
mov ecx, edi
lea edx, [esp + eax + 0x60]
push str.signature_length
push ebx
push esi
push 4
call fcn.0040b310
add esp, 0x10
test eax, eax
jne 0x40b6f0
mov esi, dword [esp + 0xc]
push dword [esp + esi*4 + 0x60]
call dword [sym.imp.WSOCK32.dll_ntohl]
cmp eax, 0x801
mov dword [esp + esi*4 + 0x60], eax
jae 0x40ba62
push 1
push 0
push eax
push edi
call fcn.0041a289
add esp, 0x10
test eax, eax
jne 0x40ba7b
mov ebx, dword [esp + 8]
add dword [esp + 0x10], 4
inc esi
mov dword [esp + 0xc], esi
cmp esi, ebx
lea esi, [esp + 0x1080]
jb 0x40b9d0
jmp 0x40bae8
push 2
call fcn.00415889
add esp, 4
push eax
push 1
push 0x2f
push str.ERROR:_Embedded_signature_length_is_too_large._n
jmp 0x40b6e8
push 2
call fcn.00415889
add esp, 4
push eax
push 1
push 0x26
push str.ERROR:_Could_not_seek_past_signature._n
jmp 0x40b6e8
push edi
push 0x1000
push 1
lea eax, [esp + 0x8c]
push eax
call fcn.0041f00f
add esp, 0x10
mov ebx, eax
push edi
call fcn.0041eb2e
add esp, 4
test eax, eax
jne 0x40bcd1
xor esi, esi
push 0
push ebx
lea eax, [esp + 0x88]
push eax
push dword [esp + esi*4 + 0x108c]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x40bcb8
inc esi
cmp esi, dword [esp + 8]
jb 0x40bac1
push edi
call fcn.0041eb03
add esp, 4
test eax, eax
je 0x40ba94
xor ecx, ecx
mov esi, dword [esp + ecx*4 + 0x60]
test esi, esi
je 0x40bc9f
mov eax, dword [ebp + 0x10]
lea eax, [eax + ecx*4]
test eax, eax
mov dword [esp + 0x14], eax
je 0x40bc9f
mov ebx, dword [esp + ecx*4 + 0x20]
test ebx, ebx
je 0x40bc9f
push esi
mov dword [esp + 0x10], ecx
call fcn.0041f68f
add esp, 4
test eax, eax
je 0x40bc9f
mov edi, eax
cmp esi, 0x20
mov dword [esp + 0x10], 0
jb 0x40bbee
lea eax, [ebx + esi]
cmp edi, eax
jae 0x40bb5b
lea eax, [edi + esi]
cmp ebx, eax
jb 0x40bbee
mov eax, esi
lea ecx, [ebx + esi - 0x10]
lea edx, [edi + 0x10]
pxor xmm3, xmm3
and eax, 0xffffffe0
mov dword [esp + 0x10], eax
movdqu xmm1, xmmword [ecx]
movdqu xmm0, xmmword [ecx - 0x10]
add ecx, 0xffffffe0
movdqa xmm2, xmm1
punpckhbw xmm1, xmm3
punpcklbw xmm2, xmm3
pshufd xmm1, xmm1, 0x4e
pshufd xmm2, xmm2, 0x4e
pshuflw xmm1, xmm1, 0x1b
pshuflw xmm2, xmm2, 0x1b
pshufhw xmm1, xmm1, 0x1b
pshufhw xmm2, xmm2, 0x1b
packuswb xmm1, xmm2
movdqa xmm2, xmm0
punpckhbw xmm0, xmm3
punpcklbw xmm2, xmm3
pshufd xmm0, xmm0, 0x4e
movdqu xmmword [edx - 0x10], xmm1
pshufd xmm2, xmm2, 0x4e
pshuflw xmm0, xmm0, 0x1b
pshuflw xmm2, xmm2, 0x1b
pshufhw xmm0, xmm0, 0x1b
pshufhw xmm2, xmm2, 0x1b
packuswb xmm0, xmm2
movdqu xmmword [edx], xmm0
add edx, 0x20
add eax, 0xffffffe0
jne 0x40bb6f
cmp esi, dword [esp + 0x10]
je 0x40bc05
mov edx, dword [esp + 0x10]
mov eax, esi
mov ecx, edi
sub eax, edx
add ecx, edx
movzx edx, byte [ebx + eax - 1]
mov byte [ecx], dl
inc ecx
dec eax
jne 0x40bbfa
push 0
push 0
mov eax, dword [esp + 0x1c]
push dword [eax]
push esi
push edi
mov ebx, dword [esp + 0x20]
push dword [esp + ebx*4 + 0x1094]
call dword [sym.imp.ADVAPI32.dll_CryptVerifySignatureA]
mov esi, eax
push edi
call fcn.0041f205
add esp, 4
test esi, esi
je 0x40bc9f
mov ecx, ebx
inc ecx
cmp ecx, dword [esp + 8]
jb 0x40baf7
cmp dword [esp + 8], 0
mov dword [esp + 0xc], ecx
je 0x40bc67
mov edi, dword [esp + 8]
lea esi, [esp + 0x20]
mov eax, dword [esi]
sub esp, 4
mov dword [esp], eax
call fcn.0041f205
add esp, 4
add esi, 4
dec edi
jne 0x40bc51
mov esi, dword [esp + 8]
cmp dword [esp + 0xc], esi
jne 0x40bc80
mov eax, dword [esp + 0xc]
xor ebx, ebx
cmp eax, dword [ebp + 0x14]
je 0x40b6f5
push 2
call fcn.00415889
add esp, 4
push esi
push dword [esp + 0x10]
push str.ERROR:_Only__d_of__d_signatures_were_verified._n
push eax
call fcn.00405b90
jmp 0x40b6ed
push 2
call fcn.00415889
add esp, 4
push eax
push 1
push 0x22
push str.ERROR:_Error_verifying_signature._n
jmp 0x40b6e8
push 2
call fcn.00415889
add esp, 4
push eax
push 1
push 0x36
push str.ERROR:_Error_updating_verify_context_with_data_block._n
jmp 0x40b6e8
push 2
call fcn.00415889
add esp, 4
push eax
push 1
push 0x21
push str.ERROR:_Error_reading_data_block._n
jmp 0x40b6e8