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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4cf858
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x504c94]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
push eax
xor esi, esi
push esi
push esi
push ecx
mov ebx, esp
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x20], ebx
call fcn.0049d1fb
xor ecx, ecx
cmp eax, esi
setne cl
cmp ecx, esi
jne 0x4759e6
push 0x80004005
call fcn.00421000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebx], eax
mov ecx, str.VirtReg.dat
mov dword [ebp - 4], esi
test ecx, 0xffff0000
jne 0x475ae1
mov edx, ecx
movzx esi, dx
push esi
call fcn.004a5121
mov edi, eax
test edi, edi
je 0x475afb
mov eax, esi
shr eax, 4
inc eax
movzx ecx, ax
push 6
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x475afb
push esi
push eax
push edi
call fcn.004216fe
mov esi, eax
add esp, 0xc
test esi, esi
je 0x475afb
mov eax, dword [ebx]
movzx edi, word [esi]
sub eax, 0x10
mov ecx, 1
sub ecx, dword [eax + 0xc]
mov eax, dword [eax + 8]
sub eax, edi
or eax, ecx
jge 0x475a6e
push edi
mov ecx, ebx
call fcn.0042151d
movzx eax, word [esi]
mov edx, dword [ebx]
add esi, 2
mov dword [ebp - 0x1c], edx
cmp eax, 0xffffffff
jne 0x475a88
push esi
call fcn.004ab8ea
add esp, 4
inc eax
add eax, eax
push eax
lea ecx, [edi + edi]
push esi
push ecx
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp - 0x1c]
push ecx
call fcn.004ab372
add esp, 0x10
cmp eax, 0x50
ja case.0x475aab.1
movzx edx, byte [eax + 0x475d30]
jmp dword [edx*4 + 0x475d20]
call fcn.0049d763
call fcn.0049d79b
test edi, edi
jl 0x475ad7
mov eax, dword [ebx]
cmp edi, dword [eax - 8]
jg 0x475ad7
mov edx, dword [ebp - 0x14]
mov dword [eax - 0xc], edi
mov eax, dword [ebx]
xor ecx, ecx
mov word [edx + eax], cx
jmp 0x475afb
push 0x80070057
call fcn.00421000
push str.VirtReg.dat
call fcn.004ab8ea
add esp, 4
push eax
push str.VirtReg.dat
mov ecx, ebx
call fcn.00423f13
push 1
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], 0xffffffff
call fcn.00479070
add esp, 0x10
mov dword [ebp - 4], 1
mov ecx, dword [ebp - 0x18]
mov eax, esp
mov dword [ebp - 0x20], esp
push ecx
push str.MountVirtReg:__s
push eax
call fcn.00466a00
add esp, 0xc
call fcn.00471300
mov edi, dword [sym.imp.KERNEL32.dll_SetLastError]
add esp, 4
push 0
call edi
mov esi, dword [ebp - 0x18]
push str.RegLoadAppKeyW
push str.ADVAPI32.DLL
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0
push 0
push 0xf003f
lea edx, [ebp - 0x10]
push edx
push esi
call eax
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jne 0x475c44
mov dword [ebp - 0x1c], 0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
lea eax, [ebp - 0x14]
push str.MyTest._d
push eax
call fcn.00466a00
add esp, 0xc
push 0
mov byte [ebp - 4], 2
call edi
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x10]
push 0
lea ecx, [ebp - 0x1c]
push ecx
push 0
push 0xf003f
push 0
push 0
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov esi, eax
test esi, esi
jne 0x475be1
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x10]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
jmp 0x475c21
call ebx
mov edx, dword [ebp - 0x14]
push ecx
mov ecx, esp
mov dword [ebp - 0x20], esp
push eax
push esi
push edx
push str.VirtRegLoad_elevation_problem._Forcing_Legacy__n_s:Res_d__LE_d
push ecx
call fcn.00466a00
add esp, 0x14
call fcn.00471300
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp + 8]
add esp, 4
mov dword [0x509e98], eax
mov dword [ecx + 0x98], 1
mov dword [ebp - 0x10], 0
mov byte [ebp - 4], 1
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 0x475c44
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [0x509e9c], 0
mov edi, str._Modern_
jne 0x475c57
mov edi, str._Legacy_
call ebx
mov edx, dword [ebp + 8]
push ecx
mov ecx, dword [0x509e9c]
mov ebx, esp
mov dword [ebp - 0x20], esp
push eax
mov eax, dword [edx + 0x98]
push esi
push edi
push ecx
push eax
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
push eax
call fcn.00423f84
add esp, 4
lea esi, [eax + 0x10]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
lea eax, [esi - 0x10]
lea edx, [eax + 0xc]
mov edi, ecx
mov ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x475cb4
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 edi
push eax
push str.MountVirtReg:__RegLoadAppKey___p__RegFileExists_d__LegacyMode_d___g_VirtKeyHandle_x_s__Ret_d__LE_d
push ebx
call fcn.00466a00
add esp, 0x24
call fcn.00471300
mov esi, dword [ebp - 0x10]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
add esp, 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x475d0c
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