Function at 0x46a750
Capabilities:
Check if file exists
Delete file
Get common file path
Get file attributes
Move file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea edi, [ebp - 0x110]
push ebx
mov esi, dword fs:[0x18]
sub esp, 0x338
mov dword [esp + 4], edi
mov dword [esp], 0x104
call dword [sym.imp.kernel32.dll_GetTempPathA]
sub esp, 8
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x16a8
mov eax, dword [esi + 0x34]
mov dword [esp + 4], 0x598124
mov dword [esp + 8], eax
xor eax, eax
test ebx, ebx
setne al
mov dword [esp], eax
call fcn.0045bef0
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x16a9
xor eax, eax
cmp ebx, 0x103
lea ebx, [ebp - 0x318]
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], edi
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0
mov dword [esp + 4], 0x59db28
mov dword [ebp - 0x324], edx
call edx
sub esp, 0x10
mov dword [ebp - 0x31c], eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x16ac
mov eax, dword [esi + 0x34]
mov dword [esp + 4], 0x598160
mov dword [esp + 8], eax
mov ecx, dword [ebp - 0x31c]
xor eax, eax
test ecx, ecx
setne al
mov dword [esp], eax
call fcn.0045bef0
mov eax, dword [sym.imp.kernel32.dll_DeleteFileA]
mov dword [esp], ebx
mov dword [ebp - 0x31c], eax
call eax
sub esp, 4
mov dword [ebp - 0x320], eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x16ae
mov dword [esp + 4], str.expect_success_n
mov ecx, dword [ebp - 0x320]
mov dword [esp], ecx
call fcn.0045bef0
lea edx, [ebp - 0x214]
mov dword [esp], edi
mov dword [esp + 0xc], edx
mov dword [esp + 8], 0
mov dword [esp + 4], 0x59db28
mov edx, dword [ebp - 0x324]
call edx
sub esp, 0x10
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x16b1
mov eax, dword [esi + 0x34]
mov dword [esp + 4], 0x598160
mov dword [esp + 8], eax
xor eax, eax
test edi, edi
setne al
mov dword [esp], eax
call fcn.0045bef0
lea ecx, [ebp - 0x214]
mov dword [esp], ecx
mov eax, dword [ebp - 0x31c]
call eax
sub esp, 4
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x16b3
mov dword [esp], edi
mov dword [esp + 4], str.expect_success_n
call fcn.0045bef0
mov ecx, dword [sym.imp.kernel32.dll_CreateFileA]
mov dword [esp], ebx
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 1
mov dword [esp + 0x10], 2
mov dword [esp + 0xc], 0
mov dword [esp + 8], 7
mov dword [esp + 4], 0
mov dword [ebp - 0x320], ecx
call ecx
sub esp, 0x1c
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x16b6
mov eax, dword [esi + 0x34]
mov dword [esp + 4], 0x59ad23
mov dword [esp + 8], eax
xor eax, eax
cmp edi, 0xffffffff
setne al
mov dword [esp], eax
call fcn.0045bef0
mov edx, dword [sym.imp.kernel32.dll_CloseHandle]
mov dword [esp], edi
mov dword [ebp - 0x328], edx
call edx
mov dword [esi + 0x34], 0xdeadbeef
sub esp, 4
mov dword [esp], ebx
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 7
mov dword [esp + 4], 0x40000000
mov ecx, dword [ebp - 0x320]
call ecx
mov edi, dword [esi + 0x34]
sub esp, 0x1c
mov dword [ebp - 0x324], eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x16bd
xor eax, eax
mov dword [esp + 4], str.expect_failure_n
cmp dword [ebp - 0x324], 0xffffffff
sete al
mov dword [esp], eax
call fcn.0045bef0
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x16be
xor eax, eax
cmp edi, 5
sete al
mov dword [esp + 8], edi
mov dword [esp + 4], str.wrong_error_code:__lx_n
mov dword [esp], eax
call fcn.0045bef0
mov dword [esp], ebx
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 7
mov dword [esp + 4], 0x10000
mov ecx, dword [ebp - 0x320]
call ecx
sub esp, 0x1c
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x16c2
xor eax, eax
cmp edi, 0xffffffff
setne al
mov dword [esp + 4], str.expect_success_n
mov dword [esp], eax
call fcn.0045bef0
mov dword [esp], edi
mov edx, dword [ebp - 0x328]
call edx
mov dword [esi + 0x34], 0xdeadbeef
sub esp, 4
mov dword [esp], ebx
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x4000080
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 7
mov dword [esp + 4], 0x10000
mov ecx, dword [ebp - 0x320]
call ecx
mov edi, dword [esi + 0x34]
sub esp, 0x1c
mov dword [ebp - 0x320], eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x16ca
xor eax, eax
mov dword [esp + 4], str.expect_failure_n
cmp dword [ebp - 0x320], 0xffffffff
sete al
mov dword [esp], eax
call fcn.0045bef0
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x16cb
xor eax, eax
cmp edi, 5
sete al
mov dword [esp + 8], edi
mov dword [esp + 4], str.wrong_error_code:__lx_n
mov dword [esp], eax
call fcn.0045bef0
lea edx, [ebp - 0x214]
mov dword [esp], ebx
mov dword [esp + 4], edx
mov edx, dword [sym.imp.kernel32.dll_MoveFileA]
mov dword [ebp - 0x320], edx
call edx
sub esp, 8
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x16ce
mov dword [esp], edi
mov dword [esp + 4], str.expect_success_n
call fcn.0045bef0
lea ecx, [ebp - 0x214]
mov dword [esp + 4], ebx
mov dword [esp], ecx
mov edx, dword [ebp - 0x320]
call edx
sub esp, 8
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x16d0
mov dword [esp], edi
mov dword [esp + 4], str.expect_success_n
call fcn.0045bef0
mov dword [esi + 0x34], 0xdeadbeef
mov dword [esp], ebx
mov eax, dword [ebp - 0x31c]
call eax
mov edi, dword [esi + 0x34]
sub esp, 4
mov dword [ebp - 0x320], eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x16d5
xor eax, eax
mov dword [esp + 4], str.expect_failure_n
mov edx, dword [ebp - 0x320]
test edx, edx
sete al
mov dword [esp], eax
call fcn.0045bef0
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x16d6
xor eax, eax
cmp edi, 5
sete al
mov dword [esp + 8], edi
mov dword [esp + 4], str.wrong_error_code:__lx_n
mov dword [esp], eax
call fcn.0045bef0
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_GetFileAttributesA]
sub esp, 4
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x16d9
mov dword [esp + 8], edi
and edi, 1
mov dword [esp], edi
mov dword [esp + 4], str.got_wrong_attribute:__lx._n
call fcn.0045bef0
mov dword [esp], ebx
mov dword [esp + 4], pe_nt_image_headers32
call dword [sym.imp.kernel32.dll_SetFileAttributesA]
sub esp, 8
mov dword [esp], ebx
mov eax, dword [ebp - 0x31c]
call eax
sub esp, 4
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x16de
mov eax, dword [esi + 0x34]
mov dword [esp], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], 0x59878f
call fcn.0045bef0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret