Function at 0x406a40
Capabilities:
Hash data via wincrypt
Hash data with md5
Initialize hashing via wincrypt
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42b45b
mov eax, dword fs:[0]
push eax
sub esp, 0x454
mov eax, dword [0x4394c8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov dword [ebp - 0x444], eax
cmp dword [eax + 0x14], 0x10
mov dword [eax + 0x10], 0
jb 0x406a8b
mov eax, dword [eax]
mov byte [eax], 0
cmp dword [esi + 0x14], 8
mov dword [ebp - 0x428], 0
mov dword [ebp - 0x424], 0
mov dword [ebp - 0x430], 0
mov dword [ebp - 0x42c], 0
jb 0x406ac0
mov eax, dword [esi]
jmp 0x406ac2
mov eax, esi
push 0
push 0x8000000
push 3
push 0
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x406b2b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [esi]
sub esp, 0x18
mov ecx, esp
push str.CDriverInstaller::CalcMD5OfFile__:_Error_opening_file___File:___s___ErrorCode:___d__
mov dword [ecx], eax
mov eax, dword [esi + 4]
mov dword [ecx + 4], eax
mov eax, dword [esi + 8]
mov dword [ecx + 8], eax
mov eax, dword [esi + 0xc]
mov dword [ecx + 0xc], eax
mov eax, dword [esi + 0x10]
mov dword [ecx + 0x10], eax
mov eax, dword [esi + 0x14]
mov dword [ecx + 0x14], eax
lea eax, [ebx + 0xc]
push 0xc8
push eax
call fcn.00409df0
add esp, 0x28
jmp 0x406c68
push 0xf0000000
push 1
push 0
push 0
lea eax, [ebp - 0x428]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x406b69
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CDriverInstaller::CalcMD5OfFile__:_CryptAcquireContext_failed:_ErrorCode:___d__
lea eax, [ebx + 0xc]
push 0xc8
push eax
call fcn.00409df0
add esp, 0x10
jmp 0x406c61
lea eax, [ebp - 0x424]
push eax
push 0
push 0
push 0x8003
push dword [ebp - 0x428]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x406bc0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CDriverInstaller::CalcMD5OfFile__:_CryptAcquireContext_failed:_ErrorCode:___d__
lea eax, [ebx + 0xc]
push 0xc8
push eax
call fcn.00409df0
add esp, 0x10
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push dword [ebp - 0x428]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
jmp 0x406c68
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 0x430]
push 0
push eax
push 0x400
lea eax, [ebp - 0x420]
push eax
push edi
call esi
test eax, eax
je 0x406c2a
mov ecx, dword [ebp - 0x430]
test ecx, ecx
je 0x406c96
push 0
push ecx
lea eax, [ebp - 0x420]
push eax
push dword [ebp - 0x424]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x406c88
push 0
lea eax, [ebp - 0x430]
push eax
push 0x400
lea eax, [ebp - 0x420]
push eax
push edi
call esi
test eax, eax
jne 0x406be2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CDriverInstaller::CalcMD5OfFile__:_ReadFile_failed:_ErrorCode:___d__
lea eax, [ebx + 0xc]
push 0xc8
push eax
call fcn.00409df0
add esp, 0x10
push 0
push dword [ebp - 0x428]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
push dword [ebp - 0x424]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00416cb0
mov esp, ebp
pop ebp
ret 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CDriverInstaller::CalcMD5OfFile__:_CryptHashData_failed:_ErrorCode:___d__
jmp 0x406c36
test eax, eax
je 0x406c2a
xor eax, eax
mov dword [ebp - 0x42c], 0x10
mov dword [ebp - 0x43c], eax
mov dword [ebp - 0x438], eax
mov dword [ebp - 0x434], eax
mov dword [ebp - 0x43c], eax
mov dword [ebp - 0x438], eax
mov dword [ebp - 0x434], eax
push eax
mov dword [ebp - 4], eax
lea eax, [ebp - 0x42c]
push eax
lea eax, [ebp - 0x20]
push eax
push 2
push dword [ebp - 0x424]
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
je 0x406dc0
xor esi, esi
cmp dword [ebp - 0x42c], esi
jbe 0x406d3b
lea esp, [esp]
movzx eax, byte [ebp + esi - 0x20]
lea ecx, [ebp - 0x43c]
shr eax, 4
add eax, str.0123456789abcdef
push eax
call fcn.00407360
movzx eax, byte [ebp + esi - 0x20]
lea ecx, [ebp - 0x43c]
and eax, 0xf
add eax, str.0123456789abcdef
push eax
call fcn.00407360
inc esi
cmp esi, dword [ebp - 0x42c]
jb 0x406d00
lea eax, [ebp - 0x43d]
mov byte [ebp - 0x43d], 0
push eax
lea ecx, [ebp - 0x43c]
call fcn.00407360
mov esi, dword [ebp - 0x43c]
lea ecx, [ebp - 0x45c]
push esi
call fcn.00401ce0
mov ecx, dword [ebp - 0x444]
push eax
call fcn.00407030
cmp dword [ebp - 0x448], 0x10
jb 0x406d89
push dword [ebp - 0x45c]
call fcn.00417533
add esp, 4
push dword [ebp - 0x424]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
push 0
push dword [ebp - 0x428]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov bl, 1
test esi, esi
je 0x406ddf
push esi
call fcn.00417533
add esp, 4
mov al, bl
jmp 0x406c6a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CDriverInstaller::CalcMD5OfFile__:_CryptGetHashParam_failed:_ErrorCode:___d__
lea eax, [ebx + 0xc]
push 0xc8
push eax
call fcn.00409df0
add esp, 0x10
xor bl, bl
mov al, bl
jmp 0x406c6a