Function at 0x10012640
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10059f3b
mov eax, dword fs:[0]
push eax
sub esp, 0x124
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 ebx, ecx
mov esi, edx
mov eax, dword [esi]
mov eax, dword [eax - 0xc]
xor edi, edi
cmp eax, edi
jne 0x1001269c
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
cmp dword [ebp + 8], edi
jne 0x100126c0
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
cmp ebx, edi
jne 0x100126e3
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 ecx, dword [ebp + 0x10]
mov dword [ecx], edi
mov ecx, dword [ebp + 0xc]
call fcn.10002880
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], edi
mov eax, dword [esi]
lea edx, [ebp - 0x14]
push edx
push eax
lea edi, [ebp - 0x18]
lea esi, [ebp - 0x1c]
call fcn.100128c0
test al, al
jne 0x1001272e
mov eax, dword [ebp + 0x10]
mov dword [eax], 6
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 dword [ebp - 4], 0
push ebx
call fcn.100324d6
add esp, 4
mov edi, eax
mov dword [ebp - 0x24], edi
mov dword [ebp - 4], 0xffffffff
test edi, edi
jne 0x100127a2
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
push 0
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov ecx, dword [ebp + 0x10]
mov dword [ecx], 0xe
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
push ebx
push 0
push edi
call fcn.10043430
push ebx
mov edx, dword [ebp + 8]
push edx
push edi
call fcn.10046430
add esp, 0x18
mov dword [ebp - 0x20], ebx
lea eax, [ebp - 0x20]
push eax
push edi
push 0
push 1
push 0
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
jne 0x10012823
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
push 0
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
push edi
call fcn.100324db
add esp, 4
mov edx, dword [ebp + 0x10]
mov dword [edx], 6
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 eax, dword [ebp - 0x20]
cmp ebx, eax
jbe 0x1001283a
sub ebx, eax
push ebx
push 0
add eax, edi
push eax
call fcn.10043430
add esp, 0xc
push edi
lea esi, [ebp - 0x130]
call fcn.10012b50
mov dword [ebp - 4], 2
mov eax, dword [eax]
push eax
mov ecx, dword [ebp + 0xc]
call fcn.10002760
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x12c]
mov eax, dword [ebp - 0x130]
cmp eax, ecx
je 0x10012878
push eax
call fcn.10041647
add esp, 4
push edi
call fcn.100324db
add esp, 4
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
push 0
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
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