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

Disassembly:
mov eax, 0x422492
call fcn.00414d1c
sub esp, 0x14c
push ebx
push edi
mov edi, dword [esp + 0x168]
push 0
push edi
call fcn.00411929
xor ebx, ebx
pop ecx
inc ebx
pop ecx
test al, al
jne 0x40bf6b
push ebx
push edi
call fcn.00411929
pop ecx
pop ecx
test al, al
jne 0x40bf6b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x40c198
cmp eax, 3
je 0x40c198
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_DeleteFileA]
push edi
call ebp
test eax, eax
jne 0x40c197
xor ecx, ecx
push 0xf
pop eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], ecx
mov byte [esp + 0xc], cl
mov dword [esp + 0x160], ecx
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x38], eax
mov dword [esp + 0x34], ecx
mov byte [esp + 0x24], cl
mov byte [esp + 0x160], bl
lea eax, [esp + 0x54]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
je 0x40bff1
cmp byte [esp + 0x54], 0
jne 0x40bfd7
xor eax, eax
jmp 0x40bfe2
lea eax, [esp + 0x54]
push eax
call fcn.00414490
pop ecx
push eax
lea eax, [esp + 0x58]
push eax
lea ecx, [esp + 0x14]
call fcn.004021fe
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x40c044
cmp dword [esp + 0x20], 0x10
lea eax, [esp + 0xc]
cmovae eax, dword [esp + 0xc]
cmp byte [eax + ecx - 1], 0x5c
jne 0x40c044
lea eax, [ecx - 1]
push eax
push 0
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x18]
call fcn.004065a8
mov byte [esp + 0x160], 2
push eax
lea ecx, [esp + 0x10]
call fcn.00409c9a
mov byte [esp + 0x160], bl
lea ecx, [esp + 0x3c]
call fcn.0040150a
cmp dword [esp + 0x20], 0x10
push esi
lea eax, [esp + 0x10]
cmovae eax, dword [esp + 0x10]
push ebx
push eax
call fcn.00411929
pop ecx
pop ecx
test al, al
je 0x40c156
call fcn.00417072
mov esi, eax
shl esi, 0xf
call fcn.00417072
or eax, esi
push eax
lea eax, [esp + 0x44]
push str.__tmp__08x
push eax
call fcn.004078b1
add esp, 0xc
mov byte [esp + 0x164], 3
push 0xffffffffffffffff
push 0
push eax
lea ecx, [esp + 0x1c]
call fcn.00404e38
mov byte [esp + 0x164], bl
lea ecx, [esp + 0x40]
call fcn.0040150a
push 0x10
pop esi
cmp dword [esp + 0x24], esi
lea eax, [esp + 0x10]
cmovae eax, dword [esp + 0x10]
push ebx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
je 0x40c156
cmp dword [esp + 0x24], esi
lea eax, [esp + 0x10]
cmovae eax, dword [esp + 0x10]
push eax
call fcn.0040ad54
cmp dword [esp + 0x28], esi
lea eax, [esp + 0x14]
cmovae eax, dword [esp + 0x14]
pop ecx
push eax
call ebp
cmp eax, ebx
je 0x40c174
cmp dword [esp + 0x24], esi
push 4
lea eax, [esp + 0x14]
cmovae eax, dword [esp + 0x14]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
mov eax, dword [0x42f1c0]
mov ecx, eax
not ecx
and ecx, 0x2b2
neg ecx
sbb ecx, ecx
add eax, eax
neg ecx
or eax, ecx
mov dword [0x42f1c0], eax
mov eax, dword [0x42f1c4]
inc eax
mov ecx, 0x143
cmove eax, ecx
or eax, 0x3bb
mov ecx, 0x372
cmp eax, ecx
cmove eax, ecx
or eax, 0x225
mov dword [0x42f1c4], eax
jmp 0x40c174
push edi
call fcn.0040ad54
pop ecx
push edi
call ebp
cmp eax, ebx
je 0x40c174
push 4
push 0
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
setne bl
mov byte [esp + 0x164], 0
lea ecx, [esp + 0x28]
call fcn.0040150a
or dword [esp + 0x164], 0xffffffff
lea ecx, [esp + 0x10]
call fcn.0040150a
pop esi
pop ebp
mov ecx, dword [esp + 0x154]
pop edi
mov al, bl
pop ebx
mov dword fs:[0], ecx
leave
ret