Function at 0x10021d2b
Capabilities:
Check if file exists
Delete file

Disassembly:
push 0x94
mov eax, 0x1006e7a2
call fcn.100521f6
call fcn.1001936e
mov esi, eax
xor edi, edi
cmp esi, edi
je 0x10021d69
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x10021d69
xor ecx, ecx
mov eax, 0x10094c38
cmp ecx, eax
je 0x10021d69
push eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x10021d70
xor al, al
jmp 0x10021fce
call fcn.1001936e
xor ebx, ebx
mov esi, eax
inc ebx
mov dword [ebp - 0x84], esi
cmp esi, edi
je 0x10021fc0
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x10021fc0
push 7
pop eax
xor ecx, ecx
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x6c], edi
mov word [ebp - 0x7c], cx
mov dword [ebp - 4], edi
mov dword [ebp - 0x4c], eax
xor eax, eax
mov dword [ebp - 0x50], edi
mov word [ebp - 0x60], ax
mov byte [ebp - 4], bl
call fcn.1000bca4
lea eax, [ebp - 0x64]
push eax
lea eax, [ebp - 0x80]
push eax
call fcn.1002031c
lea eax, [ebp - 0xa0]
push eax
call fcn.100041d1
push 4
lea eax, [ebp - 0xa0]
push eax
mov byte [ebp - 4], 2
call fcn.1000baf2
push esi
lea esi, [ebp - 0x48]
call fcn.100040e3
push str.TsService.exe
lea esi, [ebp - 0x2c]
mov byte [ebp - 4], 3
call fcn.100040e3
lea eax, [ebp - 0x48]
push eax
mov eax, esi
mov byte [ebp - 4], 4
call fcn.1002770a
pop ecx
push edi
push ebx
mov byte [ebp - 4], 3
call fcn.1000457f
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0xa0]
call fcn.1000bbf5
mov eax, dword [ebp - 0x84]
lea ecx, [ebp - 0x48]
call fcn.100042f6
push str.TsService.exe.new
lea esi, [ebp - 0x2c]
call fcn.100040e3
lea eax, [ebp - 0x48]
push eax
mov eax, esi
mov byte [ebp - 4], 5
call fcn.1002770a
pop ecx
push edi
push ebx
mov byte [ebp - 4], 3
call fcn.1000457f
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0xa0]
call fcn.1000bbf5
mov eax, dword [ebp - 0x84]
lea ecx, [ebp - 0x48]
call fcn.100042f6
push str.TsService.exe.old
lea esi, [ebp - 0x2c]
call fcn.100040e3
mov byte [ebp - 4], 6
lea eax, [ebp - 0x48]
push eax
mov eax, esi
call fcn.1002770a
pop ecx
push edi
push ebx
mov byte [ebp - 4], 3
call fcn.1000457f
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0xa0]
call fcn.1000bbf5
cmp dword [ebp - 0x50], edi
je 0x10021ee5
mov eax, dword [ebp - 0x84]
lea ecx, [ebp - 0x48]
call fcn.100042f6
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x64]
call fcn.1002770a
pop ecx
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0xa0]
call fcn.1000bbf5
mov eax, dword [ebp - 0x90]
sub eax, dword [ebp - 0x94]
push 0x1c
cdq
pop ecx
idiv ecx
mov dword [ebp - 0x88], edi
test eax, eax
jbe 0x10021f8b
push dword [ebp - 0x88]
lea esi, [ebp - 0xa0]
call fcn.1000bbd1
push eax
lea esi, [ebp - 0x2c]
call fcn.10004103
push 0x64
pop esi
cmp dword [ebp - 0x14], 8
mov eax, dword [ebp - 0x28]
jae 0x10021f2e
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x10021f5d
cmp dword [ebp - 0x14], 8
mov eax, dword [ebp - 0x28]
jae 0x10021f45
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x10021f5d
push 0x64
dec esi
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp esi, edi
jg 0x10021f22
push edi
push ebx
lea esi, [ebp - 0x2c]
call fcn.1000457f
mov eax, dword [ebp - 0x90]
sub eax, dword [ebp - 0x94]
push 0x1c
cdq
pop ecx
idiv ecx
inc dword [ebp - 0x88]
cmp dword [ebp - 0x88], eax
jb 0x10021f05
push edi
push ebx
lea esi, [ebp - 0x48]
call fcn.1000457f
lea esi, [ebp - 0xa0]
call fcn.10004651
push dword [ebp - 0xa0]
call fcn.1004dd0c
pop ecx
push edi
push ebx
lea esi, [ebp - 0x64]
call fcn.1000457f
push edi
push ebx
lea esi, [ebp - 0x80]
call fcn.1000457f
push dword [ebp - 0x84]
call fcn.1001a601
pop ecx
mov al, bl
call fcn.10052279
ret