Function at 0x462380
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x52420c
mov eax, dword fs:[0]
push eax
push ecx
sub esp, 0x110
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 - 0xfc], ecx
mov dword [ebp - 0x14], 0
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0xfc]
cmp dword [eax + 8], 0
jne 0x4623fb
push 0x80090003
call dword [sym.imp.KERNEL32.dll_SetLastError]
push str.Encrypt_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 0x46242d
push 0x6f8
call dword [sym.imp.KERNEL32.dll_SetLastError]
push str.Encrypt_1_:_Buffer_is_NULL
lea ecx, [ebp - 0xb8]
call fcn.00463510
push 0x5534e0
lea edx, [ebp - 0xb8]
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 - 0xfc]
call fcn.00462320
mov byte [ebp - 0xfd], al
movzx edx, byte [ebp - 0xfd]
test edx, edx
je 0x46248c
mov eax, dword [ebp + 0xc]
cmp eax, dword [ebp - 0x18]
jae 0x46248c
push 0x80090028
call dword [sym.imp.KERNEL32.dll_SetLastError]
push str.Encrypt_1_:_Buffer_is_too_small
lea ecx, [ebp - 0xc4]
call fcn.00463510
push 0x5534e0
lea ecx, [ebp - 0xc4]
push ecx
call fcn.004ffd8f
mov edx, dword [ebp - 0xfc]
movzx eax, byte [edx + 0x10]
test eax, eax
jne 0x4624c6
push 0x80090027
call dword [sym.imp.KERNEL32.dll_SetLastError]
push str.Encrypt_1_:_IV_has_not_been_set
lea ecx, [ebp - 0xd0]
call fcn.00463510
push 0x5534e0
lea ecx, [ebp - 0xd0]
push ecx
call fcn.004ffd8f
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp + 0xc]
push eax
lea ecx, [ebp - 0x1c]
push ecx
mov edx, dword [ebp + 8]
push edx
push 0
push 1
push 0
mov eax, dword [ebp - 0xfc]
mov ecx, dword [eax + 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x462632
push 1
push 2
lea ecx, [ebp - 0xa0]
call fcn.00406c20
mov dword [ebp - 0x104], eax
mov byte [ebp - 4], 1
push str.Encrypt_1_:_CryptEncrypt_failed__
lea edx, [ebp - 0xa0]
push edx
call fcn.00409520
add esp, 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00462f90
add esp, 4
mov dword [ebp - 0x108], eax
mov eax, dword [ebp - 0x108]
push eax
lea ecx, [ebp - 0xa0]
push ecx
call fcn.00409520
add esp, 8
push 0x538da4
lea edx, [ebp - 0xa0]
push edx
call fcn.00409520
add esp, 8
mov dword [ebp - 0x10c], eax
push 0x405980
mov ecx, dword [ebp - 0x10c]
call fcn.00406750
mov dword [ebp - 0x110], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov ecx, dword [ebp - 0x110]
call fcn.00463660
mov dword [ebp - 0x114], eax
push 0x538da0
mov eax, dword [ebp - 0x114]
push eax
call fcn.00409520
add esp, 8
mov ecx, dword [ebp + 0x14]
mov dword [ecx], 0
lea edx, [ebp - 0xf8]
push edx
lea ecx, [ebp - 0xa0]
call fcn.00406d80
mov dword [ebp - 0x118], eax
mov eax, dword [ebp - 0x118]
mov dword [ebp - 0x11c], eax
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x11c]
call fcn.00403860
mov dword [ebp - 0x120], eax
mov ecx, dword [ebp - 0x120]
push ecx
lea ecx, [ebp - 0xdc]
call fcn.00463510
push 0x5534e0
lea edx, [ebp - 0xdc]
push edx
call fcn.004ffd8f
mov byte [ebp - 4], 1
lea ecx, [ebp - 0xf8]
call fcn.00402b90
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xa0]
call fcn.00406180
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 0x1c]
mov dword [eax], ecx
jmp 0x462667
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