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

Disassembly:
sub esp, 0x82c
push ebx
push ebp
push esi
mov esi, dword [esp + 0x83c]
push edi
mov edi, dword [esp + 0x844]
push 5
push edi
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
mov dword [esp + 0x10], eax
jne 0x4112ce
mov ebx, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
lea eax, [esp + 0x2c]
push 0x104
push eax
push esi
call ebx
mov ebp, dword [sym.imp.KERNEL32.dll_lstrcpyA]
test eax, eax
jne 0x4110c3
lea ecx, [esp + 0x2c]
push esi
push ecx
call ebp
test edi, edi
jne 0x4110d6
lea edx, [esp + 0x130]
push 0x617790
push edx
jmp 0x411105
lea eax, [esp + 0x338]
push 0x104
push eax
push edi
call ebx
test eax, eax
jne 0x4110f5
lea ecx, [esp + 0x338]
push edi
push ecx
call ebp
lea edx, [esp + 0x338]
lea eax, [esp + 0x130]
push edx
push eax
call ebp
lea ecx, [esp + 0x2c]
lea edx, [esp + 0x130]
push ecx
push edx
lea eax, [esp + 0x444]
push str._hs_hs_r_n
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
mov edx, dword [0x61777c]
mov ecx, dword [str._Rename__r_n]
add esp, 0x10
mov dword [esp + 0x1c], edx
mov esi, eax
mov ax, word [0x617780]
mov dword [esp + 0x18], ecx
mov cl, byte [0x617782]
lea edx, [esp + 0x234]
push 0x104
push edx
mov dword [esp + 0x1c], esi
mov word [esp + 0x28], ax
mov byte [esp + 0x2a], cl
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea eax, [esp + 0x234]
push str.WinInit.Ini
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0
push 0x8000080
push 4
push 0
push 0
lea ecx, [esp + 0x248]
push 0xc0000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
mov dword [esp + 0x28], edi
jne 0x4111b7
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x82c
ret
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
push 0
lea edx, [ebx + esi + 0xa]
push edx
push 0
push 4
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
test eax, eax
mov dword [esp + 0x24], eax
je 0x4112b0
push 0
push 0
push 0
push 2
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ebp, eax
test ebp, ebp
je 0x4112a5
lea eax, [esp + 0x18]
push eax
push ebp
call fcn.0054e0f0
add esp, 8
test eax, eax
jne 0x41122c
lea ecx, [esp + 0x18]
lea edx, [ebx + ebp]
push ecx
push 0x615e9c
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
add ebx, eax
mov dword [esp + 0x10], ebx
jmp 0x411259
push 0xa
push eax
call fcn.0054e030
mov ecx, dword [esp + 0x1c]
mov esi, eax
inc esi
mov eax, ebp
sub eax, esi
add eax, ebx
lea edx, [esi + ecx]
push eax
push esi
push edx
call fcn.0054ee90
add esp, 0x14
sub esi, ebp
mov dword [esp + 0x10], esi
mov esi, dword [esp + 0x14]
lea eax, [esp + 0x43c]
push eax
push ebp
call fcn.0054e0f0
add esp, 8
test eax, eax
jne 0x411294
mov edx, dword [esp + 0x10]
mov ecx, esi
mov eax, ecx
lea esi, [esp + 0x43c]
lea edi, [edx + ebp]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x28]
mov esi, dword [esp + 0x14]
push ebp
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
add ebx, esi
mov dword [esp + 0x10], 1
mov ecx, dword [esp + 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push 0
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]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x82c
ret