Function at 0x412cb0
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43dc05
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x40
push esi
push edi
push 0xf0000040
push 1
push 0
push 0
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x28], edx
push eax
mov edi, ecx
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x18], 4
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
mov esi, eax
test esi, esi
je 0x412f2c
mov ecx, dword [edi]
lea edx, [ebp - 0x14]
mov eax, dword [edi + 4]
push edx
push 0
push 0
sub eax, ecx
push eax
push ecx
push dword [ebp - 0x2c]
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
mov esi, eax
test esi, esi
je 0x412f2c
push 0
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x10]
push eax
push 8
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_CryptGetKeyParam]
mov esi, eax
test esi, esi
je 0x412f2c
mov esi, dword [ebp - 0x10]
xor eax, eax
shr esi, 3
xor edi, edi
add esi, 0xfffffff5
mov dword [ebp - 0x40], edi
push ebx
xor ebx, ebx
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x38], eax
test esi, esi
je 0x412dac
cmp esi, 0x7fffffff
ja 0x412f5c
push esi
lea ecx, [ebp - 0x40]
call fcn.00409240
mov edi, dword [ebp - 0x40]
push esi
push ebx
push edi
call fcn.00422520
mov eax, dword [ebp - 0x38]
lea ebx, [esi + edi]
mov esi, dword [ebp - 0x10]
add esp, 0xc
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x20], eax
mov dword [ebp - 4], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0
mov byte [ebp - 4], 1
xor edx, edx
nop
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax]
mov eax, dword [eax + 4]
sub eax, ecx
sub eax, edx
cmp esi, eax
jae 0x412de5
mov dword [ebp - 0x1c], esi
jmp 0x412dea
mov dword [ebp - 0x1c], eax
mov esi, eax
push esi
mov esi, dword [ebp - 0x24]
lea eax, [ecx + esi]
push eax
push edi
call fcn.00421fa0
mov ecx, dword [ebp - 0x28]
add esp, 0xc
mov eax, dword [ebp - 0x1c]
add esi, eax
mov dword [ebp - 0x18], eax
xor eax, eax
mov dword [ebp - 0x24], esi
mov edx, dword [ecx + 4]
sub edx, dword [ecx]
lea ecx, [ebp - 0x18]
push 0
push ecx
push 0
cmp esi, edx
mov dword [ebp - 0x34], edx
push 0
sete al
push eax
push 0
push dword [ebp - 0x14]
mov dword [ebp - 0x30], eax
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
mov esi, eax
test esi, esi
je 0x412ec2
mov esi, dword [ebp - 0x18]
mov ecx, ebx
sub ecx, edi
cmp esi, ecx
jbe 0x412e83
jae 0x412e4d
lea ebx, [edi + esi]
jmp 0x412e80
jbe 0x412e83
mov eax, dword [ebp - 0x20]
sub eax, edi
cmp esi, eax
jbe 0x412e70
push ecx
push esi
lea ecx, [ebp - 0x40]
call fcn.00413270
mov eax, dword [ebp - 0x38]
mov ebx, dword [ebp - 0x3c]
mov edi, dword [ebp - 0x40]
mov dword [ebp - 0x20], eax
jmp 0x412e83
sub esi, ecx
push esi
push 0
push ebx
call fcn.00422520
add esp, 0xc
add ebx, esi
mov dword [ebp - 0x3c], ebx
mov eax, ebx
sub eax, edi
push eax
lea eax, [ebp - 0x1c]
push eax
push edi
push 0
push dword [ebp - 0x30]
push 0
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
mov esi, eax
test esi, esi
je 0x412ec2
push dword [ebp - 0x1c]
lea ecx, [ebp - 0x4c]
push edi
push dword [ebp - 0x48]
call fcn.00413070
mov edx, dword [ebp - 0x24]
cmp edx, dword [ebp - 0x34]
je 0x412ec2
mov esi, dword [ebp - 0x10]
jmp 0x412dd0
mov ecx, dword [ebp - 0x28]
lea eax, [ebp - 0x4c]
push eax
call fcn.00412f70
mov ecx, dword [ebp - 0x4c]
pop ebx
test ecx, ecx
je 0x412eff
mov edx, dword [ebp - 0x44]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x412ef5
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x412f61
push edx
push ecx
call fcn.004209ec
add esp, 8
test edi, edi
je 0x412f2c
mov ecx, dword [ebp - 0x20]
mov eax, edi
sub ecx, edi
cmp ecx, 0x1000
jb 0x412f22
mov edi, dword [eax - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x412f61
push ecx
push edi
call fcn.004209ec
add esp, 8
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x412f3a
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x412f4a
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
call fcn.004057e0
call fcn.0042cebf
int3