Function at 0x1317d93
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
xor ebx, ebx
push esi
push edi
mov dword [ebp - 0x14], ecx
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0xc], ebx
cmp dword [ebp + 8], ebx
je 0x1317faf
cmp dword [ebp + 0x10], ebx
je 0x1317faf
mov eax, dword [ebp + 0x14]
cmp eax, ebx
je 0x1317faf
cmp dword [ecx + 0x20], ebx
jne 0x1317dda
mov dword [ebp - 4], 0x80049e51
jmp 0x1317fb6
mov edx, dword [eax]
push 4
mov dword [ebp - 0x10], edx
mov dword [eax], ebx
mov eax, dword [ebp + 8]
mov edx, 0x10320b8
pop edi
mov si, word [eax]
cmp si, word [edx]
jne 0x1317e10
cmp si, bx
je 0x1317e0c
mov si, word [eax + 2]
cmp si, word [edx + 2]
jne 0x1317e10
add eax, edi
add edx, edi
cmp si, bx
jne 0x1317dec
xor eax, eax
jmp 0x1317e15
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x1317e21
cmp dword [ecx + 8], 1
push 0x10
jmp 0x1317e9d
mov eax, dword [ebp + 8]
mov edx, 0x1032060
mov si, word [eax]
cmp si, word [edx]
jne 0x1317e4d
cmp si, bx
je 0x1317e49
mov si, word [eax + 2]
cmp si, word [edx + 2]
jne 0x1317e4d
add eax, edi
add edx, edi
cmp si, bx
jne 0x1317e29
xor eax, eax
jmp 0x1317e52
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x1317e5e
cmp dword [ecx + 8], 2
push 0x18
jmp 0x1317e9d
mov eax, dword [ebp + 8]
mov edx, 0x1032008
mov si, word [eax]
cmp si, word [edx]
jne 0x1317e8a
cmp si, bx
je 0x1317e86
mov si, word [eax + 2]
cmp si, word [edx + 2]
jne 0x1317e8a
add eax, edi
add edx, edi
cmp si, bx
jne 0x1317e66
xor eax, eax
jmp 0x1317e8f
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x1317fa6
cmp dword [ecx + 8], 3
push 0x20
pop esi
je 0x1317eac
mov dword [ebp - 4], 0x80049e2e
jmp 0x1317fb6
mov eax, dword [ebp + 0xc]
lea edi, [esi + eax]
push edi
lea eax, [ebp - 8]
push eax
push ebx
push ebx
push 1
push ebx
push dword [ecx + 0x20]
mov ebx, dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
mov dword [ebp - 8], edi
call ebx
test eax, eax
jne 0x1317eea
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x1317ee2
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 4], eax
jmp 0x1317fb6
cmp dword [ebp + 0x18], 0
mov eax, dword [ebp - 8]
mov ecx, dword [ebp + 0x14]
mov dword [ecx], eax
je 0x1317fb6
cmp dword [ebp - 0x10], eax
jae 0x1317f0d
mov dword [ebp - 4], 0x80049e19
jmp 0x1317fb6
push eax
mov dword [ebp + 0x14], eax
mov dword [ebp - 8], edi
call fcn.0103e496
mov edi, eax
pop ecx
mov dword [ebp - 0xc], edi
test edi, edi
jne 0x1317f2f
mov dword [ebp - 4], 0x8007000e
jmp 0x1317fb6
push dword [ebp + 0x14]
push 0
push edi
call sub.msvcrt.dll_memset
push dword [ebp + 0xc]
lea eax, [edi + esi]
push dword [ebp + 0x10]
push eax
call sub.msvcrt.dll_memcpy
push 0
call dword [sym.imp.msvcrt.dll_time]
push eax
call dword [sym.imp.msvcrt.dll_srand]
and dword [ebp + 8], 0
add esp, 0x20
test esi, esi
jbe 0x1317f77
call dword [sym.imp.msvcrt.dll_rand]
mov ecx, dword [ebp + 8]
inc dword [ebp + 8]
mov byte [ecx + edi], al
cmp dword [ebp + 8], esi
jb 0x1317f63
push dword [ebp + 0x14]
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 0x14]
push edi
push 0
push 1
push 0
push dword [eax + 0x20]
call ebx
test eax, eax
je 0x1317ece
push dword [ebp - 8]
push edi
push dword [ebp + 0x18]
call sub.msvcrt.dll_memcpy
add esp, 0xc
jmp 0x1317fb6
mov dword [ebp - 4], 0x80049e5b
jmp 0x1317fb6
mov dword [ebp - 4], 0x80070057
push dword [ebp - 0xc]
call fcn.0103e4a5
mov eax, dword [ebp - 4]
pop ecx
pop edi
pop esi
pop ebx
leave
ret 0x14