Function at 0x100123a0
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10059f73
mov eax, dword fs:[0]
push eax
sub esp, 0xac
push ebx
push esi
push edi
mov eax, dword [0x10078c14]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, edx
mov eax, dword [edi]
mov eax, dword [eax - 0xc]
xor ebx, ebx
cmp eax, ebx
jne 0x100123fa
mov ecx, dword [ebp + 0x10]
mov dword [ecx], 1
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov edx, dword [ecx]
cmp dword [edx - 0xc], ebx
jne 0x10012420
mov eax, dword [ebp + 0x10]
mov dword [eax], 1
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov edx, dword [ebp + 8]
cmp edx, ebx
je 0x100123db
mov eax, dword [ebp + 0xc]
cmp eax, ebx
jne 0x1001244d
mov edx, dword [ebp + 0x10]
mov dword [edx], 1
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov esi, dword [ebp + 0x10]
mov dword [esi], ebx
mov dword [edx], ebx
mov dword [eax], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x1c], ebx
mov esi, dword [ecx]
lea eax, [ebp - 0xb4]
mov dword [ebp - 0xb8], eax
call dword [0x1007a0d8]
push eax
push esi
lea eax, [ebp - 0xb8]
call fcn.10012ba0
mov dword [ebp - 4], ebx
lea ecx, [ebp - 0x14]
push ecx
mov ecx, dword [ebp - 0xb8]
call fcn.10012a50
mov byte [ebp - 4], 2
lea edx, [ebp - 0xb4]
mov eax, dword [ebp - 0xb8]
cmp eax, edx
je 0x100124af
push eax
call fcn.10041647
add esp, 4
mov eax, dword [ebp - 0x14]
mov eax, dword [eax - 0xc]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], eax
mov eax, dword [edi]
lea ecx, [ebp - 0x18]
push ecx
push eax
lea edi, [ebp - 0x1c]
lea esi, [ebp - 0x20]
call fcn.100128c0
test al, al
je 0x10012510
push ebx
lea eax, [ebp - 0x24]
push eax
push ebx
push ebx
push 1
push ebx
mov ecx, dword [ebp - 0x18]
push ecx
mov edi, dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
call edi
test eax, eax
jne 0x1001253e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
push ebx
mov ecx, dword [ebp - 0x20]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov edx, dword [ebp + 0x10]
mov dword [edx], 6
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.10002690
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x24]
push eax
call fcn.100324d6
add esp, 4
mov esi, eax
mov dword [ebp - 0x2c], esi
mov dword [ebp - 4], 2
cmp esi, ebx
je 0x100125bc
mov edx, dword [ebp - 0x24]
push edx
push ebx
push esi
call fcn.10043430
mov eax, dword [ebp - 0x28]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
push esi
call fcn.10046430
add esp, 0x18
mov edx, dword [ebp - 0x24]
push edx
lea eax, [ebp - 0x28]
push eax
push esi
push ebx
push 1
push ebx
mov ecx, dword [ebp - 0x18]
push ecx
call edi
test eax, eax
jne 0x100125e9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
call fcn.100324db
add esp, 4
jmp 0x100124f1
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
push ebx
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov ecx, dword [ebp + 0x10]
mov dword [ecx], 0xe
jmp 0x10012519
mov eax, dword [ebp + 8]
mov dword [eax], esi
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp + 0xc]
mov dword [edx], ecx
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
push ebx
mov edx, dword [ebp - 0x20]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.10002690
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc