Function at 0x474930
Capabilities:
Delete registry key
Terminate process

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d7748
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x518f10]
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 0x4749a9
lea ecx, [ebp - 0x1c]
push ecx
mov ecx, dword [ebp + 8]
call fcn.00477db0
add esp, 4
push eax
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], 1
call fcn.00424d3a
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4749a9
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 - 0x1c], esp
push edx
push str.MountVirtReg:__s
push ecx
call fcn.00466ad0
add esp, 0xc
call fcn.004703d0
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 0x474a30
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 0x474a15
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
push 0
push 0
push 0xf003f
lea ecx, [ebp - 0x10]
push ecx
push esi
call eax
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ecx
mov edx, esp
mov dword [ebp - 0x1c], esp
push eax
push esi
push str.MountVirtReg:__RegLoadAppKey_d__LE_d
push edx
call fcn.00466ad0
add esp, 0x10
call fcn.004703d0
add esp, 4
cmp esi, 0xb7
jne 0x474ac3
push ecx
mov eax, esp
mov dword [ebp - 0x1c], esp
push str.MountVirtReg:_ERROR_ALREADY_EXISTS._Please_close_the_currently_running_application_instances.
push eax
call fcn.00466ad0
add esp, 8
call fcn.004703d0
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0xc]
add esp, 4
push 1
push eax
push str.Please_close_all_currently_running_instances_of_this_application.
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
cmp eax, 2
jne 0x474a30
push 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
xor edi, edi
cmp esi, edi
jne 0x474b92
mov dword [ebp - 0x18], edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
lea edx, [ebp - 0x14]
push str.MyTest._d
push edx
call fcn.00466ad0
add esp, 0xc
push edi
mov byte [ebp - 4], 2
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x10]
push edi
lea eax, [ebp - 0x18]
push eax
push edi
push 0xf003f
push edi
push edi
push edi
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov esi, eax
cmp esi, edi
jne 0x474b2f
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 0x474b6f
call dword [sym.imp.KERNEL32.dll_GetLastError]
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.00466ad0
add esp, 0x14
call fcn.004703d0
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp + 8]
add esp, 4
mov dword [0x51ebfc], eax
mov dword [ecx + 0xac], 1
mov dword [ebp - 0x10], edi
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 0x474b92
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 0x1c], str._Modern_
cmp dword [ebp - 0x10], edi
jne 0x474ba5
mov dword [ebp - 0x1c], str._Legacy_
mov eax, dword [ebp + 0xc]
push ecx
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xac]
mov dword [ebp - 0x20], esp
mov ebx, esp
push edx
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x20], esp
mov edi, esp
push eax
call fcn.004252a0
add eax, 0x10
add esp, 4
mov dword [edi], eax
call fcn.00469180
add esp, 4
push str.RegLoadAppKeyW
push str.ADVAPI32.DLL
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x1c]
push esi
push eax
push ecx
push str.MountVirtReg:_hMountedKey_x_s__Ret_d__LE_d___RegLoadAppKey___p__RegFileExists_d__Settings.LegacyMode_d_
push ebx
call fcn.00466ad0
add esp, 0x24
call fcn.004703d0
mov esi, dword [ebp - 0x10]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
add esp, 4
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x474c41
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