Function at 0x402730
Capabilities:
Check if file exists
Get common file path
Get program files directory
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x634
mov eax, dword [0x76a02c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x20c]
push esi
push edi
push 0x208
push 0
push eax
mov dword [ebp - 0x630], 0
mov dword [ebp - 0x620], 0
mov dword [ebp - 0x624], 0
call fcn.00530310
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea eax, [ebp - 0x630]
add esp, 0xc
push eax
push 0x20019
push 0
push 0x7417e0
push SysReAllocString
call esi
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
jne 0x402893
lea eax, [ebp - 0x620]
push eax
push 0x20019
push 0
push str.shell
push dword [ebp - 0x630]
call esi
test eax, eax
jne 0x402893
lea eax, [ebp - 0x624]
push eax
push 0x20019
push 0
push str.opencommand
push dword [ebp - 0x620]
call esi
test eax, eax
jne 0x402893
lea eax, [ebp - 0x634]
mov dword [ebp - 0x634], 0x104
push eax
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x628], 1
push eax
lea eax, [ebp - 0x628]
push eax
push 0
push 0x741954
push dword [ebp - 0x624]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0x620]
call edi
push dword [ebp - 0x624]
call edi
lea eax, [ebp - 0x20c]
push eax
call fcn.0053435b
push 0x741950
push eax
call fcn.0052fa1d
add esp, 0xc
mov dword [ebp - 0x62c], eax
test eax, eax
je 0x402893
add eax, 2
push 0x741950
push eax
call fcn.0052fa1d
add esp, 8
test eax, eax
je 0x402893
xor ecx, ecx
mov word [eax], cx
mov eax, dword [ebp - 0x62c]
add eax, 2
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x402a0c
push 0x208
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.00530310
add esp, 0xc
mov dword [ebp - 0x620], 0
lea eax, [ebp - 0x620]
push eax
push 0x20019
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionApp_PathsIEXPLORE.EXE
push reloc.OLEAUT32.dll_SysReAllocString
call esi
test eax, eax
jne 0x402a0c
push 0x208
push eax
lea eax, [ebp - 0x61c]
push eax
call fcn.00530310
add esp, 0xc
mov dword [ebp - 0x62c], 0x104
lea eax, [ebp - 0x62c]
mov dword [ebp - 0x628], 1
push eax
lea eax, [ebp - 0x61c]
push eax
lea eax, [ebp - 0x628]
push eax
push 0
push 0x741954
push dword [ebp - 0x620]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [ebp - 0x61c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4029ba
push dword [ebp - 0x620]
call edi
push 0x208
lea eax, [ebp - 0x414]
push 0
push eax
call fcn.00530310
add esp, 0xc
lea eax, [ebp - 0x414]
push 0
push 0x26
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea edi, [ebp - 0x414]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x402975
lea eax, [ebp - 0x414]
mov ecx, 0x10
mov esi, str.Internet_Exploreriexplore.exe
rep movsd dword es:[edi], dword [esi]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x402a0c
xor ecx, ecx
movzx eax, word [ebp + ecx - 0x414]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x20e], ax
test ax, ax
jne 0x4029a0
jmp 0x4029e0
xor ecx, ecx
nop dword [eax]
movzx eax, word [ebp + ecx - 0x61c]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x20e], ax
test ax, ax
jne 0x4029c0
push dword [ebp - 0x620]
call edi
push 0
push 0
lea eax, [ebp - 0x20c]
push ebx
push eax
call fcn.0050a50a
add esp, 0x10
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00468d3e
mov esp, ebp
pop ebp
ret 4
push ebx
call fcn.00402a30
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00468d3e
mov esp, ebp
pop ebp
ret 4