Function at 0x401392
Capabilities:
Get common file path
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x918
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
neg eax
sbb eax, eax
push ebx
neg ecx
sbb ecx, ecx
push esi
test ecx, eax
push edi
jne 0x4013bc
push 0x57
call fcn.004021e2
jmp 0x401606
push 0x5c
push dword [ebp + 0xc]
call fcn.004077b0
mov ebx, eax
pop ecx
test ebx, ebx
pop ecx
je 0x4013d1
inc ebx
jmp 0x4013d4
mov ebx, dword [ebp + 0xc]
mov esi, 0x104
push 1
lea eax, [ebp - 0x518]
push esi
push eax
call fcn.0040192b
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
add esp, 0xc
lea eax, [ebp - 0x518]
push eax
lea eax, [ebp - 0x20c]
push eax
call edi
push esi
lea eax, [ebp - 0x20c]
push ebx
push eax
call fcn.0040196b
add esp, 0xc
xor ebx, ebx
lea eax, [ebp - 4]
mov dword [ebp - 4], ebx
push ebx
push ebx
push eax
call fcn.0040185c
add esp, 0xc
test eax, eax
je 0x401606
push dword [ebp + 0xc]
cmp dword [ebp + 0x10], ebx
push dword [ebp + 8]
je 0x40143f
call fcn.00401a1d
jmp 0x401444
call fcn.00401b3a
pop ecx
cmp eax, ebx
pop ecx
jne 0x401452
push dword [ebp + 0xc]
jmp 0x401600
lea eax, [ebp - 0x20c]
push eax
push dword [ebp + 0xc]
call fcn.0040133e
pop ecx
test eax, eax
pop ecx
jne 0x40146f
push dword [ebp + 0xc]
jmp 0x401611
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x310]
push eax
call edi
lea eax, [ebp - 0x310]
push 0x5c
push eax
call fcn.004077b0
pop ecx
cmp eax, ebx
pop ecx
jne 0x401499
lea eax, [ebp - 0x310]
and byte [eax + 6], 0
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
mov dword [ebp + 8], ebx
push dword [ebp + 8]
lea eax, [ebp - 0x310]
push eax
lea eax, [ebp - 0x108]
push str._s_3.3d.new
push eax
call edi
add esp, 0x10
lea eax, [ebp - 0x108]
push eax
call fcn.004019df
test eax, eax
pop ecx
je 0x4014de
inc dword [ebp + 8]
cmp dword [ebp + 8], 0x3e8
jl 0x4014a6
lea eax, [ebp - 0x108]
push eax
push dword [ebp + 0xc]
call fcn.00401b3a
pop ecx
pop ecx
push dword [ebp + 0xc]
test eax, eax
jne 0x40151d
call fcn.0040161f
pop ecx
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x918]
push str.__You_do_not_have_access_to_update_the_following_file:_n_____s_n__This_file_is_required_for_the_map_editor.__To_enable_the_editor__n__please_have_an_administrator_run_this_patch_or_install_a_recent_n__version_of_this_file.
push eax
call edi
add esp, 0xc
lea eax, [ebp - 0x918]
push ebx
jmp 0x40156b
call fcn.0040161f
cmp dword [ebp - 4], 2
pop ecx
jne 0x40158b
mov esi, dword [sym.imp.KERNEL32.dll_MoveFileExA]
push 4
lea eax, [ebp - 0x20c]
push ebx
push eax
call esi
test eax, eax
jne 0x401577
lea eax, [ebp - 0x108]
push eax
call fcn.0040161f
pop ecx
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x918]
push str.__You_do_not_have_access_to_update_the_following_file:_n_____s_n__This_file_is_required_for_the_map_editor.__To_enable_the_editor__n__please_have_an_administrator_run_this_patch_or_install_a_recent_n__version_of_this_file.
push eax
call edi
add esp, 0xc
lea eax, [ebp - 0x918]
push ebx
push eax
call section..text
pop ecx
jmp 0x401605
lea eax, [ebp - 0x20c]
push 4
push eax
lea eax, [ebp - 0x108]
push eax
call esi
jmp 0x4015f5
cmp dword [ebp - 4], 1
jne 0x40160a
lea eax, [ebp - 0x414]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
jbe 0x4015f9
push esi
lea eax, [ebp - 0x414]
push str.WININIT.INI
push eax
call fcn.0040196b
add esp, 0xc
mov esi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
lea eax, [ebp - 0x414]
mov edi, str.Rename
push eax
lea eax, [ebp - 0x20c]
push eax
push 0x40d1cc
push edi
call esi
test eax, eax
je 0x4015f9
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x20c]
push eax
push edi
call esi
test eax, eax
jne 0x401617
lea eax, [ebp - 0x108]
push eax
call fcn.0040161f
pop ecx
xor eax, eax
jmp 0x40161a
lea eax, [ebp - 0x108]
push eax
call fcn.0040161f
pop ecx
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret