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

Disassembly:
mov eax, 0x420418
call fcn.00412bcc
sub esp, 0x560
push ebx
push esi
push edi
mov edi, dword [esp + 0x580]
push 0
push edi
call fcn.0040fefc
xor ebx, ebx
pop ecx
inc ebx
pop ecx
mov esi, 0x104
test al, al
jne 0x40b179
push ebx
push edi
call fcn.0040fefc
pop ecx
pop ecx
test al, al
jne 0x40b179
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x40b375
cmp eax, 3
je 0x40b375
call fcn.0040ca1a
cmp eax, 3
jae 0x40b179
lea eax, [esp + 0x158]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_DeleteFileA]
push edi
call ebp
test eax, eax
jne 0x40b374
xor ecx, ecx
push 0xf
pop eax
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], ecx
mov byte [esp + 0x10], cl
mov dword [esp + 0x578], ecx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x38], ecx
mov byte [esp + 0x28], cl
mov byte [esp + 0x578], bl
lea eax, [esp + 0x58]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
je 0x40b1fb
cmp byte [esp + 0x58], 0
jne 0x40b1e1
xor eax, eax
jmp 0x40b1ec
lea eax, [esp + 0x58]
push eax
call fcn.00412340
pop ecx
push eax
lea eax, [esp + 0x5c]
push eax
lea ecx, [esp + 0x18]
call fcn.00404022
mov ecx, dword [esp + 0x20]
test ecx, ecx
je 0x40b24e
cmp dword [esp + 0x24], 0x10
lea eax, [esp + 0x10]
cmovae eax, dword [esp + 0x10]
cmp byte [eax + ecx - 1], 0x5c
jne 0x40b24e
lea eax, [ecx - 1]
push eax
push 0
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x1c]
call fcn.004062fc
mov byte [esp + 0x578], 2
push eax
lea ecx, [esp + 0x14]
call fcn.0040959e
mov byte [esp + 0x578], bl
lea ecx, [esp + 0x40]
call fcn.004015ab
cmp dword [esp + 0x24], 0x10
lea eax, [esp + 0x10]
cmovae eax, dword [esp + 0x10]
push ebx
push eax
call fcn.0040fefc
pop ecx
pop ecx
test al, al
je 0x40b31b
call fcn.00414f52
mov esi, eax
shl esi, 0xf
call fcn.00414f52
or eax, esi
push eax
lea eax, [esp + 0x44]
push str.__tmp__08x
push eax
call fcn.0040743b
add esp, 0xc
mov byte [esp + 0x578], 3
push 0xffffffffffffffff
push 0
push eax
lea ecx, [esp + 0x1c]
call fcn.004050b9
mov byte [esp + 0x578], bl
lea ecx, [esp + 0x40]
call fcn.004015ab
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 0x40b316
cmp dword [esp + 0x24], esi
lea eax, [esp + 0x10]
cmovae eax, dword [esp + 0x10]
push eax
call fcn.0040a5b6
cmp dword [esp + 0x28], esi
lea eax, [esp + 0x14]
cmovae eax, dword [esp + 0x14]
pop ecx
push eax
call ebp
cmp eax, ebx
je 0x40b352
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]
jmp 0x40b352
mov esi, 0x104
push edi
call fcn.0040a5b6
pop ecx
call fcn.0040ca1a
cmp eax, 3
jae 0x40b33b
lea eax, [esp + 0x15c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
push edi
call ebp
cmp eax, ebx
je 0x40b352
push 4
push 0
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
setne bl
mov byte [esp + 0x578], 0
lea ecx, [esp + 0x28]
call fcn.004015ab
or dword [esp + 0x578], 0xffffffff
lea ecx, [esp + 0x10]
call fcn.004015ab
pop ebp
mov ecx, dword [esp + 0x56c]
pop edi
pop esi
mov al, bl
pop ebx
mov dword fs:[0], ecx
leave
ret