Function at 0x404360
Capabilities:
Get common file path
Get file size
Move file
Set file attributes

Disassembly:
sub esp, 0x624
push ebx
push ebp
push esi
mov esi, dword [esp + 0x634]
push edi
push esi
mov ebp, ecx
call fcn.00404320
mov edi, dword [sym.imp.SHLWAPI.dll_PathIsDirectoryA]
test al, al
jne 0x404399
push esi
call edi
test eax, eax
jne 0x404399
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x624
ret 8
push esi
call edi
mov edi, dword [esp + 0x63c]
test eax, eax
je 0x4043ba
test edi, edi
je 0x4043ba
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x624
ret 8
push 0x80
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push 4
push edi
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
cmp eax, 1
sete bl
test bl, bl
mov byte [esp + 0x13], bl
jne 0x4045dc
lea eax, [esp + 0x130]
push 0x104
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
test eax, eax
jne 0x404415
push str.Calling_GetShortPathNameLong_in_NvReplaceFileOnReboot
mov ecx, ebp
call fcn.00402530
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x624
ret 8
test edi, edi
mov eax, 0x40c42c
je 0x404420
mov eax, edi
lea ecx, [esp + 0x130]
lea edx, [esp + 0x234]
push ecx
push eax
push str._hs_hs_r_n
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
mov ecx, dword [0x40c418]
mov dx, word [0x40c41c]
mov esi, eax
mov eax, dword [str._Rename__r_n]
add esp, 0x10
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], eax
mov al, byte [0x40c41e]
lea ecx, [esp + 0x2c]
push 0x104
push ecx
mov dword [esp + 0x1c], esi
mov word [esp + 0x28], dx
mov byte [esp + 0x2a], al
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea edi, [esp + 0x2c]
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [str.WININIT.INI]
repne scasb al, byte es:[edi]
mov eax, dword [0x40c408]
mov ecx, dword [0x40c40c]
dec edi
push 0
push 0x8000080
push 4
mov dword [edi], edx
mov dl, byte [0x40c410]
push 0
push 0
mov dword [edi + 4], eax
lea eax, [esp + 0x40]
push 0xc0000000
push eax
mov dword [edi + 8], ecx
mov byte [edi + 0xc], dl
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
mov dword [esp + 0x24], edi
jne 0x4044e2
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x624
ret 8
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, eax
push 0
lea ecx, [esi + ebp + 0xa]
push ecx
push 0
push 4
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov esi, eax
test esi, esi
mov dword [esp + 0x28], esi
je 0x4045c2
push 0
push 0
push 0
push 2
push esi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ebx, eax
test ebx, ebx
je 0x4045b7
lea edx, [esp + 0x18]
push edx
push ebx
call dword [sym.imp.MSVCRT.dll_strstr]
add esp, 8
test eax, eax
jne 0x404558
lea eax, [esp + 0x18]
lea ecx, [ebx + ebp]
push eax
push 0x40a9d0
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
add ebp, eax
mov eax, ebp
jmp 0x404581
push 0xa
push eax
call dword [sym.imp.MSVCRT.dll_strchr]
mov esi, eax
mov eax, dword [esp + 0x1c]
inc esi
mov edx, ebx
sub edx, esi
add edx, ebp
lea ecx, [esi + eax]
push edx
push esi
push ecx
call dword [sym.imp.MSVCRT.dll_memmove]
add esp, 0x14
sub esi, ebx
mov eax, esi
mov ecx, dword [esp + 0x14]
lea esi, [esp + 0x234]
mov edx, ecx
lea edi, [eax + ebx]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x28]
mov edi, dword [esp + 0x24]
add ebp, eax
mov byte [esp + 0x13], 1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov bl, byte [esp + 0x13]
push 0
push 0
push ebp
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]
pop edi
pop esi
mov al, bl
pop ebp
pop ebx
add esp, 0x624
ret 8