Function at 0x40f4e0
Capabilities:
Create new key via cryptacquirecontext
Encrypt data using rc4 via winapi
Get file size
Hash data via wincrypt
Hash data with md5
Initialize hashing via wincrypt
Read file on windows

Disassembly:
sub esp, 8
push esi
push edi
push 0x18
mov edi, 1
call fcn.0041095c
mov esi, eax
add esp, 4
xor eax, eax
test esi, esi
je 0x40f7b0
push ebx
mov ebx, dword [esp + 0x1c]
push ebp
push eax
push 0x80
push 3
mov dword [esi], eax
push eax
mov dword [esi + 4], eax
push edi
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
push 0x80000000
mov dword [esi + 0x10], eax
push ebx
mov dword [esi + 0x14], eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esi], eax
cmp eax, 0xffffffff
jne 0x40f54b
mov ebp, dword [esp + 0x28]
push ebx
push str.Error_opening_ciphertext_file__s_n
push ebp
call fcn.00410748
add esp, 0xc
xor edi, edi
jmp 0x40f5a5
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
push 0
push 1
push 0
push str.Container
lea ebx, [esi + 0xc]
push ebx
mov dword [esi + 4], eax
call ebp
test eax, eax
jne 0x40f5a1
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x80090016
jne 0x40f5a1
push 8
push 1
push 0
push str.Container
push ebx
call ebp
test eax, eax
jne 0x40f5a1
mov eax, dword [esp + 0x28]
push str.Could_not_create_a_new_key_container._n
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov ebp, dword [esp + 0x28]
mov ebx, dword [esp + 0x24]
test ebx, ebx
jne 0x40f69e
cmp edi, 1
jne 0x40f762
mov edx, dword [esi]
push 0
lea ecx, [esp + 0x18]
push ecx
push 4
lea ebx, [esi + 0x14]
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edi, eax
test edi, edi
je 0x40f5dd
cmp dword [esp + 0x14], 0
jne 0x40f5f0
push str.Error_reading_file_header__n
push ebp
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
xor edi, edi
jmp 0x40f766
cmp edi, 1
jne 0x40f762
mov eax, dword [ebx]
push eax
call fcn.0041095c
add esp, 4
lea ebp, [esi + 0x10]
mov dword [ebp], eax
test eax, eax
jne 0x40f625
mov ecx, dword [esp + 0x28]
push str.Memory_allocation_error._n
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
xor edi, edi
jmp 0x40f766
mov eax, dword [ebx]
mov ecx, dword [esi]
push 0
lea edx, [esp + 0x18]
push edx
push eax
push ebp
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edi, eax
test edi, edi
je 0x40f646
cmp dword [esp + 0x14], 0
jne 0x40f65d
mov edx, dword [esp + 0x28]
push str.Error_reading_file_header__n
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
xor edi, edi
jmp 0x40f766
cmp edi, 1
jne 0x40f762
mov ecx, dword [ebx]
mov edx, dword [ebp]
lea eax, [esi + 8]
push eax
mov eax, dword [esi + 0xc]
push 0
push 0
push ecx
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
mov edi, eax
test edi, edi
jne 0x40f7a6
mov ecx, dword [esp + 0x28]
push str.Error_during_CryptImportKey__n
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x40f762
cmp edi, 1
jne 0x40f762
mov eax, dword [esi + 0xc]
lea edx, [esp + 0x10]
push edx
push 0
push 0
push 0x8003
push eax
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
mov edi, eax
test edi, edi
jne 0x40f6d1
push str.Error_during_CryptCreateHash___n
push ebp
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
cmp edi, 1
jne 0x40f762
mov eax, ebx
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40f6e0
mov ecx, dword [esp + 0x10]
push 0
sub eax, edx
push eax
push ebx
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov edi, eax
test edi, edi
jne 0x40f70c
push str.Error_during_CryptHashData_
push ebp
call ebx
cmp edi, 1
jne 0x40f762
mov eax, dword [esp + 0x10]
mov ecx, dword [esi + 0xc]
lea edx, [esi + 8]
push edx
push 0x800000
push eax
push 0x6801
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptDeriveKey]
mov edi, eax
test edi, edi
jne 0x40f73c
push str.Error_during_CryptDeriveKey_
push ebp
call ebx
cmp edi, 1
jne 0x40f762
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov edi, eax
test edi, edi
jne 0x40f75a
push str.Error_during_CryptDestroyHash_
push ebp
call ebx
mov dword [esp + 0x10], 0
test edi, edi
jne 0x40f7a6
mov eax, dword [esi]
test eax, eax
je 0x40f773
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi + 0xc]
test eax, eax
je 0x40f783
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, dword [esi + 0x10]
test eax, eax
je 0x40f793
push eax
call fcn.00410663
add esp, 4
push esi
call fcn.00410663
add esp, 4
pop ebp
pop ebx
mov eax, edi
pop edi
pop esi
add esp, 8
ret
mov eax, dword [esp + 0x1c]
pop ebp
mov dword [eax], esi
mov eax, edi
pop ebx
pop edi
pop esi
add esp, 8
ret