Function at 0x10004d70
Capabilities:
Create new key via cryptacquirecontext
Delete file
Encrypt data using aes via winapi
Encrypt or decrypt via wincrypt
Get file size
Read file on windows
Write file on windows

Disassembly:
sub esp, 0x70
mov eax, dword [0x10139d00]
xor eax, esp
mov dword [esp + 0x68], eax
push ebx
mov ebx, edx
push esi
push edi
mov edi, ecx
mov dword [esp + 0x2c], ebx
mov byte [esp + 0x13], 0
test ebx, ebx
je 0x10004ef2
push 0xf0000000
push 0x18
push 0
push 0
lea eax, [esp + 0x2c]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x10004ef2
xor eax, eax
push 0x10
xor ecx, ecx
lea edx, [esp + 0x48]
push 0x101285a4
push edx
mov byte [esp + 0x44], 8
mov byte [esp + 0x45], 2
mov word [esp + 0x46], cx
mov dword [esp + 0x48], 0x660e
mov dword [esp + 0x4c], 0x10
mov byte [esp + 0x60], cl
mov dword [esp + 0x61], eax
mov dword [esp + 0x65], eax
mov dword [esp + 0x69], eax
mov word [esp + 0x6d], ax
mov byte [esp + 0x6f], al
call fcn.100d0e10
push 0x10
lea eax, [esp + 0x64]
push 0x101285b8
push eax
call fcn.100d0e10
mov eax, dword [esp + 0x34]
add esp, 0x18
lea ecx, [esp + 0x14]
push ecx
push 0
push 0
push 0x1c
lea edx, [esp + 0x48]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
push 0
test eax, eax
je 0x10004ee7
mov eax, dword [esp + 0x18]
mov esi, dword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
lea edx, [esp + 0x34]
push edx
push 4
push eax
mov dword [esp + 0x40], 1
call esi
mov ecx, dword [esp + 0x14]
test eax, eax
jne 0x10004e86
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov edx, dword [esp + 0x1c]
push 0
push edx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x68]
xor ecx, esp
call fcn.100d0738
add esp, 0x70
ret
push 0
lea eax, [esp + 0x38]
push eax
push 3
push ecx
mov dword [esp + 0x44], 1
call esi
mov edx, dword [esp + 0x14]
test eax, eax
jne 0x10004eca
push edx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov eax, dword [esp + 0x1c]
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x68]
xor ecx, esp
call fcn.100d0738
add esp, 0x70
ret
push 0
lea ecx, [esp + 0x58]
push ecx
push 1
push edx
call esi
test eax, eax
jne 0x10004f06
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
push 0
mov ecx, dword [esp + 0x20]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x68]
xor ecx, esp
call fcn.100d0738
add esp, 0x70
ret
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileW]
call edi
mov esi, eax
cmp esi, 0xffffffff
je 0x10005023
lea edx, [esp + 0x20]
push edx
push esi
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], 0
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
push ebx
call edi
mov edi, eax
cmp edi, 0xffffffff
je 0x1000501c
push 0
lea eax, [esp + 0x1c]
push eax
push 0x10
lea ecx, [esp + 0x70]
push ecx
push esi
mov dword [esp + 0x2c], 0
xor bl, bl
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1000500d
nop
mov eax, dword [esp + 0x18]
test eax, eax
je 0x1000500d
cmp eax, 0x10
jne 0x1000505f
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
adc dword [esp + 0x24], 0xffffffff
mov dword [esp + 0x20], eax
test bl, bl
jne 0x10004fb7
mov bl, 1
or eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x68]
push eax
push 0
jne 0x10004fd1
push 1
jmp 0x10004fd3
push 0
push 0
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
mov eax, dword [esp + 0x18]
push 0
lea edx, [esp + 0x1c]
push edx
push eax
lea ecx, [esp + 0x70]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea edx, [esp + 0x1c]
push edx
push 0x10
lea eax, [esp + 0x70]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x10004f90
push edi
mov byte [esp + 0x17], bl
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [esp + 0x2c]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov edx, dword [esp + 0x1c]
push 0
push edx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
cmp byte [esp + 0x13], 0
jne 0x10005049
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ecx, dword [esp + 0x74]
mov al, byte [esp + 0x13]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.100d0738
add esp, 0x70
ret
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
push esi
call edi
mov ebx, dword [esp + 0x2c]
jmp 0x10005042