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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x46c94f
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push esi
push edi
mov eax, dword [0x487ba4]
xor eax, esp
push eax
lea eax, [esp + 0x30]
mov dword fs:[0], eax
mov ebx, ecx
mov eax, dword [ebp + 8]
xor edi, edi
mov dword [esp + 0x1c], edi
cmp dword [eax], edi
je 0x40c6af
mov esi, ebx
call fcn.0040c542
jmp 0x40c891
lea eax, [esp + 0x20]
push eax
push ebx
call fcn.0040c22a
push edi
mov esi, 0x80
push esi
push 3
push edi
push 3
mov dword [esp + 0x4c], edi
push 0xc0000000
push dword [esp + 0x38]
mov dword [esp + 0x34], edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x40c745
mov eax, dword [ebx + 0x54]
mov ecx, dword [eax + 0x88]
mov eax, dword [eax + 0x8c]
push 0
push 0
push eax
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x40c717
push edi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
je 0x40c717
mov dword [esp + 0x18], 1
test edi, edi
je 0x40c722
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x18], 0
je 0x40c745
lea edi, [ebx + 0x44]
push dword [edi]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push dword [edi]
push dword [esp + 0x24]
call fcn.0044da57
pop ecx
pop ecx
test eax, eax
je 0x40c753
mov eax, dword [ebp + 8]
mov dword [eax], 9
jmp 0x40c883
mov eax, dword [edi]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
cmp dword [ebx + 0x9c], 0
je 0x40c792
lea esi, [esp + 0x18]
mov eax, ebx
call fcn.0040d1e7
mov byte [esp + 0x38], 1
push eax
mov ecx, 0x479d3c
mov dword [esp + 0x20], 1
call fcn.0040405f
mov byte [esp + 0x17], 1
test eax, eax
jne 0x40c797
mov byte [esp + 0x17], 0
and dword [esp + 0x38], 0
test byte [esp + 0x1c], 1
je 0x40c7af
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
call fcn.004026ee
cmp byte [esp + 0x17], 0
je 0x40c883
mov eax, dword [edi]
and dword [esp + 0x18], 0
sub eax, 0x10
cmp dword [eax + 0xc], 1
jle 0x40c7d3
push dword [eax + 4]
push edi
call fcn.00402473
push dword [edi]
lea ecx, [esp + 0x20]
call fcn.0040d203
sub esp, 0x1c
mov byte [esp + 0x54], 2
mov esi, esp
mov dword [esp + 0x40], esp
push dword [esp + 0x38]
call fcn.004070da
sub esp, 0x1c
mov esi, esp
mov dword [esp + 0x60], esp
push str.downpackagemd5
mov byte [esp + 0x74], 3
call fcn.004070da
mov byte [esp + 0x70], 2
call fcn.00413ca3
mov eax, dword [esp + 0x1c]
cmp dword [eax - 0xc], 0
je 0x40c85f
lea esi, [esp + 0x24]
mov eax, ebx
call fcn.0040d1e7
mov byte [esp + 0x38], 4
mov eax, dword [eax]
lea ecx, [esp + 0x1c]
push ecx
mov ecx, eax
call fcn.0040405f
mov ebx, eax
mov eax, dword [esp + 0x24]
neg ebx
sbb bl, bl
add eax, 0xfffffff0
inc bl
call fcn.004026ee
test bl, bl
je 0x40c85f
mov dword [esp + 0x18], 1
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
call fcn.004026ee
cmp dword [esp + 0x18], 0
jne 0x40c883
mov eax, dword [ebp + 8]
mov dword [eax], 0xb
push dword [edi]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
call fcn.004026ee
xor edi, edi
mov ecx, dword [ebp + 8]
xor eax, eax
cmp dword [ecx], edi
sete al
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4