Function at 0x490bf8
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc0
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0xc], ebx
mov esi, ecx
mov edi, edx
mov dword [ebp - 4], eax
mov ebx, dword [ebp + 0x10]
xor eax, eax
push ebp
push 0x490f99
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, edi
mov edx, dword [0x48d030]
call fcn.00403684
test al, al
jne 0x490c59
lea edx, [ebp - 0x38]
mov eax, dword [0x4e24e4]
call fcn.0040630c
mov ecx, dword [ebp - 0x38]
mov dl, 1
mov eax, dword [0x48ce9c]
call fcn.00456eac
call fcn.00403c74
mov dword [ebp - 0x34], edi
mov eax, dword [ebp - 0x34]
cmp byte [eax + 0x2d], 0
je 0x490c82
push ebx
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
push eax
mov ecx, esi
mov edx, edi
mov eax, dword [ebp - 4]
call fcn.004910fc
mov byte [ebp - 5], al
jmp 0x490f70
mov byte [ebp - 5], 0
mov eax, dword [ebp - 0x34]
mov eax, dword [eax + 0xc]
mov edx, dword [eax]
call dword [edx + 0x14]
dec eax
shr eax, 3
inc eax
mov edx, dword [ebp + 8]
cmp eax, dword [edx]
jle 0x490cb7
mov eax, dword [ebp - 0x34]
mov eax, dword [eax + 0xc]
mov edx, dword [eax]
call dword [edx + 0x14]
dec eax
shr eax, 3
inc eax
mov edx, dword [ebp + 8]
mov dword [edx], eax
jmp 0x490f70
push ebx
lea eax, [ebp - 0xc]
mov ecx, 1
mov edx, dword [0x4565dc]
call fcn.004055e8
add esp, 4
mov edx, ebx
dec edx
test edx, edx
jl 0x490cea
inc edx
xor eax, eax
mov ecx, ebx
sub ecx, eax
mov cl, byte [esi + ecx - 1]
mov edi, dword [ebp - 0xc]
mov byte [edi + eax], cl
inc eax
dec edx
jne 0x490cd8
lea eax, [ebp - 0x3c]
push eax
mov edx, dword [0x4e26b4]
mov edx, dword [edx]
mov eax, dword [ebp - 0x34]
mov eax, dword [eax + 0xc]
xor ecx, ecx
mov ebx, dword [eax]
call dword [ebx + 0x64]
mov eax, dword [ebp - 0x3c]
call fcn.00476210
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x490f70
lea eax, [ebp - 0x14]
push eax
push 0
push 2
mov eax, dword [ebp - 0x10]
push eax
call sub.crypt32.dll_CertGetCertificateContextProperty
mov eax, dword [ebp - 0x14]
call fcn.00402a54
mov ebx, eax
lea eax, [ebp - 0x14]
push eax
push ebx
push 2
mov eax, dword [ebp - 0x10]
push eax
call sub.crypt32.dll_CertGetCertificateContextProperty
test eax, eax
je 0x490f69
xor eax, eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x18], ebx
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 4]
push eax
push 0
push 0
call sub.kernel32.dll_WideCharToMultiByte_1
mov dword [ebp - 0x1c], eax
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
mov eax, dword [ebp - 0x18]
mov eax, dword [eax]
push eax
push 0
push 0
call sub.kernel32.dll_WideCharToMultiByte_1
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x1c]
call fcn.00402a54
mov esi, eax
mov eax, dword [ebp - 0x20]
call fcn.00402a54
mov edi, eax
push 0
push 0
mov eax, dword [ebp - 0x1c]
push eax
push esi
push 0xffffffffffffffff
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 4]
push eax
push 0
push 0
call sub.kernel32.dll_WideCharToMultiByte_1
push 0
push 0
mov eax, dword [ebp - 0x20]
push eax
push edi
push 0xffffffffffffffff
mov eax, dword [ebp - 0x18]
mov eax, dword [eax]
push eax
push 0
push 0
call sub.kernel32.dll_WideCharToMultiByte_1
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0xc]
push eax
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 8]
push eax
push esi
push edi
lea eax, [ebp - 0x28]
push eax
call sub.advapi32.dll_CryptAcquireContextA
test eax, eax
je 0x490e70
mov eax, dword [ebp - 4]
cmp dword [eax + 0x60], 0
je 0x490e0f
push 0
mov eax, dword [ebp - 4]
add eax, 0x60
push eax
push 1
mov eax, dword [ebp - 0x28]
push eax
call sub.advapi32.dll_CryptSetProvParam
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x18]
push eax
mov eax, dword [ebp - 0x28]
push eax
call sub.advapi32.dll_CryptGetUserKey
test eax, eax
je 0x490e70
mov eax, dword [ebp - 0xc]
call fcn.0040540c
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x30]
push eax
mov eax, dword [ebp - 0xc]
push eax
push 0
push 0xffffffffffffffff
push 0
mov eax, dword [ebp - 0x2c]
push eax
call sub.advapi32.dll_CryptDecrypt
test eax, eax
je 0x490e67
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x30]
call fcn.00402c74
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x30]
mov dword [eax], edx
mov byte [ebp - 5], 1
mov eax, dword [ebp - 0x2c]
push eax
call sub.advapi32.dll_CryptDestroyKey
cmp byte [ebp - 5], 0
jne 0x490f4a
mov eax, dword [ebp - 4]
cmp byte [eax + 0x5c], 0
je 0x490f4a
lea eax, [ebp - 0x40]
mov edx, esi
call fcn.004044fc
mov eax, dword [ebp - 0x40]
mov edx, 0x490fb4
call fcn.00404710
jne 0x490f4a
mov eax, 0x490fe0
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0xc]
push eax
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 8]
push eax
mov eax, dword [ebp - 0x24]
push eax
push edi
lea eax, [ebp - 0x28]
push eax
call sub.advapi32.dll_CryptAcquireContextA
test eax, eax
je 0x490f4a
mov eax, dword [ebp - 4]
cmp dword [eax + 0x60], 0
je 0x490ee9
push 0
mov eax, dword [ebp - 4]
add eax, 0x60
push eax
push 1
mov eax, dword [ebp - 0x28]
push eax
call sub.advapi32.dll_CryptSetProvParam
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x18]
push eax
mov eax, dword [ebp - 0x28]
push eax
call sub.advapi32.dll_CryptGetUserKey
test eax, eax
je 0x490f4a
mov eax, dword [ebp - 0xc]
call fcn.0040540c
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x30]
push eax
mov eax, dword [ebp - 0xc]
push eax
push 0
push 0xffffffffffffffff
push 0
mov eax, dword [ebp - 0x2c]
push eax
call sub.advapi32.dll_CryptDecrypt
test eax, eax
je 0x490f41
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x30]
call fcn.00402c74
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x30]
mov dword [eax], edx
mov byte [ebp - 5], 1
mov eax, dword [ebp - 0x2c]
push eax
call sub.advapi32.dll_CryptDestroyKey
mov eax, esi
call fcn.00402a84
mov eax, edi
call fcn.00402a84
cmp dword [ebp - 0x28], 0
je 0x490f69
push 0
mov eax, dword [ebp - 0x28]
push eax
call sub.advapi32.dll_CryptReleaseContext
mov eax, ebx
call fcn.00402a84
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x490fa0
lea eax, [ebp - 0x40]
mov edx, 3
call fcn.00404328
lea eax, [ebp - 0xc]
mov edx, dword [0x4565dc]
call fcn.004056f4
ret