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

Disassembly:
push 0xffffffffffffffff
push 0x428a5d
mov eax, dword fs:[0]
push eax
sub esp, 0x49c
mov eax, dword [0x43c060]
xor eax, esp
mov dword [esp + 0x498], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x43c060]
xor eax, esp
push eax
lea eax, [esp + 0x4b0]
mov dword fs:[0], eax
mov ebx, edx
mov esi, str.0123456789abcdef
lea edi, [esp + 0x88]
xor ebp, ebp
lea ecx, [esp + 0x18]
push 0x430dfc
mov dword [esp + 0x64], ebp
movsd dword es:[edi], dword [esi]
mov dword [esp + 0x68], ebp
mov dword [esp + 0x70], ebp
mov dword [esp + 0x6c], ebp
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
call fcn.00402c98
push ebx
mov edx, eax
mov dword [esp + 0x4bc], ebp
lea ecx, [esp + 0x34]
call fcn.004070ab
mov byte [esp + 0x4bc], 1
lea ecx, [esp + 0x4c]
mov edx, eax
mov dword [esp], 0x430df8
call fcn.004070ab
push ebx
mov edx, eax
mov byte [esp + 0x4c0], 2
lea ecx, [esp + 0x78]
call fcn.004070ab
pop ecx
pop ecx
xor esi, esi
lea ecx, [esp + 0x48]
push ebp
inc esi
push esi
call fcn.004032ac
push ebp
push esi
lea ecx, [esp + 0x38]
call fcn.004032ac
push ebp
push esi
lea ecx, [esp + 0x20]
call fcn.004032ac
push 0x10
pop ebx
cmp dword [esp + 0x84], ebx
lea eax, [esp + 0x70]
push ebp
cmovae eax, dword [esp + 0x74]
push 0x8000000
push 3
push ebp
push esi
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4023f5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [esp + 0x84], ebx
lea ecx, [esp + 0x70]
push eax
cmovae ecx, dword [esp + 0x74]
push ecx
push str.Error_opening_file__s_nError:__d_n
call fcn.00408acc
add esp, 0xc
jmp 0x4024dd
push 0xf0000000
push 1
push ebp
push ebp
lea eax, [esp + 0x70]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x402425
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CryptAcquireContext_failed:__d_n
call fcn.00408acc
pop ecx
pop ecx
jmp 0x4024d6
lea eax, [esp + 0x64]
push eax
push ebp
push ebp
push 0x8003
push dword [esp + 0x70]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x402466
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CryptAcquireContext_failed:__d_n
call fcn.00408acc
pop ecx
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebp
push dword [esp + 0x64]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
jmp 0x4024dd
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
jmp 0x402494
cmp dword [esp + 0x6c], 0
je 0x40251f
push ebp
push dword [esp + 0x70]
lea eax, [esp + 0xb4]
push eax
push dword [esp + 0x70]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x402511
push ebp
lea eax, [esp + 0x70]
push eax
push 0x400
lea eax, [esp + 0xb8]
push eax
push esi
call edi
test eax, eax
jne 0x40246e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ReadFile_failed:__d_n
call fcn.00408acc
pop ecx
pop ecx
push ebp
push dword [esp + 0x64]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
push dword [esp + 0x64]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebp
push 1
lea ecx, [esp + 0x78]
call fcn.004032ac
mov ecx, dword [esp + 0x4b0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x498]
xor ecx, esp
call fcn.00407db1
add esp, 0x4a8
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CryptHashData_failed:__d_n
jmp 0x4024ba
test eax, eax
je 0x4024ae
push ebp
lea eax, [esp + 0x6c]
mov dword [esp + 0x6c], ebx
push eax
lea eax, [esp + 0xa4]
push eax
push 2
push dword [esp + 0x74]
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
je 0x4025ac
cmp dword [esp + 0x84], ebx
lea eax, [esp + 0x70]
cmovae eax, dword [esp + 0x70]
push eax
push str.MD5_hash_of_file__s_is:
call fcn.00408acc
mov edi, ebp
pop ecx
pop ecx
cmp dword [esp + 0x68], edi
jbe 0x4025a0
movzx ecx, byte [esp + edi + 0x9c]
mov eax, ecx
shr ecx, 4
and eax, 0xf
movsx eax, byte [esp + eax + 0x88]
push eax
movsx eax, byte [esp + ecx + 0x8c]
push eax
push str._c_c
call fcn.00408acc
add esp, 0xc
inc edi
cmp edi, dword [esp + 0x68]
jb 0x40256a
push 0x430e9c
call fcn.00408acc
jmp 0x4025be
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CryptGetHashParam_failed:__d_n
call fcn.00408acc
pop ecx
pop ecx
push dword [esp + 0x64]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
push ebp
push dword [esp + 0x64]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
jmp 0x4024d6