Function at 0x40663d
Capabilities:
Get common file path
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push esi
push edi
xor edi, edi
push str.kernel32.dll
mov dword [ebp - 8], edi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
cmp esi, edi
je 0x406688
push str.MoveFileExA
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, edi
je 0x406678
push 5
push dword [ebp + 0xc]
push dword [ebp + 8]
call eax
mov dword [ebp - 8], eax
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [ebp - 8], edi
jne 0x406830
push ebx
push 0xc00
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 4], eax
lea esi, [eax + 0x400]
add eax, 0x800
cmp dword [ebp + 0xc], edi
mov edi, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
mov ebx, 0x400
je 0x4066bd
push ebx
push eax
push dword [ebp + 0xc]
call edi
jmp 0x4066c5
mov ecx, dword [0x40735c]
mov dword [eax], ecx
push ebx
push esi
push dword [ebp + 8]
call edi
mov eax, dword [ebp - 4]
push esi
add eax, 0x800
push eax
push str._s_s_r_n
push dword [ebp - 4]
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
mov dword [ebp + 0xc], eax
push 0x3f0
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push str.wininit.ini
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatA]
xor ebx, ebx
push ebx
push 0x8000080
push 4
push ebx
push ebx
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 0x14], edi
je 0x406826
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
mov eax, dword [ebp + 0xc]
push ebx
mov dword [ebp - 0xc], esi
lea eax, [esi + eax + 0xa]
push eax
push ebx
push 4
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
cmp eax, ebx
mov dword [ebp - 0x10], eax
je 0x40680e
push ebx
push ebx
push ebx
push 2
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edi, eax
cmp edi, ebx
mov dword [ebp + 8], edi
je 0x406802
push 0xffffffffffffffff
push str._Rename__r_n
push edi
call fcn.00406837
add esp, 0xc
cmp eax, ebx
jne 0x406797
lea eax, [edi + esi]
push str._Rename__r_n
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
add esi, 0xa
mov eax, esi
jmp 0x4067d8
push 0xffffffffffffffff
push 0x4094c0
push eax
call fcn.00406837
mov esi, eax
inc esi
sub edi, esi
add edi, dword [ebp - 0xc]
push edi
push dword [ebp - 4]
push esi
call fcn.00406837
add esp, 0x18
test eax, eax
jne 0x4067ee
mov eax, dword [ebp + 0xc]
push edi
add eax, esi
push esi
push eax
call fcn.004043bb
mov edi, dword [ebp + 8]
add esp, 0xc
sub esi, dword [ebp + 8]
mov eax, esi
mov esi, dword [ebp - 0xc]
push dword [ebp + 0xc]
add eax, edi
push dword [ebp - 4]
push eax
call fcn.00404393
add esp, 0xc
add esi, dword [ebp + 0xc]
jmp 0x4067f4
mov edi, dword [ebp + 8]
mov esi, dword [ebp - 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [ebp - 8], 1
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebp - 0x14]
push ebx
push ebx
push esi
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]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop ebx
mov eax, dword [ebp - 8]
pop edi
pop esi
leave
ret