Function at 0x405143
Capabilities:
Check if file exists
Get common file path
Get program files directory

Disassembly:
push ebp
lea ebp, [esp - 0x103c]
mov eax, 0x103c
call fcn.0043f800
push 0xffffffffffffffff
push 0x44924e
mov eax, dword fs:[0]
push eax
sub esp, 0x20
mov eax, dword [0x45b1d4]
xor eax, ebp
mov dword [ebp + 0x1038], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
push str.julegameieplugin.3.ocx
lea eax, [ebp + 0x1c]
push edi
push eax
mov dword [ebp - 0x10], edi
call fcn.00405e08
add esp, 0xc
and dword [ebp - 4], 0
cmp dword [ebp + 0x34], 8
mov eax, dword [ebp + 0x20]
jae 0x4051a7
lea eax, [ebp + 0x20]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4051e2
push eax
push 1
lea esi, [ebp + 0x1c]
call fcn.004022b6
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x1038]
xor ecx, ebp
call fcn.0042d4ab
add ebp, 0x103c
leave
ret
push str.julegameieplugin.3.inf
lea eax, [ebp - 0x2c]
push edi
push eax
call fcn.00405e08
add esp, 0xc
push 0xffffffffffffffff
lea ecx, [ebp + 0x1c]
push ecx
xor ebx, ebx
mov byte [ebp - 4], 1
call fcn.00402089
push ebx
push 1
lea esi, [ebp - 0x2c]
mov byte [ebp - 4], bl
call fcn.004022b6
cmp dword [ebp + 0x34], 8
mov eax, dword [ebp + 0x20]
jae 0x40521f
lea eax, [ebp + 0x20]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40522d
push ebx
jmp 0x4051b3
push str.npjulegameplugin.3.dll
lea eax, [ebp - 0x2c]
push edi
push eax
call fcn.00405e08
add esp, 0xc
push 0xffffffffffffffff
lea ecx, [ebp + 0x1c]
push ecx
xor ebx, ebx
mov byte [ebp - 4], 2
call fcn.00402089
push ebx
push 1
lea esi, [ebp - 0x2c]
mov byte [ebp - 4], bl
call fcn.004022b6
cmp dword [ebp + 0x34], 8
mov eax, dword [ebp + 0x20]
jae 0x40526a
lea eax, [ebp + 0x20]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40522a
push str.uninstallwebplugin.exe
lea eax, [ebp - 0x2c]
push edi
push eax
call fcn.00405e08
add esp, 0xc
push 0xffffffffffffffff
lea ecx, [ebp + 0x1c]
push ecx
xor ebx, ebx
mov byte [ebp - 4], 3
call fcn.00402089
xor edi, edi
push ebx
inc edi
push edi
lea esi, [ebp - 0x2c]
mov byte [ebp - 4], bl
call fcn.004022b6
cmp dword [ebp + 0x34], 8
mov eax, dword [ebp + 0x20]
jae 0x4052b4
lea eax, [ebp + 0x20]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4052d4
mov dword [ebp - 0x10], ebx
push ebx
push edi
lea esi, [ebp + 0x1c]
call fcn.004022b6
mov eax, dword [ebp - 0x10]
jmp 0x4051bf
push str.JuleGameWebBrowserPlugin
push str.softwarejulegamepath
lea eax, [ebp]
push getpeername
push eax
call section..text
push dword [ebp - 0x10]
lea ecx, [ebp]
push edi
mov byte [ebp - 4], 4
call fcn.004047c7
add esp, 0x18
test eax, eax
je 0x405312
push ebx
push edi
lea esi, [ebp]
call fcn.004022b6
mov dword [ebp - 0x10], edi
jmp 0x4052c2
push edi
push 0x26
lea eax, [ebp + 0x38]
push eax
push ebx
mov word [ebp + 0x38], bx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea eax, [ebp + 0x38]
lea esi, [ebp]
mov word [ebp + 0x1036], bx
call fcn.0040210f
push dword [ebp - 0x10]
mov ecx, esi
push ebx
call fcn.004047c7
test eax, eax
pop ecx
pop ecx
jne 0x405303
push edi
push 0x23
lea eax, [ebp + 0x38]
push eax
push ebx
mov word [ebp + 0x38], bx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea eax, [ebp + 0x38]
mov word [ebp + 0x1036], bx
call fcn.0040210f
push dword [ebp - 0x10]
mov ecx, esi
push ebx
call fcn.004047c7
test eax, eax
pop ecx
pop ecx
jne 0x405303
lea eax, [ebp + 0x38]
push eax
push 0x800
mov word [ebp + 0x38], bx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea eax, [ebp + 0x38]
mov word [ebp + 0x1036], bx
call fcn.0040210f
push dword [ebp - 0x10]
mov ecx, esi
push ebx
call fcn.004047c7
test eax, eax
pop ecx
pop ecx
jne 0x405303
push ebx
push edi
call fcn.004022b6
jmp 0x4052bf