Function at 0x407220
Capabilities:
Encrypt data using des via winapi
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
push ebx
push esi
push edi
mov edi, dword [0x40def0]
lea eax, [ebp - 0x30]
push eax
mov eax, dword [0x40df04]
push 0
mov eax, dword [eax + 0xc]
push 0
push 0x254
push dword [0x40dee4]
mov esi, ecx
push dword [0x40deec]
mov ebx, edx
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x24], edi
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0x18], 0
call eax
test eax, eax
jne 0x40728c
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x34]
push eax
mov eax, dword [0x40df04]
push 0
mov eax, dword [eax + 0xc]
push 0
push 0x94
push edi
push dword [0x40deec]
call eax
test eax, eax
je 0x407283
lea eax, [ebp - 0x14]
push eax
push 1
push 0x6603
push dword [0x40deec]
call dword [sym.imp.ADVAPI32.dll_CryptGenKey]
test eax, eax
jne 0x4072d5
pop edi
pop esi
mov eax, 2
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
push 8
push dword [0x40def8]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
je 0x4073b6
push ebx
push esi
push edi
call sub.msvcrt.dll_memcpy
mov esi, dword [ebp + 0x14]
add esp, 0xc
mov dword [esi], ebx
push ebx
push esi
push edi
push 0
push 1
push 0
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
jne 0x407374
mov eax, dword [esi]
push eax
push edi
push 8
push dword [0x40def8]
mov dword [ebp - 0x1c], eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov edi, eax
test edi, edi
je 0x4073b6
push ebx
push dword [ebp - 0x20]
push edi
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov dword [esi], ebx
push dword [ebp - 0x1c]
push esi
push edi
push 0
push 1
push 0
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
jne 0x407374
push edi
push eax
push dword [0x40def8]
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
pop esi
mov eax, 5
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x18]
push eax
push 0
push 0
push 8
push 0
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_CryptExportKey]
test eax, eax
je 0x40766d
push dword [ebp - 0x18]
push 8
push dword [0x40def8]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
jne 0x4073c2
push edi
push eax
push dword [0x40def8]
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
pop esi
mov eax, 3
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x18]
push eax
push esi
push 0
push 8
push 0
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_CryptExportKey]
test eax, eax
je 0x40766d
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x28]
push eax
mov eax, dword [0x40df04]
push 0
mov eax, dword [eax + 0xc]
push 0
push 0x94
push dword [ebp - 0x24]
push dword [0x40deec]
call eax
test eax, eax
je 0x407645
mov edx, dword [ebp - 0x2c]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 8]
push eax
mov ecx, esi
call fcn.00407150
add esp, 0xc
test al, al
je 0x407645
push esi
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
push 0
push dword [0x40def8]
call esi
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
jne 0x40748c
mov eax, dword [ebp - 8]
test eax, eax
je 0x40746f
push eax
push 0
push dword [0x40def8]
call esi
jmp 0x407475
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
push 0
push dword [0x40def8]
call esi
pop edi
pop esi
mov eax, 4
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push ebx
push dword [ebp - 0x20]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
jne 0x4074d9
mov eax, dword [ebp - 8]
test eax, eax
je 0x4074b3
push eax
push 0
push dword [0x40def8]
call esi
jmp 0x4074b9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
push 0
push dword [0x40def8]
call esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
pop edi
pop esi
mov eax, 4
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0xc]
push eax
push 0
push 0
push 0
push 1
push dword [ebp - 4]
mov dword [ebp - 0xc], 0
call dword [sym.imp.ADVAPI32.dll_CryptSignHashW]
test eax, eax
jne 0x407533
mov eax, dword [ebp - 8]
test eax, eax
je 0x40750d
push eax
push 0
push dword [0x40def8]
call esi
jmp 0x407513
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
push 0
push dword [0x40def8]
call esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
pop edi
pop esi
mov eax, 6
pop ebx
mov esp, ebp
pop ebp
ret
push dword [ebp - 0xc]
push 8
push dword [0x40def8]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
jne 0x407583
mov eax, dword [ebp - 8]
test eax, eax
je 0x40755d
push eax
push ebx
push dword [0x40def8]
call esi
jmp 0x407563
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
push 0
push dword [0x40def8]
call esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
pop edi
pop esi
mov eax, 3
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0xc]
push eax
push ebx
push 0
push 0
push 1
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptSignHashW]
test eax, eax
je 0x4074f9
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov ecx, dword [ebp - 0x1c]
add ecx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
add eax, ecx
mov ecx, dword [ebp + 0x14]
push eax
push 8
push dword [0x40def8]
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x20], eax
mov dword [ecx], eax
test eax, eax
je 0x4073b6
push dword [ebp - 0x10]
push dword [ebp - 8]
push eax
call sub.msvcrt.dll_memcpy
push dword [ebp - 0xc]
mov eax, dword [ebp - 0x10]
add eax, dword [ebp - 0x20]
push ebx
push eax
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 0x10]
add eax, dword [ebp - 0x20]
push dword [ebp - 0x1c]
add eax, dword [ebp - 0xc]
push edi
push eax
call sub.msvcrt.dll_memcpy
add esp, 0x24
push ebx
push 0
push dword [0x40def8]
call esi
mov eax, dword [ebp - 8]
test eax, eax
je 0x407628
push eax
push 0
push dword [0x40def8]
call esi
jmp 0x40762e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
push 0
push dword [0x40def8]
call esi
pop edi
pop esi
mov eax, 7
pop ebx
mov esp, ebp
pop ebp
ret
push esi
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
push 0
push dword [0x40def8]
call esi
push edi
push 0
push dword [0x40def8]
call esi
pop edi
pop esi
mov eax, 5
pop ebx
mov esp, ebp
pop ebp
ret
push edi
push 0
push dword [0x40def8]
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret