Function at 0x4042f0
Capabilities:
Check if file exists
Get common file path
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5491b8
mov eax, dword fs:[0]
push eax
sub esp, 0x41c
mov eax, dword [0x5ac7dc]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov ebx, eax
push str.IsWow64Process
push str.kernel32.dll
call esi
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call edi
test eax, eax
jne 0x404350
xor bl, bl
jmp 0x404376
lea ecx, [ebp - 0x424]
mov dword [ebp - 0x424], 0
push ecx
push ebx
call eax
test eax, eax
jne 0x40436c
xor bl, bl
jmp 0x404376
cmp dword [ebp - 0x424], 0
setne bl
push 0x104
lea eax, [ebp - 0x420]
push 0
push eax
call fcn.004d3150
push 0x104
lea eax, [ebp - 0x114]
push 0
push eax
call fcn.004d3150
push 0x104
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.004d3150
add esp, 0x24
mov dword [ebp - 0x428], 0
test bl, bl
je 0x4043e8
push str.Wow64DisableWow64FsRedirection
push str.kernel32.dll
call esi
push eax
call edi
test eax, eax
je 0x4045ac
lea ecx, [ebp - 0x428]
push ecx
call eax
test eax, eax
je 0x4045ac
push 0x104
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x104
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
push str.drivers_
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
cmp dword [ebp + 0x1c], 0x10
lea eax, [ebp + 8]
cmovae eax, dword [ebp + 8]
push eax
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x4044ad
sub esp, 0x18
mov edx, esp
mov dword [edx + 0x14], 0xf
mov dword [edx + 0x10], 0
mov byte [edx], 0
cmp byte [ebp - 0x114], 0
jne 0x404472
xor ecx, ecx
jmp 0x40448e
lea ecx, [ebp - 0x114]
lea eax, [ecx + 1]
mov dword [ebp - 0x424], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404481
sub ecx, dword [ebp - 0x424]
push ecx
lea eax, [ebp - 0x114]
mov ecx, edx
push eax
call fcn.00407fe0
call fcn.00403a40
add esp, 0x18
test al, al
je 0x40454e
push 0x104
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
cmp dword [ebp + 0x1c], 0x10
lea eax, [ebp + 8]
cmovae eax, dword [ebp + 8]
push eax
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x4045b0
sub esp, 0x18
mov edx, esp
mov dword [edx + 0x14], 0xf
mov dword [edx + 0x10], 0
mov byte [edx], 0
cmp byte [ebp - 0x218], 0
jne 0x404517
xor ecx, ecx
jmp 0x404533
lea ecx, [ebp - 0x218]
lea eax, [ecx + 1]
mov dword [ebp - 0x424], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404526
sub ecx, dword [ebp - 0x424]
push ecx
lea eax, [ebp - 0x218]
mov ecx, edx
push eax
call fcn.00407fe0
call fcn.00403a40
add esp, 0x18
test al, al
jne 0x4045b0
push 0x104
lea eax, [ebp - 0x31c]
push 0
push eax
call fcn.004d3150
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x31c]
push str.delete_file_failed_with_errorcode__d
push eax
call fcn.00401830
add esp, 0xc
lea eax, [ebp - 0x31c]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
test bl, bl
je 0x4045ac
mov ebx, dword [ebp - 0x428]
push str.Wow64RevertWow64FsRedirection
push str.kernel32.dll
call esi
push eax
call edi
test eax, eax
je 0x4045ac
push ebx
call eax
xor esi, esi
jmp 0x4045d9
test bl, bl
je 0x4045d4
mov ebx, dword [ebp - 0x428]
push str.Wow64RevertWow64FsRedirection
push str.kernel32.dll
call esi
push eax
call edi
test eax, eax
je 0x4045ac
push ebx
call eax
mov esi, eax
jmp 0x4045d9
mov esi, 1
mov eax, dword [ebp + 0x1c]
cmp eax, 0x10
jb 0x404623
mov ecx, dword [ebp + 8]
inc eax
cmp eax, 0x1000
jb 0x40461a
test cl, 0x1f
je 0x4045f6
call fcn.004ef829
mov eax, dword [ecx - 4]
cmp eax, ecx
jb 0x404602
call fcn.004ef829
sub ecx, eax
cmp ecx, 4
jae 0x40460e
call fcn.004ef829
cmp ecx, 0x23
jbe 0x404618
call fcn.004ef829
mov ecx, eax
push ecx
call fcn.004ae222
add esp, 4
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004ae22e
mov esp, ebp
pop ebp
ret