Function at 0x10018a42
Capabilities:
Get common file path
Get file size
Move file

Disassembly:
push ebp
lea ebp, [esp - 0x7e0]
sub esp, 0x860
mov eax, dword [0x10095dec]
xor eax, ebp
mov dword [ebp + 0x7dc], eax
mov eax, dword [ebp + 0x7ec]
push edi
mov edi, dword [ebp + 0x7e8]
mov dword [ebp - 0x74], eax
test edi, edi
jne 0x10018a78
xor eax, eax
jmp 0x10018ca5
push 5
push eax
push edi
call dword [sym.imp.kernel32.dll_MoveFileExW]
mov dword [ebp - 0x78], eax
call fcn.100309ee
test eax, eax
jne 0x10018ca2
push ebx
push esi
mov esi, dword [sym.imp.kernel32.dll_GetShortPathNameW]
mov ebx, 0x104
push ebx
lea eax, [ebp - 0x70]
push eax
push edi
call esi
cmp dword [ebp - 0x74], 0
je 0x10018abc
push ebx
lea eax, [ebp + 0x5c8]
push eax
push dword [ebp - 0x74]
call esi
jmp 0x10018aed
push edi
call fcn.1001834c
test eax, eax
pop ecx
lea eax, [ebp + 0x5c8]
je 0x10018ad9
push str.DIRNUL
push 0x1007588c
jmp 0x10018ae3
push 0x10075894
push 0x1007589c
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp + 0x5c8]
push eax
lea eax, [ebp + 0x198]
push str._ls_ls_r_n
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
mov esi, str._Rename__r_n
lea edi, [ebp + 0x7d0]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
add esp, 0x10
movsw word es:[edi], word [esi]
mov dword [ebp - 0x74], eax
push ebx
lea eax, [ebp + 0x3c0]
push eax
movsb byte es:[edi], byte [esi]
call dword [sym.imp.kernel32.dll_GetWindowsDirectoryW]
push str.WinInit.Ini
lea eax, [ebp + 0x3c0]
push ebx
push eax
call fcn.1006d75b
add esp, 0xc
xor esi, esi
push esi
push 0x8000080
push 4
push esi
push esi
push 0xc0000000
lea eax, [ebp + 0x3c0]
push eax
call dword [sym.imp.kernel32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x7c], edi
cmp edi, 0xffffffff
je 0x10018ca0
push esi
push edi
call dword [sym.imp.kernel32.dll_GetFileSize]
mov ebx, eax
mov eax, dword [ebp - 0x74]
push esi
lea eax, [ebx + eax + 0xa]
push eax
push esi
push 4
push esi
push edi
call dword [sym.imp.kernel32.dll_CreateFileMappingW]
mov dword [ebp - 0x80], eax
cmp eax, esi
je 0x10018c88
push esi
push esi
push esi
push 2
push eax
call dword [sym.imp.kernel32.dll_MapViewOfFile]
mov edi, eax
cmp edi, esi
je 0x10018c7c
lea eax, [ebp + 0x7d0]
push eax
push edi
call fcn.10040ab0
pop ecx
pop ecx
cmp eax, esi
jne 0x10018be0
lea eax, [ebp + 0x7d0]
push eax
lea eax, [edi + ebx]
push 0x100758d8
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
add ebx, eax
mov eax, ebx
jmp 0x10018c34
mov ecx, dword [0x100974fc]
cmp ecx, esi
je 0x10018c0b
push ecx
push eax
call fcn.10040ab0
pop ecx
pop ecx
mov ecx, dword [0x100974fc]
mov esi, eax
lea eax, [ecx + 1]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x10018bfe
sub ecx, eax
add esi, ecx
jmp 0x10018c18
push 0xa
push eax
call fcn.100409f0
pop ecx
pop ecx
lea esi, [eax + 1]
mov eax, edi
sub eax, esi
add eax, ebx
push eax
mov eax, dword [ebp - 0x74]
add eax, esi
push esi
push eax
call fcn.1006d75b
sub esi, edi
add esp, 0xc
mov eax, esi
xor esi, esi
push dword [ebp - 0x74]
lea ecx, [ebp + 0x198]
push ecx
add eax, edi
push eax
call fcn.1006d75b
mov eax, dword [0x100974fc]
add esp, 0xc
cmp eax, esi
je 0x10018c59
push eax
call fcn.1006d75b
pop ecx
lea eax, [ebp + 0x198]
push eax
call fcn.1006d75b
pop ecx
push edi
mov dword [0x100974fc], eax
call dword [sym.imp.kernel32.dll_UnmapViewOfFile]
add ebx, dword [ebp - 0x74]
mov dword [ebp - 0x78], 1
push dword [ebp - 0x80]
call dword [sym.imp.kernel32.dll_CloseHandle]
mov edi, dword [ebp - 0x7c]
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]
pop esi
pop ebx
mov eax, dword [ebp - 0x78]
mov ecx, dword [ebp + 0x7dc]
xor ecx, ebp
pop edi
call fcn.1003c09c
add ebp, 0x7e0
leave
ret