Function at 0x415fb0
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x4d53a4]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x34], ecx
mov byte [ebp - 0x10], 0
xor eax, eax
mov word [ebp - 0xf], ax
mov byte [ebp - 0xd], al
mov dword [ebp - 0x14], 0
jmp 0x415fe2
mov ecx, dword [ebp - 0x14]
add ecx, 1
mov dword [ebp - 0x14], ecx
cmp dword [ebp - 0x14], 4
jae 0x415ff9
mov edx, dword [ebp + 8]
add edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
mov cl, byte [edx]
mov byte [ebp + eax - 0x10], cl
jmp 0x415fd9
mov edx, 1
imul eax, edx, 0
movsx ecx, byte [ebp + eax - 0x10]
cmp ecx, 0x14
jne 0x41616c
mov edx, 1
shl edx, 0
movsx eax, byte [ebp + edx - 0x10]
cmp eax, 0xf
jne 0x41616c
mov ecx, 1
shl ecx, 1
movsx edx, byte [ebp + ecx - 0x10]
cmp edx, 0xb
jne 0x41616c
mov eax, 1
imul ecx, eax, 3
movsx edx, byte [ebp + ecx - 0x10]
cmp edx, 0xb
jne 0x41616c
mov ecx, dword [ebp - 0x34]
call fcn.004162b0
mov dword [ebp - 0x2c], eax
mov byte [ebp - 0xc], 0
xor eax, eax
mov dword [ebp - 0xb], eax
mov dword [ebp - 0x18], 0
jmp 0x416076
mov ecx, dword [ebp - 0x18]
add ecx, 1
mov dword [ebp - 0x18], ecx
cmp dword [ebp - 0x18], 4
jae 0x41608e
mov edx, dword [ebp + 8]
add edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x18]
mov cl, byte [edx + 4]
mov byte [ebp + eax - 0xc], cl
jmp 0x41606d
lea edx, [ebp - 0xc]
push edx
mov eax, dword [ebp - 0x2c]
push eax
mov ecx, dword [ebp - 0x34]
call fcn.004161f0
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp + 0x10]
sub ecx, 8
mov dword [ebp + 0x10], ecx
mov edx, dword [ebp + 0x10]
add edx, 1
push edx
call fcn.00470eaa
add esp, 4
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp + 0x10]
add ecx, 1
push ecx
push 0
mov edx, dword [ebp - 0x20]
push edx
call fcn.004726b0
add esp, 0xc
mov dword [ebp - 0x1c], 0
jmp 0x4160e9
mov eax, dword [ebp - 0x1c]
add eax, 1
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x1c]
cmp ecx, dword [ebp + 0x10]
jae 0x416104
mov edx, dword [ebp - 0x20]
add edx, dword [ebp - 0x1c]
mov eax, dword [ebp + 8]
add eax, dword [ebp - 0x1c]
mov cl, byte [eax + 8]
mov byte [edx], cl
jmp 0x4160e0
lea edx, [ebp + 0x10]
push edx
mov eax, dword [ebp - 0x20]
push eax
push 0
push 0
push 0
mov ecx, dword [ebp - 0x28]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
jne 0x416127
xor eax, eax
jmp 0x4161d2
cmp dword [ebp - 0x28], 0
je 0x416142
mov edx, dword [ebp - 0x28]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
test eax, eax
jne 0x416142
xor eax, eax
jmp 0x4161d2
cmp dword [ebp - 0x2c], 0
je 0x41615c
push 0
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
test eax, eax
jne 0x41615c
xor eax, eax
jmp 0x4161d2
cmp dword [ebp - 0x20], 0
je 0x41616a
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 0x20]
mov dword [ecx], edx
jmp 0x4161cd
mov eax, dword [ebp + 0x10]
add eax, 1
push eax
call fcn.00470eaa
add esp, 4
mov dword [ebp - 0x3c], eax
mov ecx, dword [ebp - 0x3c]
mov dword [ebp - 0x30], ecx
mov edx, dword [ebp + 0x10]
add edx, 1
push edx
push 0
mov eax, dword [ebp - 0x30]
push eax
call fcn.004726b0
add esp, 0xc
mov dword [ebp - 0x24], 0
jmp 0x4161ab
mov ecx, dword [ebp - 0x24]
add ecx, 1
mov dword [ebp - 0x24], ecx
mov edx, dword [ebp - 0x24]
cmp edx, dword [ebp + 0x10]
jae 0x4161c5
mov eax, dword [ebp - 0x30]
add eax, dword [ebp - 0x24]
mov ecx, dword [ebp + 8]
add ecx, dword [ebp - 0x24]
mov dl, byte [ecx]
mov byte [eax], dl
jmp 0x4161a2
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x30]
mov dword [eax], ecx
mov eax, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00470931
mov esp, ebp
pop ebp
ret 0xc