Function at 0x103f655
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
push esi
push edi
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x18]
push eax
push dword [ebp + 0x14]
xor edi, edi
push dword [ebp + 0x18]
mov dword [ebp - 0x1c], edi
push dword [ebp + 8]
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x10], edi
mov dword [ebp - 4], edi
mov dword [ebp - 8], edi
mov dword [ebp - 0xc], edi
call fcn.0103f2fb
cmp eax, edi
mov dword [ebp + 0x18], eax
jl 0x103f850
mov esi, dword [ebp + 0x20]
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x10]
push eax
push esi
push dword [ebp + 0x1c]
push dword [ebp - 0x18]
push dword [ebp - 0x1c]
call fcn.0103f03c
cmp eax, edi
mov dword [ebp + 0x18], eax
jl 0x103f842
mov eax, dword [ebp - 4]
push ebx
lea eax, [eax + esi + 4]
push eax
push 0x40
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
cmp ebx, edi
jne 0x103f6e6
mov dword [ebp + 0x18], 0xc000009a
jmp 0x103f836
mov eax, dword [ebp - 4]
mov esi, dword [ebp - 0x10]
mov dword [ebx], eax
mov ecx, dword [ebp - 4]
mov edx, ecx
shr ecx, 2
lea eax, [ebx + 4]
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edx, dword [ebp - 4]
mov ecx, dword [ebp + 0x20]
mov esi, dword [ebp + 0x1c]
lea edi, [eax + edx]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp - 8]
push eax
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0xc]
push eax
push ebx
xor edi, edi
push edi
push 1
push edi
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
mov esi, eax
cmp esi, edi
jne 0x103f750
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x103f7f3
cmp dword [ebp + 0x24], edi
je 0x103f822
mov eax, dword [ebp + 0x28]
mov eax, dword [eax]
cmp eax, edi
jbe 0x103f822
mov ecx, dword [ebp - 0xc]
add ecx, 0x40
cmp eax, ecx
jb 0x103f822
cmp esi, edi
jne 0x103f7fc
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 8]
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
cmp ebx, edi
jne 0x103f7a0
mov dword [ebp + 0x18], 0xc000009a
jmp 0x103f834
mov eax, dword [ebp - 4]
mov esi, dword [ebp - 0x10]
mov dword [ebx], eax
mov ecx, dword [ebp - 4]
mov edx, ecx
shr ecx, 2
lea eax, [ebx + 4]
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edx, dword [ebp - 4]
mov ecx, dword [ebp + 0x20]
mov esi, dword [ebp + 0x1c]
lea edi, [eax + edx]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push dword [ebp - 0xc]
lea eax, [ebp - 8]
push eax
push ebx
push 0
push 1
push 0
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
jne 0x103f7fc
mov dword [ebp + 0x18], 0xc0000321
jmp 0x103f834
mov esi, dword [ebp + 0x14]
mov edi, dword [ebp + 0x24]
push 0x10
pop ecx
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp - 8]
mov edi, dword [ebp + 0x24]
mov eax, ecx
shr ecx, 2
add edi, 0x40
mov esi, ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x103f829
mov dword [ebp + 0x18], 0xc0000023
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp + 0x28]
add eax, 0x40
mov dword [ecx], eax
xor edi, edi
cmp ebx, edi
je 0x103f841
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop ebx
cmp dword [ebp - 0x10], edi
je 0x103f850
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0x14], edi
mov esi, dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
je 0x103f860
push dword [ebp - 0x14]
call esi
cmp dword [ebp - 0x18], edi
je 0x103f86a
push dword [ebp - 0x18]
call esi
cmp dword [ebp - 0x1c], edi
je 0x103f879
push edi
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, dword [ebp + 0x18]
pop edi
pop esi
leave
ret 0x24