Function at 0x1004cf20
Capabilities:
Copy file
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
mov eax, dword [0x100934c8]
xor eax, ebp
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x34], ecx
mov eax, dword [ebp + 8]
mov dword [ebp - 0x38], eax
mov ecx, dword [ebp - 0x38]
add ecx, 2
mov dword [ebp - 0x3c], ecx
mov edx, dword [ebp - 0x38]
mov ax, word [edx]
mov word [ebp - 0x3e], ax
add dword [ebp - 0x38], 2
cmp word [ebp - 0x3e], 0
jne 0x1004cf42
mov ecx, dword [ebp - 0x38]
sub ecx, dword [ebp - 0x3c]
sar ecx, 1
mov dword [ebp - 0x44], ecx
mov edx, dword [ebp - 0x44]
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x20]
add eax, 7
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.10079e01
add esp, 4
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x1004cfba
push str.BavAs:_Failed_to_AllocMemory.
push 4
push 0xae
push 0x1008ad44
call dword [sym.imp.log.dll_WriteLog]
add esp, 0x10
mov eax, 0x8007000e
jmp 0x1004d15b
push 0x2e
mov ecx, dword [ebp + 8]
push ecx
call fcn.10079ef2
add esp, 8
mov dword [ebp - 4], eax
push 0x5c
mov edx, dword [ebp + 8]
push edx
call fcn.10079ef2
add esp, 8
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 0xc]
jbe 0x1004cfef
mov ecx, dword [ebp - 4]
sub ecx, dword [ebp + 8]
sar ecx, 1
mov dword [ebp - 0x20], ecx
lea edx, [ebp - 0x1c]
push edx
call fcn.10076360
mov ecx, eax
call fcn.10076460
mov eax, dword [ebp - 0x20]
shl eax, 1
push eax
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 8]
push edx
call fcn.1007c4c0
add esp, 0xc
mov eax, 0x2e
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 8]
mov word [edx + ecx*2], ax
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 8]
lea edx, [ecx + eax*2 + 2]
mov eax, dword [ebp - 0x1c]
mov dword [edx], eax
mov ecx, dword [ebp - 0x18]
mov dword [edx + 4], ecx
mov eax, dword [ebp - 0x14]
mov dword [edx + 8], eax
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
jne 0x1004d08f
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp + 8]
push ecx
push str.BavAs:_Failed_to_RenameFile__s___s_.
push 4
push 0xc3
push 0x1008adac
call dword [sym.imp.log.dll_WriteLog]
add esp, 0x18
mov edx, dword [ebp - 8]
mov dword [ebp - 0x28], edx
mov eax, dword [ebp - 0x28]
push eax
call fcn.10079ee7
add esp, 4
mov eax, 0x80004005
jmp 0x1004d15b
push 0
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x1004d10e
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 8]
push ecx
push str.BavAs:_Failed_to_CopyFile__s___s_.
push 4
push 0xca
push 0x1008ae10
call dword [sym.imp.log.dll_WriteLog]
add esp, 0x18
push 4
push 0
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x1004d0f5
mov eax, dword [ebp - 8]
push eax
push str.BavAs:_Failed_to_MoveFileEx__s___phare_1.
push 4
push 0xcd
push 0x1008ae84
call dword [sym.imp.log.dll_WriteLog]
add esp, 0x14
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x2c], ecx
mov edx, dword [ebp - 0x2c]
push edx
call fcn.10079ee7
add esp, 4
mov eax, 0x80004005
jmp 0x1004d15b
push 4
push 0
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x1004d13e
mov ecx, dword [ebp - 8]
push ecx
push str.BavAs:_Failed_to_MoveFileEx__s___phare_2.
push 4
push 0xd6
push str...EngineMappingFile.cxx
call dword [sym.imp.log.dll_WriteLog]
add esp, 0x14
mov edx, dword [ebp - 8]
mov dword [ebp - 0x30], edx
mov eax, dword [ebp - 0x30]
push eax
call fcn.10079ee7
add esp, 4
mov ecx, dword [ebp - 0x34]
mov dword [ecx], 1
xor eax, eax
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10079e7c
mov esp, ebp
pop ebp
ret 4