Function at 0x5413b8
Capabilities:
Check if file exists
Delete directory
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x1b
push 0
push 0
dec ecx
jne 0x5413c0
push ebx
push esi
push edi
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00406f78
xor eax, eax
push ebp
push 0x541d2d
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 0x25], 1
xor eax, eax
mov dword [ebp - 0xc], eax
xor eax, eax
mov dword [ebp - 8], eax
xor ecx, ecx
mov dl, 1
mov eax, dword [0x53c0f4]
call fcn.004e8544
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
call fcn.0053f4c4
add eax, 0xa0
mov edx, 0x541d48
call fcn.00407254
lea edx, [ebp - 0x74]
mov eax, dword [0x5510d4]
mov eax, dword [eax]
call fcn.004c0d1c
mov eax, dword [ebp - 0x74]
lea edx, [ebp - 0x70]
call fcn.0041d688
mov edx, dword [ebp - 0x70]
lea eax, [ebp - 0x24]
mov ecx, 0x541d9c
call fcn.00407aa0
lea eax, [ebp - 0x78]
mov ecx, 0x541dac
mov edx, dword [ebp - 0x24]
call fcn.00407aa0
mov eax, dword [ebp - 0x78]
mov dl, 1
call fcn.0041d3a4
test al, al
je 0x5415eb
xor eax, eax
push ebp
push 0x5415db
push dword fs:[eax]
mov dword fs:[eax], esp
mov dl, 1
mov eax, dword [0x435900]
call fcn.00442430
mov dword [ebp - 0xc], eax
mov ecx, 0x541dac
lea eax, [ebp - 0x7c]
mov edx, dword [ebp - 0x24]
call fcn.00407aa0
mov edx, dword [ebp - 0x7c]
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
call dword [ecx + 0x68]
mov eax, dword [ebp - 0xc]
mov edx, dword [eax]
call dword [edx + 0x14]
dec eax
push eax
mov eax, 0x557678
mov ecx, 1
mov edx, dword [0x540e54]
call fcn.004089dc
add esp, 4
xor eax, eax
mov dword [ebp - 0x18], eax
mov eax, dword [0x557678]
call fcn.00408814
test eax, eax
jle 0x5415cd
mov eax, dword [ebp - 0xc]
mov edx, dword [eax]
call dword [edx + 0x14]
dec eax
test eax, eax
jle 0x5415d1
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x10], 1
mov eax, dword [ebp - 0x18]
lea eax, [eax + eax*2]
mov edx, dword [0x557678]
lea eax, [edx + eax*4]
push eax
lea ecx, [ebp - 0x80]
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
mov ebx, dword [eax]
call dword [ebx + 0xc]
mov edx, dword [ebp - 0x80]
mov eax, 0x541dd0
call fcn.00407d7c
dec eax
push eax
lea ecx, [ebp - 0x84]
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
mov ebx, dword [eax]
call dword [ebx + 0xc]
mov eax, dword [ebp - 0x84]
xor edx, edx
pop ecx
call fcn.00407c10
lea ecx, [ebp - 0x40]
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
mov ebx, dword [eax]
call dword [ebx + 0xc]
lea ecx, [ebp - 0x88]
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
mov ebx, dword [eax]
call dword [ebx + 0xc]
mov eax, dword [ebp - 0x88]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
je 0x54157c
mov eax, dword [ebp - 0x3c]
sub eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x18]
lea eax, [eax + eax*2]
mov edx, dword [0x557678]
lea eax, [edx + eax*4 + 4]
push eax
lea ecx, [ebp - 0x8c]
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
mov ebx, dword [eax]
call dword [ebx + 0xc]
mov edx, dword [ebp - 0x8c]
mov eax, 0x541dd0
call fcn.00407d7c
mov edx, eax
inc edx
mov ecx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x40]
call fcn.00407c10
inc dword [ebp - 0x18]
inc dword [ebp - 0x10]
dec dword [ebp - 0x30]
jne 0x5414f1
jmp 0x5415d1
mov byte [ebp - 0x25], 0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x5415ef
mov byte [ebp - 0x25], 0
mov eax, dword [0x557678]
call fcn.00408814
dec eax
mov dword [ebp - 0x20], eax
xor eax, eax
push ebp
push 0x54177b
push dword fs:[eax]
mov dword fs:[eax], esp
mov dl, 1
mov eax, dword [0x435900]
call fcn.00442430
mov dword [ebp - 8], eax
mov ecx, 0x541dac
lea eax, [ebp - 0x94]
mov edx, dword [ebp - 4]
call fcn.00407aa0
mov edx, dword [ebp - 0x94]
lea ecx, [ebp - 0x90]
mov eax, dword [ebp - 0x2c]
call fcn.0053d3d8
mov edx, dword [ebp - 0x90]
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
call dword [ecx + 0x2c]
mov eax, dword [ebp - 8]
mov edx, dword [eax]
call dword [edx + 0x14]
dec eax
push eax
mov eax, 0x557674
mov ecx, 1
mov edx, dword [0x540e54]
call fcn.004089dc
add esp, 4
xor eax, eax
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 8]
mov edx, dword [eax]
call dword [edx + 0x14]
dec eax
test eax, eax
jle 0x541771
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x10], 1
mov eax, dword [ebp - 0x18]
lea eax, [eax + eax*2]
mov edx, dword [0x557674]
lea eax, [edx + eax*4]
push eax
lea ecx, [ebp - 0x98]
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 8]
mov ebx, dword [eax]
call dword [ebx + 0xc]
mov edx, dword [ebp - 0x98]
mov eax, 0x541dd0
call fcn.00407d7c
dec eax
push eax
lea ecx, [ebp - 0x9c]
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 8]
mov ebx, dword [eax]
call dword [ebx + 0xc]
mov eax, dword [ebp - 0x9c]
xor edx, edx
pop ecx
call fcn.00407c10
lea ecx, [ebp - 0x4c]
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 8]
mov ebx, dword [eax]
call dword [ebx + 0xc]
lea ecx, [ebp - 0xa0]
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 8]
mov ebx, dword [eax]
call dword [ebx + 0xc]
mov eax, dword [ebp - 0xa0]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x48], eax
cmp dword [ebp - 0x48], 0
je 0x541722
mov eax, dword [ebp - 0x48]
sub eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x18]
lea eax, [eax + eax*2]
mov edx, dword [0x557674]
lea eax, [edx + eax*4 + 4]
push eax
lea ecx, [ebp - 0xa4]
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 8]
mov ebx, dword [eax]
call dword [ebx + 0xc]
mov edx, dword [ebp - 0xa4]
mov eax, 0x541dd0
call fcn.00407d7c
mov edx, eax
inc edx
mov ecx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x4c]
call fcn.00407c10
inc dword [ebp - 0x18]
inc dword [ebp - 0x10]
dec dword [ebp - 0x30]
jne 0x541691
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x5417b5
mov eax, dword [0x557674]
call fcn.00408814
dec eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
test eax, eax
jl 0x5417ee
inc eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x10], 0
mov eax, dword [ebp - 0x10]
lea eax, [eax + eax*2]
mov edx, dword [0x557674]
mov byte [edx + eax*4 + 8], 0
inc dword [ebp - 0x10]
dec dword [ebp - 0x30]
jne 0x5417d5
cmp byte [ebp - 0x25], 0
je 0x5418c9
mov eax, dword [ebp - 0x1c]
test eax, eax
jl 0x5418f4
inc eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x10], 0
mov byte [ebp - 0x26], 0
mov eax, dword [ebp - 0x20]
test eax, eax
jl 0x5418a4
inc eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x14], 0
mov eax, dword [ebp - 0x10]
lea eax, [eax + eax*2]
mov edx, dword [0x557674]
mov eax, dword [edx + eax*4]
mov edx, dword [ebp - 0x14]
lea edx, [edx + edx*2]
mov ecx, dword [0x557678]
mov edx, dword [ecx + edx*4]
call fcn.00407bd8
jne 0x54189c
mov byte [ebp - 0x26], 1
mov eax, dword [ebp - 0x10]
lea eax, [eax + eax*2]
mov edx, dword [0x557674]
mov eax, dword [edx + eax*4 + 4]
mov edx, dword [ebp - 0x14]
lea edx, [edx + edx*2]
mov ecx, dword [0x557678]
mov edx, dword [ecx + edx*4 + 4]
call fcn.00407bd8
je 0x54188b
mov eax, dword [ebp - 0x10]
lea eax, [eax + eax*2]
mov edx, dword [0x557674]
mov byte [edx + eax*4 + 8], 1
jmp 0x54189c
mov eax, dword [ebp - 0x10]
lea eax, [eax + eax*2]
mov edx, dword [0x557674]
mov byte [edx + eax*4 + 8], 0
inc dword [ebp - 0x14]
dec dword [ebp - 0x34]
jne 0x541828
cmp byte [ebp - 0x26], 0
jne 0x5418bb
mov eax, dword [ebp - 0x10]
lea eax, [eax + eax*2]
mov edx, dword [0x557674]
mov byte [edx + eax*4 + 8], 1
inc dword [ebp - 0x10]
dec dword [ebp - 0x30]
jne 0x54180e
jmp 0x5418f4
mov eax, dword [ebp - 0x1c]
test eax, eax
jl 0x5418f4
inc eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x10], 0
mov eax, dword [ebp - 0x10]
lea eax, [eax + eax*2]
mov edx, dword [0x557674]
mov byte [edx + eax*4 + 8], 1
inc dword [ebp - 0x10]
dec dword [ebp - 0x30]
jne 0x5418db
mov eax, dword [0x5514a4]
mov eax, dword [eax]
call fcn.004bd1e8
mov edx, eax
mov eax, dword [0x557670]
sub edx, dword [eax + 0x48]
sar edx, 1
jns 0x541911
adc edx, 0
mov eax, dword [0x557670]
call fcn.004bc524
mov eax, dword [0x5514a4]
mov eax, dword [eax]
call fcn.004bd1e0
mov edx, eax
mov eax, dword [0x557670]
sub edx, dword [eax + 0x4c]
sar edx, 1
jns 0x541938
adc edx, 0
mov eax, dword [0x557670]
call fcn.004bc560
mov eax, dword [0x557670]
call fcn.004bb978
mov eax, dword [ebp - 0x1c]
test eax, eax
jl 0x541994
inc eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x10], 0
mov eax, dword [ebp - 0x10]
lea eax, [eax + eax*2]
mov edx, dword [0x557674]
mov eax, dword [edx + eax*4]
mov edx, 0x541dac
call fcn.00407bd8
jne 0x54198c
mov eax, dword [ebp - 0x10]
lea eax, [eax + eax*2]
mov edx, dword [0x557674]
mov byte [edx + eax*4 + 8], 1
jmp 0x541994
inc dword [ebp - 0x10]
dec dword [ebp - 0x30]
jne 0x54195e
mov eax, dword [0x557670]
mov eax, dword [eax + 0x38c]
xor edx, edx
call fcn.004752e4
mov eax, dword [0x557670]
mov eax, dword [eax + 0x39c]
mov edx, 0x541dfc
call fcn.004752e4
mov eax, dword [ebp - 4]
call fcn.00540e7c
mov dword [0x55767c], eax
mov eax, dword [ebp - 0x1c]
test eax, eax
jl 0x541a9d
inc eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x10], 0
mov eax, dword [ebp - 0x10]
lea eax, [eax + eax*2]
mov edx, dword [0x557674]
cmp byte [edx + eax*4 + 8], 0
je 0x541a91
mov eax, dword [ebp - 0x10]
lea eax, [eax + eax*2]
mov edx, dword [0x557674]
mov edx, dword [edx + eax*4]
mov eax, dword [0x557670]
mov eax, dword [eax + 0x38c]
call fcn.004752e4
mov eax, dword [ebp - 0x10]
lea eax, [eax + eax*2]
mov edx, dword [0x557674]
mov ecx, dword [edx + eax*4]
lea eax, [ebp - 0xac]
mov edx, dword [ebp - 0x24]
call fcn.00407aa0
mov eax, dword [ebp - 0xac]
call fcn.00407854
mov edx, eax
lea eax, [ebp - 0xa8]
call fcn.004078b4
mov eax, dword [ebp - 0xa8]
push eax
mov eax, dword [ebp - 0x10]
lea eax, [eax + eax*2]
mov edx, dword [0x557674]
mov ecx, dword [edx + eax*4]
lea eax, [ebp - 0xb4]
mov edx, dword [ebp - 4]
call fcn.00407aa0
mov eax, dword [ebp - 0xb4]
call fcn.00407854
mov edx, eax
lea eax, [ebp - 0xb0]
call fcn.004078b4
mov eax, dword [ebp - 0xb0]
pop edx
call fcn.00541044
inc dword [ebp - 0x10]
dec dword [ebp - 0x30]
jne 0x5419de
mov ecx, 0x541dac
lea eax, [ebp - 0xb8]
mov edx, dword [ebp - 0x24]
call fcn.00407aa0
mov edx, dword [ebp - 0xb8]
mov eax, 0x541e4c
call fcn.00541044
mov eax, dword [ebp - 0xc]
call fcn.00405428
mov eax, dword [ebp - 8]
call fcn.00405428
mov eax, dword [ebp - 0x2c]
call fcn.00405428
lea eax, [ebp - 0xbc]
call fcn.0041d884
lea eax, [ebp - 0xbc]
mov edx, 0x541ec8
call fcn.00407a48
mov eax, dword [ebp - 0xbc]
mov dl, 1
call fcn.0041d3a4
test al, al
je 0x541bae
lea eax, [ebp - 0xc4]
call fcn.0041d884
lea eax, [ebp - 0xc4]
mov edx, 0x541ec8
call fcn.00407a48
mov eax, dword [ebp - 0xc4]
call fcn.00407854
mov edx, eax
lea eax, [ebp - 0xc0]
call fcn.004078b4
mov eax, dword [ebp - 0xc0]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x50]
call fcn.00407854
push eax
call sub.kernel32.dll_DeleteFileW
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x51], al
cmp byte [ebp - 0x51], 0
jne 0x541bae
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0x50]
call fcn.00407854
push eax
call sub.kernel32.dll_GetFileAttributesW
mov dword [ebp - 0x58], eax
cmp dword [ebp - 0x58], 0xffffffff
je 0x541ba5
test byte [ebp - 0x57], 4
je 0x541ba5
test byte [ebp - 0x58], 0x10
je 0x541ba5
mov eax, dword [ebp - 0x50]
call fcn.00407854
push eax
call sub.kernel32.dll_RemoveDirectoryW
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x51], al
jmp 0x541bae
mov eax, dword [ebp - 0x5c]
push eax
call sub.kernel32.dll_SetLastError
lea eax, [ebp - 0xc8]
call fcn.0041d884
lea eax, [ebp - 0xc8]
mov edx, 0x541f14
call fcn.00407a48
mov eax, dword [ebp - 0xc8]
mov dl, 1
call fcn.0041d3a4
test al, al
je 0x541cd7
lea eax, [ebp - 0xcc]
call fcn.0041d884
lea eax, [ebp - 0xcc]
mov edx, 0x541ec8
call fcn.00407a48
mov eax, dword [ebp - 0xcc]
call fcn.00407854
push eax
lea eax, [ebp - 0xd0]
call fcn.0041d884
lea eax, [ebp - 0xd0]
mov edx, 0x541f14
call fcn.00407a48
mov eax, dword [ebp - 0xd0]
call fcn.00407854
push eax
call sub.kernel32.dll_MoveFileW
lea eax, [ebp - 0xd8]
call fcn.0041d884
lea eax, [ebp - 0xd8]
mov edx, 0x541f14
call fcn.00407a48
mov eax, dword [ebp - 0xd8]
call fcn.00407854
mov edx, eax
lea eax, [ebp - 0xd4]
call fcn.004078b4
mov eax, dword [ebp - 0xd4]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x60]
call fcn.00407854
push eax
call sub.kernel32.dll_DeleteFileW
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x61], al
cmp byte [ebp - 0x61], 0
jne 0x541cd7
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp - 0x60]
call fcn.00407854
push eax
call sub.kernel32.dll_GetFileAttributesW
mov dword [ebp - 0x68], eax
cmp dword [ebp - 0x68], 0xffffffff
je 0x541cce
test byte [ebp - 0x67], 4
je 0x541cce
test byte [ebp - 0x68], 0x10
je 0x541cce
mov eax, dword [ebp - 0x60]
call fcn.00407854
push eax
call sub.kernel32.dll_RemoveDirectoryW
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x61], al
jmp 0x541cd7
mov eax, dword [ebp - 0x6c]
push eax
call sub.kernel32.dll_SetLastError
mov eax, dword [0x5510d4]
mov eax, dword [eax]
call fcn.004c0590
push 5
push 0x541f2c
call sub.kernel32.dll_WinExec
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x541d34
lea eax, [ebp - 0xd8]
mov edx, 0x1b
call fcn.00406ef4
lea eax, [ebp - 0x4c]
call fcn.00406e94
lea eax, [ebp - 0x40]
call fcn.00406e94
lea eax, [ebp - 0x24]
call fcn.00406e94
lea eax, [ebp - 4]
call fcn.00406e94
ret