Function at 0x46f240
Capabilities:
Check if file exists
Copy file
Delete file
Get common file path
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
lea ebx, [ebp - 0x318]
mov edi, dword fs:[0x18]
sub esp, 0x334
mov dword [esp + 4], ebx
mov dword [esp], 0x104
call dword [sym.imp.kernel32.dll_GetTempPathA]
sub esp, 8
mov esi, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x4b1
mov eax, dword [edi + 0x34]
mov dword [esp + 4], 0x598124
mov dword [esp + 8], eax
xor eax, eax
test esi, esi
setne al
mov dword [esp], eax
call fcn.0045bef0
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x4b2
xor eax, eax
cmp esi, 0x103
setbe al
mov dword [esp + 4], 0x59813c
mov dword [esp], eax
call fcn.0045bef0
mov edx, dword [sym.imp.kernel32.dll_GetTempFileNameA]
mov dword [esp], ebx
lea eax, [ebp - 0x214]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0x59ee10
mov dword [ebp - 0x31c], edx
call edx
sub esp, 0x10
mov esi, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x4b5
mov eax, dword [edi + 0x34]
mov dword [esp + 4], 0x598160
mov dword [esp + 8], eax
xor eax, eax
test esi, esi
lea esi, [ebp - 0x110]
setne al
mov dword [esp], eax
call fcn.0045bef0
mov dword [esp], ebx
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0
mov dword [esp + 4], 0x59ee10
mov edx, dword [ebp - 0x31c]
call edx
sub esp, 0x10
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x4b8
mov eax, dword [edi + 0x34]
mov dword [esp + 4], 0x598160
mov dword [esp + 8], eax
xor eax, eax
test ebx, ebx
setne al
mov dword [esp], eax
call fcn.0045bef0
mov dword [esp + 0x18], 0
mov ebx, dword [sym.imp.kernel32.dll_CreateFileA]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 2
mov dword [esp + 4], 0xc0000000
mov dword [esp], esi
call ebx
sub esp, 0x1c
mov dword [ebp - 0x31c], eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x4bb
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str.failed_to_open_destination_file__error__ld_n
mov dword [esp + 8], eax
xor eax, eax
cmp dword [ebp - 0x31c], 0xffffffff
setne al
mov dword [esp], eax
call fcn.0045bef0
mov dword [edi + 0x34], 0xdeadbeef
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov eax, dword [ebp - 0x31c]
mov dword [esp + 8], 0x45bf10
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x214]
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_CopyFileExA]
mov dword [esp + 4], esi
mov dword [ebp - 0x31c], eax
call eax
mov ecx, dword [0x8f0770]
sub esp, 0x18
mov edi, eax
mov dword [ebp - 0x320], ecx
call fcn.0057d110
mov ecx, dword [eax + 0x10]
mov dword [eax + 0x14], 1
lea edx, [ecx + ecx]
mov ecx, dword [ebp - 0x320]
test ecx, ecx
setne cl
movzx ecx, cl
or edx, ecx
mov dword [eax + 0x10], edx
jmp 0x46f4b1
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x4bf
xor eax, eax
test edi, edi
sete al
mov dword [esp + 4], str.CopyFileExA_unexpectedly_succeeded_n
mov dword [esp], eax
call fcn.0045bef0
call fcn.0057d110
shr dword [eax + 0x10], 1
call fcn.0057d110
mov edx, dword [eax + 0x14]
mov dword [eax + 0x14], 0
test edx, edx
jne 0x46f480
mov edi, dword [0x8f0770]
call fcn.0057d110
mov ecx, dword [eax + 0x10]
mov dword [eax + 0x14], 1
lea edx, [ecx + ecx]
xor ecx, ecx
test edi, edi
setne cl
or edx, ecx
mov dword [eax + 0x10], edx
mov edi, dword fs:[0x18]
jmp 0x46f535
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x4c1
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str.expected_ERROR_REQUEST_ABORTED__got__ld_n
mov dword [esp + 8], eax
xor eax, eax
cmp dword [edi + 0x34], 0x4d3
sete al
mov dword [esp], eax
call fcn.0045bef0
call fcn.0057d110
shr dword [eax + 0x10], 1
call fcn.0057d110
mov edx, dword [eax + 0x14]
mov dword [eax + 0x14], 0
test edx, edx
jne 0x46f4f8
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x4c2
mov eax, dword [sym.imp.kernel32.dll_GetFileAttributesA]
mov dword [esp], esi
mov dword [ebp - 0x320], eax
call eax
sub esp, 4
cmp eax, 0xffffffff
setne al
mov dword [esp + 4], str.file_was_deleted_n
movzx eax, al
mov dword [esp], eax
call fcn.0045bef0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 6
mov dword [esp + 4], 0xc0000000
mov dword [esp], esi
call ebx
mov ebx, dword [0x8f0770]
sub esp, 0x1c
mov edi, eax
call fcn.0057d110
mov ecx, dword [eax + 0x10]
mov dword [eax + 0x14], 1
lea edx, [ecx + ecx]
xor ecx, ecx
test ebx, ebx
setne cl
or edx, ecx
mov dword [eax + 0x10], edx
mov ebx, dword fs:[0x18]
jmp 0x46f629
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x4c7
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str.failed_to_open_destination_file__error__ld_n
mov dword [esp + 8], eax
xor eax, eax
cmp edi, 0xffffffff
setne al
mov dword [esp], eax
call fcn.0045bef0
call fcn.0057d110
shr dword [eax + 0x10], 1
call fcn.0057d110
mov edx, dword [eax + 0x14]
mov dword [eax + 0x14], 0
test edx, edx
jne 0x46f5f0
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], 0xdeadbeef
lea eax, [ebp - 0x214]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0x45bf10
mov dword [esp + 4], esi
mov dword [esp], eax
mov eax, dword [ebp - 0x31c]
call eax
mov ecx, dword [0x8f0770]
sub esp, 0x18
mov ebx, eax
mov dword [ebp - 0x324], ecx
call fcn.0057d110
mov ecx, dword [eax + 0x10]
mov dword [eax + 0x14], 1
lea edx, [ecx + ecx]
mov ecx, dword [ebp - 0x324]
test ecx, ecx
setne cl
movzx ecx, cl
or edx, ecx
mov dword [eax + 0x10], edx
jmp 0x46f6e9
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x4cb
xor eax, eax
test ebx, ebx
sete al
mov dword [esp + 4], str.CopyFileExA_unexpectedly_succeeded_n
mov dword [esp], eax
call fcn.0045bef0
call fcn.0057d110
shr dword [eax + 0x10], 1
call fcn.0057d110
mov edx, dword [eax + 0x14]
mov dword [eax + 0x14], 0
test edx, edx
jne 0x46f6b8
mov ebx, dword [0x8f0770]
call fcn.0057d110
mov ecx, dword [eax + 0x10]
mov dword [eax + 0x14], 1
lea edx, [ecx + ecx]
xor ecx, ecx
test ebx, ebx
setne cl
or edx, ecx
mov dword [eax + 0x10], edx
mov ebx, dword fs:[0x18]
jmp 0x46f76d
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x4cd
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str.expected_ERROR_REQUEST_ABORTED__got__ld_n
mov dword [esp + 8], eax
xor eax, eax
cmp dword [ebx + 0x34], 0x4d3
sete al
mov dword [esp], eax
call fcn.0045bef0
call fcn.0057d110
shr dword [eax + 0x10], 1
call fcn.0057d110
mov edx, dword [eax + 0x14]
mov dword [eax + 0x14], 0
test edx, edx
jne 0x46f730
mov ebx, dword [0x8f0770]
call fcn.0057d110
mov ecx, dword [eax + 0x10]
mov dword [eax + 0x14], 1
lea edx, [ecx + ecx]
xor ecx, ecx
test ebx, ebx
mov ebx, dword [ebp - 0x320]
setne cl
or edx, ecx
mov dword [eax + 0x10], edx
jmp 0x46f7eb
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x4cf
mov dword [esp], esi
call ebx
sub esp, 4
cmp eax, 0xffffffff
sete al
mov dword [esp + 4], str.file_was_not_deleted_n
movzx eax, al
mov dword [esp], eax
call fcn.0045bef0
call fcn.0057d110
shr dword [eax + 0x10], 1
call fcn.0057d110
mov edx, dword [eax + 0x14]
mov dword [eax + 0x14], 0
test edx, edx
jne 0x46f7b0
lea eax, [ebp - 0x214]
mov dword [esp + 0xc], edi
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 8], 0x45bf10
mov dword [esp + 4], 0
mov dword [esp], eax
mov eax, dword [ebp - 0x31c]
call eax
sub esp, 0x18
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x4d2
xor eax, eax
test ebx, ebx
sete al
mov dword [esp + 4], str.CopyFileExA_unexpectedly_succeeded_n
mov dword [esp], eax
mov ebx, dword fs:[0x18]
call fcn.0045bef0
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x4d3
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str.expected_ERROR_PATH_NOT_FOUND__got__ld_n
mov dword [esp + 8], eax
xor eax, eax
cmp dword [ebx + 0x34], 3
sete al
mov dword [esp], eax
call fcn.0045bef0
mov dword [esp + 0xc], edi
mov dword [esp + 4], esi
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 8], 0x45bf10
mov dword [esp], 0
mov eax, dword [ebp - 0x31c]
call eax
sub esp, 0x18
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x4d5
xor eax, eax
test edi, edi
sete al
mov dword [esp + 4], str.CopyFileExA_unexpectedly_succeeded_n
mov dword [esp], eax
call fcn.0045bef0
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x4d6
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str.expected_ERROR_PATH_NOT_FOUND__got__ld_n
mov dword [esp + 8], eax
xor eax, eax
cmp dword [ebx + 0x34], 3
sete al
mov dword [esp], eax
call fcn.0045bef0
mov edx, dword [sym.imp.kernel32.dll_DeleteFileA]
lea eax, [ebp - 0x214]
mov dword [esp], eax
mov dword [ebp - 0x31c], edx
call edx
sub esp, 4
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x4d9
mov eax, dword [ebx + 0x34]
mov dword [esp], edi
mov dword [esp + 8], eax
mov dword [esp + 4], str.DeleteFileA_failed_with_error__ld_n
call fcn.0045bef0
mov dword [esp], esi
mov edx, dword [ebp - 0x31c]
call edx
sub esp, 4
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x4db
xor eax, eax
test ebx, ebx
sete al
mov dword [esp + 4], str.DeleteFileA_unexpectedly_succeeded_n
mov dword [esp], eax
call fcn.0045bef0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret