Function at 0x405ef6
Capabilities:
Check if file exists
Delete file
Get common file path
Get file attributes
Get file size
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc34
cmp dword [ebp + 0x14], 0
push ebx
push esi
push edi
jne 0x40603b
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x406033
push dword [ebp + 8]
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
call edi
cmp eax, 0xffffffff
je 0x406033
push 0x5c
push dword [ebp + 8]
call sub.MSVCRT.dll_wcsrchr
mov ebx, eax
pop ecx
test ebx, ebx
pop ecx
je 0x40603b
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpiW]
inc ebx
inc ebx
push str.IDMNetMon.dll
push ebx
call esi
test eax, eax
je 0x405ff3
push str.IDMNetMon64.dll
push ebx
call esi
test eax, eax
je 0x405ff3
push str.IDMNetMonAA.dll
push ebx
call esi
test eax, eax
je 0x405ff3
push str.IDMIntegratorAA.exe
push ebx
call esi
test eax, eax
je 0x405ff3
push str.IDMIntegrator64.exe
push ebx
call esi
test eax, eax
je 0x405ff3
push str.idmbrbtn.dll
push ebx
call esi
test eax, eax
je 0x405ff3
push str.idmbrbtn64.dll
push ebx
call esi
test eax, eax
je 0x405ff3
push str.idmbrbtnAA.dll
push ebx
call esi
test eax, eax
je 0x405ff3
push str.IDMVMPrs.dll
push ebx
call esi
test eax, eax
je 0x405ff3
push str.IDMVMPrs64.dll
push ebx
call esi
test eax, eax
je 0x405ff3
push str.IDMVMPrsAA.dll
push ebx
call esi
test eax, eax
je 0x405ff3
push str.IDMFType64.dll
push ebx
call esi
test eax, eax
je 0x405ff3
push str.IDMFType.dll
push ebx
call esi
test eax, eax
jne 0x40603b
mov esi, dword [0x41cd44]
push 0x19
pop ebx
cmp esi, ebx
mov dword [0x41cd44], esi
jle 0x40600c
mov dword [0x41cd44], ebx
push 0x64
call fcn.004058d8
pop ecx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x406033
push dword [ebp + 8]
call edi
cmp eax, 0xffffffff
je 0x406033
inc esi
cmp esi, 0x1e
jg 0x40603b
jmp 0x405ffc
push 1
pop eax
jmp 0x40626e
mov eax, dword [ebp + 0xc]
cmp dword [eax], 0
jne 0x406049
mov dword [eax], 1
push 5
push dword [ebp + 0x14]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
mov dword [ebp + 0xc], eax
jne 0x40626e
mov esi, dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
mov ebx, 0x104
lea eax, [ebp - 0x834]
push ebx
push eax
push dword [ebp + 8]
call esi
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
test eax, eax
jne 0x406090
push dword [ebp + 8]
lea eax, [ebp - 0x834]
push eax
call edi
cmp dword [ebp + 0x14], 0
jne 0x40609d
push 0x4173b4
jmp 0x4060c1
lea eax, [ebp - 0x21c]
push ebx
push eax
push dword [ebp + 0x14]
call esi
test eax, eax
jne 0x4060ba
push dword [ebp + 0x14]
lea eax, [ebp - 0x21c]
push eax
call edi
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x424]
push eax
call edi
lea eax, [ebp - 0x834]
push eax
lea eax, [ebp - 0x424]
push eax
lea eax, [ebp - 0xc34]
push str._hs_hs_r_n
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
mov esi, str._Rename__r_n
lea edi, [ebp - 0x14]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
add esp, 0x10
mov dword [ebp + 8], eax
movsw word es:[edi], word [esi]
lea eax, [ebp - 0x62c]
push ebx
push eax
movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea eax, [ebp - 0x62c]
push str.WinInit.Ini
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
xor esi, esi
lea eax, [ebp - 0x62c]
push esi
push 0x8000080
push 4
push esi
push esi
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 4], edi
jne 0x406159
mov eax, dword [ebp + 0x10]
cmp dword [eax], esi
jne 0x406152
mov dword [eax], 1
xor eax, eax
jmp 0x40626e
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
mov eax, dword [ebp + 8]
push esi
lea eax, [ebx + eax + 0xa]
push eax
push esi
push 4
push esi
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
cmp eax, esi
mov dword [ebp - 8], eax
je 0x406246
push esi
push esi
push esi
push 2
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edi, eax
cmp edi, esi
je 0x40622b
lea eax, [ebp - 0x14]
push eax
push edi
call sub.MSVCRT.dll_strstr
pop ecx
cmp eax, esi
pop ecx
jne 0x4061c5
lea eax, [ebp - 0x14]
push eax
lea eax, [edi + ebx]
push 0x41737c
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
add ebx, eax
mov dword [ebp + 0x14], ebx
jmp 0x4061ed
push 0xa
push eax
call sub.MSVCRT.dll_strchr
mov esi, eax
mov eax, edi
inc esi
sub eax, esi
add eax, ebx
push eax
mov eax, dword [ebp + 8]
add eax, esi
push esi
push eax
call sub.MSVCRT.dll_memmove
sub esi, edi
add esp, 0x14
mov dword [ebp + 0x14], esi
xor esi, esi
lea eax, [ebp - 0xc34]
push eax
push edi
call sub.MSVCRT.dll_strstr
pop ecx
test eax, eax
pop ecx
jne 0x406218
push dword [ebp + 8]
lea eax, [ebp - 0xc34]
push eax
mov eax, dword [ebp + 0x14]
add eax, edi
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
add ebx, dword [ebp + 8]
mov dword [ebp + 0xc], 1
jmp 0x406238
mov eax, dword [ebp + 0x10]
cmp dword [eax], esi
jne 0x406238
mov dword [eax], 1
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebp - 4]
jmp 0x406253
mov eax, dword [ebp + 0x10]
cmp dword [eax], esi
jne 0x406253
mov dword [eax], 1
push esi
push esi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push edi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 0xc]
pop edi
pop esi
pop ebx
leave
ret 0x10