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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x440
mov eax, dword [0x44c4b8]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov esi, str.0123456789abcdef
lea edi, [ebp - 0x18]
xor eax, eax
mov ebx, ecx
push eax
push 0x8000000
movsd dword es:[edi], dword [esi]
push 3
push eax
push 1
movsd dword es:[edi], dword [esi]
push 0x80000000
push ebx
mov dword [ebp - 0x42c], eax
movsd dword es:[edi], dword [esi]
mov dword [ebp - 0x430], eax
mov dword [ebp - 0x438], eax
mov dword [ebp - 0x434], eax
movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x440], esi
cmp esi, 0xffffffff
jne 0x413605
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push str.Error_opening_file__s_nError:__d_n
call fcn.0042286b
add esp, 0xc
xor eax, eax
jmp 0x413710
push 0xf0000000
push 1
xor edi, edi
lea eax, [ebp - 0x42c]
push edi
push edi
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x41363d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CryptAcquireContext_failed:__d_n
call fcn.0042286b
pop ecx
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4135fe
lea eax, [ebp - 0x430]
push eax
push edi
push edi
push 0x8003
push dword [ebp - 0x42c]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x413687
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CryptAcquireContext_failed:__d_n
call fcn.0042286b
pop ecx
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push dword [ebp - 0x42c]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
jmp 0x4135fe
push edi
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
jmp 0x4136be
cmp dword [ebp - 0x438], 0
je 0x413753
push 0
push dword [ebp - 0x438]
lea eax, [ebp - 0x428]
push eax
push dword [ebp - 0x430]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x413721
push 0
lea eax, [ebp - 0x438]
push eax
push 0x400
lea eax, [ebp - 0x428]
push eax
push esi
call edi
test eax, eax
jne 0x413690
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ReadFile_failed:__d_n
call fcn.0042286b
pop ecx
pop ecx
push 0
push dword [ebp - 0x42c]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
push dword [ebp - 0x430]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
xor edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041da8c
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CryptHashData_failed:__d_n
call fcn.0042286b
pop ecx
pop ecx
push 0
push dword [ebp - 0x42c]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
push dword [ebp - 0x430]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
jmp 0x413634
test eax, eax
je 0x4136d8
push 0
lea eax, [ebp - 0x434]
mov dword [ebp - 0x434], 0x10
push eax
lea eax, [ebp - 0x28]
push eax
push 2
push dword [ebp - 0x430]
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
mov edi, 0x44f4d0
test eax, eax
je 0x413812
push ebx
push str.MD5_hash_of_file__s_is:
call fcn.0042286b
and dword [ebp - 0x43c], 0
cmp dword [ebp - 0x434], 0
pop ecx
pop ecx
jbe 0x413806
mov esi, dword [ebp - 0x43c]
mov ebx, edi
movzx ecx, byte [ebp + esi - 0x28]
mov eax, ecx
shr ecx, 4
and eax, 0xf
movsx eax, byte [ebp + eax - 0x18]
push eax
movsx eax, byte [ebp + ecx - 0x18]
push eax
push str._c_c
call fcn.0042286b
movzx ecx, byte [ebp + esi - 0x28]
add esp, 0xc
mov eax, ecx
and ecx, 0xf
shr eax, 4
inc esi
movsx ax, byte [ebp + eax - 0x18]
mov word [ebx], ax
lea ebx, [ebx + 4]
movsx ax, byte [ebp + ecx - 0x18]
mov word [ebx - 2], ax
cmp esi, dword [ebp - 0x434]
jb 0x4137ae
mov esi, dword [ebp - 0x440]
push 0x445708
call fcn.0042286b
jmp 0x413824
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CryptGetHashParam_failed:__d_n
call fcn.0042286b
pop ecx
pop ecx
push dword [ebp - 0x430]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
push 0
push dword [ebp - 0x42c]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
jmp 0x413707