Function at 0x65cf0a0
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x65d1046
mov eax, dword fs:[0]
push eax
sub esp, 0x1d8
mov eax, dword [0x65e4e2c]
xor eax, ebp
mov dword [ebp - 0x18], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, dword [ebp + 8]
mov edi, ecx
mov ecx, dword [esi]
mov ebx, edx
mov dword [ebp - 0x1d0], esi
test ecx, ecx
je 0x65cf0f1
mov eax, dword [ecx]
mov edx, dword [eax + 8]
call edx
mov dword [esi], 0
mov eax, dword [edi + 4]
test eax, eax
jne 0x65cf102
mov eax, 0x8007139f
jmp 0x65cf393
test ebx, ebx
jne 0x65cf110
mov eax, 0x80070057
jmp 0x65cf393
mov esi, dword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
push 0
lea ecx, [ebp - 0x1e0]
push ecx
push 4
push eax
mov dword [ebp - 0x1e0], 1
call esi
test eax, eax
jne 0x65cf14f
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x65cf393
and eax, 0xffff
or eax, 0x80070000
jmp 0x65cf393
mov eax, dword [edi + 4]
push 0
lea edx, [ebp - 0x1dc]
push edx
push 3
push eax
mov dword [ebp - 0x1dc], 1
call esi
test eax, eax
je 0x65cf132
cmp byte [ebx], 0
mov eax, ebx
je 0x65cf17b
inc eax
cmp byte [eax], 0
jne 0x65cf175
sub eax, ebx
mov esi, eax
lea ecx, [ebp - 0xc4]
mov dword [ebp - 0x1d8], esi
call fcn.0658b8e9
push esi
lea ecx, [ebp - 0xc4]
mov dword [ebp - 4], 0
call fcn.0658bb20
test eax, eax
jne 0x65cf1bc
lea ecx, [ebp - 0xc4]
call fcn.0658bb15
mov eax, 0x8007000e
jmp 0x65cf393
lea ecx, [ebp - 0x1d8]
push ecx
lea ecx, [ebp - 0xc4]
call fcn.0658ba91
push eax
mov ecx, ebx
call fcn.06571180
mov ecx, ebx
call fcn.06571040
add esp, 8
lea ecx, [ebp - 0xc4]
test eax, eax
jne 0x65cf1f9
call fcn.0658bb15
mov eax, 0x8000ffff
jmp 0x65cf393
call fcn.0658ba91
mov esi, eax
xor eax, eax
mov dword [ebp - 0x27], eax
mov dword [ebp - 0x23], eax
mov dword [ebp - 0x1f], eax
mov word [ebp - 0x1b], ax
mov byte [ebp - 0x19], al
mov eax, dword [ebp - 0x1d8]
mov byte [ebp - 0x28], 0
cmp eax, 0x10
jae 0x65cf236
lea ecx, [ebp - 0xc4]
call fcn.0658bb15
mov eax, 0x8007000d
jmp 0x65cf393
add eax, 0xfffffff0
mov dword [ebp - 0x1d4], eax
mov edx, dword [eax + esi]
mov dword [ebp - 0x28], edx
mov ecx, dword [eax + esi + 4]
mov dword [ebp - 0x24], ecx
mov edx, dword [eax + esi + 8]
push 0
lea ecx, [ebp - 0x28]
push ecx
mov dword [ebp - 0x20], edx
mov edx, dword [edi + 4]
mov eax, dword [eax + esi + 0xc]
push 1
push edx
mov dword [ebp - 0x1c], eax
call dword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
jne 0x65cf298
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x65cf284
and eax, 0xffff
or eax, 0x80070000
lea ecx, [ebp - 0xc4]
mov esi, eax
call fcn.0658bb15
mov eax, esi
jmp 0x65cf393
mov ecx, dword [edi + 4]
lea eax, [ebp - 0x1d4]
push eax
push esi
push 0
push 1
push 0
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
jne 0x65cf2dc
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x65cf2c8
and eax, 0xffff
or eax, 0x80070000
lea ecx, [ebp - 0xc4]
mov esi, eax
call fcn.0658bb15
mov eax, esi
jmp 0x65cf393
mov edx, dword [ebp - 0x1d4]
mov byte [edx + esi], 0
call fcn.0658d623
test eax, eax
je 0x65cf2f4
add eax, 8
jmp 0x65cf2f6
xor eax, eax
mov edi, dword [ebp - 0x1d0]
mov dword [edi], eax
test eax, eax
je 0x65cf1a7
push 0xfde9
lea eax, [ebp - 0x1c8]
mov byte [ebp - 4], 1
push esi
lea ecx, [ebp - 0x1cc]
mov dword [ebp - 0x1cc], eax
call fcn.06571460
mov byte [ebp - 4], 2
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x1cc]
mov edx, dword [edx + 0x2c]
push eax
call edx
mov eax, dword [ebp - 0x1cc]
lea ecx, [ebp - 0x1c8]
cmp eax, ecx
je 0x65cf354
push eax
call fcn.065b6b02
add esp, 4
lea ecx, [ebp - 0xc4]
call fcn.0658bb15
xor eax, eax
jmp 0x65cf393
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x18]
xor ecx, ebp
call fcn.065b6645
mov esp, ebp
pop ebp
ret 4