Function at 0x40ae50
Capabilities:
Persist via app paths registry key
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x57aac9
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x5ca104]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x24], edi
mov dword [ebp - 4], 0
mov dword [ebp - 0x1c], 0
call fcn.00451120
mov dword [ebp - 4], 0
mov eax, dword [edi]
push ecx
sub eax, 0x10
mov dword [ebp - 0x1c], 1
mov esi, esp
push eax
mov dword [ebp - 0x20], esi
call fcn.00405650
add esp, 4
lea ecx, [ebp - 0x18]
add eax, 0x10
mov dword [esi], eax
call fcn.0040ac60
mov eax, dword [edi]
add esp, 4
mov esi, eax
mov dword [ebp - 0x20], eax
lea ecx, [esi + 2]
nop dword [eax]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x40aed0
push 0
lea eax, [ebp - 0x14]
mov dword [ebp - 0x10], reloc.OLEAUT32.dll_SysReAllocString
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push str.SoftwareMicrosoftWindowsCurrentVersionApp_PathsDllRepairOfficial.exe
sub esi, ecx
mov dword [ebp - 0x14], 0
push reloc.OLEAUT32.dll_SysReAllocString
sar esi, 1
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
jne 0x40af48
mov eax, dword [ebp - 0x10]
cmp eax, reloc.OLEAUT32.dll_SysReAllocString
je 0x40af27
push eax
call ebx
mov ecx, dword [ebp - 0x14]
lea eax, [esi*2 + 2]
push eax
push dword [ebp - 0x20]
mov dword [ebp - 0x10], ecx
push 1
push 0
push 0x5a41c8
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov eax, dword [ebp - 0x10]
cmp eax, reloc.OLEAUT32.dll_SysReAllocString
je 0x40af55
push eax
call ebx
mov eax, dword [ebp - 0x18]
mov esi, eax
mov dword [ebp - 0x20], eax
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x40af60
push 0
lea eax, [ebp - 0x14]
mov dword [ebp - 0x10], reloc.OLEAUT32.dll_SysReAllocString
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push str.SoftwareMicrosoftWindowsCurrentVersionApp_PathsDllRepairOfficial.exe
sub esi, ecx
mov dword [ebp - 0x14], 0
push reloc.OLEAUT32.dll_SysReAllocString
sar esi, 1
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x40afd2
mov eax, dword [ebp - 0x10]
cmp eax, reloc.OLEAUT32.dll_SysReAllocString
je 0x40afb1
push eax
call ebx
mov ecx, dword [ebp - 0x14]
lea eax, [esi*2 + 2]
push eax
push dword [ebp - 0x20]
mov dword [ebp - 0x10], ecx
push 1
push 0
push str.Mid_C
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov eax, dword [ebp - 0x10]
cmp eax, reloc.OLEAUT32.dll_SysReAllocString
je 0x40afdf
push eax
call ebx
mov ecx, dword [ebp - 0x18]
or eax, 0xffffffff
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x40b033
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov esi, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x40b02f
mov edx, dword [edx + 4]
mov eax, dword [edx]
mov esi, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x40b02f
push 0
push dword [edx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, edx
call esi
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret