Function at 0x505200
Capabilities:
Access firewall settings via inetfwmgr
Check if file exists
Create directory
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x53b441
mov eax, dword fs:[0]
push eax
sub esp, 0x594
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 - 0x580], ebx
xor eax, eax
mov dword [ebp - 0x21c], 7
mov dword [ebp - 0x220], 0
mov word [ebp - 0x230], ax
mov dword [ebp - 4], eax
call fcn.00401980
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x505272
push 0x80004005
call fcn.00401b40
mov eax, dword [edx]
mov esi, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x505287
lock inc dword [edx + 0x14]
lea eax, [edx + 8]
jmp 0x50528b
mov ecx, edx
call esi
lea esi, [eax + 0x10]
mov dword [ebp - 0x58c], esi
mov byte [ebp - 4], 1
mov dword [ebp - 0x59c], 0
mov dword [ebp - 0x588], 0
call fcn.00401980
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x5052c8
push 0x80004005
call fcn.00401b40
mov eax, dword [edx]
mov edi, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x5052dd
lock inc dword [edx + 0x14]
lea eax, [edx + 8]
jmp 0x5052e1
mov ecx, edx
call edi
lea edi, [eax + 0x10]
mov dword [ebp - 0x598], edi
push 0x208
lea eax, [ebp - 0x218]
mov byte [ebp - 4], 2
push 0
push eax
call fcn.0049e130
add esp, 0xc
lea eax, [ebp - 0x218]
push 1
push 0x1a
push eax
push dword [ebx + 4]
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x50536c
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x598]
push str._sTencentTxGameAssistantGameDownload
push eax
call fcn.004023f0
mov edi, dword [ebp - 0x598]
add esp, 0xc
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x50536c
push ecx
mov ebx, esp
lea ecx, [edi - 0x10]
mov dword [ebp - 0x594], ebx
call fcn.004021e0
add eax, 0x10
mov dword [ebx], eax
call fcn.004e1680
mov ebx, dword [ebp - 0x580]
add esp, 4
cmp dword [ebx + 0x404], 0
je 0x50537f
mov dword [ebx + 0x998], 0
push dword [ebx + 0x998]
push 0x565878
push str.__s__P2pDownload__d_
call fcn.004e78a0
push eax
call fcn.004e76a0
lea ecx, [edi - 0x10]
add esp, 0x10
lea ebx, [esi - 0x10]
mov dword [ebp - 0x5a0], ecx
cmp ecx, ebx
je 0x50541c
cmp dword [ebx + 0xc], 0
lea esi, [ebx + 0xc]
jl 0x505407
mov eax, dword [ecx]
cmp eax, dword [ebx]
jne 0x505407
call fcn.004021e0
mov edi, eax
or ecx, 0xffffffff
lock xadd dword [esi], ecx
dec ecx
test ecx, ecx
jg 0x5053fc
mov edx, dword [ebx]
push ebx
mov ecx, dword [edx]
mov esi, dword [ecx + 4]
cmp ecx, vtable.ATL::CAtlStringMgr.0
jne 0x5053f8
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
lea esi, [edi + 0x10]
mov dword [ebp - 0x58c], esi
jmp 0x50541c
mov ecx, edx
call esi
lea esi, [edi + 0x10]
mov dword [ebp - 0x58c], esi
jmp 0x50541c
push dword [edi - 0xc]
lea ecx, [ebp - 0x58c]
push edi
call fcn.00402d50
mov esi, dword [ebp - 0x58c]
cmp dword [esi - 0xc], 0
jne 0x505465
lea eax, [ebp - 0x59c]
push eax
call fcn.004b010e
push dword [ebp - 0x59c]
mov ebx, dword [ebp - 0x580]
lea eax, [ebp - 0x58c]
push dword [ebx + 0x434]
push str._sdlcore__d
push eax
call fcn.004023f0
mov esi, dword [ebp - 0x58c]
add esp, 0x14
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
jmp 0x50546b
mov ebx, dword [ebp - 0x580]
mov ecx, dword [esi - 0x10]
lea edx, [esi - 0x10]
mov dword [ebp - 0x594], edx
mov eax, dword [ecx]
cmp eax, vtable.ATL::CAtlStringMgr.0
je 0x505488
call dword [eax + 0x10]
mov ecx, eax
lea edx, [esi - 0x10]
cmp dword [edx + 0xc], 0
lea eax, [edx + 0xc]
jl 0x50549c
cmp ecx, dword [edx]
jne 0x50549c
mov edi, edx
lock inc dword [eax]
jmp 0x5054d7
mov eax, dword [ecx]
push 2
push dword [edx + 4]
call dword [eax]
mov edi, eax
test edi, edi
jne 0x5054b0
call fcn.00402c20
mov eax, dword [esi - 0xc]
lea ecx, [edi + 0x10]
mov dword [edi + 4], eax
mov edx, dword [esi - 0xc]
lea eax, [edx*2 + 2]
push eax
push esi
lea edx, [edx*2 + 2]
call fcn.004c7670
add esp, 8
lea edx, [esi - 0x10]
add edi, 0x10
mov dword [ebp - 0x590], edi
lea ecx, [ebx + 0x4b0]
mov byte [ebp - 4], 3
mov ebx, dword [ecx]
sub ebx, 0x10
cmp edx, ebx
je 0x505578
cmp dword [ebx + 0xc], 0
jl 0x50556f
mov eax, dword [edx]
cmp eax, dword [ebx]
jne 0x50556f
mov ecx, edx
call fcn.004021e0
mov dword [ebp - 0x570], eax
lea edx, [ebx + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x505558
mov edx, dword [ebx]
push ebx
mov ecx, dword [edx]
mov esi, dword [ecx + 4]
cmp ecx, vtable.ATL::CAtlStringMgr.0
jne 0x505554
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [ebp - 0x580]
mov eax, dword [ebp - 0x570]
add eax, 0x10
mov dword [ecx + 0x4b0], eax
jmp 0x505578
mov ecx, edx
call esi
mov ecx, dword [ebp - 0x580]
mov eax, dword [ebp - 0x570]
add eax, 0x10
mov dword [ecx + 0x4b0], eax
jmp 0x505578
push dword [esi - 0xc]
push esi
call fcn.00402d50
call fcn.00401980
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x505594
push 0x80004005
call fcn.00401b40
mov eax, dword [edx]
mov esi, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x5055a9
lock inc dword [edx + 0x14]
lea eax, [edx + 8]
jmp 0x5055ad
mov ecx, edx
call esi
lea esi, [eax + 0x10]
mov dword [ebp - 0x57c], esi
push 0x565958
lea edx, [ebp - 0x590]
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x574]
call fcn.00401d60
add esp, 4
mov byte [ebp - 4], 5
lea ebx, [esi - 0x10]
mov edx, dword [eax]
lea ecx, [edx - 0x10]
cmp ecx, ebx
je 0x505662
cmp dword [ebx + 0xc], 0
lea esi, [ebx + 0xc]
jl 0x50564d
mov eax, dword [ecx]
cmp eax, dword [ebx]
jne 0x50564d
call fcn.004021e0
mov dword [ebp - 0x570], eax
or ecx, 0xffffffff
lock xadd dword [esi], ecx
dec ecx
test ecx, ecx
jg 0x50563c
mov edx, dword [ebx]
push ebx
mov ecx, dword [edx]
mov esi, dword [ecx + 4]
cmp ecx, vtable.ATL::CAtlStringMgr.0
jne 0x505638
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, dword [ebp - 0x570]
add esi, 0x10
mov dword [ebp - 0x57c], esi
jmp 0x505662
mov ecx, edx
call esi
mov esi, dword [ebp - 0x570]
add esi, 0x10
mov dword [ebp - 0x57c], esi
jmp 0x505662
push dword [edx - 0xc]
lea ecx, [ebp - 0x57c]
push edx
call fcn.00402d50
mov esi, dword [ebp - 0x57c]
mov byte [ebp - 4], 4
or eax, 0xffffffff
mov ecx, dword [ebp - 0x574]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x50569f
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov ebx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x50569b
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x50569f
mov ecx, edx
call ebx
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x505763
mov ecx, esi
call fcn.004c6030
test eax, eax
je 0x505763
push ecx
mov ecx, esp
mov dword [ebp - 0x578], esp
push dword [0x59ab94]
call fcn.00401ff0
mov byte [ebp - 4], 6
lea ebx, [esi - 0x10]
push ecx
mov dword [ebp - 0x574], esp
mov ecx, dword [ebx]
mov eax, dword [ecx]
cmp eax, vtable.ATL::CAtlStringMgr.0
je 0x5056ef
call dword [eax + 0x10]
mov ecx, eax
cmp dword [ebx + 0xc], 0
lea eax, [ebx + 0xc]
jl 0x505701
cmp ecx, dword [ebx]
jne 0x505701
lock inc dword [eax]
jmp 0x505748
mov eax, dword [ecx]
push 2
push dword [ebx + 4]
call dword [eax]
mov ecx, eax
mov dword [ebp - 0x570], ecx
test ecx, ecx
jne 0x50571b
call fcn.00402c20
mov eax, dword [ebx + 4]
mov dword [ecx + 4], eax
add ecx, 0x10
mov edx, dword [ebx + 4]
lea eax, [edx*2 + 2]
push eax
lea eax, [ebx + 0x10]
push eax
lea edx, [edx*2 + 2]
call fcn.004c7670
mov ebx, dword [ebp - 0x570]
add esp, 8
mov ecx, dword [ebp - 0x574]
lea eax, [ebx + 0x10]
mov dword [ecx], eax
mov byte [ebp - 4], 4
call fcn.004dcae0
add esp, 8
test eax, eax
jne 0x505788
mov eax, dword [ebp - 0x580]
mov edx, 0x8d
push 0x565938
push esi
mov ecx, dword [eax + 0x3f0]
call fcn.004e1010
add esp, 8
mov dword [ebp - 0x588], eax
push 0x565940
lea edx, [ebp - 0x590]
lea ecx, [ebp - 0x574]
call fcn.00401d60
add esp, 4
mov byte [ebp - 4], 7
lea ebx, [esi - 0x10]
mov edx, dword [eax]
lea ecx, [edx - 0x10]
cmp ecx, ebx
je 0x505830
cmp dword [ebx + 0xc], 0
lea esi, [ebx + 0xc]
jl 0x50581b
mov eax, dword [ecx]
cmp eax, dword [ebx]
jne 0x50581b
call fcn.004021e0
mov dword [ebp - 0x570], eax
or ecx, 0xffffffff
lock xadd dword [esi], ecx
dec ecx
test ecx, ecx
jg 0x50580a
mov edx, dword [ebx]
push ebx
mov ecx, dword [edx]
mov esi, dword [ecx + 4]
cmp ecx, vtable.ATL::CAtlStringMgr.0
jne 0x505806
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, dword [ebp - 0x570]
add esi, 0x10
mov dword [ebp - 0x57c], esi
jmp 0x505830
mov ecx, edx
call esi
mov esi, dword [ebp - 0x570]
add esi, 0x10
mov dword [ebp - 0x57c], esi
jmp 0x505830
push dword [edx - 0xc]
lea ecx, [ebp - 0x57c]
push edx
call fcn.00402d50
mov esi, dword [ebp - 0x57c]
mov byte [ebp - 4], 4
or eax, 0xffffffff
mov ecx, dword [ebp - 0x574]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x50586d
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov ebx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x505869
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x50586d
mov ecx, edx
call ebx
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x505931
mov ecx, esi
call fcn.004c6030
test eax, eax
je 0x505931
push ecx
mov ecx, esp
mov dword [ebp - 0x578], esp
push dword [0x59ab9c]
call fcn.00401ff0
mov byte [ebp - 4], 8
lea ebx, [esi - 0x10]
push ecx
mov dword [ebp - 0x574], esp
mov ecx, dword [ebx]
mov eax, dword [ecx]
cmp eax, vtable.ATL::CAtlStringMgr.0
je 0x5058bd
call dword [eax + 0x10]
mov ecx, eax
cmp dword [ebx + 0xc], 0
lea eax, [ebx + 0xc]
jl 0x5058cf
cmp ecx, dword [ebx]
jne 0x5058cf
lock inc dword [eax]
jmp 0x505916
mov eax, dword [ecx]
push 2
push dword [ebx + 4]
call dword [eax]
mov ecx, eax
mov dword [ebp - 0x570], ecx
test ecx, ecx
jne 0x5058e9
call fcn.00402c20
mov eax, dword [ebx + 4]
mov dword [ecx + 4], eax
add ecx, 0x10
mov edx, dword [ebx + 4]
lea eax, [edx*2 + 2]
push eax
lea eax, [ebx + 0x10]
push eax
lea edx, [edx*2 + 2]
call fcn.004c7670
mov ebx, dword [ebp - 0x570]
add esp, 8
mov ecx, dword [ebp - 0x574]
lea eax, [ebx + 0x10]
mov dword [ecx], eax
mov byte [ebp - 4], 4
call fcn.004dcae0
add esp, 8
test eax, eax
jne 0x505956
mov eax, dword [ebp - 0x580]
mov edx, 0x8e
push 0x5659a0
push esi
mov ecx, dword [eax + 0x3f0]
call fcn.004e1010
add esp, 8
mov dword [ebp - 0x588], eax
push 0x5659a8
lea edx, [ebp - 0x590]
lea ecx, [ebp - 0x574]
call fcn.00401d60
add esp, 4
mov byte [ebp - 4], 9
lea ebx, [esi - 0x10]
mov edx, dword [eax]
lea ecx, [edx - 0x10]
cmp ecx, ebx
je 0x5059fe
cmp dword [ebx + 0xc], 0
lea esi, [ebx + 0xc]
jl 0x5059e9
mov eax, dword [ecx]
cmp eax, dword [ebx]
jne 0x5059e9
call fcn.004021e0
mov dword [ebp - 0x570], eax
or ecx, 0xffffffff
lock xadd dword [esi], ecx
dec ecx
test ecx, ecx
jg 0x5059d8
mov edx, dword [ebx]
push ebx
mov ecx, dword [edx]
mov esi, dword [ecx + 4]
cmp ecx, vtable.ATL::CAtlStringMgr.0
jne 0x5059d4
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, dword [ebp - 0x570]
add esi, 0x10
mov dword [ebp - 0x57c], esi
jmp 0x5059fe
mov ecx, edx
call esi
mov esi, dword [ebp - 0x570]
add esi, 0x10
mov dword [ebp - 0x57c], esi
jmp 0x5059fe
push dword [edx - 0xc]
lea ecx, [ebp - 0x57c]
push edx
call fcn.00402d50
mov esi, dword [ebp - 0x57c]
mov byte [ebp - 4], 4
or eax, 0xffffffff
mov ecx, dword [ebp - 0x574]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x505a3b
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov ebx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x505a37
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x505a3b
mov ecx, edx
call ebx
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x505aff
mov ecx, esi
call fcn.004c6030
test eax, eax
je 0x505aff
push ecx
mov ecx, esp
mov dword [ebp - 0x578], esp
push dword [0x59ab84]
call fcn.00401ff0
mov byte [ebp - 4], 0xa
lea ebx, [esi - 0x10]
push ecx
mov dword [ebp - 0x574], esp
mov ecx, dword [ebx]
mov eax, dword [ecx]
cmp eax, vtable.ATL::CAtlStringMgr.0
je 0x505a8b
call dword [eax + 0x10]
mov ecx, eax
cmp dword [ebx + 0xc], 0
lea eax, [ebx + 0xc]
jl 0x505a9d
cmp ecx, dword [ebx]
jne 0x505a9d
lock inc dword [eax]
jmp 0x505ae4
mov eax, dword [ecx]
push 2
push dword [ebx + 4]
call dword [eax]
mov ecx, eax
mov dword [ebp - 0x570], ecx
test ecx, ecx
jne 0x505ab7
call fcn.00402c20
mov eax, dword [ebx + 4]
mov dword [ecx + 4], eax
add ecx, 0x10
mov edx, dword [ebx + 4]
lea eax, [edx*2 + 2]
push eax
lea eax, [ebx + 0x10]
push eax
lea edx, [edx*2 + 2]
call fcn.004c7670
mov ebx, dword [ebp - 0x570]
add esp, 8
mov ecx, dword [ebp - 0x574]
lea eax, [ebx + 0x10]
mov dword [ecx], eax
mov byte [ebp - 4], 4
call fcn.004dcae0
add esp, 8
test eax, eax
jne 0x505b24
mov eax, dword [ebp - 0x580]
mov edx, 0x8c
push 0x56597c
push esi
mov ecx, dword [eax + 0x3f0]
call fcn.004e1010
add esp, 8
mov dword [ebp - 0x588], eax
push 0x565984
lea edx, [ebp - 0x590]
lea ecx, [ebp - 0x574]
call fcn.00401d60
add esp, 4
mov byte [ebp - 4], 0xb
lea ebx, [esi - 0x10]
mov edx, dword [eax]
lea ecx, [edx - 0x10]
cmp ecx, ebx
je 0x505bcc
cmp dword [ebx + 0xc], 0
lea esi, [ebx + 0xc]
jl 0x505bb7
mov eax, dword [ecx]
cmp eax, dword [ebx]
jne 0x505bb7
call fcn.004021e0
mov dword [ebp - 0x570], eax
or ecx, 0xffffffff
lock xadd dword [esi], ecx
dec ecx
test ecx, ecx
jg 0x505ba6
mov edx, dword [ebx]
push ebx
mov ecx, dword [edx]
mov esi, dword [ecx + 4]
cmp ecx, vtable.ATL::CAtlStringMgr.0
jne 0x505ba2
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, dword [ebp - 0x570]
add esi, 0x10
mov dword [ebp - 0x57c], esi
jmp 0x505bcc
mov ecx, edx
call esi
mov esi, dword [ebp - 0x570]
add esi, 0x10
mov dword [ebp - 0x57c], esi
jmp 0x505bcc
push dword [edx - 0xc]
lea ecx, [ebp - 0x57c]
push edx
call fcn.00402d50
mov esi, dword [ebp - 0x57c]
mov byte [ebp - 4], 4
or eax, 0xffffffff
mov ecx, dword [ebp - 0x574]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x505c09
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov ebx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x505c05
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x505c09
mov ecx, edx
call ebx
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x505cd1
mov ecx, esi
call fcn.004c6030
test eax, eax
je 0x505cd1
push ecx
mov ecx, esp
mov dword [ebp - 0x578], esp
push dword [0x59ab8c]
call fcn.00401ff0
mov byte [ebp - 4], 0xc
lea ebx, [esi - 0x10]
push ecx
mov dword [ebp - 0x574], esp
mov ecx, dword [ebx]
mov eax, dword [ecx]
cmp eax, vtable.ATL::CAtlStringMgr.0
je 0x505c59
call dword [eax + 0x10]
mov ecx, eax
cmp dword [ebx + 0xc], 0
lea eax, [ebx + 0xc]
jl 0x505c6b
cmp ecx, dword [ebx]
jne 0x505c6b
lock inc dword [eax]
jmp 0x505cb2
mov eax, dword [ecx]
push 2
push dword [ebx + 4]
call dword [eax]
mov ecx, eax
mov dword [ebp - 0x570], ecx
test ecx, ecx
jne 0x505c85
call fcn.00402c20
mov eax, dword [ebx + 4]
mov dword [ecx + 4], eax
add ecx, 0x10
mov edx, dword [ebx + 4]
lea eax, [edx*2 + 2]
push eax
lea eax, [ebx + 0x10]
push eax
lea edx, [edx*2 + 2]
call fcn.004c7670
mov ebx, dword [ebp - 0x570]
add esp, 8
mov ecx, dword [ebp - 0x574]
lea eax, [ebx + 0x10]
mov dword [ecx], eax
mov byte [ebp - 4], 4
call fcn.004dcae0
add esp, 8
test eax, eax
jne 0x505da0
mov ebx, dword [ebp - 0x580]
mov edx, 0x8f
push 0x565a68
push esi
mov ecx, dword [ebx + 0x3f0]
call fcn.004e1010
add esp, 8
mov dword [ebp - 0x588], eax
test eax, eax
jne 0x505d09
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x505da0
lea edx, [ebx + 0x938]
mov ebx, dword [edx]
lea ecx, [esi - 0x10]
sub ebx, 0x10
cmp ecx, ebx
je 0x505da0
cmp dword [ebx + 0xc], 0
jl 0x505d95
mov eax, dword [ecx]
cmp eax, dword [ebx]
jne 0x505d95
call fcn.004021e0
mov dword [ebp - 0x570], eax
lea edx, [ebx + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x505d7e
mov edx, dword [ebx]
push ebx
mov ecx, dword [edx]
mov eax, dword [ecx + 4]
cmp ecx, vtable.ATL::CAtlStringMgr.0
jne 0x505d7a
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [ebp - 0x580]
mov eax, dword [ebp - 0x570]
add eax, 0x10
mov dword [ecx + 0x938], eax
jmp 0x505da0
mov ecx, edx
call eax
mov ecx, dword [ebp - 0x580]
mov eax, dword [ebp - 0x570]
add eax, 0x10
mov dword [ecx + 0x938], eax
jmp 0x505da0
push dword [esi - 0xc]
mov ecx, edx
push esi
call fcn.00402d50
test esi, esi
je 0x50607c
push 0
mov dword [ebp - 0x584], 0
call dword [sym.imp.ole32.dll_CoInitialize]
mov ebx, eax
mov dword [ebp - 0x570], ebx
cmp ebx, 0x80010106
je 0x505dd2
test ebx, ebx
js 0x505e7e
lea eax, [ebp - 0x574]
mov dword [ebp - 0x574], 0
push eax
push 0x5792e0
push 1
push 0
push 0x5792d0
mov dword [ebp - 0x578], 0
mov dword [ebp - 0x584], 0
call dword [sym.imp.ole32.dll_CoCreateInstance]
mov ebx, eax
test ebx, ebx
js 0x505e3f
mov eax, dword [ebp - 0x574]
lea edx, [ebp - 0x578]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x1c]
mov ebx, eax
test ebx, ebx
js 0x505e3f
mov eax, dword [ebp - 0x578]
lea edx, [ebp - 0x584]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x1c]
mov ebx, eax
mov ecx, dword [ebp - 0x578]
test ecx, ecx
je 0x505e4f
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov ecx, dword [ebp - 0x574]
test ecx, ecx
je 0x505e5f
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
test ebx, ebx
js 0x505e78
mov ecx, dword [ebp - 0x584]
mov edx, esi
push 0x565a70
call fcn.004cc6c0
add esp, 4
mov ebx, dword [ebp - 0x570]
mov ecx, dword [ebp - 0x584]
test ecx, ecx
je 0x505e8e
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
test ebx, ebx
js 0x505e98
call dword [sym.imp.ole32.dll_CoUninitialize]
push 0
mov dword [ebp - 0x584], 0
call dword [sym.imp.ole32.dll_CoInitialize]
mov ebx, eax
mov dword [ebp - 0x570], ebx
cmp ebx, 0x80010106
je 0x505ec2
test ebx, ebx
js 0x505f70
lea eax, [ebp - 0x578]
mov dword [ebp - 0x578], 0
push eax
push 0x5792e0
push 1
push 0
push 0x5792d0
mov dword [ebp - 0x574], 0
mov dword [ebp - 0x584], 0
call dword [sym.imp.ole32.dll_CoCreateInstance]
mov ebx, eax
test ebx, ebx
js 0x505f31
mov eax, dword [ebp - 0x578]
lea edx, [ebp - 0x574]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x1c]
mov ebx, eax
test ebx, ebx
js 0x505f31
mov eax, dword [ebp - 0x574]
lea edx, [ebp - 0x584]
push edx
push 0
push eax
mov ecx, dword [eax]
call dword [ecx + 0x20]
mov ebx, eax
mov ecx, dword [ebp - 0x574]
test ecx, ecx
je 0x505f41
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov ecx, dword [ebp - 0x578]
test ecx, ecx
je 0x505f51
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
test ebx, ebx
js 0x505f6a
mov ecx, dword [ebp - 0x584]
mov edx, esi
push 0x565a70
call fcn.004cc6c0
add esp, 4
mov ebx, dword [ebp - 0x570]
mov ecx, dword [ebp - 0x584]
test ecx, ecx
je 0x505f80
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
test ebx, ebx
js 0x505f8a
call dword [sym.imp.ole32.dll_CoUninitialize]
push 0
mov dword [ebp - 0x584], 0
call dword [sym.imp.ole32.dll_CoInitialize]
mov ebx, eax
mov dword [ebp - 0x570], ebx
cmp ebx, 0x80010106
je 0x505fb4
test ebx, ebx
js 0x506062
lea eax, [ebp - 0x578]
mov dword [ebp - 0x578], 0
push eax
push 0x5792e0
push 1
push 0
push 0x5792d0
mov dword [ebp - 0x574], 0
mov dword [ebp - 0x584], 0
call dword [sym.imp.ole32.dll_CoCreateInstance]
mov ebx, eax
test ebx, ebx
js 0x506023
mov eax, dword [ebp - 0x578]
lea edx, [ebp - 0x574]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x1c]
mov ebx, eax
test ebx, ebx
js 0x506023
mov eax, dword [ebp - 0x574]
lea edx, [ebp - 0x584]
push edx
push 1
push eax
mov ecx, dword [eax]
call dword [ecx + 0x20]
mov ebx, eax
mov ecx, dword [ebp - 0x574]
test ecx, ecx
je 0x506033
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov ecx, dword [ebp - 0x578]
test ecx, ecx
je 0x506043
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
test ebx, ebx
js 0x50605c
mov ecx, dword [ebp - 0x584]
mov edx, esi
push 0x565a70
call fcn.004cc6c0
add esp, 4
mov ebx, dword [ebp - 0x570]
mov ecx, dword [ebp - 0x584]
test ecx, ecx
je 0x506072
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
test ebx, ebx
js 0x50607c
call dword [sym.imp.ole32.dll_CoUninitialize]
mov eax, dword fs:[0x2c]
mov ecx, dword [eax]
mov eax, dword [0x59fee8]
mov dword [ebp - 0x570], ecx
cmp eax, dword [ecx + 4]
jle 0x5060d1
push 0x59fee8
call fcn.0049af28
add esp, 4
cmp dword [0x59fee8], 0xffffffff
jne 0x5060d1
mov byte [ebp - 4], 0xd
call fcn.004e7150
push 0x53eaa0
call fcn.0049b282
push 0x59fee8
mov byte [ebp - 4], 4
call fcn.0049aee9
add esp, 8
push 0x565a18
push str.__s__Add_To_Firewall_Finish
push 0x59feec
call fcn.004e76a0
push 0x5659fc
lea edx, [ebp - 0x590]
lea ecx, [ebp - 0x578]
call fcn.00401d60
add esp, 0x10
mov byte [ebp - 4], 0xe
lea ebx, [esi - 0x10]
mov edx, dword [eax]
lea ecx, [edx - 0x10]
cmp ecx, ebx
je 0x50618d
cmp dword [ebx + 0xc], 0
lea esi, [ebx + 0xc]
jl 0x506178
mov eax, dword [ecx]
cmp eax, dword [ebx]
jne 0x506178
call fcn.004021e0
mov dword [ebp - 0x574], eax
or ecx, 0xffffffff
lock xadd dword [esi], ecx
dec ecx
test ecx, ecx
jg 0x506167
mov edx, dword [ebx]
push ebx
mov ecx, dword [edx]
mov esi, dword [ecx + 4]
cmp ecx, vtable.ATL::CAtlStringMgr.0
jne 0x506163
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, dword [ebp - 0x574]
add esi, 0x10
mov dword [ebp - 0x57c], esi
jmp 0x50618d
mov ecx, edx
call esi
mov esi, dword [ebp - 0x574]
add esi, 0x10
mov dword [ebp - 0x57c], esi
jmp 0x50618d
push dword [edx - 0xc]
lea ecx, [ebp - 0x57c]
push edx
call fcn.00402d50
mov esi, dword [ebp - 0x57c]
mov byte [ebp - 4], 4
or ebx, 0xffffffff
mov ecx, dword [ebp - 0x578]
mov eax, ebx
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x5061d8
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov edx, dword [eax + 4]
mov dword [ebp - 0x574], edx
mov edx, dword [ecx]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x5061d0
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x5061d8
mov ecx, edx
call dword [ebp - 0x574]
push esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ecx, dword [ebp - 0x580]
mov dword [ecx + 0x41c], eax
test eax, eax
jne 0x506262
add esi, 0xfffffff0
mov byte [ebp - 4], 3
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x506223
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x506221
mov eax, dword [ecx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x506223
call edx
mov byte [ebp - 4], 2
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x506489
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x506487
mov eax, dword [ecx + 4]
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
push 0
push dword [eax + 4]
call ebx
jmp 0x50648f
push 1
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x506273
xor ebx, ebx
jmp 0x506277
call eax
mov ebx, eax
mov eax, dword [ebp - 0x580]
mov dword [eax + 0x420], ebx
test ebx, ebx
jne 0x506292
add esi, 0xfffffff0
or ebx, 0xffffffff
jmp 0x5061f2
push 0x334
lea eax, [ebp - 0x564]
push 0
push eax
call fcn.0049e130
add esp, 0xc
mov dword [ebp - 0x56c], 0x5de
mov dword [ebp - 0x568], 1
lea ecx, [ebp - 0x56c]
mov eax, dword [ebx]
push ecx
mov ecx, ebx
call dword [eax]
test eax, eax
jne 0x5062d8
add esi, 0xfffffff0
or ebx, 0xffffffff
jmp 0x5061f2
mov ebx, dword [ebp - 0x580]
mov ecx, dword [ebx + 0x420]
lea edx, [ebx + 0x3c4]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebx + 0x420]
push 1
mov eax, dword [ecx]
call dword [eax + 0x3c]
mov ecx, dword [ebx + 0x420]
push dword [0x59fbd8]
mov eax, dword [ecx]
call dword [eax + 0x1c]
cmp dword [0x59fbd0], 0
mov ebx, dword [ebp - 0x570]
jbe 0x50639a
mov eax, dword [0x59fee8]
cmp eax, dword [ebx + 4]
jle 0x506364
push 0x59fee8
call fcn.0049af28
add esp, 4
cmp dword [0x59fee8], 0xffffffff
jne 0x506364
mov byte [ebp - 4], 0xf
call fcn.004e7150
push 0x53eaa0
call fcn.0049b282
push 0x59fee8
mov byte [ebp - 4], 4
call fcn.0049aee9
add esp, 8
push dword [0x59fbd0]
push 0x565b18
push str.__s__Download_Speed_Limit_At__d
push 0x59feec
call fcn.004e76a0
mov eax, dword [ebp - 0x580]
add esp, 0x10
mov ecx, dword [eax + 0x420]
push dword [0x59fbd0]
push 0
mov eax, dword [ecx]
call dword [eax + 0x20]
cmp dword [0x59fbd4], 0
jbe 0x506420
mov eax, dword [0x59fee8]
cmp eax, dword [ebx + 4]
jle 0x5063ea
push 0x59fee8
call fcn.0049af28
add esp, 4
cmp dword [0x59fee8], 0xffffffff
jne 0x5063ea
mov byte [ebp - 4], 0x10
call fcn.004e7150
push 0x53eaa0
call fcn.0049b282
push 0x59fee8
mov byte [ebp - 4], 4
call fcn.0049aee9
add esp, 8
push dword [0x59fbd4]
push 0x565ac8
push str.__s__Upload_Speed_Limit_At__d
push 0x59feec
call fcn.004e76a0
mov eax, dword [ebp - 0x580]
add esp, 0x10
mov ecx, dword [eax + 0x420]
push dword [0x59fbd4]
push 1
mov eax, dword [ecx]
call dword [eax + 0x20]
or ebx, 0xffffffff
mov dword [ebp - 0x588], 1
mov byte [ebp - 4], 3
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x506461
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x50645f
mov eax, dword [ecx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x506461
call edx
mov byte [ebp - 4], 2
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x506489
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
je 0x50624d
call edx
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
push str.GameDownload::CMainUI::InitDLCoreModule
push str.__s__InitDLCoreModule_Finish
call fcn.004e78a0
push eax
call fcn.004e76a0
mov esi, dword [ebp - 0x5a0]
or edi, 0xffffffff
add esp, 0xc
mov byte [ebp - 4], 1
mov eax, edi
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x5064dd
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x5064db
mov eax, dword [ecx + 4]
push 0
push dword [eax + 4]
call ebx
jmp 0x5064dd
call edx
mov esi, dword [ebp - 0x594]
mov byte [ebp - 4], 0
lock xadd dword [esi + 0xc], edi
dec edi
test edi, edi
jg 0x50650e
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x50650c
mov eax, dword [ecx + 4]
push 0
push dword [eax + 4]
call ebx
jmp 0x50650e
call edx
mov eax, dword [ebp - 0x588]
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