Function at 0x462690
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x524240
mov eax, dword fs:[0]
push eax
push ecx
sub esp, 0x11c
push ebx
push esi
push edi
mov eax, dword [0x56f28c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x108], ecx
mov dword [ebp - 0x14], 0
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x108]
cmp dword [eax + 8], 0
jne 0x46270b
push 0x80090003
call dword [sym.imp.KERNEL32.dll_SetLastError]
push str.Decrypt_1_:_Key_is_not_valid
lea ecx, [ebp - 0xac]
call fcn.00463510
push 0x5534e0
lea ecx, [ebp - 0xac]
push ecx
call fcn.004ffd8f
cmp dword [ebp + 8], 0
jne 0x46273d
push 0x6f8
call dword [sym.imp.KERNEL32.dll_SetLastError]
push str.Decrypt_1_:_Buffer_is_NULL
lea ecx, [ebp - 0xb8]
call fcn.00463510
push 0x5534e0
lea edx, [ebp - 0xb8]
push edx
call fcn.004ffd8f
mov eax, dword [ebp + 0x10]
xor edx, edx
mov ecx, 0x10
div ecx
test edx, edx
je 0x462779
push 0x80090005
call dword [sym.imp.KERNEL32.dll_SetLastError]
push str.Decrypt_1_:_Data_size_is_not_a_multple_of_block_size
lea ecx, [ebp - 0xc4]
call fcn.00463510
push 0x5534e0
lea edx, [ebp - 0xc4]
push edx
call fcn.004ffd8f
mov dword [ebp - 0x18], 0
lea eax, [ebp - 0x18]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
mov ecx, dword [ebp - 0x108]
call fcn.00462350
mov byte [ebp - 0x109], al
movzx edx, byte [ebp - 0x109]
test edx, edx
je 0x4627db
mov eax, dword [ebp - 0x18]
sub eax, 0x10
cmp dword [ebp + 0xc], eax
ja 0x4627db
push 0x80090028
call dword [sym.imp.KERNEL32.dll_SetLastError]
push str.Decrypt_1_:_Buffer_is_too_small
lea ecx, [ebp - 0xd0]
call fcn.00463510
push 0x5534e0
lea ecx, [ebp - 0xd0]
push ecx
call fcn.004ffd8f
mov edx, dword [ebp - 0x108]
movzx eax, byte [edx + 0x10]
test eax, eax
jne 0x462815
push 0x80090027
call dword [sym.imp.KERNEL32.dll_SetLastError]
push str.Decrypt_1_:_IV_has_not_been_set
lea ecx, [ebp - 0xdc]
call fcn.00463510
push 0x5534e0
lea ecx, [ebp - 0xdc]
push ecx
call fcn.004ffd8f
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0x1c], edx
lea eax, [ebp - 0x1c]
push eax
mov ecx, dword [ebp + 8]
push ecx
push 0
push 1
push 0
mov edx, dword [ebp - 0x108]
mov eax, dword [edx + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x46297d
push 1
push 2
lea ecx, [ebp - 0xa0]
call fcn.00406c20
mov dword [ebp - 0x110], eax
mov byte [ebp - 4], 1
push str.Decrypt_1_:_CryptDecrypt_failed__
lea ecx, [ebp - 0xa0]
push ecx
call fcn.00409520
add esp, 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00462f90
add esp, 4
mov dword [ebp - 0x114], eax
mov edx, dword [ebp - 0x114]
push edx
lea eax, [ebp - 0xa0]
push eax
call fcn.00409520
add esp, 8
push 0x538e88
lea ecx, [ebp - 0xa0]
push ecx
call fcn.00409520
add esp, 8
mov dword [ebp - 0x118], eax
push 0x405980
mov ecx, dword [ebp - 0x118]
call fcn.00406750
mov dword [ebp - 0x11c], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov ecx, dword [ebp - 0x11c]
call fcn.00463660
mov dword [ebp - 0x120], eax
push 0x538e84
mov edx, dword [ebp - 0x120]
push edx
call fcn.00409520
add esp, 8
mov eax, dword [ebp + 0x14]
mov dword [eax], 0
lea ecx, [ebp - 0x104]
push ecx
lea ecx, [ebp - 0xa0]
call fcn.00406d80
mov dword [ebp - 0x124], eax
mov edx, dword [ebp - 0x124]
mov dword [ebp - 0x128], edx
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x128]
call fcn.00403860
mov dword [ebp - 0x12c], eax
mov eax, dword [ebp - 0x12c]
push eax
lea ecx, [ebp - 0xe8]
call fcn.00463510
push 0x5534e0
lea ecx, [ebp - 0xe8]
push ecx
call fcn.004ffd8f
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x104]
call fcn.00402b90
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xa0]
call fcn.00406180
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp - 0x1c]
mov dword [edx], eax
jmp 0x4629b2
mov dword [ebp - 4], 0xffffffff
xor eax, eax
cmp dword [ebp - 0x14], 0
setne al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10