Function at 0x409020
Capabilities:
Check if file exists
Delete file
Get common file path
Move file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a8ba7
mov eax, dword fs:[0]
push eax
sub esp, 0x29c
mov eax, dword [0x4d5210]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4095a2
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x4095a2
push 0x208
push eax
lea eax, [ebp - 0x218]
push eax
call fcn.00459150
add esp, 0xc
lea ecx, [ebp - 0x2a8]
push 0x4c94e4
call fcn.004078d0
lea eax, [ebp - 0x218]
mov dword [ebp - 4], 0
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push edi
lea eax, [ebp - 0x290]
push eax
call fcn.004098b0
push edi
lea eax, [ebp - 0x278]
mov byte [ebp - 4], 1
push eax
call fcn.004095c0
lea eax, [ebp - 0x218]
mov byte [ebp - 4], 2
push eax
lea eax, [ebp - 0x260]
push eax
call fcn.004095c0
lea eax, [ebp - 0x278]
mov byte [ebp - 4], 3
push eax
call fcn.004099e0
lea eax, [ebp - 0x260]
push eax
call fcn.004099e0
lea eax, [ebp - 0x278]
push eax
lea ecx, [ebp - 0x260]
call fcn.0040a370
test eax, eax
jne 0x409164
cmp word [ebp - 0x218], ax
jne 0x409133
xor ecx, ecx
lea eax, [ebp - 0x218]
push ecx
push eax
lea ecx, [ebp - 0x2a8]
call fcn.00407a30
jmp 0x40919b
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x409140
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x2a8]
call fcn.00407a30
jmp 0x40919b
push edi
lea eax, [ebp - 0x248]
push eax
call fcn.00409700
push eax
lea ecx, [ebp - 0x2a8]
call fcn.00409bd0
mov eax, dword [ebp - 0x234]
cmp eax, 8
jb 0x40919b
inc eax
lea ecx, [ebp - 0x248]
push eax
push dword [ebp - 0x248]
call fcn.00407b30
xor esi, esi
nop dword [eax]
xor eax, eax
mov dword [ebp - 0x21c], 7
push eax
push 0x4c94e4
lea ecx, [ebp - 0x230]
mov dword [ebp - 0x220], 0
mov word [ebp - 0x230], ax
call fcn.00407a30
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x2a8]
mov byte [ebp - 4], 4
push eax
lea ecx, [ebp - 0x230]
call fcn.00407c50
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x290]
push eax
lea ecx, [ebp - 0x230]
call fcn.0040a0d0
push 4
push str..del
lea ecx, [ebp - 0x230]
call fcn.00409fa0
test esi, esi
jle 0x409282
xor eax, eax
xorps xmm0, xmm0
push esi
mov word [ebp - 0x244], ax
mov word [ebp - 0x232], ax
lea eax, [ebp - 0x244]
push 0x4c954c
push eax
movups xmmword [ebp - 0x242], xmm0
call fcn.0040a880
add esp, 0xc
cmp word [ebp - 0x244], 0
jne 0x409251
xor ecx, ecx
jmp 0x40926f
lea ecx, [ebp - 0x244]
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x409260
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x244]
push eax
lea ecx, [ebp - 0x230]
call fcn.00409fa0
cmp dword [ebp - 0x21c], 8
lea eax, [ebp - 0x230]
cmovae eax, dword [ebp - 0x230]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4092f5
cmp dword [ebp - 0x21c], 8
lea eax, [ebp - 0x230]
cmovae eax, dword [ebp - 0x230]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x4092f5
cmp esi, 0xa
jge 0x409365
mov byte [ebp - 4], 3
inc esi
mov eax, dword [ebp - 0x21c]
cmp eax, 8
jb 0x4091a0
inc eax
lea ecx, [ebp - 0x230]
push eax
push dword [ebp - 0x230]
call fcn.00407b30
jmp 0x4091a0
cmp dword [ebp - 0x21c], 8
lea eax, [ebp - 0x230]
cmovae eax, dword [ebp - 0x230]
push eax
push edi
call fcn.00461d03
add esp, 8
lea eax, [ebp - 0x230]
cmp dword [ebp - 0x21c], 8
cmovae eax, dword [ebp - 0x230]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov esi, dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x409353
cmp dword [ebp - 0x21c], 8
lea eax, [ebp - 0x230]
push 5
cmovae eax, dword [ebp - 0x230]
push 0
push eax
call esi
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x409365
push 5
push 0
push edi
call esi
mov eax, dword [ebp - 0x21c]
cmp eax, 8
jb 0x4093c7
mov ecx, dword [ebp - 0x230]
inc eax
cmp eax, 0x7fffffff
jbe 0x409383
call fcn.0045cc11
add eax, eax
cmp eax, 0x1000
jb 0x4093be
test byte [ebp - 0x230], 0x1f
je 0x40939a
call fcn.0045cc11
mov eax, dword [ecx - 4]
cmp eax, ecx
jb 0x4093a6
call fcn.0045cc11
sub ecx, eax
cmp ecx, 4
jae 0x4093b2
call fcn.0045cc11
cmp ecx, 0x23
jbe 0x4093bc
call fcn.0045cc11
mov ecx, eax
push ecx
call fcn.0043483b
add esp, 4
mov eax, dword [ebp - 0x24c]
cmp eax, 8
jb 0x409429
mov ecx, dword [ebp - 0x260]
inc eax
cmp eax, 0x7fffffff
jbe 0x4093e5
call fcn.0045cc11
add eax, eax
cmp eax, 0x1000
jb 0x409420
test byte [ebp - 0x260], 0x1f
je 0x4093fc
call fcn.0045cc11
mov eax, dword [ecx - 4]
cmp eax, ecx
jb 0x409408
call fcn.0045cc11
sub ecx, eax
cmp ecx, 4
jae 0x409414
call fcn.0045cc11
cmp ecx, 0x23
jbe 0x40941e
call fcn.0045cc11
mov ecx, eax
push ecx
call fcn.0043483b
add esp, 4
xor eax, eax
mov dword [ebp - 0x24c], 7
mov word [ebp - 0x260], ax
mov eax, dword [ebp - 0x264]
mov dword [ebp - 0x250], 0
cmp eax, 8
jb 0x4094a8
mov ecx, dword [ebp - 0x278]
inc eax
cmp eax, 0x7fffffff
jbe 0x409464
call fcn.0045cc11
add eax, eax
cmp eax, 0x1000
jb 0x40949f
test byte [ebp - 0x278], 0x1f
je 0x40947b
call fcn.0045cc11
mov eax, dword [ecx - 4]
cmp eax, ecx
jb 0x409487
call fcn.0045cc11
sub ecx, eax
cmp ecx, 4
jae 0x409493
call fcn.0045cc11
cmp ecx, 0x23
jbe 0x40949d
call fcn.0045cc11
mov ecx, eax
push ecx
call fcn.0043483b
add esp, 4
xor eax, eax
mov dword [ebp - 0x264], 7
mov word [ebp - 0x278], ax
mov eax, dword [ebp - 0x27c]
mov dword [ebp - 0x268], 0
cmp eax, 8
jb 0x409527
mov ecx, dword [ebp - 0x290]
inc eax
cmp eax, 0x7fffffff
jbe 0x4094e3
call fcn.0045cc11
add eax, eax
cmp eax, 0x1000
jb 0x40951e
test byte [ebp - 0x290], 0x1f
je 0x4094fa
call fcn.0045cc11
mov eax, dword [ecx - 4]
cmp eax, ecx
jb 0x409506
call fcn.0045cc11
sub ecx, eax
cmp ecx, 4
jae 0x409512
call fcn.0045cc11
cmp ecx, 0x23
jbe 0x40951c
call fcn.0045cc11
mov ecx, eax
push ecx
call fcn.0043483b
add esp, 4
xor eax, eax
mov dword [ebp - 0x27c], 7
mov word [ebp - 0x290], ax
mov eax, dword [ebp - 0x294]
mov dword [ebp - 0x280], 0
cmp eax, 8
jb 0x4095a2
mov ecx, dword [ebp - 0x2a8]
inc eax
cmp eax, 0x7fffffff
jbe 0x409562
call fcn.0045cc11
add eax, eax
cmp eax, 0x1000
jb 0x409599
test cl, 0x1f
je 0x409575
call fcn.0045cc11
mov eax, dword [ecx - 4]
cmp eax, ecx
jb 0x409581
call fcn.0045cc11
sub ecx, eax
cmp ecx, 4
jae 0x40958d
call fcn.0045cc11
cmp ecx, 0x23
jbe 0x409597
call fcn.0045cc11
mov ecx, eax
push ecx
call fcn.0043483b
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00434840
mov esp, ebp
pop ebp
ret 4