Function at 0x40f260
Capabilities:
Encrypt data using rc4 via winapi
Encrypt or decrypt via wincrypt
Hash data via wincrypt
Hash data with md5
Initialize hashing via wincrypt
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6c
mov eax, dword [0x43c040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
xor ebx, ebx
mov dword [ebp - 0x5c], edx
mov esi, ecx
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x6c], 0
mov dword [ebp - 0x60], ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push ebx
push 0x80
push 3
push ebx
push 1
push 1
push esi
mov dword [ebp - 0x64], eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40f32f
test edi, edi
je 0x40f961
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xa
push 0x20
lea ecx, [ebp - 0x44]
push ecx
push eax
call fcn.0041eff8
add esp, 0xc
mov edx, 0x104
push str.Error_opening_source_plaintext_file
push ecx
mov ecx, edi
call fcn.00401190
push 0x434140
mov edx, 0x208
mov ecx, edi
call fcn.00401120
lea eax, [ebp - 0x44]
mov edx, 0x208
push eax
mov ecx, edi
call fcn.00401120
push 0x434a88
mov edx, 0x208
mov ecx, edi
call fcn.00401120
jmp 0x40f961
push 0
push 0x80
push 2
push 0
push 1
push 2
push dword [ebp - 0x5c]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x5c], eax
cmp eax, 0xffffffff
jne 0x40f3ba
test edi, edi
je 0x40f3ae
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xa
push 0x20
lea ecx, [ebp - 0x44]
push ecx
push eax
call fcn.0041eff8
add esp, 0xc
mov edx, 0x104
push str.Error_opening_destination_file
push ecx
mov ecx, edi
call fcn.00401190
push 0x434140
mov edx, 0x208
mov ecx, edi
call fcn.00401120
lea eax, [ebp - 0x44]
mov edx, 0x208
push eax
mov ecx, edi
call fcn.00401120
push 0x434a88
mov edx, 0x208
mov ecx, edi
call fcn.00401120
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40f961
push 0xf0000000
push 1
push str.Microsoft_Enhanced_Cryptographic_Provider_v1.0
push 0
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x40f49b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x80090016
jne 0x40f474
push 0xf0000008
push 1
push str.Microsoft_Enhanced_Cryptographic_Provider_v1.0
push 0
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x40f49b
test edi, edi
je 0x40f927
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
push 0xa
push 0x20
lea ecx, [ebp - 0x44]
push ecx
push eax
call fcn.0041eff8
add esp, 0xc
push str.Error_CryptAcquireContext._NTE_BAD_KEYSET
push ecx
mov edx, 0x104
mov ecx, edi
call fcn.00401190
push 0x434140
mov edx, 0x208
mov ecx, edi
call fcn.00401120
lea eax, [ebp - 0x44]
mov edx, 0x208
push eax
mov ecx, edi
call fcn.00401120
push 0x434a88
mov edx, 0x208
mov ecx, edi
call fcn.00401120
jmp 0x40f927
test edi, edi
je 0x40f927
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
push 0xa
push 0x20
lea ecx, [ebp - 0x44]
push ecx
push eax
call fcn.0041eff8
add esp, 0xc
push str.Error_CryptAcquireContext
jmp 0x40f430
cmp word [0x43e0bc], bx
je 0x40f584
lea eax, [ebp - 0x6c]
push eax
push 0
push 0
push 0x8003
push dword [ebp - 0x48]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x40f4ec
test edi, edi
je 0x40f927
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
push 0xa
push 0x20
lea ecx, [ebp - 0x44]
push ecx
push eax
call fcn.0041eff8
add esp, 0xc
push str.Error_CryptCreateHash
jmp 0x40f430
push 0
push 0x43e0bc
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, eax
push eax
push 0x43e0bc
push dword [ebp - 0x6c]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
jne 0x40f538
test edi, edi
je 0x40f927
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
push 0xa
push 0x20
lea ecx, [ebp - 0x44]
push ecx
push eax
call fcn.0041eff8
add esp, 0xc
push str.Error_CryptHashData
jmp 0x40f430
lea eax, [ebp - 0x58]
push eax
push 0x800000
push dword [ebp - 0x6c]
push 0x6801
push dword [ebp - 0x48]
call dword [sym.imp.ADVAPI32.dll_CryptDeriveKey]
test eax, eax
jne 0x40f7ba
test edi, edi
je 0x40f927
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
push 0xa
push 0x20
lea ecx, [ebp - 0x44]
push ecx
push eax
call fcn.0041eff8
add esp, 0xc
push str.Error_CryptDeriveKey
jmp 0x40f430
lea eax, [ebp - 0x58]
push eax
push 0x800001
push 0x6801
push dword [ebp - 0x48]
call dword [sym.imp.ADVAPI32.dll_CryptGenKey]
test eax, eax
jne 0x40f5c9
test edi, edi
je 0x40f927
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
push 0xa
push 0x20
lea ecx, [ebp - 0x44]
push ecx
push eax
call fcn.0041eff8
add esp, 0xc
push str.Error_CryptGenKey
jmp 0x40f430
lea eax, [ebp - 0x4c]
push eax
push 1
push dword [ebp - 0x48]
call dword [sym.imp.ADVAPI32.dll_CryptGetUserKey]
test eax, eax
jne 0x40f651
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
cmp eax, 0x8009000d
jne 0x40f628
lea eax, [ebp - 0x4c]
push eax
push 1
push 1
push dword [ebp - 0x48]
call dword [sym.imp.ADVAPI32.dll_CryptGenKey]
test eax, eax
jne 0x40f651
test edi, edi
je 0x40f927
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xa
push 0x20
lea ecx, [ebp - 0x44]
push ecx
push eax
call fcn.0041eff8
add esp, 0xc
push str.Could_not_create_a_user_public_key
jmp 0x40f430
test edi, edi
je 0x40f927
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xa
push 0x20
lea ecx, [ebp - 0x44]
push ecx
push eax
call fcn.0041eff8
add esp, 0xc
push str.User_public_key_is_not_available_and_may_not_exist
jmp 0x40f430
lea eax, [ebp - 0x68]
push eax
push 0
push 0
push 1
push dword [ebp - 0x4c]
push dword [ebp - 0x58]
call dword [sym.imp.ADVAPI32.dll_CryptExportKey]
test eax, eax
jne 0x40f694
test edi, edi
je 0x40f927
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xa
push 0x20
lea ecx, [ebp - 0x44]
push ecx
push eax
call fcn.0041eff8
add esp, 0xc
push str.Error_computing_BLOB_length
jmp 0x40f430
push dword [ebp - 0x68]
push 8
push dword [ebp - 0x64]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
jne 0x40f6d1
test edi, edi
je 0x40f927
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xa
push 0x20
lea ecx, [ebp - 0x44]
push ecx
push eax
call fcn.0041eff8
add esp, 0xc
push str.Out_of_memory
jmp 0x40f430
lea eax, [ebp - 0x68]
push eax
push ebx
push 0
push 1
push dword [ebp - 0x4c]
push dword [ebp - 0x58]
call dword [sym.imp.ADVAPI32.dll_CryptExportKey]
test eax, eax
jne 0x40f713
test edi, edi
je 0x40f927
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xa
push 0x20
lea ecx, [ebp - 0x44]
push ecx
push eax
call fcn.0041eff8
add esp, 0xc
push str.Error_CryptExportKey
jmp 0x40f430
mov eax, dword [ebp - 0x4c]
test eax, eax
je 0x40f755
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
test eax, eax
jne 0x40f74e
test edi, edi
je 0x40f927
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xa
push 0x20
lea ecx, [ebp - 0x44]
push ecx
push eax
call fcn.0041eff8
add esp, 0xc
push str.Error_CryptDestroyKey
jmp 0x40f430
mov dword [ebp - 0x4c], 0
push 0
lea eax, [ebp - 0x54]
push eax
push 4
lea eax, [ebp - 0x68]
push eax
push dword [ebp - 0x5c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40f797
test edi, edi
je 0x40f927
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xa
push 0x20
lea ecx, [ebp - 0x44]
push ecx
push eax
call fcn.0041eff8
add esp, 0xc
push str.Error_writing_header
jmp 0x40f430
push 0
lea eax, [ebp - 0x54]
push eax
push dword [ebp - 0x68]
push ebx
push dword [ebp - 0x5c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40f76e
push ebx
push 0
push dword [ebp - 0x64]
call dword [sym.imp.KERNEL32.dll_HeapFree]
push 0x3f0
push 8
push dword [ebp - 0x64]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x60], eax
test eax, eax
jne 0x40f7fa
test edi, edi
je 0x40f925
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xa
push 0x20
lea ecx, [ebp - 0x44]
push ecx
push eax
call fcn.0041eff8
add esp, 0xc
push str.Out_of_memory
jmp 0x40f8e6
xor bl, bl
jmp 0x40f803
mov eax, dword [ebp - 0x60]
push 0
lea ecx, [ebp - 0x54]
push ecx
push 0x3e8
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40f8c6
cmp dword [ebp - 0x54], 0x3e8
mov eax, 1
push 0x3f0
movzx ebx, bl
cmovb ebx, eax
lea eax, [ebp - 0x54]
push eax
push dword [ebp - 0x60]
movzx eax, bl
push 0
push eax
push 0
push dword [ebp - 0x58]
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
je 0x40f8a0
push 0
lea eax, [ebp - 0x54]
push eax
push dword [ebp - 0x54]
push dword [ebp - 0x60]
push dword [ebp - 0x5c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40f87a
test bl, bl
je 0x40f800
mov dword [ebp - 0x50], 1
jmp 0x40f925
test edi, edi
je 0x40f925
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xa
push 0x20
lea ecx, [ebp - 0x44]
push ecx
push eax
call fcn.0041eff8
add esp, 0xc
push str.Error_writing_ciphertext
jmp 0x40f8e6
test edi, edi
je 0x40f925
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xa
push 0x20
lea ecx, [ebp - 0x44]
push ecx
push eax
call fcn.0041eff8
add esp, 0xc
push str.Error_CryptEncrypt
jmp 0x40f8e6
test edi, edi
je 0x40f925
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xa
push 0x20
lea ecx, [ebp - 0x44]
push ecx
push eax
call fcn.0041eff8
add esp, 0xc
push str.Error_reading_source_plaintext_file
push ecx
mov edx, 0x104
mov ecx, edi
call fcn.00401190
push 0x434140
mov edx, 0x208
mov ecx, edi
call fcn.00401120
lea eax, [ebp - 0x44]
mov edx, 0x208
push eax
mov ecx, edi
call fcn.00401120
push 0x434a88
mov edx, 0x208
mov ecx, edi
call fcn.00401120
xor ebx, ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
mov eax, dword [ebp - 0x50]
push dword [ebp - 0x5c]
mov dword [ebp - 0x50], eax
call esi
mov eax, dword [ebp - 0x60]
mov esi, dword [ebp - 0x64]
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
test eax, eax
je 0x40f957
push eax
push 0
push esi
call edi
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x50], eax
test ebx, ebx
je 0x40f961
push ebx
push 0
push esi
call edi
mov eax, dword [ebp - 0x6c]
test eax, eax
je 0x40f96f
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov eax, dword [ebp - 0x4c]
mov ebx, dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
test eax, eax
je 0x40f97f
push eax
call ebx
mov eax, dword [ebp - 0x58]
test eax, eax
je 0x40f989
push eax
call ebx
mov ecx, dword [ebp - 0x48]
pop edi
pop esi
pop ebx
test ecx, ecx
je 0x40f99c
push 0
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x50]
xor ecx, ebp
call fcn.0041bbdc
mov esp, ebp
pop ebp
ret