Function at 0x407690
Capabilities:
Encrypt or decrypt via wincrypt
Hash data via wincrypt
Hash data with md5
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x40dee4]
push edi
mov edi, ecx
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x24], eax
mov dword [ebp - 8], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x20], 0
cmp edx, 0x100
jae 0x4076e0
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x34]
push ecx
push 0
push 0
push 0x254
push eax
mov eax, dword [0x40df04]
push dword [0x40deec]
mov eax, dword [eax + 0xc]
call eax
test eax, eax
je 0x4076d9
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_HeapAlloc]
push esi
push 0x80
push 8
push dword [0x40def8]
call ebx
mov esi, eax
test esi, esi
je 0x407833
push 0x80
push edi
push esi
call sub.msvcrt.dll_memcpy
add esp, 0xc
lea eax, [ebp - 0x28]
push eax
mov eax, dword [0x40df04]
push 0
mov eax, dword [eax + 0xc]
push 0
push 0x254
push dword [ebp - 0x24]
push dword [0x40deec]
call eax
test eax, eax
je 0x4079fa
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0xc]
push eax
lea edx, [ebp - 0x10]
mov ecx, esi
call fcn.00407a20
add esp, 8
test al, al
je 0x4079fa
push esi
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
push 0
push dword [0x40def8]
call esi
lea eax, [ebp - 0x30]
push eax
mov eax, dword [0x40df04]
push 0
mov eax, dword [eax + 0xc]
push 0
push dword [ebp - 0xc]
push dword [ebp - 0x10]
push dword [0x40deec]
call eax
test eax, eax
je 0x40794f
mov eax, dword [ebp - 0x2c]
add eax, 0xffffff00
push eax
push 8
push dword [0x40def8]
mov dword [ebp - 8], eax
call ebx
mov edi, eax
test edi, edi
je 0x407833
push dword [ebp - 8]
mov eax, dword [ebp - 0x14]
add eax, 0x100
push eax
push edi
call sub.msvcrt.dll_memcpy
add esp, 0xc
lea eax, [ebp - 8]
push eax
push edi
push 0
push 1
push 0
push dword [ebp - 0x30]
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
jne 0x407814
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
push 0
push dword [0x40def8]
call esi
pop esi
pop ebx
mov eax, 4
pop edi
mov esp, ebp
pop ebp
ret
push 0x80
push 8
push dword [0x40def8]
call ebx
mov ebx, eax
test ebx, ebx
jne 0x40783f
push edi
push eax
push dword [0x40def8]
call esi
pop esi
pop ebx
mov eax, 2
pop edi
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x14]
push 0x80
sub eax, 0xffffff80
push eax
push ebx
call sub.msvcrt.dll_memcpy
add esp, 0xc
lea eax, [ebp - 4]
push eax
push 0
push 0
push 0x8003
push dword [0x40deec]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x40788d
push 0
push dword [ebp - 8]
push edi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
jne 0x4078af
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
push ebx
push 0
push dword [0x40def8]
call esi
push edi
push 0
push dword [0x40def8]
call esi
pop esi
pop ebx
mov eax, 3
pop edi
mov esp, ebp
pop ebp
ret
mov eax, dword [0x40def0]
test eax, eax
je 0x4078da
lea ecx, [ebp - 0x18]
push ecx
push 0
push 0
push 0x94
push eax
mov eax, dword [0x40df04]
push dword [0x40deec]
mov eax, dword [eax + 0xc]
call eax
test eax, eax
je 0x407930
mov eax, dword [0x40df00]
test eax, eax
je 0x407905
lea ecx, [ebp - 0x1c]
push ecx
push 0
push 0
push 0x94
push eax
mov eax, dword [0x40df04]
push dword [0x40deec]
mov eax, dword [eax + 0xc]
call eax
test eax, eax
je 0x407930
mov eax, dword [0x40dee8]
test eax, eax
je 0x407958
lea ecx, [ebp - 0x20]
push ecx
push 0
push 0
push 0x94
push eax
mov eax, dword [0x40df04]
push dword [0x40deec]
mov eax, dword [eax + 0xc]
call eax
test eax, eax
jne 0x407958
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
push ebx
push 0
push dword [0x40def8]
call esi
push edi
push 0
push dword [0x40def8]
call esi
pop esi
pop ebx
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret
push 0
push 0
push dword [ebp - 0x18]
push 0x80
push ebx
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptVerifySignatureW]
test eax, eax
jne 0x4079cd
push eax
push eax
push dword [ebp - 0x1c]
push 0x80
push ebx
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptVerifySignatureW]
test eax, eax
jne 0x4079cd
push eax
push eax
push dword [ebp - 0x20]
push 0x80
push ebx
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptVerifySignatureW]
test eax, eax
jne 0x4079cd
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
push ebx
push 0
push dword [0x40def8]
call esi
push edi
push 0
push dword [0x40def8]
call esi
pop esi
pop ebx
mov eax, 5
pop edi
mov esp, ebp
pop ebp
ret
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
push ebx
push 0
push dword [0x40def8]
call esi
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp - 8]
mov dword [ecx], eax
mov eax, dword [ebp + 0xc]
pop esi
mov dword [eax], edi
pop ebx
mov eax, 6
pop edi
mov esp, ebp
pop ebp
ret
push esi
push 0
push dword [0x40def8]
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop esi
pop ebx
mov eax, 4
pop edi
mov esp, ebp
pop ebp
ret