Function at 0x10001890
Capabilities:
Encrypt data using dpapi
Encrypt or decrypt data via bcrypt
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1001003d
mov eax, dword fs:[0]
push eax
sub esp, 0x68
mov eax, dword [0x1003a004]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0
push 0
push 0x100170b0
lea eax, [ebp - 0x20]
mov dword [ebp - 4], 0
push eax
mov dword [ebp - 0x20], 0
call dword [sym.imp.bcrypt.dll_BCryptOpenAlgorithmProvider]
test eax, eax
jne 0x10001d30
mov ebx, dword [sym.imp.bcrypt.dll_BCryptGetProperty]
push eax
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x18]
push eax
push 4
lea eax, [ebp - 0x5c]
push eax
push str.ObjectLength
push dword [ebp - 0x20]
call ebx
test eax, eax
jne 0x10001d30
cmp dword [ebp - 0x18], 4
jne 0x10001d30
mov edi, dword [ebp - 0x5c]
xorps xmm0, xmm0
xor ecx, ecx
movq qword [ebp - 0x54], xmm0
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x54], ecx
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], eax
test edi, edi
je 0x10001955
push edi
lea ecx, [ebp - 0x54]
call fcn.10001f40
mov esi, dword [ebp - 0x54]
push edi
push 0
push esi
call fcn.10005b30
mov ecx, dword [ebp - 0x54]
lea eax, [esi + edi]
add esp, 0xc
mov dword [ebp - 0x50], eax
push 0
push 0x20
push 0x100882b0
sub eax, ecx
mov byte [ebp - 4], 2
push eax
push ecx
lea eax, [ebp - 0x48]
mov dword [ebp - 0x48], 0
push eax
push dword [ebp - 0x20]
call dword [sym.imp.bcrypt.dll_BCryptGenerateSymmetricKey]
test eax, eax
jne 0x10001cd9
push eax
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x18]
push eax
push 4
lea eax, [ebp - 0x64]
push eax
push str.BlockLength
push dword [ebp - 0x20]
call ebx
test eax, eax
jne 0x10001cd9
cmp dword [ebp - 0x18], 4
jne 0x10001cd9
mov edi, dword [ebp - 0x64]
xorps xmm0, xmm0
xor ecx, ecx
movq qword [ebp - 0x38], xmm0
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
test edi, edi
je 0x100019f3
push edi
lea ecx, [ebp - 0x38]
call fcn.10001f40
mov esi, dword [ebp - 0x38]
push edi
push 0x1003a870
push esi
call fcn.10005cf0
mov ecx, dword [ebp - 0x38]
lea eax, [edi + esi]
mov edi, dword [ebp - 0x64]
add esp, 0xc
mov dword [ebp - 0x34], eax
lea ebx, [edi + 0x1003a870]
mov byte [ebp - 4], 3
xor edx, edx
mov dword [ebp - 0x3c], 0
xorps xmm0, xmm0
mov dword [ebp - 0x3c], edx
xor esi, esi
movq qword [ebp - 0x44], xmm0
mov edi, 0x100882b0
mov dword [ebp - 0x44], esi
mov dword [ebp - 0x40], edx
sub edi, ebx
je 0x10001a48
push edi
lea ecx, [ebp - 0x44]
call fcn.10001f40
mov esi, dword [ebp - 0x44]
push edi
push ebx
push esi
call fcn.10005cf0
mov eax, dword [ebp - 0x34]
lea edx, [edi + esi]
mov ecx, dword [ebp - 0x38]
add esp, 0xc
mov esi, dword [ebp - 0x44]
mov dword [ebp - 0x40], edx
push 1
lea edi, [ebp - 0x58]
mov byte [ebp - 4], 4
push edi
push 0
push 0
sub eax, ecx
mov dword [ebp - 0x58], 0
push eax
push ecx
push 0
sub edx, esi
push edx
push esi
push dword [ebp - 0x48]
call dword [sym.imp.bcrypt.dll_BCryptDecrypt]
test eax, eax
je 0x10001a7b
xor bl, bl
jmp 0x10001bf2
mov ebx, dword [ebp - 0x58]
xor eax, eax
xor edi, edi
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x24], eax
test ebx, ebx
je 0x10001abd
push ebx
lea ecx, [ebp - 0x2c]
call fcn.10001f40
mov esi, dword [ebp - 0x2c]
push ebx
push edi
push esi
call fcn.10005b30
mov eax, dword [ebp - 0x2c]
lea edi, [esi + ebx]
add esp, 0xc
mov dword [ebp - 0x28], edi
mov esi, dword [ebp - 0x34]
lea ebx, [ebp - 0x60]
mov edx, dword [ebp - 0x38]
sub edi, eax
mov ecx, dword [ebp - 0x40]
sub esi, edx
mov eax, dword [ebp - 0x44]
sub ecx, eax
push 1
push ebx
push edi
push dword [ebp - 0x2c]
push esi
push edx
push 0
push ecx
push eax
push dword [ebp - 0x48]
call dword [sym.imp.bcrypt.dll_BCryptDecrypt]
test eax, eax
jne 0x10001ba7
mov edx, dword [ebp - 0x58]
mov eax, dword [ebp - 0x60]
cmp edx, eax
jb 0x10001ba7
mov ecx, dword [ebp - 0x28]
sub edx, eax
je 0x10001b11
mov eax, ecx
sub eax, edx
cmp eax, ecx
cmovne ecx, eax
mov dword [ebp - 0x28], ecx
mov eax, dword [ebp - 0x2c]
xorps xmm0, xmm0
sub ecx, eax
mov dword [ebp - 0x70], eax
lea eax, [ebp - 0x6c]
mov dword [ebp - 0x74], ecx
push eax
push 4
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x74]
movlpd qword [ebp - 0x6c], xmm0
push eax
call dword [sym.imp.CRYPT32.dll_CryptProtectData]
test eax, eax
je 0x10001ba7
mov esi, dword [ebp - 0x68]
test esi, esi
je 0x10001ba7
cmp dword [ebp - 0x6c], 0
je 0x10001ba7
cmp dword [0x10089054], 8
lea ecx, [ebp - 0x1c]
push 0
push ecx
push 0
push 0x20006
push 0
push 0
mov eax, 0x10089040
mov dword [ebp - 0x1c], 0
cmovae eax, dword [0x10089040]
push 0
push eax
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x10001c8a
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x10001b9c
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x10001ba7
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor bl, bl
mov ecx, dword [ebp - 0x2c]
test ecx, ecx
je 0x10001bf2
mov edx, dword [ebp - 0x24]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x10001bd3
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10001d60
push edx
push ecx
call fcn.100045a4
add esp, 8
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov ecx, dword [ebp - 0x44]
test ecx, ecx
je 0x10001c3b
mov edx, dword [ebp - 0x3c]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x10001c1c
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10001d60
push edx
push ecx
call fcn.100045a4
add esp, 8
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
mov ecx, dword [ebp - 0x38]
test ecx, ecx
je 0x10001cdb
mov edx, dword [ebp - 0x30]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x10001c69
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10001d60
push edx
push ecx
call fcn.100045a4
add esp, 8
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
jmp 0x10001cdb
push dword [ebp - 0x6c]
cmp dword [0x1008924c], 8
mov eax, 0x10089238
push dword [ebp - 0x68]
cmovae eax, dword [0x10089238]
push 3
push eax
push 0
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegSetKeyValueW]
test eax, eax
mov eax, dword [ebp - 0x1c]
jne 0x10001b91
test eax, eax
je 0x10001cc7
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x10001cd2
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov bl, 1
jmp 0x10001ba9
xor bl, bl
mov eax, dword [ebp - 0x48]
test eax, eax
je 0x10001ce9
push eax
call dword [sym.imp.bcrypt.dll_BCryptDestroyKey]
mov ecx, dword [ebp - 0x54]
test ecx, ecx
je 0x10001d32
mov edx, dword [ebp - 0x4c]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x10001d0f
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10001d60
push edx
push ecx
call fcn.100045a4
add esp, 8
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 0
jmp 0x10001d32
xor bl, bl
mov ecx, dword [ebp - 0x20]
test ecx, ecx
je 0x10001d42
push 0
push ecx
call dword [sym.imp.bcrypt.dll_BCryptCloseAlgorithmProvider]
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.1000443f
mov esp, ebp
pop ebp
ret
call fcn.1000779c
int3