Function at 0x511880
Capabilities:
Check http status code
Check if file exists
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x53c3d9
mov eax, dword fs:[0]
push eax
sub esp, 0x15c
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
push dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov ebx, 1
push esi
push 0x567588
push str.__s__compId__d__dwErrorCode__d_
call fcn.004e78a0
push eax
call fcn.004e76a0
add esp, 0x14
lea ecx, [ebp - 0x150]
call fcn.00429b90
lea eax, [ebp - 0x150]
mov dword [ebp - 4], 0
push eax
push esi
mov ecx, edi
call fcn.0050a9c0
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x110], eax
lea eax, [ebp - 0x150]
push ecx
push eax
mov dword [ebp - 0x10c], ebx
call fcn.0044c609
mov ecx, eax
call fcn.0042afe0
lea ecx, [ebp - 0x150]
mov dword [ebp - 4], 0xffffffff
call fcn.0042a6a0
call fcn.00401980
mov ecx, eax
xor eax, eax
test ecx, ecx
setne al
test eax, eax
jne 0x511946
push 0x80004005
call fcn.00401b40
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x51195b
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x51195d
call edx
lea esi, [eax + 0x10]
mov dword [ebp - 0x154], esi
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x168]
push ecx
lea ecx, [ebp - 0x15c]
mov dword [ebp - 4], 1
push ecx
lea ecx, [edi + 0x424]
mov dword [ebp - 0x168], eax
call fcn.0042be10
mov eax, dword [ebp - 0x15c]
lea ecx, [esi - 0x10]
mov dword [ebp - 0x158], ecx
mov edx, dword [eax + 0x60]
lea eax, [edx - 0x10]
mov dword [ebp - 0x160], eax
cmp eax, ecx
je 0x5119ec
cmp dword [ecx + 0xc], 0
jl 0x5119dd
mov eax, dword [eax]
cmp eax, dword [ecx]
jne 0x5119dd
mov ecx, dword [ebp - 0x160]
call fcn.004021e0
mov ecx, dword [ebp - 0x158]
mov esi, eax
call fcn.00402e90
lea eax, [esi + 0x10]
mov dword [ebp - 0x154], eax
jmp 0x5119ec
push dword [edx - 0xc]
lea ecx, [ebp - 0x154]
push edx
call fcn.00402d50
push 4
push 0x56648c
lea ecx, [ebp - 0x154]
call fcn.00402320
mov esi, dword [ebp - 0x154]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x511a30
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push eax
push esi
push str.GameDownload::CMainUI::OnCommonDownloadFail
push str.__s__DelTtdFile__s__Ret__d_
call fcn.004e78a0
push eax
call fcn.004e76a0
add esp, 0x14
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x511a68
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x511a66
mov eax, dword [ecx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x511a68
call edx
mov ecx, dword [ebp + 8]
cmp ecx, 0xc8
ja case.0x511a7e.8
movzx eax, byte [ecx + 0x511cfc]
jmp dword [eax*4 + 0x511cc4]
mov ecx, edi
mov dword [edi + 0x400], 0xb
call fcn.00504e50
jmp 0x511c86
mov ecx, edi
mov dword [edi + 0x400], 0xd
call fcn.00504da0
jmp 0x511c86
push 0xb28
push 0x5676a8
push 0x566624
lea ecx, [ebp - 0x44]
mov dword [edi + 0x400], 0x13
xor ebx, ebx
mov dword [ebp - 0x158], 0xc
call fcn.00428d70
mov esi, eax
lea eax, [ebp - 0x158]
mov dword [ebp - 4], 2
push eax
lea eax, [ebp - 0x164]
push eax
lea ecx, [edi + 0x424]
call fcn.0042be10
mov ecx, dword [ebp - 0x164]
push dword [ecx + 0x104]
push dword [ecx + 0x100]
lea ecx, [edi + 0x408]
call fcn.0042ad30
push eax
mov edx, esi
xor ecx, ecx
call fcn.00508bc0
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x44]
call fcn.00428f50
jmp 0x511c88
push 0xb36
push 0x567760
push 0x566564
lea ecx, [ebp - 0x78]
mov dword [edi + 0x400], 0x14
xor ebx, ebx
mov dword [ebp - 0x160], 0xd
call fcn.00428d70
mov esi, eax
lea eax, [ebp - 0x160]
mov dword [ebp - 4], 3
push eax
lea eax, [ebp - 0x15c]
push eax
lea ecx, [edi + 0x424]
call fcn.0042be10
mov ecx, dword [ebp - 0x15c]
push dword [ecx + 0x104]
push dword [ecx + 0x100]
lea ecx, [edi + 0x408]
call fcn.0042ad30
push eax
mov edx, esi
xor ecx, ecx
call fcn.00508bc0
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x78]
call fcn.00428f50
jmp 0x511c88
push 1
mov ecx, edi
mov dword [edi + 0x400], 0xcc
call fcn.00504df0
jmp 0x511c86
push 2
mov ecx, edi
mov dword [edi + 0x400], 0xcb
call fcn.00504df0
jmp 0x511c86
push 6
mov ecx, edi
mov dword [edi + 0x400], 0xca
call fcn.00504df0
jmp 0x511c86
push 3
mov ecx, edi
mov dword [edi + 0x400], 0xc9
call fcn.00504df0
jmp 0x511c86
push 0xa
mov ecx, edi
mov dword [edi + 0x400], 0xd0
call fcn.00504df0
jmp 0x511c86
push 7
mov ecx, edi
mov dword [edi + 0x400], 0xc8
call fcn.00504df0
jmp 0x511c86
mov ecx, edi
mov dword [edi + 0x400], 0x44c
call fcn.00504d50
jmp 0x511c86
mov ecx, edi
mov dword [edi + 0x400], 0x44d
call fcn.004e9e50
jmp 0x511c86
mov ecx, edi
mov dword [edi + 0x400], 0x640
call fcn.004ed090
mov ebx, eax
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
mov dword [edi + 0x4c4], edx
test ebx, ebx
je 0x511ca4
mov eax, dword [edi]
push edx
push ecx
mov ecx, edi
call dword [eax + 0x88]
mov eax, ebx
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 8