Function at 0x4ed0c0
Capabilities:
Check for time delay via gettickcount
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x53973e
mov eax, dword fs:[0]
push eax
sub esp, 0x264
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 edi, ecx
lea ecx, [ebp - 0x270]
mov dword [edi + 0x994], 0xc8
push ecx
lea ecx, [ebp - 0x26c]
mov dword [ebp - 0x270], 0xc8
push ecx
lea ecx, [edi + 0x424]
call fcn.0042be10
cmp dword [edi + 0x420], 0
mov ebx, dword [ebp - 0x26c]
je 0x4ed852
lea ecx, [ebp - 0x120]
call fcn.00428cc0
lea esi, [ebx + 0xc8]
mov dword [ebp - 4], 0
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [ebx + 0xb0]
mov eax, dword [ebx + 0xb4]
mov ecx, dword [ebx + 0xac]
sub eax, edx
sar eax, 2
mov dword [ebp - 0x25c], ecx
mov dword [ebp - 0x260], edx
cmp eax, ecx
ja 0x4ed180
push 0x57962c
call fcn.00498105
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 0x25c]
mov ecx, dword [ebp - 0x260]
mov edx, dword [ecx + eax*4]
cmp word [edx], 0
jne 0x4ed1a0
xor ecx, ecx
jmp 0x4ed1b4
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4ed1a5
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x120]
call fcn.00405040
mov edx, dword [ebx + 0x60]
cmp word [edx], 0
jne 0x4ed1ce
xor ecx, ecx
jmp 0x4ed1e2
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4ed1d3
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x108]
call fcn.00405040
cmp dword [ebp - 0xf4], 8
lea ecx, [ebp - 0x108]
lea eax, [ebp - 0x120]
mov dword [ebp - 0x78], 0
cmovae ecx, dword [ebp - 0x108]
cmp dword [ebp - 0x10c], 8
push ecx
cmovae eax, dword [ebp - 0x120]
push eax
push 0x561898
push str.__s__Ready_To_Download._Url:__s__FileName:__s
mov dword [ebp - 0x74], 0
call fcn.004e78a0
push eax
call fcn.004e76a0
add esp, 0x14
lea ecx, [ebp - 0x28]
push dword [ebx + 0x60]
call fcn.00404170
mov byte [ebp - 4], 1
lea eax, [ebp - 0x28]
cmp dword [ebp - 0x14], 8
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4ed2a8
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x4ed2a8
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
push ecx
cmovae eax, dword [ebp - 0x28]
mov ecx, esp
push eax
call fcn.00401ff0
call fcn.004e1680
add esp, 4
mov esi, 0xa
nop dword [eax]
cmp dword [ebp - 0xf4], 8
lea eax, [ebp - 0x108]
cmovae eax, dword [ebp - 0x108]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4ed312
cmp dword [ebp - 0xf4], 8
lea eax, [ebp - 0x108]
push ecx
cmovae eax, dword [ebp - 0x108]
mov ecx, esp
push eax
call fcn.00401ff0
call fcn.004e0050
add esp, 4
test eax, eax
jne 0x4ed312
push 0x3e8
dec esi
mov dword [edi + 0x400], 0x578
call dword [sym.imp.KERNEL32.dll_Sleep]
test esi, esi
jg 0x4ed2b0
cmp dword [ebp - 0xf4], 8
lea eax, [ebp - 0x108]
push ecx
cmovae eax, dword [ebp - 0x108]
mov ecx, esp
push eax
call fcn.00401ff0
call fcn.004e0050
add esp, 4
test eax, eax
jne 0x4ed4a2
push 1
push ecx
lea eax, [ebp - 0x25c]
mov dword [ebp - 0x25c], 0x2e
push eax
lea ecx, [ebp - 0x108]
call fcn.00404200
mov esi, eax
cmp esi, 0xffffffff
je 0x4ed51e
push esi
push 0
lea eax, [ebp - 0x138]
push eax
lea ecx, [ebp - 0x108]
call fcn.00404000
mov byte [ebp - 4], 2
cmp dword [eax + 0x14], 8
jb 0x4ed38a
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x264]
call fcn.00401ff0
lea ecx, [ebp - 0x138]
mov byte [ebp - 4], 4
call fcn.00403110
push 0xffffffffffffffff
push esi
lea eax, [ebp - 0x150]
push eax
lea ecx, [ebp - 0x108]
call fcn.00404000
mov byte [ebp - 4], 5
cmp dword [eax + 0x14], 8
jb 0x4ed3c6
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x25c]
call fcn.00401ff0
lea ecx, [ebp - 0x150]
call fcn.00403110
lea ecx, [ebp - 0x260]
call fcn.00402e50
mov byte [ebp - 4], 8
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
lea eax, [ebp - 0x260]
push 0x5618e4
push eax
call fcn.004023f0
mov eax, dword [ebp - 0x260]
lea ecx, [ebp - 0x264]
add esp, 0xc
push dword [eax - 0xc]
push eax
call fcn.00402320
mov eax, dword [ebp - 0x25c]
lea ecx, [ebp - 0x264]
push dword [eax - 0xc]
push eax
call fcn.00402320
push ecx
mov esi, esp
mov dword [ebp - 0x268], esi
mov ecx, dword [ebp - 0x264]
lea ecx, [ecx - 0x10]
call fcn.004021e0
add eax, 0x10
mov dword [esi], eax
call fcn.004e0050
add esp, 4
test eax, eax
je 0x4ed4e3
lea eax, [ebp - 0x264]
push eax
lea ecx, [ebx + 0x60]
call fcn.00401f90
push dword [ebp - 0x264]
lea ecx, [ebp - 0x108]
call fcn.00405170
lea ecx, [ebp - 0x260]
call fcn.00402ed0
lea ecx, [ebp - 0x25c]
call fcn.00402ed0
lea ecx, [ebp - 0x264]
mov byte [ebp - 4], 1
call fcn.00402ed0
cmp dword [edi + 0x404], 0
mov ecx, 1
mov eax, dword [ebp - 0x80]
cmovne eax, ecx
mov dword [ebp - 0x80], eax
inc dword [ebx + 0x28]
cmp dword [ebx + 0x28], 0xa
jbe 0x4ed538
mov eax, dword [edi]
mov ecx, edi
push 0x44c
push 0xc8
mov dword [edi + 0x400], 0x44c
call dword [eax + 0xe0]
jmp 0x4ed81e
push dword [edi + 0x400]
mov eax, dword [edi]
mov ecx, edi
push 0xc8
call dword [eax + 0xe0]
lea ecx, [ebp - 0x260]
call fcn.00402ed0
lea ecx, [ebp - 0x25c]
call fcn.00402ed0
lea ecx, [ebp - 0x264]
call fcn.00402ed0
jmp 0x4ed81e
push dword [edi + 0x400]
mov eax, dword [edi]
mov ecx, edi
push 0xc8
call dword [eax + 0xe0]
jmp 0x4ed81e
mov dword [ebx + 0x1c], 0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push ecx
mov dword [ebx + 0x34], eax
mov esi, esp
lea eax, [ebx + 0x90]
mov dword [ebp - 0x268], esi
mov dword [edi + 0x400], 0x3e8
mov ecx, dword [eax]
sub ecx, 0x10
mov dword [ebp - 0x260], eax
call fcn.004021e0
add eax, 0x10
mov ecx, edi
mov dword [esi], eax
call fcn.004f4ea0
cmp dword [ebp - 0x10c], 8
lea eax, [ebp - 0x120]
lea ecx, [ebp - 0x1d0]
cmovae eax, dword [ebp - 0x120]
push 0
mov dword [ebp - 0x1d4], ecx
lea ecx, [ebp - 0x1d4]
push eax
call fcn.0042ac40
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x58]
push dword [ebp - 0x1d4]
call fcn.00409230
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0x1d0]
mov eax, dword [ebp - 0x1d4]
cmp eax, ecx
je 0x4ed5da
push eax
call fcn.004a51fb
add esp, 4
cmp dword [ebp - 0xf4], 8
lea eax, [ebp - 0x108]
lea ecx, [ebp - 0x254]
cmovae eax, dword [ebp - 0x108]
push 0xfde9
mov dword [ebp - 0x258], ecx
lea ecx, [ebp - 0x258]
push eax
call fcn.0042ac40
mov byte [ebp - 4], 0xc
lea ecx, [ebp - 0x40]
push dword [ebp - 0x258]
call fcn.00409230
mov byte [ebp - 4], 0xe
lea ecx, [ebp - 0x254]
mov eax, dword [ebp - 0x258]
cmp eax, ecx
je 0x4ed63a
push eax
call fcn.004a51fb
add esp, 4
cmp dword [ebp - 0x2c], 0x10
lea esi, [ebp - 0x40]
mov ecx, dword [edi + 0x420]
lea edx, [ebp - 0x58]
cmovae esi, dword [ebp - 0x40]
cmp dword [ebp - 0x44], 0x10
push 0
cmovae edx, dword [ebp - 0x58]
mov eax, dword [ecx]
push 0x553f3a
push dword [edi + 0x998]
push esi
push edx
call dword [eax + 8]
mov esi, eax
test esi, esi
je 0x4ed6d4
cmp esi, 0xffffffff
je 0x4ed6d4
cmp dword [ebp - 0x2c], 0x10
lea ecx, [ebp - 0x40]
lea eax, [ebp - 0x58]
cmovae ecx, dword [ebp - 0x40]
cmp dword [ebp - 0x44], 0x10
push ecx
cmovae eax, dword [ebp - 0x58]
push eax
push esi
push 0x561a20
push str.__s__Create_Task_Succ._TaskId__d__Url__S__FileName__S_
call fcn.004e78a0
push eax
call fcn.004e76a0
add esp, 0x18
mov dword [ebp - 0x25c], 0xc8
lea eax, [ebp - 0x25c]
lea ecx, [edi + 0x424]
push eax
lea eax, [ebp - 0x26c]
push eax
call fcn.0042be10
mov eax, dword [ebp - 0x26c]
mov dword [eax + 0x24], esi
jmp 0x4ed704
cmp dword [ebp - 0x2c], 0x10
lea ecx, [ebp - 0x40]
lea eax, [ebp - 0x58]
cmovae ecx, dword [ebp - 0x40]
cmp dword [ebp - 0x44], 0x10
push ecx
cmovae eax, dword [ebp - 0x58]
push eax
push 0x561960
push 0x5618f8
call fcn.004e78a0
push eax
call fcn.004e76a0
add esp, 0x14
mov ecx, dword [edi + 0x420]
push esi
mov eax, dword [ecx]
call dword [eax + 0x10]
test eax, eax
je 0x4ed789
mov eax, dword [edi]
mov ecx, edi
push 0
push 0
call dword [eax + 0xb0]
mov ebx, dword [ebp - 0x260]
mov dword [edi + 0x3fc], 0xa
mov eax, dword [ebx]
cmp dword [eax - 4], 1
jle 0x4ed744
push dword [eax - 0xc]
mov ecx, ebx
call fcn.00402b70
sub esp, 0x18
mov ecx, esp
push dword [ebx]
call fcn.00404170
push 6
mov ecx, edi
call fcn.004ee360
cmp dword [ebp - 0xf4], 8
lea eax, [ebp - 0x108]
cmovae eax, dword [ebp - 0x108]
push eax
push esi
push 0x561a70
push 0x56185c
call fcn.004e78a0
push eax
call fcn.004e76a0
add esp, 0x14
jmp 0x4ed7d0
cmp dword [ebp - 0xf4], 8
lea eax, [ebp - 0x108]
cmovae eax, dword [ebp - 0x108]
push eax
push esi
push str.GameDownload::CMainUI::DownloadBundle
push str._ERROR____s_:_Start_Task_Fail._TaskId:__s
call fcn.004e78a0
push eax
call fcn.004e76a0
mov eax, dword [ebx + 0x40]
add esp, 0x14
mov edx, dword [edi]
mov ecx, edi
mov dword [edi + 0x400], eax
push eax
push 0xc8
call dword [edx + 0xe0]
mov eax, dword [ebp - 0x2c]
cmp eax, 0x10
jb 0x4ed7e5
inc eax
lea ecx, [ebp - 0x40]
push eax
push dword [ebp - 0x40]
call fcn.00405350
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x2c], 0xf
mov dword [ebp - 0x30], 0
mov byte [ebp - 0x40], 0
cmp eax, 0x10
jb 0x4ed80c
inc eax
lea ecx, [ebp - 0x58]
push eax
push dword [ebp - 0x58]
call fcn.00405350
mov dword [ebp - 0x44], 0xf
mov dword [ebp - 0x48], 0
mov byte [ebp - 0x58], 0
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x4ed833
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00403010
xor eax, eax
mov dword [ebp - 0x14], 7
lea ecx, [ebp - 0x120]
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
call fcn.0042a1a0
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