Function at 0x10022f13
Capabilities:
Check if file exists
Delete file
Move file

Disassembly:
push 0x220
mov eax, 0x1006899b
call fcn.1002f2b3
mov ebx, ecx
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
mov dword [ebp - 0x21c], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x224], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x228], eax
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x220], eax
call fcn.1000678d
push eax
lea ecx, [ebp - 0x22c]
call fcn.100062ac
xor esi, esi
test byte [ebp + 0x14], 0x20
mov dword [ebp - 4], esi
je 0x10022fd5
mov ebx, dword [ebp - 0x21c]
push 5
push dword [ebp - 0x228]
push ebx
call fcn.1000dee1
mov edi, eax
add esp, 0xc
test edi, edi
je 0x100231ae
test dword [ebp + 0x14], 0x4000
je 0x10022fc6
push 0x927c0
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x10022fcd
push 4
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
jmp 0x10022fcd
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
inc esi
jmp 0x100231ae
test dword [ebp + 0x14], 0x840
je 0x10023036
test dword [ebp + 0x14], 0x800
jne 0x10022ff2
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x10023036
push dword [ebp - 0x220]
mov ecx, ebx
push dword [ebp - 0x21c]
push edi
call fcn.10023433
test eax, eax
je 0x10023024
test dword [ebp + 0x14], 0x400
jne 0x1002301c
push 2
mov ecx, ebx
call fcn.10020389
push 3
pop esi
jmp 0x100231ae
push edi
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
push eax
push 0x10001
jmp 0x1002314d
push 0x208
lea eax, [ebp - 0x218]
push esi
push eax
call fcn.10038c20
add esp, 0xc
lea eax, [ebp - 0x218]
push SysReAllocString
push edi
push esi
push 0x104
push eax
call fcn.100114aa
test eax, eax
js 0x10023074
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x100230aa
cmp word [ebp - 0x218], si
je 0x100230aa
lea eax, [ebp - 0x218]
push eax
call fcn.1000dc3f
pop ecx
test eax, eax
jne 0x100230aa
lea eax, [ebp - 0x218]
push eax
push 0x10002
jmp 0x1002314d
push dword [ebp - 0x220]
mov ecx, ebx
push dword [ebp - 0x21c]
push edi
call fcn.1002338d
mov dword [ebp - 0x21c], eax
cmp eax, 1
je 0x100230ce
cmp eax, 2
jne 0x1002310f
mov ecx, dword [ebp - 0x224]
test ecx, ecx
je 0x1002310f
push ecx
call fcn.1003d0a0
pop ecx
cmp eax, 0x20
jne 0x10023109
push dword [ebp + 0x20]
push dword [ebp - 0x224]
push edi
call fcn.1000cca8
add esp, 0xc
test eax, eax
jne 0x10023109
push edi
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
push eax
push 0x10003
jmp 0x1002314d
mov eax, dword [ebp - 0x21c]
test eax, eax
jne 0x10023122
push edi
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
push eax
push 0x10004
jmp 0x1002314d
test dword [ebp + 0x14], 0x100
je 0x10023160
cmp word [ebp - 0x218], si
je 0x1002315c
lea eax, [ebp - 0x218]
push eax
push edi
call fcn.1000e499
pop ecx
pop ecx
test eax, eax
jne 0x10023156
push edi
push 0x10005
mov ecx, ebx
call fcn.10023334
jmp 0x100231ae
mov eax, dword [ebp - 0x21c]
mov esi, eax
jmp 0x100231ae
test byte [ebp + 0x14], 1
je 0x10023170
push 1
push edi
call fcn.1000ceea
pop ecx
pop ecx
test byte [ebp + 0x14], 0x80
je 0x10023185
push esi
push str._RegServer
push edi
call fcn.1000dfc3
add esp, 0xc
mov esi, dword [ebp - 0x21c]
cmp esi, 3
je 0x100231ae
test byte [ebp + 0x14], 4
je 0x1002319f
push 1
mov ecx, ebx
call fcn.10020389
test byte [ebp + 0x14], 8
je 0x100231ae
push 2
mov ecx, ebx
call fcn.10020389
mov ecx, dword [ebp - 0x22c]
add ecx, 0xfffffff0
call fcn.100057c1
mov eax, esi
call fcn.1002f25d
ret 0x1c