Function at 0x4c4d50
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59dd36
mov eax, dword fs:[0]
push eax
sub esp, 0xf0
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 ebx, dword [ebp + 0x10]
mov esi, dword [ebp + 8]
mov dword [ebp - 4], 0
mov eax, dword [esi + 8]
test eax, eax
jne 0x4c4dc5
push 0x80090003
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea eax, [ebp + 0xc]
push eax
lea ecx, [ebp - 0x44]
mov dword [ebp + 0xc], str.Decrypt_1_:_Key_is_not_valid
call fcn.004f795a
push 0x607cf0
lea ecx, [ebp - 0x44]
push ecx
mov dword [ebp - 0x44], vtable.WinAESException.0
call fcn.004fe8eb
test edx, edx
jne 0x4c4dfc
push 0x6f8
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea edx, [ebp + 0xc]
push edx
lea ecx, [ebp - 0x38]
mov dword [ebp + 0xc], str.Decrypt_1_:_Buffer_is_NULL
call fcn.004f795a
push 0x607cf0
lea eax, [ebp - 0x38]
push eax
mov dword [ebp - 0x38], vtable.WinAESException.0
call fcn.004fe8eb
test ecx, 0xf
je 0x4c4e37
push 0x80090005
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea ecx, [ebp + 0xc]
push ecx
lea ecx, [ebp - 0x50]
mov dword [ebp + 0xc], str.Decrypt_1_:_Data_size_is_not_a_multple_of_block_size
call fcn.004f795a
push 0x607cf0
lea edx, [ebp - 0x50]
push edx
mov dword [ebp - 0x50], vtable.WinAESException.0
call fcn.004fe8eb
lea edi, [ecx - 0x10]
cmp dword [ebp + 0xc], edi
ja 0x4c4e72
push 0x80090028
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea eax, [ebp + 0xc]
push eax
lea ecx, [ebp - 0x20]
mov dword [ebp + 0xc], str.Decrypt_1_:_Buffer_is_too_small
call fcn.004f795a
push 0x607cf0
lea ecx, [ebp - 0x20]
push ecx
mov dword [ebp - 0x20], vtable.WinAESException.0
call fcn.004fe8eb
cmp byte [esi + 0x10], 0
jne 0x4c4eab
push 0x80090027
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea edx, [ebp + 0xc]
push edx
lea ecx, [ebp - 0x2c]
mov dword [ebp + 0xc], str.Decrypt_1_:_IV_has_not_been_set
call fcn.004f795a
push 0x607cf0
lea eax, [ebp - 0x2c]
push eax
mov dword [ebp - 0x2c], vtable.WinAESException.0
call fcn.004fe8eb
mov dword [ebp + 0x10], ecx
lea ecx, [ebp + 0x10]
push ecx
push edx
push 0
push 1
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
jne 0x4c4fa5
lea edx, [ebp - 0xdc]
push edx
call fcn.004b5080
lea eax, [ebp - 0xdc]
push str.Decrypt_1_:_CryptDecrypt_failed__
push eax
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 ecx, [ebp - 0xdc]
push ecx
call fcn.004b7630
add esp, 8
lea edx, [ebp - 0xdc]
push str.__0x
push edx
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
add esp, 8
lea ecx, [ebp - 0xf8]
lea eax, [ebp - 0xdc]
mov dword [ebx], 0
call fcn.004b51e0
mov byte [ebp - 4], 2
cmp dword [eax + 0x18], 0x10
jb 0x4c4f68
mov eax, dword [eax + 4]
jmp 0x4c4f6b
add eax, 4
push eax
lea esi, [ebp - 0x5c]
call fcn.004c4380
push 0x607cf0
mov eax, esi
push eax
call fcn.004fe8eb
mov ecx, dword [ebp + 8]
test byte [ecx + 0x14], 0x10
je 0x4c4f93
push 0
push 0
call fcn.004fe8eb
mov dword [ebp + 8], 0
mov eax, 0x4c4fa0
ret
mov edx, dword [ebp + 0x10]
mov dword [ebx], edx
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