Function at 0x401680
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
push 0xffffffffffffffff
push 0x45c0a8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x48
push ebx
push esi
push edi
mov edi, ecx
push 0x200000
lea ecx, [esp + 0x30]
mov dword [esp + 0x18], edi
call fcn.00443a53
mov esi, dword [edi + 0x20]
mov ecx, dword [edi + 0x18]
mov eax, esi
xor edx, edx
div ecx
mov eax, dword [esp + 0x68]
xor ebx, ebx
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x18], ebx
mov byte [esp + 0xf], 0
sub ecx, edx
add ecx, esi
xor esi, esi
cmp eax, ebx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x1c], esi
jbe 0x401835
push ebp
jmp 0x4016f7
mov eax, dword [esp + 0x6c]
mov ecx, dword [esp + 0x2c]
mov esi, dword [esp + 0x20]
lea edx, [esi + ecx]
cmp edx, eax
jb 0x40170c
mov ebp, eax
sub ebp, esi
mov dword [esp + 0x1c], 1
jmp 0x40170e
mov ebp, ecx
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x68]
push ebp
lea eax, [esp + 0x18]
push eax
push 0
push 0
push ecx
push 0
push edx
mov dword [esp + 0x30], ebp
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
je 0x4017d0
mov eax, dword [esp + 0x24]
cmp dword [esp + 0x14], eax
jbe 0x40175e
push ebx
call fcn.004351a3
mov eax, dword [esp + 0x18]
add eax, 0x3e8
push eax
mov dword [esp + 0x2c], eax
call fcn.0043519e
add esp, 8
mov ebx, eax
test ebx, ebx
je 0x4017ee
mov edx, dword [esp + 0x70]
mov ecx, ebp
mov eax, ecx
shr ecx, 2
add esi, edx
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x1c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x14]
push ecx
mov ecx, dword [esp + 0x6c]
lea edx, [esp + 0x2c]
push edx
push ebx
push 0
push eax
push 0
push ecx
mov dword [esp + 0x44], ebp
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
je 0x401808
mov edx, dword [esp + 0x28]
push edx
push ebx
lea ecx, [esp + 0x38]
call fcn.00443c73
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x6c]
mov edi, dword [esp + 0x18]
add eax, ebp
cmp eax, ecx
mov dword [esp + 0x20], eax
jb 0x4016eb
jmp 0x401834
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x45f9a0
push eax
push 1
lea eax, [edi + 4]
push str.Error__Action:__d___ErrorCodr0x_08X__s
push eax
call fcn.004015e0
jmp 0x40182c
push 0x11f
push 0x15
lea ecx, [edi + 4]
push str.Error__Action:__d___ErrorCodr0x_08X
push ecx
call fcn.004015e0
add esp, 0x10
jmp 0x40182f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [esp + 0x18]
push 0x45f9a0
push eax
push 1
add edx, 4
push str.Error__Action:__d___ErrorCodr0x_08X__s
push edx
call fcn.004015e0
mov edi, dword [esp + 0x2c]
add esp, 0x14
mov byte [esp + 0x13], 1
pop ebp
push ebx
call fcn.004351a3
mov al, byte [esp + 0x13]
add esp, 4
cmp al, 1
lea ecx, [esp + 0x2c]
je 0x4018b3
call fcn.00443bd2
lea ecx, [esp + 0x2c]
mov esi, eax
call fcn.00443b20
test esi, esi
je 0x401897
test eax, eax
je 0x401897
mov ecx, dword [esp + 0x70]
mov edx, dword [esp + 0x74]
mov dword [ecx], eax
lea ecx, [esp + 0x2c]
mov dword [edx], esi
mov bl, 1
mov dword [esp + 0x5c], 0xffffffff
call fcn.00443e40
pop edi
pop esi
mov al, bl
pop ebx
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
add esp, 0x54
ret 0x14
push 0x145
push 0x15
push str.Error__Action:__d___ErrorCodr0x_08X
add edi, 4
push edi
call fcn.004015e0
add esp, 0x10
lea ecx, [esp + 0x2c]
mov dword [esp + 0x5c], 0xffffffff
call fcn.00443e40
mov ecx, dword [esp + 0x54]
pop edi
pop esi
xor al, al
pop ebx
mov dword fs:[0], ecx
add esp, 0x54
ret 0x14