Function at 0x4012a0
Capabilities:
Check if file exists
Delete file
Get file attributes
Move file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40ad6b
mov eax, dword fs:[0]
push eax
sub esp, 0x2c8
mov eax, dword [0x40f01c]
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 edi, ecx
mov dword [ebp - 0x2d0], edi
xor ebx, ebx
mov dword [ebp - 4], ebx
cmp dword [edi + 0x14], 8
jb 0x4012e5
mov eax, dword [edi]
jmp 0x4012e7
mov eax, edi
xor ecx, ecx
mov word [ebp - 0x23c], cx
mov ecx, eax
mov dword [ebp - 0x228], 7
mov dword [ebp - 0x22c], ebx
lea esi, [ecx + 2]
mov dx, word [ecx]
add ecx, 2
cmp dx, bx
jne 0x401305
sub ecx, esi
sar ecx, 1
push ecx
lea esi, [ebp - 0x23c]
call fcn.00403ac0
cmp dword [ebp - 0x228], 8
mov eax, dword [ebp - 0x23c]
jae 0x401331
mov eax, esi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x401345
test al, 0x10
jne 0x401345
mov bl, 1
jmp 0x401347
xor bl, bl
mov esi, 8
cmp dword [ebp - 0x228], esi
jb 0x401363
mov edx, dword [ebp - 0x23c]
push edx
call fcn.004049bc
add esp, 4
test bl, bl
jne 0x40137f
cmp dword [ebp + 0x1c], esi
jb 0x401378
mov eax, dword [ebp + 8]
push eax
call fcn.004049bc
add esp, 4
mov al, 1
jmp 0x4017ad
mov byte [ebp - 0x2c9], 1
cmp dword [edi + 0x14], esi
jb 0x40138f
mov eax, dword [edi]
jmp 0x401391
mov eax, edi
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
xor edi, edi
xor ecx, ecx
mov word [ebp - 0x274], cx
mov ebx, 7
mov ecx, eax
mov dword [ebp - 0x260], ebx
mov dword [ebp - 0x264], edi
lea esi, [ecx + 2]
lea esp, [esp]
mov dx, word [ecx]
add ecx, 2
cmp dx, di
jne 0x4013c0
sub ecx, esi
sar ecx, 1
push ecx
lea esi, [ebp - 0x274]
call fcn.00403ac0
push 0x206
lea eax, [ebp - 0x21a]
xor edx, edx
push edi
mov byte [ebp - 4], 1
push eax
mov word [ebp - 0x21c], dx
call fcn.00407f30
mov eax, dword [ebp - 0x274]
add esp, 0xc
cmp dword [ebp - 0x260], 8
jae 0x40140e
mov eax, esi
push eax
push edi
call fcn.00404e02
add esp, 4
push edx
push eax
lea ecx, [ebp - 0x21c]
push str.Tmp_I64d__s
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x14
xor edx, edx
lea eax, [ebp - 0x21c]
mov word [ebp - 0x2ac], dx
mov dword [ebp - 0x298], ebx
mov dword [ebp - 0x29c], edi
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x401450
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x21c]
lea esi, [ebp - 0x2ac]
call fcn.00403ac0
lea ecx, [ebp - 0x290]
mov byte [ebp - 4], 2
call fcn.00401100
mov ecx, eax
mov eax, esi
lea ebx, [ebp - 0x258]
mov byte [ebp - 4], 3
call fcn.00403eb0
mov esi, 8
mov byte [ebp - 4], 5
cmp dword [ebp - 0x27c], esi
jb 0x4014b3
mov eax, dword [ebp - 0x290]
push eax
call fcn.004049bc
add esp, 4
xor ecx, ecx
xor ebx, ebx
mov edi, 7
mov word [ebp - 0x290], cx
mov ecx, dword [ebp - 0x258]
mov dword [ebp - 0x27c], edi
mov dword [ebp - 0x280], ebx
cmp dword [ebp - 0x244], esi
jae 0x4014e3
lea ecx, [ebp - 0x258]
mov eax, dword [ebp - 0x2d0]
cmp dword [eax + 0x14], esi
jb 0x4014f0
mov eax, dword [eax]
push 1
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x4016ea
cmp dword [ebp + 0x18], ebx
jne 0x4015fe
mov eax, dword [ebp - 0x2d0]
push ebx
xor edx, edx
push eax
or eax, 0xffffffff
lea ecx, [ebp - 0x23c]
mov dword [ebp - 0x228], edi
mov dword [ebp - 0x22c], ebx
mov word [ebp - 0x23c], dx
call fcn.00403810
mov byte [ebp - 4], 6
mov eax, dword [ebp + 8]
cmp dword [ebp + 0x1c], esi
jae 0x401545
lea eax, [ebp + 8]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
push 0x40d10c
lea ecx, [ebp - 0x23c]
push ecx
lea edx, [ebp - 0x2c8]
push edx
call fcn.00403ef0
add esp, 0xc
mov ecx, eax
lea eax, [ebp - 0x2ac]
lea ebx, [ebp - 0x290]
mov byte [ebp - 4], 7
call fcn.00403eb0
mov ebx, 8
mov edi, eax
lea esi, [ebp - 0x258]
mov byte [ebp - 4], bl
call fcn.004037a0
cmp dword [ebp - 0x27c], ebx
jb 0x4015aa
mov eax, dword [ebp - 0x290]
push eax
call fcn.004049bc
add esp, 4
xor ecx, ecx
mov dword [ebp - 0x27c], 7
mov dword [ebp - 0x280], 0
mov word [ebp - 0x290], cx
cmp dword [ebp - 0x2b4], ebx
jb 0x4015de
mov edx, dword [ebp - 0x2c8]
push edx
call fcn.004049bc
add esp, 4
cmp dword [ebp - 0x228], ebx
jb 0x401690
mov eax, dword [ebp - 0x23c]
push eax
call fcn.004049bc
add esp, 4
jmp 0x401690
push 0x40d10c
lea ecx, [ebp + 8]
push ecx
lea edx, [ebp - 0x2c8]
push edx
call fcn.00403ef0
add esp, 0xc
mov ecx, eax
lea eax, [ebp - 0x2ac]
lea ebx, [ebp - 0x23c]
mov byte [ebp - 4], 9
call fcn.00403eb0
mov edi, eax
lea esi, [ebp - 0x258]
mov byte [ebp - 4], 0xa
call fcn.004037a0
mov esi, 8
cmp dword [ebp - 0x228], esi
jb 0x40165a
mov eax, dword [ebp - 0x23c]
push eax
call fcn.004049bc
add esp, 4
xor ecx, ecx
mov dword [ebp - 0x228], 7
mov dword [ebp - 0x22c], 0
mov word [ebp - 0x23c], cx
cmp dword [ebp - 0x2b4], esi
jb 0x40168e
mov edx, dword [ebp - 0x2c8]
push edx
call fcn.004049bc
add esp, 4
mov ebx, esi
mov ecx, dword [ebp - 0x258]
cmp dword [ebp - 0x244], ebx
jae 0x4016a4
lea ecx, [ebp - 0x258]
mov eax, dword [ebp - 0x2d0]
cmp dword [eax + 0x14], ebx
jb 0x4016b1
mov eax, dword [eax]
push 1
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x4016c5
mov byte [ebp - 0x2c9], al
mov eax, dword [ebp - 0x258]
cmp dword [ebp - 0x244], ebx
jae 0x4016d9
lea eax, [ebp - 0x258]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
xor ebx, ebx
mov esi, 8
lea edi, [ebx + 7]
mov eax, dword [ebp - 0x258]
cmp dword [ebp - 0x244], esi
jae 0x4016fe
lea eax, [ebp - 0x258]
push 4
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x401712
mov byte [ebp - 0x2c9], bl
cmp dword [ebp - 0x244], esi
jb 0x401729
mov eax, dword [ebp - 0x258]
push eax
call fcn.004049bc
add esp, 4
xor ecx, ecx
mov dword [ebp - 0x244], edi
mov dword [ebp - 0x248], ebx
mov word [ebp - 0x258], cx
cmp dword [ebp - 0x298], esi
jb 0x401755
mov edx, dword [ebp - 0x2ac]
push edx
call fcn.004049bc
add esp, 4
xor eax, eax
mov dword [ebp - 0x298], edi
mov dword [ebp - 0x29c], ebx
mov word [ebp - 0x2ac], ax
cmp dword [ebp - 0x260], esi
jb 0x401781
mov ecx, dword [ebp - 0x274]
push ecx
call fcn.004049bc
add esp, 4
xor edx, edx
mov dword [ebp - 0x260], edi
mov dword [ebp - 0x264], ebx
mov word [ebp - 0x274], dx
cmp dword [ebp + 0x1c], esi
jb 0x4017a7
mov eax, dword [ebp + 8]
push eax
call fcn.004049bc
add esp, 4
mov al, byte [ebp - 0x2c9]
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.00404872
mov esp, ebp
pop ebp
ret 0x1c