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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d27e0
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x50ac94]
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 0x4781b9
mov ecx, dword [ebp + 8]
push ecx
push esi
push esi
push ecx
mov ebx, esp
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x20], ebx
call fcn.0049ff8a
xor ecx, ecx
cmp eax, esi
setne cl
cmp ecx, esi
jne 0x478017
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 byte [ebp - 4], 1
test ecx, 0xffff0000
jne 0x478113
mov edx, ecx
movzx esi, dx
push esi
call fcn.004a7eac
mov edi, eax
test edi, edi
je 0x47812d
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 0x47812d
push esi
push eax
push edi
call fcn.004216d6
mov esi, eax
add esp, 0xc
test esi, esi
je 0x47812d
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 0x4780a0
push edi
mov ecx, ebx
call fcn.004214f5
movzx eax, word [esi]
mov edx, dword [ebx]
add esi, 2
mov dword [ebp - 0x18], edx
cmp eax, 0xffffffff
jne 0x4780ba
push esi
call fcn.004ae67a
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 - 0x18]
push ecx
call fcn.004ae100
add esp, 0x10
cmp eax, 0x50
ja case.0x4780dd.1
movzx edx, byte [eax + 0x478414]
jmp dword [edx*4 + 0x478404]
call fcn.004a04f2
call fcn.004a052a
test edi, edi
jl 0x478109
mov eax, dword [ebx]
cmp edi, dword [eax - 8]
jg 0x478109
mov edx, dword [ebp - 0x14]
mov dword [eax - 0xc], edi
mov eax, dword [ebx]
xor ecx, ecx
mov word [edx + eax], cx
jmp 0x47812d
push 0x80070057
call fcn.00421000
push str.VirtReg.dat
call fcn.004ae67a
add esp, 4
push eax
push str.VirtReg.dat
mov ecx, ebx
call fcn.004241cf
push 1
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 0
call fcn.0047bc30
add esp, 0x14
mov byte [ebp - 4], 2
mov ecx, dword [eax]
mov esi, dword [ebp + 0xc]
lea eax, [ecx - 0x10]
add esi, 0xfffffff0
cmp eax, esi
je 0x478196
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x478189
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x478189
push eax
call fcn.00424240
mov ebx, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x478181
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
add ebx, 0x10
mov dword [ebp + 0xc], ebx
jmp 0x478196
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [ebp + 0xc]
call fcn.004241cf
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4781b9
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 - 0x20], esp
push edx
push str.MountVirtReg:__s
push ecx
call fcn.00468700
add esp, 0xc
call fcn.00473690
add esp, 4
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ebx, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push str.RegLoadAppKeyW
push str.ADVAPI32.DLL
call ebx
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call edi
test eax, eax
jne 0x47823a
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 0x478226
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 ebx
push eax
call edi
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 0x47832d
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.00468700
add esp, 0xc
push ebx
mov byte [ebp - 4], 3
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 0x4782ce
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 0x47830a
call edi
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.00468700
add esp, 0x14
call fcn.00473690
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp + 8]
add esp, 4
mov dword [0x50fe98], eax
mov dword [ecx + 0xa0], 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 0x47832d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [0x50fe9c], ebx
mov ebx, str._Modern_
jne 0x47833f
mov ebx, str._Legacy_
call edi
mov edx, dword [ebp + 8]
push ecx
mov ecx, dword [0x50fe9c]
mov edi, esp
mov dword [ebp - 0x20], esp
push eax
mov eax, dword [edx + 0xa0]
push esi
push ebx
push ecx
push eax
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
push eax
call fcn.00424240
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 0x478398
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.00468700
add esp, 0x24
call fcn.00473690
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 0x4783f0
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