Function at 0x472500
Capabilities:
Check if file exists
Delete registry key
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d2cc8
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x512f18]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor esi, esi
mov dword [ebp - 4], esi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x10], esi
mov eax, dword [eax - 0xc]
cmp eax, esi
jne 0x472579
lea ecx, [ebp - 0x18]
push ecx
mov ecx, dword [ebp + 8]
call fcn.00475990
add esp, 4
push eax
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], 1
call fcn.00423d5a
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x472579
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [ebp + 0xc]
push ecx
mov ecx, esp
mov dword [ebp - 0x18], esp
push edx
push str.MountVirtReg:__s
push ecx
call fcn.00464a80
add esp, 0xc
call fcn.0046dfb0
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push str.RegLoadAppKeyW
push str.ADVAPI32.DLL
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
cmp eax, esi
jne 0x4725f9
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4725e5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
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 esi, dword [ebp + 0xc]
push str.RegLoadAppKeyW
push str.ADVAPI32.DLL
call edi
push eax
call ebx
xor ebx, ebx
push ebx
push ebx
push 0xf003f
lea ecx, [ebp - 0x10]
push ecx
push esi
call eax
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, ebx
jne 0x4726ec
mov dword [ebp - 0x18], ebx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
lea edx, [ebp - 0x14]
push str.MyTest._d
push edx
call fcn.00464a80
add esp, 0xc
push ebx
mov byte [ebp - 4], 2
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x10]
push ebx
lea eax, [ebp - 0x18]
push eax
push ebx
push 0xf003f
push ebx
push ebx
push ebx
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov esi, eax
cmp esi, ebx
jne 0x47268d
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x10]
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
jmp 0x4726c9
call edi
mov edx, dword [ebp - 0x14]
push ecx
mov ecx, esp
mov dword [ebp - 0x1c], esp
push eax
push esi
push edx
push str.VirtRegLoad_elevation_problem._Forcing_Legacy__n_s:Res_d__LE_d
push ecx
call fcn.00464a80
add esp, 0x14
call fcn.0046dfb0
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp + 8]
add esp, 4
mov dword [0x518bfc], eax
mov dword [ecx + 0xa8], 1
mov dword [ebp - 0x10], ebx
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4726ec
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [0x518c00], ebx
mov ebx, str._Modern_
jne 0x4726fe
mov ebx, str._Legacy_
call edi
mov edx, dword [ebp + 8]
push ecx
mov ecx, dword [0x518c00]
mov edi, esp
mov dword [ebp - 0x1c], esp
push eax
mov eax, dword [edx + 0xa8]
push esi
push ebx
push ecx
push eax
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
push eax
call fcn.004242c0
add esp, 4
lea esi, [eax + 0x10]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor ebx, ebx
cmp eax, 0xffffffff
lea eax, [esi - 0x10]
setne bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x472757
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push str.RegLoadAppKeyW
push str.ADVAPI32.DLL
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push ebx
push eax
push str.MountVirtReg:__RegLoadAppKey___p__RegFileExists_d__LegacyMode_d___g_VirtKeyHandle_x_s__Ret_d__LE_d
push edi
call fcn.00464a80
add esp, 0x24
call fcn.0046dfb0
mov esi, dword [ebp - 0x10]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
add esp, 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4727af
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret