Function at 0x40c03d
Capabilities:
Clear file content
Delete file
Set file attributes

Disassembly:
push 0x20
mov eax, 0x49fc47
call fcn.0048109c
mov ebx, ecx
mov edi, dword [ebp + 8]
xor esi, esi
mov dword [ebp - 0x14], esi
push dword [edi]
mov dword [ebp - 0x18], esi
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, dword [0x4d4770]
push eax
push str._INFO___d___handle_download_finished__begin_result__d_
call fcn.00414401
add esp, 0xc
cmp dword [edi], esi
je 0x40c082
mov esi, ebx
call fcn.0040bf2d
jmp 0x40c2c7
lea eax, [ebp - 0x20]
push eax
push ebx
call fcn.0040bb1d
push esi
mov dword [ebp - 4], esi
mov esi, 0x80
push esi
push 3
push 0
push 3
push 0xc0000000
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x1c], eax
cmp eax, 0xffffffff
je 0x40c163
mov eax, dword [ebx + 0x54]
mov ecx, dword [eax + 0x88]
mov eax, dword [eax + 0x8c]
push 0
push 0
push eax
push ecx
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x40c105
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
je 0x40c105
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, dword [0x4d4770]
push eax
push str._INFO___d___handle_download_finished__check_file_size_ok.
call fcn.00414401
pop ecx
pop ecx
mov dword [ebp - 0x18], 1
cmp dword [ebp - 0x1c], 0
je 0x40c114
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x18], 0
je 0x40c163
lea edi, [ebx + 0x44]
push dword [edi]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push dword [edi]
push dword [ebp - 0x20]
call fcn.0047bc45
pop ecx
pop ecx
test eax, eax
je 0x40c15a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, dword [0x4d4770]
push eax
push str._ERROR___d___handle_download_finished__rename_failed__error__d_.
call fcn.00414401
add esp, 0xc
and dword [ebp - 0x18], 0
cmp dword [ebp - 0x18], 0
jne 0x40c16e
mov edi, dword [ebp + 8]
mov dword [edi], 9
jmp 0x40c2b8
mov eax, dword [edi]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
cmp dword [ebx + 0x9c], 0
je 0x40c19e
lea esi, [ebp - 0x1c]
mov eax, ebx
call fcn.0040cddd
mov eax, dword [eax]
cmp dword [eax - 0xc], 3
mov dword [ebp - 0x14], 1
mov byte [ebp - 0xd], 1
jg 0x40c1a2
mov byte [ebp - 0xd], 0
test byte [ebp - 0x14], 1
je 0x40c1b7
mov eax, dword [ebp - 0x1c]
and dword [ebp - 0x14], 0xfffffffe
add eax, 0xfffffff0
call fcn.00402a23
cmp byte [ebp - 0xd], 0
je 0x40c2b5
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, dword [0x4d4770]
push eax
push str._INFO___d___handle_download_finished__check_file_md5
call fcn.00414401
mov eax, dword [edi]
cmp dword [eax - 4], 1
pop ecx
pop ecx
jle 0x40c1eb
push dword [eax - 0xc]
push edi
call fcn.004023ee
push dword [edi]
lea ecx, [ebp - 0x1c]
call fcn.0040cdfc
sub esp, 0x1c
mov byte [ebp - 4], 1
mov ecx, esp
mov dword [ebp - 0x24], esp
push dword [ebp - 0x1c]
call fcn.004029c1
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x28], esp
push str.downpackagemd5
mov byte [ebp - 4], 2
call fcn.004029c1
mov byte [ebp - 4], 1
call fcn.00416b8a
mov eax, dword [ebp - 0x1c]
cmp dword [eax - 0xc], 0
je 0x40c258
lea esi, [ebp - 0x24]
mov eax, ebx
call fcn.0040cddd
push 0
mov byte [ebp - 4], 3
or dword [ebp - 0x14], 2
push eax
lea ecx, [ebp - 0x1c]
mov edx, ebx
call fcn.0040c2f2
test eax, eax
je 0x40c258
xor bl, bl
jmp 0x40c25a
mov bl, 1
mov dword [ebp - 4], 1
test byte [ebp - 0x14], 2
je 0x40c272
mov eax, dword [ebp - 0x24]
add eax, 0xfffffff0
call fcn.00402a23
test bl, bl
je 0x40c27a
and dword [ebp - 0x18], 0
cmp dword [ebp - 0x18], 0
jne 0x40c2aa
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, dword [0x4d4770]
push eax
push str._ERROR___d___handle_download_finished__check_file_md5_failed_
call fcn.00414401
mov eax, dword [ebp + 8]
pop ecx
pop ecx
mov dword [eax], 0xb
push dword [edi]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
call fcn.00402a23
mov edi, dword [ebp + 8]
or dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
call fcn.00402a23
push dword [edi]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, dword [0x4d4770]
push eax
push str._INFO___d___handle_download_finished__end_result__d_
call fcn.00414401
xor eax, eax
add esp, 0xc
cmp dword [edi], eax
sete al
call fcn.00481174
ret 4