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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x53a94f
mov eax, dword fs:[0]
push eax
sub esp, 0x6c
mov eax, dword [0x59a0a0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x5c], ebx
call fcn.00401980
xor edx, edx
mov ecx, eax
test ecx, ecx
setne dl
test edx, edx
jne 0x4fbdcc
push 0x80004005
call fcn.00401b40
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4fbde1
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x4fbde3
call edx
mov dword [ebp - 0x70], eax
add eax, 0x10
mov dword [ebp - 0x78], eax
mov dword [ebp - 4], 0
call fcn.00401980
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x4fbe0f
push 0x80004005
call fcn.00401b40
mov eax, dword [edx]
mov esi, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4fbe24
lock inc dword [edx + 0x14]
lea eax, [edx + 8]
jmp 0x4fbe28
mov ecx, edx
call esi
add eax, 0x10
mov dword [ebp - 0x60], eax
mov byte [ebp - 4], 1
mov ecx, ebx
mov eax, dword [ebx]
call dword [eax + 0x80]
mov eax, dword [ebx]
mov ecx, ebx
push 0
push 0
call dword [eax + 0xb4]
push ecx
mov esi, esp
mov dword [ebx + 0x474], 0
mov dword [ebp - 0x50], esi
mov ecx, dword [0x59fb14]
lea ecx, [ecx - 0x10]
call fcn.004021e0
add eax, 0x10
mov ecx, ebx
mov dword [esi], eax
call fcn.004f4ea0
lea eax, [ebp - 0x48]
mov dword [ebp - 0x48], 4
push eax
lea eax, [ebp - 0x54]
lea edi, [ebx + 0x424]
push eax
mov ecx, edi
call fcn.0042be10
mov ecx, dword [ebp - 0x54]
mov edx, dword [0x59fb14]
add ecx, 0x90
mov dword [ebp - 0x4c], ecx
mov ebx, dword [ecx]
lea esi, [edx - 0x10]
sub ebx, 0x10
cmp esi, ebx
je 0x4fbedd
cmp dword [ebx + 0xc], 0
jl 0x4fbed4
mov eax, dword [esi]
cmp eax, dword [ebx]
jne 0x4fbed4
mov ecx, esi
call fcn.004021e0
mov ecx, ebx
mov esi, eax
call fcn.00402e90
mov ecx, dword [ebp - 0x4c]
lea eax, [esi + 0x10]
mov dword [ecx], eax
jmp 0x4fbedd
push dword [edx - 0xc]
push edx
call fcn.00402d50
lea eax, [ebp - 0x48]
mov dword [ebp - 0x48], 4
push eax
lea eax, [ebp - 0x54]
mov ecx, edi
push eax
call fcn.0042be10
mov ecx, dword [ebp - 0x54]
mov edx, dword [0x59fb70]
add ecx, 0x94
mov dword [ebp - 0x4c], ecx
mov ebx, dword [ecx]
lea esi, [edx - 0x10]
sub ebx, 0x10
cmp esi, ebx
je 0x4fbf40
cmp dword [ebx + 0xc], 0
jl 0x4fbf37
mov eax, dword [esi]
cmp eax, dword [ebx]
jne 0x4fbf37
mov ecx, esi
call fcn.004021e0
mov ecx, ebx
mov esi, eax
call fcn.00402e90
mov ecx, dword [ebp - 0x4c]
lea eax, [esi + 0x10]
mov dword [ecx], eax
jmp 0x4fbf40
push dword [edx - 0xc]
push edx
call fcn.00402d50
lea eax, [ebp - 0x48]
mov dword [ebp - 0x48], 4
push eax
lea eax, [ebp - 0x54]
mov ecx, edi
push eax
call fcn.0042be10
mov ecx, dword [ebp - 0x54]
push 0
push 0x56be34
lea ecx, [ecx + 0x98]
call fcn.00402d50
lea eax, [ebp - 0x48]
mov dword [ebp - 0x48], 4
push eax
lea eax, [ebp - 0x54]
mov ecx, edi
push eax
call fcn.0042be10
mov ecx, dword [ebp - 0x54]
push 0
push 0x56bb8c
lea ecx, [ecx + 0x9c]
call fcn.00402d50
lea eax, [ebp - 0x48]
mov dword [ebp - 0x48], 4
push eax
lea eax, [ebp - 0x54]
mov ecx, edi
push eax
call fcn.0042be10
mov ecx, dword [ebp - 0x54]
mov edx, dword [0x59fb6c]
add ecx, 0xa0
mov dword [ebp - 0x4c], ecx
mov ebx, dword [ecx]
lea esi, [edx - 0x10]
sub ebx, 0x10
cmp esi, ebx
je 0x4fbff9
cmp dword [ebx + 0xc], 0
jl 0x4fbff0
mov eax, dword [esi]
cmp eax, dword [ebx]
jne 0x4fbff0
mov ecx, esi
call fcn.004021e0
mov ecx, ebx
mov esi, eax
call fcn.00402e90
mov ecx, dword [ebp - 0x4c]
lea eax, [esi + 0x10]
mov dword [ecx], eax
jmp 0x4fbff9
push dword [edx - 0xc]
push edx
call fcn.00402d50
lea eax, [ebp - 0x48]
mov dword [ebp - 0x48], 4
push eax
lea eax, [ebp - 0x54]
mov ecx, edi
push eax
call fcn.0042be10
mov ecx, dword [ebp - 0x54]
mov edx, dword [0x59fb68]
add ecx, 0xa8
mov dword [ebp - 0x4c], ecx
mov ebx, dword [ecx]
lea esi, [edx - 0x10]
sub ebx, 0x10
cmp esi, ebx
je 0x4fc05c
cmp dword [ebx + 0xc], 0
jl 0x4fc053
mov eax, dword [esi]
cmp eax, dword [ebx]
jne 0x4fc053
mov ecx, esi
call fcn.004021e0
mov ecx, ebx
mov esi, eax
call fcn.00402e90
mov ecx, dword [ebp - 0x4c]
lea eax, [esi + 0x10]
mov dword [ecx], eax
jmp 0x4fc05c
push dword [edx - 0xc]
push edx
call fcn.00402d50
lea eax, [ebp - 0x48]
mov dword [ebp - 0x48], 4
push eax
lea eax, [ebp - 0x54]
mov ecx, edi
push eax
call fcn.0042be10
mov ecx, dword [ebp - 0x54]
mov edx, dword [0x59fb64]
add ecx, 0x84
mov dword [ebp - 0x4c], ecx
mov ebx, dword [ecx]
lea esi, [edx - 0x10]
sub ebx, 0x10
cmp esi, ebx
je 0x4fc0bf
cmp dword [ebx + 0xc], 0
jl 0x4fc0b6
mov eax, dword [esi]
cmp eax, dword [ebx]
jne 0x4fc0b6
mov ecx, esi
call fcn.004021e0
mov ecx, ebx
mov esi, eax
call fcn.00402e90
mov ecx, dword [ebp - 0x4c]
lea eax, [esi + 0x10]
mov dword [ecx], eax
jmp 0x4fc0bf
push dword [edx - 0xc]
push edx
call fcn.00402d50
lea eax, [ebp - 0x48]
mov dword [ebp - 0x48], 4
push eax
lea eax, [ebp - 0x54]
mov ecx, edi
push eax
call fcn.0042be10
mov eax, dword [ebp - 0x54]
mov ecx, edi
mov dword [eax + 0xf8], 0x50ce80
mov dword [eax + 0xfc], 0
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x54]
mov dword [ebp - 0x48], 4
push eax
call fcn.0042be10
mov eax, dword [ebp - 0x54]
push 0
add eax, 0xc8
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSectionAndSpinCount]
test eax, eax
jne 0x4fc11d
call dword [sym.imp.KERNEL32.dll_GetLastError]
call fcn.00401980
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x4fc139
push 0x80004005
call fcn.00401b40
mov eax, dword [edx]
mov esi, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4fc14e
lock inc dword [edx + 0x14]
lea eax, [edx + 8]
jmp 0x4fc152
mov ecx, edx
call esi
add eax, 0x10
mov dword [ebp - 0x4c], eax
mov byte [ebp - 4], 2
mov ecx, dword [0x59fb14]
lea ecx, [ecx - 0x10]
call fcn.004021e0
add eax, 0x10
mov dword [ebp - 0x64], eax
sub esp, 8
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x64]
call fcn.0042ab20
lea eax, [ebp - 0x4c]
push eax
call fcn.0050a4a0
mov ebx, dword [ebp - 0x4c]
test eax, eax
lea eax, [ebp - 0x48]
mov dword [ebp - 0x48], 4
push eax
lea eax, [ebp - 0x54]
mov ecx, edi
push eax
je 0x4fc1c6
call fcn.0042be10
mov eax, dword [ebp - 0x54]
mov edi, dword [ebp - 0x64]
push dword [eax + 0xa0]
lea eax, [ebp - 0x60]
push edi
push ebx
push 0x56bbdc
push eax
call fcn.004023f0
mov esi, dword [ebp - 0x5c]
jmp 0x4fc1ef
call fcn.0042be10
mov eax, dword [ebp - 0x54]
mov esi, dword [ebp - 0x5c]
mov edi, dword [ebp - 0x64]
push dword [eax + 0xa0]
lea eax, [ebp - 0x60]
push edi
push dword [esi + 0x434]
push str._sGame__s__s.apk
push eax
call fcn.004023f0
mov eax, dword [0x59fb64]
add esp, 0x14
cmp dword [eax - 0xc], 0
jl 0x4fc22b
push str..patch
push eax
call fcn.0049d574
add esp, 8
test eax, eax
je 0x4fc22b
sub eax, dword [0x59fb64]
sar eax, 1
cmp eax, 0xffffffff
je 0x4fc22b
push 6
push 0x56c730
lea ecx, [ebp - 0x60]
call fcn.00402320
lea eax, [ebp - 0x74]
mov dword [ebp - 0x74], 4
push eax
lea eax, [ebp - 0x54]
push eax
lea ecx, [esi + 0x424]
call fcn.0042be10
mov eax, dword [ebp - 0x54]
mov esi, dword [ebp - 0x60]
add eax, 0x60
mov dword [ebp - 0x48], eax
mov edx, dword [eax]
lea ecx, [esi - 0x10]
sub edx, 0x10
mov dword [ebp - 0x50], ecx
mov dword [ebp - 0x68], edx
cmp ecx, edx
je 0x4fc29a
cmp dword [edx + 0xc], 0
jl 0x4fc28f
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x4fc28c
call fcn.004021e0
mov ecx, dword [ebp - 0x68]
mov dword [ebp - 0x58], eax
call fcn.00402e90
mov ecx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x58]
add eax, 0x10
mov dword [ecx], eax
jmp 0x4fc29a
mov eax, dword [ebp - 0x48]
push dword [esi - 0xc]
mov ecx, eax
push esi
call fcn.00402d50
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4fc312
mov ecx, dword [ebp - 0x5c]
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x6c]
mov dword [ebp - 0x58], 4
push eax
lea ecx, [ecx + 0x424]
call fcn.0042be10
mov eax, dword [ebp - 0x6c]
mov eax, dword [eax + 0xa8]
cmp dword [eax - 0xc], 0
je 0x4fc312
mov ecx, dword [ebp - 0x5c]
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x6c]
mov dword [ebp - 0x58], 4
push eax
lea ecx, [ecx + 0x424]
call fcn.0042be10
mov edx, dword [ebp - 0x6c]
mov ecx, esi
push 0
mov edx, dword [edx + 0xa8]
call fcn.004e0890
add esp, 4
test eax, eax
jne 0x4fc3c9
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov esi, dword [ebp - 0x5c]
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x6c]
mov dword [ebp - 0x58], 4
push eax
lea ecx, [esi + 0x424]
call fcn.0042be10
mov eax, dword [ebp - 0x6c]
cmp dword [eax + 0x28], 0
jne 0x4fc341
push 4
mov ecx, esi
call fcn.004f66f0
push 0x1be6
push 0x56c808
push 0x56c7a8
lea ecx, [ebp - 0x44]
call fcn.00428d70
mov esi, eax
mov ecx, dword [ebp - 0x5c]
push 0
push 0x50ce80
mov byte [ebp - 4], 5
lea ecx, [ecx + 0x408]
call fcn.0042ad30
xor ecx, ecx
push eax
mov edx, esi
call fcn.00508bc0
add esp, 4
lea ecx, [ebp - 0x44]
call fcn.00428f50
or esi, 0xffffffff
mov byte [ebp - 4], 2
add edi, 0xfffffff0
mov eax, esi
lock xadd dword [edi + 0xc], eax
dec eax
mov ecx, dword [sym.imp.KERNEL32.dll_HeapFree]
test eax, eax
jg 0x4fc428
mov edx, dword [edi]
push edi
mov eax, dword [edx]
mov ebx, dword [eax + 4]
mov dword [ebp - 0x58], ebx
mov ebx, dword [ebp - 0x4c]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4fc41d
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call ecx
jmp 0x4fc422
mov eax, dword [ebp - 0x5c]
lea ecx, [ebp - 0x44]
push 0x1bd7
push 0x56c740
push str.GameDownload::CMainUI::StartDownloadExternApk
mov dword [eax + 0x4ac], 1
mov dword [ebp - 0x58], 0
call fcn.00428d70
mov esi, eax
mov ecx, dword [ebp - 0x5c]
lea eax, [ebp - 0x58]
push 0
push fcn.0050c9e0
push eax
lea ecx, [ecx + 0x408]
mov byte [ebp - 4], 4
call fcn.0042ae10
mov ecx, 2
jmp 0x4fc375
mov ecx, edx
call dword [ebp - 0x58]
mov ecx, dword [sym.imp.KERNEL32.dll_HeapFree]
mov byte [ebp - 4], 1
add ebx, 0xfffffff0
mov eax, esi
lock xadd dword [ebx + 0xc], eax
dec eax
test eax, eax
jg 0x4fc45a
mov edx, dword [ebx]
push ebx
mov eax, dword [edx]
mov edi, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4fc456
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call ecx
jmp 0x4fc45a
mov ecx, edx
call edi
mov byte [ebp - 4], 0
mov eax, esi
mov ecx, dword [ebp - 0x50]
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x4fc492
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov edi, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4fc48e
mov eax, dword [edx + 4]
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
push 0
push dword [eax + 4]
call edi
jmp 0x4fc498
mov ecx, edx
call edi
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [ebp - 0x70]
mov dword [ebp - 4], 0xffffffff
lock xadd dword [ecx + 0xc], esi
dec esi
test esi, esi
jg 0x4fc4cb
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov esi, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4fc4c7
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call edi
jmp 0x4fc4cb
mov ecx, edx
call esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0049aa22
mov esp, ebp
pop ebp
ret