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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4b3a6e
mov eax, dword fs:[0]
push eax
sub esp, 0x2d8
mov eax, dword [0x4f2b64]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 8]
xor esi, esi
push 0xffffffffffffffff
mov edi, ecx
push esi
push edi
lea ecx, [ebp - 0x27c]
mov dword [ebp - 0x2a0], eax
mov dword [ebp - 0x2a8], edi
mov dword [ebp - 0x264], 7
mov dword [ebp - 0x268], esi
mov word [ebp - 0x278], si
call fcn.00401db0
push 1
push 0xffffffffffffffff
lea ecx, [ebp - 0x2a4]
push ecx
mov dword [ebp - 4], esi
lea ecx, [ebp - 0x27c]
mov dword [ebp - 0x2a4], 0x3f
call fcn.004038d0
cmp eax, 0xffffffff
je 0x402a25
push eax
push esi
lea edx, [ebp - 0x2c4]
push edx
lea ecx, [ebp - 0x27c]
call fcn.00403760
push 0xffffffffffffffff
push esi
push eax
lea ecx, [ebp - 0x27c]
mov byte [ebp - 4], 1
call fcn.00401db0
mov byte [ebp - 4], 0
cmp dword [ebp - 0x2ac], 8
jb 0x402a25
mov eax, dword [ebp - 0x2c0]
push eax
call fcn.0043a767
add esp, 4
push 1
push 0xffffffffffffffff
lea ecx, [ebp - 0x2a4]
push ecx
lea ecx, [ebp - 0x27c]
mov dword [ebp - 0x2a4], 0x2f
call fcn.004038d0
cmp eax, 0xffffffff
je 0x402a98
mov ecx, dword [edi + 0x14]
add eax, 1
cmp eax, ecx
jae 0x402a98
push 0xffffffffffffffff
push eax
lea edx, [ebp - 0x2c4]
push edx
lea ecx, [ebp - 0x27c]
call fcn.00403760
push 0xffffffffffffffff
push esi
push eax
lea ecx, [ebp - 0x27c]
mov byte [ebp - 4], 2
call fcn.00401db0
mov byte [ebp - 4], 0
cmp dword [ebp - 0x2ac], 8
jb 0x402a98
mov eax, dword [ebp - 0x2c0]
push eax
call fcn.0043a767
add esp, 4
cmp dword [ebp - 0x268], 4
jae 0x402aac
lea edi, [ebp - 0x27c]
call fcn.00403690
or ebx, 0xffffffff
cmp dword [ebp - 0x268], esi
mov dword [ebp - 0x2a4], ebx
je 0x402c88
mov edx, dword [ebp - 0x2a0]
lea ecx, [ebp - 0x27c]
push ecx
add edx, 0x24
push edx
lea eax, [ebp - 0x298]
push eax
call fcn.00403c70
add esp, 0xc
push str..temp
push eax
lea ecx, [ebp - 0x260]
push ecx
mov byte [ebp - 4], 3
call fcn.00403d20
add esp, 0xc
mov edi, 8
mov byte [ebp - 4], 5
cmp dword [ebp - 0x280], edi
jb 0x402b1a
mov edx, dword [ebp - 0x294]
push edx
call fcn.0043a767
add esp, 4
cmp dword [ebp - 0x248], edi
mov eax, dword [ebp - 0x25c]
mov dword [ebp - 0x280], 7
mov dword [ebp - 0x284], esi
mov word [ebp - 0x294], si
jae 0x402b45
lea eax, [ebp - 0x25c]
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push eax
call edi
cmp eax, 0xffffffff
je 0x402b9d
cmp dword [ebp - 0x248], 8
mov eax, dword [ebp - 0x25c]
jae 0x402b68
lea eax, [ebp - 0x25c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp - 0x248], 8
mov eax, dword [ebp - 0x25c]
jae 0x402b84
lea eax, [ebp - 0x25c]
push eax
call edi
cmp eax, 0xffffffff
je 0x402b9d
lea edi, [ebp - 0x260]
call fcn.00403690
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp dword [ebp - 0x24c], esi
je 0x402bf6
cmp dword [ebp - 0x248], 8
mov eax, dword [ebp - 0x25c]
jae 0x402bba
lea eax, [ebp - 0x25c]
push esi
push 0x80
push 1
push esi
push 1
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
mov dword [ebp - 0x2a4], ebx
je 0x402bf6
mov ecx, dword [ebp - 0x2a0]
push 0xffffffffffffffff
push esi
lea eax, [ebp - 0x260]
push eax
add ecx, 0x40
call fcn.00401db0
mov byte [ebp - 4], 0
cmp dword [ebp - 0x248], 8
jb 0x402c12
mov ecx, dword [ebp - 0x25c]
push ecx
call fcn.0043a767
add esp, 4
cmp ebx, 0xffffffff
mov dword [ebp - 0x248], 7
mov dword [ebp - 0x24c], esi
mov word [ebp - 0x25c], si
je 0x402c8e
mov edi, dword [ebp - 0x2a0]
mov edx, dword [ebp - 0x2a8]
push ebx
mov ecx, edi
mov byte [ebp - 4], 0xb
call fcn.00403160
push ebx
mov byte [ebp - 0x299], al
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [ebp - 0x299], 0
mov dword [ebp - 0x2a4], 0xffffffff
jne 0x402fe6
cmp dword [edi + 0x58], 8
jb 0x402fd2
mov eax, dword [edi + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov esi, 8
jmp 0x4030e3
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push 9
push str.Setup.exe
lea ecx, [ebp - 0x298]
mov dword [ebp - 0x280], 7
mov dword [ebp - 0x284], esi
mov word [ebp - 0x294], si
call fcn.00401ae0
mov ebx, dword [ebp - 0x2a0]
lea edx, [ebp - 0x298]
push edx
add ebx, 0x24
lea eax, [ebp - 0x2c4]
push ebx
push eax
mov byte [ebp - 4], 6
call fcn.00403c70
add esp, 0xc
push str..temp
push eax
lea ecx, [ebp - 0x244]
push ecx
mov byte [ebp - 4], 7
call fcn.00403d20
add esp, 0xc
mov byte [ebp - 4], 9
cmp dword [ebp - 0x2ac], 8
jb 0x402d10
mov edx, dword [ebp - 0x2c0]
push edx
call fcn.0043a767
add esp, 4
cmp dword [ebp - 0x22c], 8
mov eax, dword [ebp - 0x240]
mov dword [ebp - 0x2ac], 7
mov dword [ebp - 0x2b0], esi
mov word [ebp - 0x2c0], si
jae 0x402d3c
lea eax, [ebp - 0x240]
push eax
call edi
cmp eax, 0xffffffff
je 0x402d88
cmp dword [ebp - 0x22c], 8
mov eax, dword [ebp - 0x240]
jae 0x402d59
lea eax, [ebp - 0x240]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp - 0x22c], 8
mov eax, dword [ebp - 0x240]
jae 0x402d75
lea eax, [ebp - 0x240]
push eax
call edi
cmp eax, 0xffffffff
je 0x402d88
lea edi, [ebp - 0x244]
call fcn.00403690
cmp dword [ebp - 0x230], esi
jne 0x402ea4
push 0x20a
lea eax, [ebp - 0x226]
push esi
push eax
mov word [ebp - 0x228], si
call fcn.00456900
add esp, 0xc
cmp dword [ebx + 0x18], 8
jb 0x402dbb
mov ebx, dword [ebx + 4]
jmp 0x402dbe
add ebx, 4
lea ecx, [ebp - 0x228]
push ecx
push 1
push 0x4de1a4
push ebx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
cmp eax, esi
jbe 0x402e4a
lea eax, [ebp - 0x228]
mov word [ebp - 0x1e], si
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x402de4
sub eax, edx
sar eax, 1
push eax
lea edx, [ebp - 0x228]
push edx
lea ecx, [ebp - 0x244]
call fcn.00401ae0
push 1
lea ebx, [ebp - 0x244]
call fcn.004039c0
cmp eax, 0xffffffff
je 0x402e48
push eax
push 0
lea eax, [ebp - 0x2e0]
push eax
mov ecx, ebx
call fcn.00403760
push 0xffffffffffffffff
push 0
push eax
mov ecx, ebx
mov byte [ebp - 4], 0xa
call fcn.00401db0
lea ecx, [ebp - 0x2e0]
mov byte [ebp - 4], 9
call fcn.00401680
xor esi, esi
cmp dword [ebp - 0x230], esi
jne 0x402e69
push 0xffffffffffffffff
push esi
lea ecx, [ebp - 0x298]
push ecx
lea ecx, [ebp - 0x244]
call fcn.00401db0
jmp 0x402e7b
push 0xa
push 0x4de1b0
lea ecx, [ebp - 0x244]
call fcn.00403a60
mov edi, dword [ebp - 0x2a0]
cmp dword [edi + 0x54], esi
je 0x402eaa
cmp dword [edi + 0x58], 8
jb 0x402e98
mov eax, dword [edi + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x402eaa
lea eax, [edi + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x402eaa
mov edi, dword [ebp - 0x2a0]
mov eax, dword [ebp - 0x240]
mov ebx, 8
cmp dword [ebp - 0x22c], ebx
jae 0x402ec3
lea eax, [ebp - 0x240]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp - 0x22c], ebx
mov eax, dword [ebp - 0x240]
jae 0x402ede
lea eax, [ebp - 0x240]
push esi
push 0x80
push 1
push esi
push 1
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
mov dword [ebp - 0x2a4], ebx
je 0x402f14
push 0xffffffffffffffff
push esi
lea edx, [ebp - 0x244]
push edx
lea ecx, [edi + 0x40]
call fcn.00401db0
cmp dword [ebp - 0x22c], 8
jb 0x402f2c
mov eax, dword [ebp - 0x240]
push eax
call fcn.0043a767
add esp, 4
mov byte [ebp - 4], 0
cmp dword [ebp - 0x280], 8
mov dword [ebp - 0x22c], 7
mov dword [ebp - 0x230], esi
mov word [ebp - 0x240], si
jb 0x402f5f
mov ecx, dword [ebp - 0x294]
push ecx
call fcn.0043a767
add esp, 4
cmp ebx, 0xffffffff
mov dword [ebp - 0x280], 7
mov dword [ebp - 0x284], esi
mov word [ebp - 0x294], si
jne 0x402c34
cmp dword [edi], esi
je 0x402fb1
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x2a8], esp
push 8
mov dword [ecx + 0x18], 7
mov dword [ecx + 0x14], esi
push 0x4de1c8
mov word [ecx + 4], si
call fcn.00401ae0
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 0x14]
call eax
cmp dword [ebp - 0x264], 8
jb 0x403140
mov ecx, dword [ebp - 0x278]
push ecx
call fcn.0043a767
add esp, 4
jmp 0x403140
lea eax, [edi + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov esi, 8
jmp 0x4030e3
mov eax, dword [edi + 0x54]
add eax, 0xfffffffb
push eax
push esi
lea edx, [ebp - 0x2c4]
lea ebx, [edi + 0x40]
push edx
mov ecx, ebx
call fcn.00403760
mov edi, dword [ebp - 0x2a0]
push 0xffffffffffffffff
push esi
add edi, 8
push eax
mov ecx, edi
mov byte [ebp - 4], 0xc
call fcn.00401db0
mov esi, 8
cmp dword [ebp - 0x2ac], esi
jb 0x403033
mov eax, dword [ebp - 0x2c0]
push eax
call fcn.0043a767
add esp, 4
cmp dword [edi + 0x18], esi
jb 0x40303d
mov ecx, dword [edi + 4]
jmp 0x403040
lea ecx, [edi + 4]
cmp dword [ebx + 0x18], esi
jb 0x40304a
mov eax, dword [ebx + 4]
jmp 0x40304d
lea eax, [ebx + 4]
push ecx
push eax
call fcn.00459a0c
add esp, 8
test eax, eax
je 0x4030e3
cmp dword [edi + 0x18], esi
jb 0x403069
mov eax, dword [edi + 4]
jmp 0x40306c
lea eax, [edi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [edi + 0x18], esi
jb 0x40307d
mov ecx, dword [edi + 4]
jmp 0x403080
lea ecx, [edi + 4]
cmp dword [ebx + 0x18], esi
jb 0x40308a
mov eax, dword [ebx + 4]
jmp 0x40308d
lea eax, [ebx + 4]
push ecx
push eax
call fcn.00459a0c
add esp, 8
cmp dword [edi + 0x18], esi
jb 0x4030a1
mov ecx, dword [edi + 4]
jmp 0x4030a4
lea ecx, [edi + 4]
cmp dword [ebx + 0x18], esi
jb 0x4030ae
mov eax, dword [ebx + 4]
jmp 0x4030b1
lea eax, [ebx + 4]
push ecx
push eax
call fcn.00459a0c
add esp, 8
test eax, eax
je 0x4030e3
cmp dword [edi + 0x18], esi
jb 0x4030c9
mov edi, dword [edi + 4]
jmp 0x4030cc
add edi, 4
cmp dword [ebx + 0x18], esi
jb 0x4030d6
mov ebx, dword [ebx + 4]
jmp 0x4030d9
add ebx, 4
push 1
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
cmp dword [ebp - 0x264], esi
jb 0x4030fa
mov ecx, dword [ebp - 0x278]
push ecx
call fcn.0043a767
add esp, 4
mov al, byte [ebp - 0x299]
jmp 0x403142
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004562c9
mov esp, ebp
pop ebp
ret 4