Function at 0x401550
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 rbp
mov rbp, rsp
sub rsp, 0xa0
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov qword [rbp + 0x20], r8
mov byte [rbp - 1], 0
mov qword [rbp - 0x28], 0xffffffffffffffff
mov qword [rbp - 0x10], 0xffffffffffffffff
mov qword [rbp - 0x40], 0
mov qword [rbp - 0x48], 0
mov qword [rbp - 0x50], 0
mov qword [rbp - 0x18], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], pe_nt_image_headers64
mov dword [rsp + 0x20], 3
mov r9d, 0
mov r8d, 1
mov edx, 1
mov rcx, qword [rbp + 0x10]
mov rax, qword [sym.imp.KERNEL32.dll_CreateFileA]
call rax
mov qword [rbp - 0x28], rax
cmp qword [rbp - 0x28], 0xffffffffffffffff
jne 0x4015f9
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rcx, str.Error_Creating_Resources
call sym.MyHandleError_char__int_
jmp 0x401a34
mov rax, qword [rbp + 0x18]
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x106
mov dword [rsp + 0x20], 4
mov r9d, 0
mov r8d, 1
mov edx, 2
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CreateFileA]
call rax
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0xffffffffffffffff
jne 0x40165a
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rcx, str.Error_opening_resource_n
call sym.MyHandleError_char__int_
jmp 0x401a34
lea rax, [rbp - 0x50]
mov dword [rsp + 0x20], 0
mov r9d, 1
lea r8, str.Microsoft_Enhanced_Cryptographic_Provider_v1.0
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
call rax
test eax, eax
setne al
test al, al
jne 0x4016a9
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rcx, str.Error_while_decrypting_resources_n
call sym.MyHandleError_char__int_
jmp 0x401a34
cmp qword [rbp + 0x20], 0
je 0x4016bf
mov rax, qword [rbp + 0x20]
movzx eax, byte [rax]
test al, al
jne 0x4017ff
mov qword [rbp - 0x30], 0
lea rdx, [rbp - 0x54]
lea rax, [rbp - 0x58]
mov rcx, qword [rbp - 0x28]
mov qword [rsp + 0x20], 0
mov r9, rdx
mov r8d, 4
mov rdx, rax
mov rax, qword [sym.imp.KERNEL32.dll_ReadFile]
call rax
test eax, eax
sete al
test al, al
je 0x401716
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rcx, str.Error_Creating_Resources_n
call sym.MyHandleError_char__int_
jmp 0x401a34
mov eax, dword [rbp - 0x58]
mov eax, eax
mov rcx, rax
call sym.malloc
mov qword [rbp - 0x30], rax
cmp qword [rbp - 0x30], 0
sete al
test al, al
je 0x401744
mov edx, 0x8007000e
lea rcx, str.Memory_allocation_error._n
call sym.MyHandleError_char__int_
mov r8d, dword [rbp - 0x58]
lea rcx, [rbp - 0x54]
mov rdx, qword [rbp - 0x30]
mov rax, qword [rbp - 0x28]
mov qword [rsp + 0x20], 0
mov r9, rcx
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_ReadFile]
call rax
test eax, eax
sete al
test al, al
je 0x401791
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rcx, str.Error_Creating_Resources
call sym.MyHandleError_char__int_
jmp 0x401a34
mov r8d, dword [rbp - 0x58]
mov rcx, qword [rbp - 0x50]
mov rdx, qword [rbp - 0x30]
lea rax, [rbp - 0x40]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0
mov r9d, 0
mov rax, qword [sym.imp.ADVAPI32.dll_CryptImportKey]
call rax
test eax, eax
sete al
test al, al
je 0x4017e3
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rcx, str.Error_Creating_Resources
call sym.MyHandleError_char__int_
nop
jmp 0x401a34
cmp qword [rbp - 0x30], 0
je 0x4018ec
mov rax, qword [rbp - 0x30]
mov rcx, rax
call sym.free
jmp 0x4018ec
mov rcx, qword [rbp - 0x50]
lea rax, [rbp - 0x48]
mov qword [rsp + 0x20], rax
mov r9d, 0
mov r8d, 0
mov edx, 0x8003
mov rax, qword [sym.imp.ADVAPI32.dll_CryptCreateHash]
call rax
test eax, eax
sete al
test al, al
je 0x40184b
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rcx, str.Error_Creating_Resources_n
call sym.MyHandleError_char__int_
jmp 0x401a34
mov rax, qword [rbp + 0x20]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_lstrlenA]
call rax
mov ecx, eax
mov rax, qword [rbp - 0x48]
mov rdx, qword [rbp + 0x20]
mov r9d, 0
mov r8d, ecx
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptHashData]
call rax
test eax, eax
sete al
test al, al
je 0x40189f
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rcx, str.Error_Creating_Resources_n
call sym.MyHandleError_char__int_
jmp 0x401a34
mov rdx, qword [rbp - 0x48]
mov rcx, qword [rbp - 0x50]
lea rax, [rbp - 0x40]
mov qword [rsp + 0x20], rax
mov r9d, 0x800000
mov r8, rdx
mov edx, 0x6801
mov rax, qword [sym.imp.ADVAPI32.dll_CryptDeriveKey]
call rax
test eax, eax
sete al
test al, al
je 0x4018ed
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rcx, str.Error_Creating_Resources_n
call sym.MyHandleError_char__int_
jmp 0x401a34
nop
mov dword [rbp - 0x34], 0x3e8
mov eax, dword [rbp - 0x34]
mov dword [rbp - 0x38], eax
mov eax, dword [rbp - 0x38]
mov rcx, rax
call sym.malloc
mov qword [rbp - 0x18], rax
cmp qword [rbp - 0x18], 0
sete al
test al, al
je 0x40192b
mov edx, 0x8007000e
lea rcx, str.Memory_full_n
call sym.MyHandleError_char__int_
jmp 0x401a34
mov byte [rbp - 0x19], 0
lea rcx, [rbp - 0x54]
mov r8d, dword [rbp - 0x34]
mov rdx, qword [rbp - 0x18]
mov rax, qword [rbp - 0x28]
mov qword [rsp + 0x20], 0
mov r9, rcx
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_ReadFile]
call rax
test eax, eax
sete al
test al, al
je 0x40197c
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rcx, str.Error_Creating_Resources_n
call sym.MyHandleError_char__int_
jmp 0x401a34
mov eax, dword [rbp - 0x54]
cmp dword [rbp - 0x34], eax
jbe 0x401988
mov byte [rbp - 0x19], 1
movzx edx, byte [rbp - 0x19]
mov rcx, qword [rbp - 0x40]
lea rax, [rbp - 0x54]
mov qword [rsp + 0x28], rax
mov rax, qword [rbp - 0x18]
mov qword [rsp + 0x20], rax
mov r9d, 0
mov r8d, edx
mov edx, 0
mov rax, qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
call rax
test eax, eax
sete al
test al, al
je 0x4019db
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rcx, str.Error_Creating_Resources_n
call sym.MyHandleError_char__int_
jmp 0x401a34
mov r8d, dword [rbp - 0x54]
lea rcx, [rbp - 0x54]
mov rdx, qword [rbp - 0x18]
mov rax, qword [rbp - 0x10]
mov qword [rsp + 0x20], 0
mov r9, rcx
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_WriteFile]
call rax
test eax, eax
sete al
test al, al
je 0x401a25
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rcx, str.Error_Creating_Resources_n
call sym.MyHandleError_char__int_
jmp 0x401a34
cmp byte [rbp - 0x19], 0
jne 0x401a30
jmp 0x40192f
mov byte [rbp - 1], 1
cmp qword [rbp - 0x18], 0
je 0x401a47
mov rax, qword [rbp - 0x18]
mov rcx, rax
call sym.free
cmp qword [rbp - 0x28], 0
je 0x401a5e
mov rax, qword [rbp - 0x28]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
cmp qword [rbp - 0x10], 0
je 0x401a75
mov rax, qword [rbp - 0x10]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [rbp - 0x48]
test rax, rax
je 0x401ab6
mov rax, qword [rbp - 0x48]
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
call rax
test eax, eax
sete al
test al, al
je 0x401aae
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rcx, str.Error_Creating_Resources_n
call sym.MyHandleError_char__int_
mov qword [rbp - 0x48], 0
mov rax, qword [rbp - 0x40]
test rax, rax
je 0x401aef
mov rax, qword [rbp - 0x40]
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
call rax
test eax, eax
sete al
test al, al
je 0x401aef
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rcx, str.Error_Creating_Resources_n
call sym.MyHandleError_char__int_
mov rax, qword [rbp - 0x50]
test rax, rax
je 0x401b2d
mov rax, qword [rbp - 0x50]
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
call rax
test eax, eax
sete al
test al, al
je 0x401b2d
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rcx, str.Error_Creating_Resources_n
call sym.MyHandleError_char__int_
movzx eax, byte [rbp - 1]
add rsp, 0xa0
pop rbp
ret