Function at 0x418d00
Capabilities:
Encrypt or decrypt data via bcrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [0x425024]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov dword [ebp - 0x30], eax
xor esi, esi
mov eax, dword [ebp + 0xc]
xor edi, edi
push esi
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0x14]
push esi
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp + 0x18]
push esi
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x1c], edi
call dword [sym.imp.KERNEL32.dll_HeapCreate]
mov ebx, eax
test ebx, ebx
je 0x418eae
push esi
push esi
push 0x420a4c
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.bcrypt.dll_BCryptOpenAlgorithmProvider]
test eax, eax
js 0x418eae
push esi
lea eax, [ebp - 8]
mov dword [ebp - 0x28], esi
push eax
push 4
lea eax, [ebp - 0x28]
mov dword [ebp - 8], esi
push eax
push str.ObjectLength
push dword [ebp - 0x24]
call dword [sym.imp.bcrypt.dll_BCryptGetProperty]
test eax, eax
js 0x418eae
push dword [ebp - 0x28]
push 8
push ebx
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x20], eax
test eax, eax
je 0x418eae
push esi
lea eax, [ebp - 8]
mov dword [ebp - 0xc], esi
push eax
push 4
lea eax, [ebp - 0xc]
push eax
push str.BlockLength
push dword [ebp - 0x24]
call dword [sym.imp.bcrypt.dll_BCryptGetProperty]
test eax, eax
js 0x418eae
cmp dword [ebp - 0xc], 0x10
ja 0x418eae
push esi
push dword [ebp + 0x10]
lea eax, [ebp - 0x1c]
push dword [ebp - 0x14]
push dword [ebp - 0x28]
push dword [ebp - 0x20]
push eax
push dword [ebp - 0x24]
call dword [sym.imp.bcrypt.dll_BCryptGenerateSymmetricKey]
test eax, eax
js 0x418eae
push 1
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], esi
push eax
push esi
push esi
push dword [ebp - 0xc]
push dword [ebp - 0x30]
push esi
push dword [ebp - 0x34]
push dword [ebp - 0x38]
push dword [ebp - 0x1c]
call dword [sym.imp.bcrypt.dll_BCryptDecrypt]
test eax, eax
js 0x418eae
mov eax, dword [ebp - 0x10]
push 4
push 0x3000
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
push esi
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], esi
push eax
push 0xffffffffffffffff
call dword [sym.imp.ntdll.dll_NtAllocateVirtualMemory]
mov esi, dword [ebp - 0x20]
mov ecx, eax
test ecx, ecx
js 0x418eae
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x418e5e
nop
mov byte [esi], 0
lea esi, [esi + 1]
sub eax, 1
jne 0x418e50
mov esi, dword [ebp - 0x20]
test ecx, ecx
js 0x418eae
test esi, esi
je 0x418eae
push 1
lea eax, [ebp - 8]
mov dword [ebp - 8], edi
push eax
push dword [ebp - 0x10]
push esi
push dword [ebp - 0xc]
push dword [ebp - 0x30]
push 0
push dword [ebp - 0x34]
push dword [ebp - 0x38]
push dword [ebp - 0x1c]
call dword [sym.imp.bcrypt.dll_BCryptDecrypt]
test eax, eax
js 0x418eae
push dword [ebp - 0x1c]
call dword [sym.imp.bcrypt.dll_BCryptDestroyKey]
mov eax, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x40]
mov dword [ebp - 0x1c], edi
mov edi, 1
mov dword [eax], esi
mov eax, dword [ebp - 0x10]
mov dword [ecx], eax
jmp 0x418ebc
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x418ebc
push eax
call dword [sym.imp.bcrypt.dll_BCryptDestroyKey]
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x418ecc
push 0
push eax
call dword [sym.imp.bcrypt.dll_BCryptCloseAlgorithmProvider]
test ebx, ebx
je 0x418ed7
push ebx
call dword [sym.imp.KERNEL32.dll_HeapDestroy]
test edi, edi
jne 0x418f0c
test esi, esi
je 0x418efa
push 0x8000
lea eax, [ebp - 0x18]
mov dword [ebp - 0x2c], esi
push eax
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x18], edi
push eax
push 0xffffffffffffffff
call dword [sym.imp.ntdll.dll_NtFreeVirtualMemory]
mov eax, dword [ebp - 0x3c]
mov dword [eax], 0
mov eax, dword [ebp - 0x40]
mov dword [eax], 0
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041a772
mov esp, ebp
pop ebp
ret