Function at 0x4c4af0
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59dd76
mov eax, dword fs:[0]
push eax
sub esp, 0xe8
push ebx
push esi
push edi
mov eax, dword [0x61e69c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, ecx
mov edi, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
mov dword [ebp - 4], 0
mov ecx, dword [ebx + 8]
test ecx, ecx
jne 0x4c4b67
push 0x80090003
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x18], str.Encrypt_1_:_Key_is_not_valid
call fcn.004f795a
push 0x607cf0
lea ecx, [ebp - 0x48]
push ecx
mov dword [ebp - 0x48], vtable.WinAESException.0
call fcn.004fe8eb
test edi, edi
jne 0x4c4b9e
push 0x6f8
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea edx, [ebp - 0x18]
push edx
lea ecx, [ebp - 0x54]
mov dword [ebp - 0x18], str.Encrypt_1_:_Buffer_is_NULL
call fcn.004f795a
push 0x607cf0
lea eax, [ebp - 0x54]
push eax
mov dword [ebp - 0x54], vtable.WinAESException.0
call fcn.004fe8eb
mov eax, edx
shr eax, 4
inc eax
shl eax, 4
cmp esi, eax
jae 0x4c4bde
push 0x80090028
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea ecx, [ebp - 0x18]
push ecx
lea ecx, [ebp - 0x24]
mov dword [ebp - 0x18], str.Encrypt_1_:_Buffer_is_too_small
call fcn.004f795a
push 0x607cf0
lea edx, [ebp - 0x24]
push edx
mov dword [ebp - 0x24], vtable.WinAESException.0
call fcn.004fe8eb
cmp byte [ebx + 0x10], 0
jne 0x4c4c17
push 0x80090027
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x18], str.Encrypt_1_:_IV_has_not_been_set
call fcn.004f795a
push 0x607cf0
lea ecx, [ebp - 0x30]
push ecx
mov dword [ebp - 0x30], vtable.WinAESException.0
call fcn.004fe8eb
push esi
mov dword [ebp + 0xc], edx
lea edx, [ebp + 0xc]
push edx
push edi
push 0
push 1
push 0
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
jne 0x4c4d26
lea eax, [ebp - 0xd4]
push eax
call fcn.004b5080
lea ecx, [ebp - 0xd4]
push str.Encrypt_1_:_CryptEncrypt_failed__
push ecx
mov byte [ebp - 4], 1
call fcn.004b7630
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
add esp, 8
call edi
call fcn.004c5430
push eax
lea edx, [ebp - 0xd4]
push edx
call fcn.004b7630
add esp, 8
lea eax, [ebp - 0xd4]
push str.__0x
push eax
call fcn.004b7630
add esp, 8
push 0x4b35d0
mov esi, eax
call fcn.004b4ce0
mov esi, eax
call edi
push eax
push esi
call fcn.004c5740
push 0x5f9b80
push eax
call fcn.004b7630
mov ecx, dword [ebp + 0x10]
mov dword [ecx], 0
add esp, 8
lea ecx, [ebp - 0xf0]
lea eax, [ebp - 0xd4]
call fcn.004b51e0
mov byte [ebp - 4], 2
cmp dword [eax + 0x18], 0x10
jb 0x4c4cdb
mov edx, dword [eax + 4]
mov dword [ebp + 0x10], edx
jmp 0x4c4ce1
add eax, 4
mov dword [ebp + 0x10], eax
lea eax, [ebp + 0x10]
push eax
lea ecx, [ebp - 0x3c]
call fcn.004f795a
push 0x607cf0
lea ecx, [ebp - 0x3c]
push ecx
mov dword [ebp - 0x3c], vtable.WinAESException.0
call fcn.004fe8eb
mov edx, dword [ebp + 8]
test byte [edx + 0x14], 0x10
je 0x4c4d14
push 0
push 0
call fcn.004fe8eb
mov dword [ebp + 8], 0
mov eax, 0x4c4d21
ret
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
mov dword [edx], ecx
xor ecx, ecx
test eax, eax
setne cl
mov al, cl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc