Function at 0x404a90
Capabilities:
Check if file exists
Delete file
Get disk size

Disassembly:
push 0xffffffffffffffff
push 0x48ef8c
mov eax, dword fs:[0]
push eax
sub esp, 0x85c
mov eax, dword [0x4b0650]
xor eax, esp
mov dword [esp + 0x858], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4b0650]
xor eax, esp
push eax
lea eax, [esp + 0x870]
mov dword fs:[0], eax
mov esi, ecx
xor ebx, ebx
cmp dword [esi + 0x50], ebx
jne 0x404ade
mov eax, 0x80700002
jmp 0x40517e
mov eax, dword [esi + 0x1fc]
mov ecx, dword [esi + 0x1f8]
push eax
push ecx
push str.Start_to_download__totally__I64d
mov dword [esp + 0x20], 0x80004005
call fcn.0040de80
mov edx, dword [esi + 0x20c]
add esp, 0xc
cmp edx, dword [esi + 0x1fc]
jl 0x404b29
jg 0x404b1f
mov eax, dword [esi + 0x208]
cmp eax, dword [esi + 0x1f8]
jb 0x404b29
mov eax, 1
jmp 0x40517e
lea edi, [esi + 0x6d4]
mov ecx, edi
call fcn.00404090
cmp byte [esi + 0x1f4], bl
jne 0x404c6c
lea ecx, [esp + 0x18]
push ecx
mov ecx, edi
mov dword [esp + 0x1c], 0xffffffff
call fcn.00404a20
mov eax, dword [esi + 0x200]
mov edi, dword [esi + 0x1f8]
mov ecx, dword [esi + 0x204]
mov ebp, dword [esi + 0x1fc]
sub edi, eax
push 0x460
mov ebx, eax
mov dword [esp + 0x2c], ecx
sbb ebp, ecx
call fcn.00478bdb
add esp, 4
mov dword [esp + 0x1c], eax
test eax, eax
mov dword [esp + 0x878], 0
je 0x404bb6
lea edx, [esi + 0x6bc]
push edx
mov edx, dword [esp + 0x2c]
lea ecx, [esi + 0x58]
push ecx
push ebp
push edi
push edx
push ebx
push 0
mov ecx, eax
call fcn.004014e0
jmp 0x404bb8
xor eax, eax
mov dword [esp + 0x18], eax
lea eax, [esp + 0x18]
lea edi, [esi + 0x21c]
push eax
mov ecx, edi
mov dword [esp + 0x87c], 0xffffffff
call fcn.00404a20
mov eax, dword [edi + 4]
xor ebx, ebx
cmp eax, ebx
je 0x404bec
mov ecx, dword [edi + 8]
sub ecx, eax
sar ecx, 2
jne 0x404bf1
call fcn.004789ce
mov edx, dword [edi + 4]
mov eax, dword [edx]
mov dword [eax + 0x2c], 0x4042e0
mov dword [eax + 0x30], esi
mov eax, dword [edi + 4]
cmp eax, ebx
je 0x404c11
mov ecx, dword [edi + 8]
sub ecx, eax
sar ecx, 2
jne 0x404c16
call fcn.004789ce
mov edx, dword [esp + 0x884]
mov ecx, dword [esi + 0x3c]
push edx
mov edx, dword [esi + 0x50]
lea eax, [esi + 0x434]
push eax
mov eax, dword [edi + 4]
push ebx
push ecx
mov ecx, dword [eax]
push edx
call fcn.00401b30
mov eax, dword [edi + 4]
cmp eax, ebx
je 0x404c49
mov ecx, dword [edi + 8]
sub ecx, eax
sar ecx, 2
jne 0x404c4e
call fcn.004789ce
mov edx, dword [edi + 4]
mov eax, dword [edx]
mov eax, dword [eax + 0x28]
mov ecx, dword [eax]
add dword [esi + 0x208], ecx
mov edx, dword [eax + 4]
adc dword [esi + 0x20c], edx
jmp 0x404ee3
mov eax, dword [esi + 0x218]
mov ecx, dword [esi + 0x1f8]
sub ecx, dword [esi + 0x200]
mov edi, dword [esi + 0x1fc]
sbb edi, dword [esi + 0x204]
cdq
push edx
push eax
push edi
push ecx
call fcn.004787c0
cmp dword [esi + 0x218], ebx
mov edi, eax
mov ebp, edx
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], ebp
mov dword [esp + 0x18], ebx
jle 0x404e60
lea edx, [esi + 0x58]
mov dword [esp + 0x1c], 0xffffffff
mov dword [esp + 0x20], edx
jmp 0x404cc9
mov ebp, dword [esp + 0x30]
mov edi, dword [esp + 0x2c]
lea eax, [esp + 0x1c]
push eax
lea ecx, [esi + 0x6d4]
call fcn.00404a20
push ebp
mov eax, ebx
cdq
push edi
push edx
push eax
call fcn.00478870
add eax, dword [esi + 0x200]
mov ecx, dword [esi + 0x218]
adc edx, dword [esi + 0x204]
sub ecx, 1
cmp ebx, ecx
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], edx
jne 0x404d14
mov edi, dword [esi + 0x1f8]
mov ebp, dword [esi + 0x1fc]
jmp 0x404d31
push ebp
lea eax, [ebx + 1]
cdq
push edi
push edx
push eax
call fcn.00478870
mov edi, eax
add edi, dword [esi + 0x200]
mov ebp, edx
adc ebp, dword [esi + 0x204]
sub edi, 1
push 0x460
sbb ebp, 0
call fcn.00478bdb
add esp, 4
mov dword [esp + 0x14], eax
test eax, eax
mov dword [esp + 0x878], 1
je 0x404d79
mov ecx, dword [esp + 0x20]
lea edx, [esi + 0x6bc]
push edx
mov edx, dword [esp + 0x2c]
push ecx
mov ecx, dword [esp + 0x2c]
push ebp
push edi
push edx
push ecx
push ebx
mov ecx, eax
call fcn.004014e0
jmp 0x404d7b
xor eax, eax
lea edx, [esp + 0x14]
lea edi, [esi + 0x21c]
push edx
mov ecx, edi
mov dword [esp + 0x87c], 0xffffffff
mov dword [esp + 0x18], eax
call fcn.00404a20
mov ecx, dword [edi + 4]
test ecx, ecx
je 0x404daf
mov eax, dword [edi + 8]
sub eax, ecx
sar eax, 2
cmp ebx, eax
jb 0x404db4
call fcn.004789ce
mov eax, dword [edi + 4]
mov eax, dword [eax + ebx*4]
lea ebp, [ebx*4]
mov dword [eax + 0x2c], 0x4042e0
mov dword [eax + 0x30], esi
mov ecx, dword [edi + 4]
test ecx, ecx
je 0x404dde
mov eax, dword [edi + 8]
sub eax, ecx
sar eax, 2
cmp ebx, eax
jb 0x404de3
call fcn.004789ce
mov ecx, dword [esp + 0x884]
mov edx, dword [esi + 0x3c]
mov eax, dword [edi + 4]
push ecx
lea ecx, [esi + 0x434]
push ecx
mov ecx, dword [esi + 0x50]
push 1
push edx
add eax, ebp
push ecx
mov ecx, dword [eax]
call fcn.00401b30
mov dword [esp + 0x14], eax
mov eax, dword [edi + 4]
test eax, eax
je 0x404e1f
mov ecx, dword [edi + 8]
sub ecx, eax
sar ecx, 2
cmp ebx, ecx
jb 0x404e24
call fcn.004789ce
mov edx, dword [edi + 4]
mov eax, dword [edx + ebp]
mov eax, dword [eax + 0x28]
mov ecx, dword [eax]
add dword [esi + 0x208], ecx
mov edx, dword [eax + 4]
mov eax, 1
adc dword [esi + 0x20c], edx
cmp dword [esp + 0x14], eax
jne 0x404e4d
add dword [esp + 0x18], eax
add dword [esp + 0x20], 8
add ebx, eax
cmp ebx, dword [esi + 0x218]
jl 0x404cc1
mov ecx, dword [esi + 0x220]
test ecx, ecx
lea edi, [esi + 0x21c]
jne 0x404e74
xor eax, eax
jmp 0x404e7c
mov eax, dword [edi + 8]
sub eax, ecx
sar eax, 2
cmp dword [esp + 0x18], eax
jne 0x404ee1
mov eax, dword [esi + 0x1e8]
test eax, eax
je 0x404ea4
mov ecx, dword [esi + 0x1ec]
mov edx, dword [esp + 0x14]
push ecx
push 0
push edx
push 0x47c
call eax
add esp, 0x10
mov ecx, esi
call fcn.00402d10
test eax, eax
je 0x404b1f
mov ecx, esi
call fcn.00402ea0
mov edi, eax
mov eax, dword [esi + 0x1e8]
test eax, eax
je 0x404eda
mov ecx, dword [esi + 0x1ec]
push ecx
push 0
push edi
push 0x474
call eax
add esp, 0x10
mov eax, edi
jmp 0x40517e
xor ebx, ebx
push 0x206
lea edx, [esp + 0x25a]
push ebx
push edx
mov word [esp + 0x260], bx
call fcn.00477c40
lea eax, [esi + 0x434]
push eax
lea ecx, [esp + 0x264]
push str._s.tmp
push ecx
call fcn.00401570
add esp, 0x18
cmp dword [esi + 0x6a0], ebx
jne 0x404f3d
lea edx, [esp + 0x254]
push 0x492aa4
push edx
call fcn.00477f07
add esp, 8
mov dword [esi + 0x6a0], eax
push 0x206
lea eax, [esp + 0x52]
push ebx
push eax
mov word [esp + 0x58], bx
call fcn.00477c40
lea ebp, [esi + 0x22c]
lea edx, [esp + 0x58]
add esp, 0xc
mov eax, ebp
sub edx, ebp
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
cmp cx, bx
jne 0x404f63
lea ecx, [esp + 0x4c]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea edx, [esp + 0x3c]
push edx
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x58]
push edx
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
test eax, eax
jne 0x40501e
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, ebx
mov ecx, eax
jle 0x404fb9
and ecx, 0xffff
or ecx, 0x80070000
push ecx
push eax
push str.GetDiskFreeSpaceEx
push 0x4927e4
call fcn.0040de80
add esp, 0x10
call esi
push 0x206
mov esi, eax
lea eax, [esp + 0x462]
push ebx
push eax
mov word [esp + 0x468], bx
call fcn.00477c40
push esi
push str._ERROR_GetDiskFreeSpaceEx_failed___dwErrorCode___.8X
lea ecx, [esp + 0x470]
push 0x104
push ecx
call fcn.00477bdc
lea edx, [esp + 0x478]
push edx
call fcn.00401030
add esp, 0x20
mov eax, 0x80070005
jmp 0x40517e
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea eax, [esp + 0x254]
push eax
call ebx
test eax, eax
jne 0x405063
mov ecx, dword [esp + 0x38]
cmp ecx, dword [esi + 0x1fc]
ja 0x405063
jb 0x40504c
mov edx, dword [esp + 0x34]
cmp edx, dword [esi + 0x1f8]
jae 0x405063
push str._ERROR__E_MBD_NO_DISK_SPACE_
call fcn.00401030
add esp, 4
mov eax, 0x80700007
jmp 0x40517e
lea eax, [esp + 0x4c]
push eax
call ebx
test eax, eax
jne 0x4050d3
lea ecx, [esp + 0x4c]
push ecx
push eax
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
test eax, eax
mov dword [esp + 0x14], eax
jge 0x4050d3
push 0x206
lea edx, [esp + 0x66a]
push 0
push edx
mov word [esp + 0x670], 0
call fcn.00477c40
mov esi, dword [esp + 0x20]
push esi
push str._ERROR_SHCreateDirectory___failed___hr___.8X
lea eax, [esp + 0x678]
push 0x104
push eax
call fcn.00477bdc
lea ecx, [esp + 0x680]
push ecx
call fcn.00401030
add esp, 0x20
mov eax, esi
jmp 0x40517e
push 0x493e30
push ebp
call fcn.00477f07
add esp, 8
test eax, eax
jne 0x4050fc
push str._ERROR___wfopen_failed__E_ACCESSDENIED
call fcn.00401030
add esp, 4
mov eax, 0x80070005
jmp 0x40517e
push eax
call fcn.00477fdc
add esp, 4
push ebp
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp byte [esi + 0x1f4], 0
jne 0x405133
push 0
mov ecx, edi
call fcn.00401a00
mov edx, dword [esp + 0x880]
mov ecx, dword [eax]
push edx
call fcn.00403960
mov dword [esp + 0x14], eax
jmp 0x40517a
xor ebp, ebp
cmp dword [esi + 0x218], ebp
jle 0x40517a
mov ebx, dword [esp + 0x880]
mov ecx, dword [edi + 4]
test ecx, ecx
je 0x405157
mov eax, dword [edi + 8]
sub eax, ecx
sar eax, 2
cmp ebp, eax
jb 0x40515c
call fcn.004789ce
mov eax, dword [edi + 4]
mov ecx, dword [eax + ebp*4]
lea eax, [eax + ebp*4]
push ebx
call fcn.00403960
add ebp, 1
cmp ebp, dword [esi + 0x218]
mov dword [esp + 0x14], eax
jl 0x405144
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x870]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x858]
xor ecx, esp
call fcn.00477bf8
add esp, 0x868
ret 8