Function at 0x40a640
Capabilities:
Hash data via wincrypt
Hash data with md5
Initialize hashing via wincrypt

Disassembly:
push 0xffffffffffffffff
push 0x41db78
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
mov al, byte [esp + 0x3c]
push ebx
push ebp
push esi
xor ebx, ebx
push edi
push ebx
lea ecx, [esp + 0x20]
mov dword [esp + 0x1c], ebx
mov byte [esp + 0x20], al
call fcn.0040cc10
mov edi, 0x401008
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
lea ecx, [esp + 0x20]
push ebp
call fcn.0040cd20
test al, al
je 0x40a6b8
mov edi, dword [esp + 0x20]
mov ecx, ebp
mov edx, ecx
mov esi, 0x401008
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x20]
call fcn.0040cd00
push 0xf0000000
push 1
push ebx
lea eax, [esp + 0x20]
push ebx
push eax
mov dword [esp + 0x58], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x2c], ebx
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x40a71e
mov esi, dword [esp + 0x4c]
mov cl, byte [esp + 0x1c]
push ebx
mov byte [esi], cl
mov ecx, esi
call fcn.0040cc10
mov edx, dword [0x407740]
lea eax, [esp + 0x1c]
push edx
push ebx
push eax
mov ecx, esi
call fcn.0040c540
push 1
lea ecx, [esp + 0x20]
mov dword [esp + 0x48], 0xffffffff
call fcn.0040cc10
jmp 0x40a8b5
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x10]
push ecx
push ebx
push ebx
push 0x8003
push edx
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
push ebx
jne 0x40a747
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
jmp 0x40a6e0
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x54]
mov eax, dword [esp + 0x14]
push ecx
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
jne 0x40a77c
mov ecx, dword [esp + 0x14]
push ebx
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
jmp 0x40a86b
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x18]
push ebx
lea ecx, [esp + 0x30]
push eax
push ecx
push 2
push edx
mov dword [esp + 0x2c], 0x10
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
je 0x40a854
mov ecx, dword [esp + 0x18]
xor eax, eax
cmp ecx, ebx
mov dword [esp + 0x50], eax
jbe 0x40a854
xor ecx, ecx
lea edx, [esp + 0x54]
mov cl, byte [esp + eax + 0x2c]
mov byte [esp + 0x54], bl
push ecx
push 0x403664
push edx
mov byte [esp + 0x61], bl
call fcn.0041531f
lea edi, [esp + 0x60]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
mov eax, dword [0x407740]
mov edx, dword [esp + 0x24]
not ecx
dec ecx
sub eax, edx
mov esi, ecx
cmp eax, esi
ja 0x40a7fb
call fcn.00412f64
cmp esi, ebx
jbe 0x40a83f
mov ecx, dword [esp + 0x24]
push ebx
lea ebp, [ecx + esi]
lea ecx, [esp + 0x20]
push ebp
call fcn.0040cd20
test al, al
je 0x40a83f
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
mov ecx, esi
lea esi, [esp + 0x54]
lea edi, [eax + edx]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x20]
mov dword [esp + 0x24], ebp
mov byte [eax + ebp], bl
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x18]
inc eax
cmp eax, ecx
mov dword [esp + 0x50], eax
jb 0x40a7b6
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov edx, dword [esp + 0x14]
push ebx
push edx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov esi, dword [esp + 0x4c]
mov al, byte [esp + 0x1c]
push ebx
mov ecx, esi
mov byte [esi], al
call fcn.0040cc10
mov ecx, dword [0x407740]
lea edx, [esp + 0x1c]
push ecx
push ebx
push edx
mov ecx, esi
call fcn.0040c540
mov ecx, dword [esp + 0x20]
cmp ecx, ebx
je 0x40a8b5
mov al, byte [ecx - 1]
cmp al, bl
je 0x40a8ab
cmp al, 0xff
je 0x40a8ab
dec al
mov byte [ecx - 1], al
jmp 0x40a8b5
dec ecx
push ecx
call fcn.00412d82
add esp, 4
mov ecx, dword [esp + 0x3c]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x38
ret