Function at 0x413220
Capabilities:
Encrypt data using dpapi

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x48
mov esi, dword [ebp + 0xc]
mov eax, dword [0x53d010]
xor eax, ebp
mov dword [ebp - 0x10], eax
mov edi, 0x80070057
cmp esi, 1
jg 0x4132c7
push dword [ebp + 0x10]
call dword [sym.imp.OLEAUT32.dll_SysAllocStringByteLen]
test eax, eax
je 0x4132c7
mov ebx, eax
call dword [sym.imp.ole32.dll_CoImpersonateClient]
test eax, eax
js 0x4132c5
mov dword [ebp - 0x54], ebx
xor eax, eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x1c], eax
xor edi, edi
dec edi
lea eax, [ebp - 0x20]
mov dword [eax], edi
push 0x14
call fcn.0049a900
add esp, 4
mov ebx, eax
mov ecx, eax
push 0x4130d0
push 0x4130c0
call fcn.00462b80
mov dword [ebp - 0x24], ebx
lea ecx, [ebp - 0x20]
push ebx
call fcn.00462ca0
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x2c], edi
lea ebx, [ebp - 0x38]
mov dword [ebx], edi
push ebx
push 0x1000
xor eax, eax
push eax
call dword [sym.imp.RPCRT4.dll_I_RpcOpenClientProcess]
test eax, eax
je 0x4132eb
cmp eax, 0x6bd
je 0x4132dd
lea ecx, [ebp - 0x2c]
push 0
jmp 0x4132f1
mov edi, eax
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0049b483
mov eax, edi
add esp, 0x48
pop esi
pop edi
pop ebx
pop ebp
ret 0x14
lea eax, [ebp - 0x2c]
push eax
call fcn.00420950
add esp, 4
jmp 0x4132f6
lea ecx, [ebp - 0x2c]
push dword [ebp - 0x38]
call fcn.00420810
lea edi, [ebp - 0x2c]
mov ecx, edi
call fcn.0045dec0
test al, al
je 0x41334f
xor eax, eax
dec eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
push edi
push esi
push ebx
call fcn.00411c10
add esp, 0xc
movzx eax, byte [ebp - 0x2d]
mov esi, ebx
test al, al
js 0x41332c
mov ecx, eax
and ecx, 0x7f
jmp 0x41332f
mov ecx, dword [ebp - 0x34]
xor ebx, ebx
test ecx, ecx
jne 0x4133f9
mov edi, 0x8004a002
test al, al
jns 0x413358
push dword [ebp - 0x38]
call fcn.0049a930
add esp, 4
jmp 0x413358
mov esi, ebx
mov edi, 0x8004a001
xor ebx, ebx
lea ecx, [ebp - 0x2c]
call fcn.00420880
lea ecx, [ebp - 0x20]
call fcn.00462cc0
test bl, bl
je 0x4132c7
xor eax, eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x1c]
mov ebx, dword [eax + 4]
sub esp, 0x1c
mov dword [esp + 0x18], esi
xorps xmm0, xmm0
movups xmmword [esp + 8], xmm0
mov dword [esp], eax
mov dword [esp + 4], 0x5232b4
call dword [sym.imp.CRYPT32.dll_CryptProtectData]
mov esi, eax
test eax, eax
jne 0x4133b4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 0x18]
mov dword [ecx], eax
mov edi, 0x8004a006
test ebx, ebx
je 0x4133bf
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
test esi, esi
je 0x4132c7
mov edi, dword [ebp + 0x14]
mov esi, dword [ebp - 0x34]
push dword [ebp - 0x38]
push esi
call dword [sym.imp.OLEAUT32.dll_DllRegisterServer]
mov dword [edi], eax
xor ecx, ecx
test eax, eax
mov edi, 0x8007000e
cmovne edi, ecx
test esi, esi
je 0x4132c7
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x4132c7
lea edi, [ebp - 0x44]
mov dword [edi + 4], ebx
mov dword [edi], ebx
mov dword [edi + 8], ebx
lea ebx, [ebp - 0x50]
mov dword [ebx], ecx
mov eax, 4
mov ecx, edi
push eax
push ebx
call fcn.0041f450
movzx eax, byte [ebp - 0x2d]
mov edx, eax
and edx, 0x7f
test al, al
cmovs edx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x38]
cmovns eax, esi
mov ecx, edi
push edx
push eax
call fcn.0041f450
mov ecx, ebx
push dword [ebp - 0x54]
push dword [ebp + 0x10]
call fcn.004c4680
movzx eax, byte [ebx + 0xb]
test al, al
js 0x41344f
and eax, 0x7f
jmp 0x413452
mov eax, dword [ebp - 0x4c]
lea edx, [ebp - 0x14]
mov dword [edx], eax
mov ecx, edi
mov eax, 4
push eax
push edx
call fcn.0041f450
movzx eax, byte [ebp - 0x45]
test al, al
js 0x413475
and eax, 0x7f
lea edx, [ebp - 0x50]
jmp 0x41347b
mov eax, dword [ebp - 0x4c]
mov edx, dword [ebp - 0x50]
mov ecx, edi
push eax
push edx
call fcn.0041f450
cmp byte [ebp - 0x45], 0
jns 0x413495
push dword [ebp - 0x50]
call fcn.0049a930
add esp, 4
movzx eax, byte [ebp - 0x39]
mov ecx, eax
and ecx, 0x7f
test al, al
cmovs ecx, dword [ebp - 0x40]
lea eax, [ebp - 0x50]
mov dword [eax], ecx
cmovs edi, dword [ebp - 0x44]
mov dword [eax + 4], edi
sub esp, 0x1c
lea ecx, [ebp - 0x1c]
mov dword [esp + 0x18], ecx
xorps xmm0, xmm0
movups xmmword [esp + 8], xmm0
mov dword [esp], eax
mov dword [esp + 4], 0x5232b4
call dword [sym.imp.CRYPT32.dll_CryptProtectData]
test eax, eax
setne bl
jne 0x4134e5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 0x18]
mov dword [ecx], eax
cmp byte [ebp - 0x39], 0
jns 0x4134f6
push dword [ebp - 0x44]
call fcn.0049a930
add esp, 4
mov edi, 0x8004a005
mov al, byte [ebp - 0x2d]
jmp 0x41333e