Function at 0x41782c
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffdc
push ebx
xor ebx, ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x14], ebx
mov ebx, ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x417a2d
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 0x1c], eax
xor eax, eax
mov dword [ebp - 0x18], eax
xor eax, eax
mov dword [ebp - 0x20], eax
xor eax, eax
push ebp
push 0x417a08
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x24]
push eax
mov eax, dword [ebp - 4]
lea edx, [eax + 0x1c]
mov eax, dword [ebp - 8]
xor ecx, ecx
call fcn.0040ae90
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 4]
add eax, 4
mov ecx, 0x417a44
call fcn.00403314
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
call fcn.004032c8
mov edx, eax
dec edx
mov eax, dword [ebp - 4]
add eax, 4
call fcn.004035f8
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
call fcn.004032c8
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0xc]
mov eax, dword [ebp - 4]
lea edx, [eax + 0x10]
mov eax, dword [ebp - 8]
call fcn.0040ae90
mov eax, dword [ebp - 0x14]
call fcn.004032c8
test eax, eax
jne 0x4178f1
mov dword [ebp - 0x20], 2
call fcn.00402cf8
jmp 0x417a0f
mov eax, dword [ebp - 0x14]
push eax
push ebx
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x1c]
lea edx, [ebp - 0x18]
mov eax, dword [ebp - 4]
call fcn.00417724
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x41791f
call fcn.00402cf8
jmp 0x417a0f
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 4]
add eax, 4
call fcn.00403498
push eax
push 0
push 0xffffffffffffffff
push 0
mov eax, dword [ebp - 0x1c]
push eax
call sub.advapi32.dll_CryptEncrypt
call sub.kernel32.dll_GetLastError_1
cmp eax, 0xea
jne 0x417987
mov eax, dword [ebp - 4]
add eax, 4
mov edx, dword [ebp - 0xc]
call fcn.004035f8
mov eax, dword [ebp - 0xc]
push eax
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 4]
add eax, 4
call fcn.00403498
push eax
push 0
push 0xffffffffffffffff
push 0
mov eax, dword [ebp - 0x1c]
push eax
call sub.advapi32.dll_CryptEncrypt
jmp 0x417997
call sub.kernel32.dll_GetLastError_1
test eax, eax
je 0x417997
mov dword [ebp - 0x20], 8
mov eax, dword [ebp - 4]
add eax, 4
mov edx, dword [ebp - 0x10]
call fcn.004035f8
cmp dword [ebp - 0x20], 0
je 0x4179b2
call fcn.00402cf8
jmp 0x417a0f
mov eax, dword [ebp - 4]
mov edx, dword [eax + 4]
mov eax, dword [ebp - 4]
add eax, 0x28
call fcn.0040b5d0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x417a0f
cmp dword [ebp - 0x1c], 0
je 0x4179df
mov eax, dword [ebp - 0x1c]
push eax
call sub.advapi32.dll_CryptDestroyKey
cmp dword [ebp - 0x18], 0
je 0x4179f0
push 0
mov eax, dword [ebp - 0x18]
push eax
call sub.advapi32.dll_CryptReleaseContext
cmp dword [ebp - 0x20], 0
je 0x417a07
mov eax, dword [ebp - 4]
lea edx, [eax + 0x34]
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x20]
call fcn.0040b448
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x417a34
lea eax, [ebp - 0x24]
call fcn.0040315c
lea eax, [ebp - 0x14]
call fcn.0040315c
ret