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

Disassembly:
push 0xffffffffffffffff
push 0x521422
mov eax, dword fs:[0]
push eax
sub esp, 0x4a4
mov eax, dword [0x574674]
xor eax, esp
mov dword [esp + 0x4a0], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x574674]
xor eax, esp
push eax
lea eax, [esp + 0x4b8]
mov dword fs:[0], eax
mov ebx, ecx
push ebx
mov dword [esp + 0x18], ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40a59a
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
xor ebp, ebp
cmp eax, ebp
jne 0x40a59a
push 0x206
lea eax, [esp + 0x2b2]
push ebp
push eax
mov word [esp + 0x2b8], bp
call fcn.00437ec0
add esp, 0xc
push 0x206
lea ecx, [esp + 0xaa]
push ebp
push ecx
mov word [esp + 0xb0], bp
call fcn.00437ec0
add esp, 0xc
push ebp
push 0x566d2c
lea ecx, [esp + 0x90]
mov dword [esp + 0xa8], 7
mov dword [esp + 0xa4], ebp
mov word [esp + 0x94], bp
call fcn.00402110
lea edx, [esp + 0xa4]
push edx
push 0x104
mov dword [esp + 0x4c8], ebp
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea edi, [esp + 0x2ac]
mov esi, ebx
call fcn.00409bd0
mov ecx, ebx
lea esi, [esp + 0x50]
call fcn.00409cb0
lea ecx, [esp + 0xa4]
lea esi, [esp + 0x6c]
mov byte [esp + 0x4c0], 1
call fcn.00409cb0
lea eax, [esp + 0x50]
push eax
mov byte [esp + 0x4c4], 2
call fcn.0040a7e0
mov ecx, esi
add esp, 4
push ecx
call fcn.0040a7e0
mov eax, dword [esp + 0x58]
mov edi, 8
add esp, 4
cmp dword [esp + 0x68], edi
jae 0x40a267
lea eax, [esp + 0x54]
mov edx, dword [esp + 0x64]
push edx
push eax
mov eax, dword [esp + 0x88]
push eax
push ebp
lea ecx, [esp + 0x7c]
call fcn.00404a10
test eax, eax
jne 0x40a2b6
lea eax, [esp + 0xa4]
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x40a290
sub eax, edx
sar eax, 1
push eax
lea ecx, [esp + 0xa8]
push ecx
lea ecx, [esp + 0x90]
call fcn.00402110
jmp 0x40a2f4
mov ecx, ebx
lea esi, [esp + 0x34]
call fcn.00409de0
push 0xffffffffffffffff
push ebp
push eax
lea ecx, [esp + 0x94]
mov byte [esp + 0x4cc], 3
call fcn.00401e80
mov byte [esp + 0x4c0], 2
cmp dword [esp + 0x4c], edi
jb 0x40a2f4
mov edx, dword [esp + 0x38]
push edx
call fcn.00418473
add esp, 4
xor edi, edi
lea ebx, [edi + 4]
push ebp
push 0x566d2c
lea ecx, [esp + 0x3c]
mov dword [esp + 0x54], 7
mov dword [esp + 0x50], ebp
mov word [esp + 0x40], bp
call fcn.00402110
push 0xffffffffffffffff
push ebp
lea eax, [esp + 0x90]
push eax
lea ecx, [esp + 0x40]
mov byte [esp + 0x4cc], bl
call fcn.00401e80
lea eax, [esp + 0x2ac]
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x40a340
sub eax, edx
sar eax, 1
push eax
lea ecx, [esp + 0x2b0]
push ecx
lea ecx, [esp + 0x3c]
call fcn.00402010
push ebx
push str..del
lea ecx, [esp + 0x3c]
call fcn.00402010
cmp edi, ebp
jle 0x40a3bb
mov eax, edi
cdq
push edx
push eax
lea esi, [esp + 0x20]
call fcn.0040aa10
add esp, 8
push 0xffffffffffffffff
push ebp
push eax
lea ecx, [esp + 0x40]
mov byte [esp + 0x4cc], 5
call fcn.00402320
mov esi, 8
mov byte [esp + 0x4c0], bl
cmp dword [esp + 0x30], esi
jb 0x40a3c0
mov edx, dword [esp + 0x1c]
push edx
call fcn.00418473
add esp, 4
jmp 0x40a3c0
mov esi, 8
cmp dword [esp + 0x4c], esi
mov eax, dword [esp + 0x38]
jae 0x40a3ce
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40a4ae
cmp dword [esp + 0x4c], esi
mov eax, dword [esp + 0x38]
jae 0x40a3eb
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp eax, ebp
jne 0x40a4ae
cmp edi, 0xa
jge 0x40a426
add edi, 1
mov byte [esp + 0x4c0], 2
cmp dword [esp + 0x4c], esi
jb 0x40a2f9
mov eax, dword [esp + 0x38]
push eax
call fcn.00418473
add esp, 4
jmp 0x40a2f9
cmp dword [esp + 0x4c], esi
jb 0x40a439
mov ecx, dword [esp + 0x38]
push ecx
call fcn.00418473
add esp, 4
cmp dword [esp + 0x84], esi
mov edi, 7
mov dword [esp + 0x4c], edi
mov dword [esp + 0x48], ebp
mov word [esp + 0x38], bp
jb 0x40a461
mov edx, dword [esp + 0x70]
push edx
call fcn.00418473
add esp, 4
cmp dword [esp + 0x68], esi
mov dword [esp + 0x84], edi
mov dword [esp + 0x80], ebp
mov word [esp + 0x70], bp
jb 0x40a487
mov eax, dword [esp + 0x54]
push eax
call fcn.00418473
add esp, 4
cmp dword [esp + 0xa0], esi
mov dword [esp + 0x68], edi
mov dword [esp + 0x64], ebp
mov word [esp + 0x54], bp
jb 0x40a59a
mov ecx, dword [esp + 0x8c]
push ecx
jmp 0x40a592
cmp dword [esp + 0x4c], esi
mov eax, dword [esp + 0x38]
jae 0x40a4bc
lea eax, [esp + 0x38]
mov edi, dword [esp + 0x14]
push eax
push edi
call fcn.004345bb
mov eax, dword [esp + 0x40]
add esp, 8
cmp dword [esp + 0x4c], esi
jae 0x40a4d8
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
mov esi, dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov ebx, 8
je 0x40a502
cmp dword [esp + 0x4c], ebx
mov eax, dword [esp + 0x38]
jae 0x40a4fc
lea eax, [esp + 0x38]
push 5
push ebp
push eax
call esi
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40a513
push 5
push ebp
push edi
call esi
cmp dword [esp + 0x4c], ebx
jb 0x40a526
mov edx, dword [esp + 0x38]
push edx
call fcn.00418473
add esp, 4
cmp dword [esp + 0x84], ebx
mov esi, 7
mov dword [esp + 0x4c], esi
mov dword [esp + 0x48], ebp
mov word [esp + 0x38], bp
jb 0x40a54e
mov eax, dword [esp + 0x70]
push eax
call fcn.00418473
add esp, 4
cmp dword [esp + 0x68], ebx
mov dword [esp + 0x84], esi
mov dword [esp + 0x80], ebp
mov word [esp + 0x70], bp
jb 0x40a574
mov ecx, dword [esp + 0x54]
push ecx
call fcn.00418473
add esp, 4
cmp dword [esp + 0xa0], ebx
mov dword [esp + 0x68], esi
mov dword [esp + 0x64], ebp
mov word [esp + 0x54], bp
jb 0x40a59a
mov edx, dword [esp + 0x8c]
push edx
call fcn.00418473
add esp, 4
mov ecx, dword [esp + 0x4b8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x4a0]
xor ecx, esp
call fcn.004338df
add esp, 0x4b0
ret