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

Disassembly:
push ecx
push ebx
push ebp
mov ebp, dword [esp + 0x10]
push esi
mov esi, dword [esp + 0x18]
push edi
push 5
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
je 0x410b26
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
pop ecx
ret
mov eax, dword [0x443128]
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
mov dword [0x444f0c], eax
test esi, esi
je 0x410b92
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ecx, eax
push 0
inc ecx
neg ecx
sbb ecx, ecx
and ecx, eax
push ecx
push 1
push 0
push 1
push 0
push esi
call ebx
cmp eax, 0xffffffff
je 0x410b72
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x410d9b
push 0x400
push 0x444f0c
push esi
call edi
test eax, eax
je 0x410d9b
cmp eax, 0x400
jg 0x410d9b
push 0x400
push 0x444b0c
push ebp
call edi
test eax, eax
je 0x410d9b
cmp eax, 0x400
jg 0x410d9b
push 0x444b0c
push 0x444f0c
push str._s_s_r_n
push 0x44470c
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
mov esi, eax
mov dword [esp + 0x1c], esi
push 0x3f0
push 0x444b0c
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
je 0x410d9b
push str.wininit.ini
push 0x444b0c
call dword [sym.imp.KERNEL32.dll_lstrcatA]
test eax, eax
je 0x410d9b
push 0
push 0x8000080
push 4
push 0
push 0
push 0xc0000000
push 0x444b0c
call ebx
mov ebx, eax
cmp ebx, 0xffffffff
je 0x410d9b
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp edi, 0xffffffff
mov dword [esp + 0x10], edi
je 0x410d94
lea edx, [edi + esi + 0xa]
push 0
push edx
push 0
push 4
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov esi, eax
test esi, esi
mov dword [esp + 0x18], esi
je 0x410d94
push 0
push 0
push 0
push 2
push esi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ebp, eax
test ebp, ebp
je 0x410ca5
push str._Rename__r_n
push ebp
call dword [sym.imp.MSVCRT.dll__mbsstr]
add esp, 8
test eax, eax
jne 0x410cc2
lea eax, [edi + ebp]
push str._Rename__r_n
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
test eax, eax
jne 0x410cb9
push ebp
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push ebx
call esi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
add edi, 0xa
mov dword [esp + 0x10], edi
jmp 0x410cf4
add eax, 0xa
push 0x443100
push eax
call dword [sym.imp.MSVCRT.dll__mbsstr]
mov esi, eax
add esp, 8
test esi, esi
je 0x410cf4
lea ecx, [edi + ebp]
inc esi
cmp ecx, esi
jb 0x410cf0
mov eax, dword [esp + 0x1c]
mov dl, byte [ecx]
mov byte [ecx + eax], dl
dec ecx
cmp ecx, esi
jae 0x410ce2
sub esi, ebp
mov edi, esi
mov ecx, dword [esp + 0x1c]
mov esi, 0x44470c
mov edx, ecx
add edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
test eax, eax
jne 0x410d30
mov eax, dword [esp + 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
push ebx
call esi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
mov ecx, dword [esp + 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call esi
test eax, eax
jne 0x410d4c
push ebx
call esi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
push 0
add edx, eax
push 0
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
push ebx
jne 0x410d72
call esi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
push ebx
jne 0x410d87
call esi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
call esi
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
pop ecx
ret
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret