Function at 0x673ed0
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
push ebp
lea ebp, [esp - 0x40]
sub esp, 0x40
push 0xffffffffffffffff
push 0x7c7406
mov eax, dword fs:[0]
push eax
sub esp, 0xa0
push ebx
push esi
push edi
mov eax, dword [0x89b044]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp + 0x3c], ecx
mov edi, dword [ecx + 8]
mov dword [ebp - 4], 0
test edi, edi
jne 0x673f47
push 0x80090003
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea eax, [ebp + 0x50]
push eax
lea ecx, [ebp + 0xc]
mov dword [ebp + 0x50], str.Encrypt_1_:_Key_is_not_valid
call fcn.007203fb
push 0x870120
lea ecx, [ebp + 0xc]
push ecx
mov dword [ebp + 0xc], vtable.WinAESException.0
call fcn.0072039e
mov ebx, dword [ebp + 0x48]
test ebx, ebx
jne 0x673f81
push 0x6f8
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea edx, [ebp + 0x50]
push edx
lea ecx, [ebp]
mov dword [ebp + 0x50], str.Encrypt_1_:_Buffer_is_NULL
call fcn.007203fb
push 0x870120
lea eax, [ebp]
push eax
mov dword [ebp], vtable.WinAESException.0
call fcn.0072039e
mov edx, dword [ebp + 0x50]
mov esi, dword [ebp + 0x4c]
mov eax, edx
shr eax, 4
inc eax
shl eax, 4
cmp esi, eax
jae 0x673fc7
push 0x80090028
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea ecx, [ebp + 0x50]
push ecx
lea ecx, [ebp + 0x30]
mov dword [ebp + 0x50], str.Encrypt_1_:_Buffer_is_too_small
call fcn.007203fb
push 0x870120
lea edx, [ebp + 0x30]
push edx
mov dword [ebp + 0x30], vtable.WinAESException.0
call fcn.0072039e
cmp byte [ecx + 0x10], 0
jne 0x674000
push 0x80090027
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea eax, [ebp + 0x50]
push eax
lea ecx, [ebp + 0x24]
mov dword [ebp + 0x50], str.Encrypt_1_:_IV_has_not_been_set
call fcn.007203fb
push 0x870120
lea ecx, [ebp + 0x24]
push ecx
mov dword [ebp + 0x24], vtable.WinAESException.0
call fcn.0072039e
push esi
mov dword [ebp + 0x48], edx
lea edx, [ebp + 0x48]
push edx
push ebx
push 0
push 1
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
jne 0x674115
push 1
push 2
lea ecx, [ebp - 0x90]
call fcn.00673a90
lea eax, [ebp - 0x90]
push str.Encrypt_1_:_CryptEncrypt_failed__
push eax
mov byte [ebp - 4], 1
call fcn.00673b70
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
add esp, 8
call edi
push eax
call fcn.00670a80
push eax
lea ecx, [ebp - 0x90]
push ecx
call fcn.00673b70
add esp, 0xc
lea edx, [ebp - 0x90]
push str.__0x
push edx
call fcn.00673b70
add esp, 8
push 0x670410
mov ecx, eax
call fcn.00670ca0
mov esi, eax
call edi
push eax
mov ecx, esi
call fcn.00673d80
push 0x8151f0
push eax
call fcn.00673b70
mov eax, dword [ebp + 0x54]
add esp, 8
lea ecx, [ebp - 0xac]
push ecx
lea ecx, [ebp - 0x90]
mov dword [eax], 0
call fcn.00672540
cmp dword [eax + 0x18], 0x10
mov byte [ebp - 4], 2
jb 0x6740ca
mov edx, dword [eax + 4]
mov dword [ebp + 0x54], edx
jmp 0x6740d0
add eax, 4
mov dword [ebp + 0x54], eax
lea eax, [ebp + 0x54]
push eax
lea ecx, [ebp + 0x18]
call fcn.007203fb
push 0x870120
lea ecx, [ebp + 0x18]
push ecx
mov dword [ebp + 0x18], vtable.WinAESException.0
call fcn.0072039e
mov edx, dword [ebp + 0x3c]
test byte [edx + 0x14], 0x10
je 0x674103
push 0
push 0
call fcn.0072039e
mov dword [ebp + 0x54], 0
mov eax, 0x674110
ret
mov ecx, dword [ebp + 0x54]
mov edx, dword [ebp + 0x48]
mov dword [ecx], 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
add ebp, 0x40
mov esp, ebp
pop ebp
ret 0x10