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

Disassembly:
push 0xffffffffffffffff
push 0x501978
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5364d0]
xor eax, esp
push eax
lea eax, [esp + 0x34]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [edi]
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFindExtensionW]
push eax
call ebx
mov dword [esp + 0x28], eax
test eax, eax
je 0x4a88c0
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4a87e3
sub eax, edx
sar eax, 1
test eax, eax
jle 0x4a88c0
mov eax, dword [edi]
sub eax, 0x10
call fcn.004048c0
lea esi, [eax + 0x10]
mov dword [esp + 0x1c], esi
mov dword [esp + 0x3c], 0
mov eax, dword [edi]
sub eax, 0x10
call fcn.004048c0
lea edi, [eax + 0x10]
mov dword [esp + 0x14], edi
mov byte [esp + 0x3c], 1
cmp dword [esi - 4], 1
jle 0x4a8841
mov eax, dword [esi - 0xc]
push eax
lea ecx, [esp + 0x20]
push ecx
call fcn.00401410
mov esi, dword [esp + 0x1c]
mov ebp, dword [sym.imp.SHLWAPI.dll_PathRemoveExtensionW]
push esi
call ebp
mov eax, dword [esi - 8]
push eax
push esi
call fcn.004e4d4d
add esp, 8
test eax, eax
jl 0x4a8b4c
cmp eax, dword [esi - 8]
jg 0x4a8b4c
xor edx, edx
mov dword [esi - 0xc], eax
push esi
mov word [esi + eax*2], dx
call ebx
mov dword [esp + 0x24], eax
test eax, eax
jne 0x4a88d6
mov byte [esp + 0x3c], al
lea eax, [edi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a889c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add esi, 0xfffffff0
mov dword [esp + 0x3c], 0xffffffff
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a88c0
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
xor eax, eax
mov ecx, dword [esp + 0x34]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret
lea eax, [esi - 0x10]
mov dword [esp + 0x30], eax
call fcn.004048c0
lea ebx, [eax + 0x10]
mov dword [esp + 0x18], ebx
mov byte [esp + 0x3c], 2
cmp dword [ebx - 4], 1
jle 0x4a8906
mov eax, dword [ebx - 0xc]
push eax
lea ecx, [esp + 0x1c]
push ecx
call fcn.00401410
mov ebx, dword [esp + 0x18]
push ebx
call ebp
mov eax, dword [ebx - 8]
push eax
push ebx
call fcn.004e4d4d
add esp, 8
test eax, eax
jl 0x4a8b4c
cmp eax, dword [ebx - 8]
jg 0x4a8b4c
mov ebp, dword [esp + 0x24]
xor edx, edx
mov dword [ebx - 0xc], eax
mov word [ebx + eax*2], dx
mov eax, ebp
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4a8940
sub eax, edx
sar eax, 1
mov edi, eax
test edi, edi
jg 0x4a8975
lea ecx, [esp + 0x18]
call fcn.004016f0
lea ecx, [esp + 0x14]
call fcn.004016f0
lea ecx, [esp + 0x1c]
call fcn.004016f0
jmp 0x4a88c0
mov eax, dword [0x563288]
mov edx, dword [eax + 0xc]
mov ecx, 0x563288
call edx
add eax, 0x10
mov dword [esp + 0x24], eax
xor esi, esi
mov byte [esp + 0x3c], 3
test edi, edi
jle 0x4a89b4
cmp word [ebp + esi*2], 0x30
jne 0x4a89af
push 1
push 0x515f5c
lea eax, [esp + 0x2c]
push eax
call fcn.0041e520
inc esi
cmp esi, edi
jl 0x4a8996
mov edx, dword [0x563288]
mov eax, dword [edx + 0xc]
mov ecx, 0x563288
call eax
lea esi, [eax + 0x10]
mov dword [esp + 0x20], esi
mov byte [esp + 0x3c], 4
mov ebp, 1
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov edi, eax
mov dword [esp + 0x2c], edi
test edi, edi
je 0x4a8a85
lea edx, [esp + 0x20]
push edx
inc ebp
push ebp
lea esi, [esp + 0x2c]
call fcn.004a8530
mov eax, dword [esp + 0x28]
mov esi, dword [esp + 0x20]
push eax
push ebp
push esi
push ebx
push str._s.part_s_d_s
lea edi, [esp + 0x28]
call fcn.00404890
mov edi, dword [esi - 0x10]
lea eax, [esi - 0x10]
add esp, 0x14
cmp dword [eax + 4], 0
je 0x4a8a6e
cmp dword [eax + 0xc], 0
lea ecx, [eax + 0xc]
jge 0x4a8a48
cmp dword [esi - 8], 0
jl 0x4a8b4c
xor ecx, ecx
mov dword [esi - 0xc], 0
mov word [esi], cx
jmp 0x4a8a6e
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a8a5e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [edi]
mov eax, dword [edx + 0xc]
mov ecx, edi
call eax
lea esi, [eax + 0x10]
mov dword [esp + 0x20], esi
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4a89d5
mov edi, dword [esp + 0x2c]
add esi, 0xfffffff0
mov byte [esp + 0x3c], 3
lea edx, [esi + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x4a8aa6
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov byte [esp + 0x3c], 2
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a8acb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add ebx, 0xfffffff0
mov byte [esp + 0x3c], 1
lea ecx, [ebx + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a8aec
mov ecx, dword [ebx]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebx
call edx
mov byte [esp + 0x3c], 0
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a8b11
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x3c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a8b36
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, edi
mov ecx, dword [esp + 0x34]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret
push 0x80070057
call fcn.00401540
int3