Function at 0x410694
Capabilities:
Delete file
Get file size

Disassembly:
mov eax, 0x56cb5e
call fcn.0055a6a0
sub esp, 0x284
push ebx
push esi
push edi
mov edi, ecx
mov eax, dword [edi]
call dword [eax + 0x10]
test al, al
jne 0x4106c5
xor eax, eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 0x14
mov ecx, dword [ebp + 8]
xor ebx, ebx
mov dword [edi + 0xc], ebx
mov dword [edi + 0x30], ebx
mov dword [edi + 0x34], ebx
mov dword [edi + 0x5c], ebx
mov eax, dword [ecx + 0x10]
sub eax, dword [ecx + 0xc]
push 0x2c
cdq
pop ecx
idiv ecx
cmp eax, ebx
jne 0x41070c
mov edi, dword [ebp + 0x18]
cmp edi, ebx
je 0x4106b2
push str.INVALID_CRC_TABLE
push ecx
call fcn.004032e1
pop ecx
mov esi, eax
call fcn.0040582a
push 2
mov ecx, eax
pop esi
call fcn.00420460
jmp 0x4106b2
lea eax, [ebp - 0x134]
push eax
call fcn.00403cc7
mov dword [ebp - 4], ebx
fldz
push ecx
fstp dword [esp]
push str.TORRENT_STATE_CHECKING
call fcn.004032e1
mov esi, eax
call fcn.0040582a
mov esi, dword [edi + 8]
push eax
call fcn.004154f1
mov esi, dword [edi + 8]
push ebx
push 0x5bb970
call fcn.00415524
mov eax, dword [edi + 8]
push 0x5bb970
lea ecx, [eax + 0x1fc]
call fcn.004027ca
push dword [edi + 8]
call fcn.0041547e
mov eax, dword [ebp + 8]
mov dword [ebp + 8], eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp + 8]
call fcn.00411eba
pop ecx
lea eax, [ebp - 0x64]
push eax
lea eax, [ebp + 8]
call fcn.00417188
pop ecx
mov eax, dword [ebp - 0x18]
cmp eax, ebx
je 0x410790
cmp eax, dword [ebp - 0x64]
je 0x410795
call fcn.00504cec
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x60]
je 0x410916
lea esi, [ebp - 0x18]
call fcn.004171db
mov esi, eax
mov eax, dword [edi]
mov ecx, edi
mov dword [ebp - 0x1c], esi
call dword [eax + 0x10]
test al, al
je 0x410901
mov ecx, dword [edi + 8]
mov eax, dword [ecx]
call dword [eax + 0x14]
test eax, eax
jne 0x410948
push esi
push dword [ebp + 0x10]
lea eax, [ebp - 0x5c]
push eax
mov byte [ebp + 0xb], 1
call fcn.0040f6db
add esp, 0xc
mov byte [ebp - 4], 1
cmp dword [ebp - 0x44], 8
mov eax, dword [ebp - 0x58]
jae 0x4107f1
lea eax, [ebp - 0x58]
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x10], eax
cmp eax, 0xffffffff
je 0x4108cd
lea ecx, [ebp - 0x70]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x4108b4
lea eax, [ebp - 0x24]
push eax
push ebx
push ebx
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_GetFileTime]
test eax, eax
je 0x4108b4
mov eax, dword [esi + 0x28]
mov ecx, dword [ebp - 0x70]
cmp ecx, eax
jne 0x4108b4
mov eax, dword [ebp - 0x6c]
cmp eax, ebx
jne 0x4108b4
mov eax, dword [ebp - 0x20]
cmp eax, dword [esi + 0x20]
jne 0x41085b
mov eax, dword [ebp - 0x24]
cmp eax, dword [esi + 0x24]
je 0x4108b1
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebp - 0x10], 0xffffffff
cmp dword [ebp - 0x44], 8
mov eax, dword [ebp - 0x58]
mov dword [ebp + 8], ebx
jae 0x410877
lea eax, [ebp - 0x58]
push eax
lea esi, [ebp + 8]
call fcn.00414837
pop ecx
cmp al, 1
jne 0x4108ca
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x1c]
cmp eax, dword [ecx + 0x1c]
jne 0x4108ca
cmp dword [ebp - 0x44], 8
mov ecx, dword [ebp - 0x58]
jae 0x41089c
lea ecx, [ebp - 0x58]
mov eax, dword [ebp - 0x1c]
push dword [eax + 0x24]
push dword [eax + 0x20]
push ecx
call fcn.00407353
mov esi, dword [ebp - 0x1c]
add esp, 0xc
mov byte [ebp + 0xb], bl
cmp dword [ebp - 0x10], 0xffffffff
je 0x4108c3
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [ebp + 0xb], bl
je 0x4108e6
jmp 0x4108cd
mov esi, dword [ebp - 0x1c]
push esi
lea eax, [ebp - 0x134]
push eax
call fcn.0040406e
inc dword [edi + 0xc]
mov eax, dword [esi + 0x28]
add dword [edi + 0x30], eax
adc dword [edi + 0x34], ebx
mov byte [ebp - 4], bl
push ebx
push 1
lea ecx, [ebp - 0x5c]
call fcn.00403580
lea esi, [ebp - 0x18]
call fcn.00404853
jmp 0x410784
or dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x134]
push eax
call fcn.00403d50
jmp 0x4106b2
cmp dword [edi + 0xc], ebx
jne 0x41095f
push 0x5bb970
lea ecx, [ebp - 0x40]
call fcn.004027e7
mov byte [ebp - 4], 2
mov eax, dword [edi]
push ebx
lea ecx, [ebp - 0x40]
push ecx
mov ecx, edi
call dword [eax + 8]
mov byte [ebp - 4], bl
push ebx
xor ebx, ebx
inc ebx
push ebx
lea ecx, [ebp - 0x40]
call fcn.00403580
or dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x134]
push eax
call fcn.00403d50
mov eax, ebx
jmp 0x4106b4
fldz
push ecx
fstp dword [esp]
push str.TORRENT_TOTAL_PROGRESS
call fcn.004032e1
mov esi, eax
call fcn.0040582a
mov esi, dword [edi + 8]
push eax
call fcn.004154f1
push ebx
push str.TORRENT_STATE_DOWNLOADING
call fcn.004032e1
mov esi, eax
call fcn.0040582a
mov esi, dword [edi + 8]
push eax
call fcn.00415524
mov eax, dword [edi + 8]
push 0x5bb970
lea ecx, [eax + 0x1fc]
call fcn.004027ca
push dword [edi + 8]
call fcn.0041547e
lea eax, [ebp - 0x134]
mov dword [ebp + 8], eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp + 8]
call fcn.00411eba
pop ecx
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp + 8]
call fcn.00417188
pop ecx
mov eax, dword [ebp - 0x18]
cmp eax, ebx
je 0x4109e4
cmp eax, dword [ebp - 0x24]
je 0x4109e9
call fcn.00504cec
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x20]
je 0x410d13
lea esi, [ebp - 0x18]
call fcn.004171db
mov esi, eax
mov eax, dword [edi]
mov ecx, edi
mov dword [ebp + 8], esi
call dword [eax + 0x10]
test al, al
je 0x410948
push esi
push dword [ebp + 0x14]
lea eax, [ebp - 0x8c]
push eax
call fcn.0040f6db
add esp, 0xc
mov byte [ebp - 4], 3
push esi
push dword [ebp + 0xc]
lea eax, [ebp - 0x150]
push eax
call fcn.0040f6db
add esp, 0xc
mov byte [ebp - 4], 4
push 0x5bd498
push eax
lea eax, [ebp - 0xa8]
push eax
call fcn.0040f683
add esp, 0xc
mov byte [ebp - 4], 6
push ebx
push 1
lea ecx, [ebp - 0x150]
call fcn.00403580
push 0xffffffffffffffff
push ebx
push esi
lea ecx, [edi + 0x40]
call fcn.00403685
mov eax, dword [esi + 0x28]
mov esi, edi
mov dword [edi + 0x20], eax
mov dword [edi + 0x24], ebx
mov dword [edi + 0x18], ebx
mov dword [edi + 0x1c], ebx
call fcn.004119cf
mov ecx, dword [ebp - 0x88]
push 8
pop esi
cmp dword [ebp - 0x74], esi
jae 0x410a9c
lea ecx, [ebp - 0x88]
mov eax, dword [ebp - 0xa4]
cmp dword [ebp - 0x90], esi
jae 0x410ab0
lea eax, [ebp - 0xa4]
push dword [ebp + 0x18]
push ecx
push eax
push edi
call fcn.00411533
test al, al
je 0x410ca6
mov eax, dword [ebp - 0x88]
cmp dword [ebp - 0x74], esi
jae 0x410ad4
lea eax, [ebp - 0x88]
push 0x104
push eax
lea eax, [ebp - 0x290]
push eax
call fcn.00508e8a
add esp, 0xc
lea eax, [ebp - 0x290]
push eax
lea ecx, [ebp - 0xe0]
call fcn.00402ae0
mov byte [ebp - 4], 7
lea eax, [ebp - 0xe0]
push eax
lea eax, [ebp - 0xfc]
push eax
call fcn.0041032e
mov byte [ebp - 4], 8
mov esi, 0x5bd4dc
push esi
call fcn.00504d00
add esp, 0xc
push eax
push esi
push dword [ebp - 0xe8]
lea ecx, [ebp - 0xfc]
push ebx
call fcn.00411f5b
test eax, eax
jne 0x410c45
lea eax, [ebp - 0xe0]
push eax
lea eax, [ebp - 0x16c]
push eax
call fcn.004103d3
mov byte [ebp - 4], 9
push str._texcache.epk
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.00411ee4
add esp, 0x14
mov byte [ebp - 4], 0xb
xor esi, esi
push ebx
inc esi
push esi
lea ecx, [ebp - 0x16c]
call fcn.004039a0
cmp dword [ebp - 0x28], 0x10
mov eax, dword [ebp - 0x3c]
jae 0x410b89
lea eax, [ebp - 0x3c]
push ebx
push eax
call fcn.00509007
pop ecx
pop ecx
test eax, eax
jne 0x410ba9
cmp dword [ebp - 0x28], 0x10
mov eax, dword [ebp - 0x3c]
jae 0x410ba2
lea eax, [ebp - 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [ebp - 0xe0]
push eax
lea eax, [ebp - 0x188]
push eax
call fcn.004103d3
mov byte [ebp - 4], 0xc
push str._texcache.eix
push eax
lea eax, [ebp - 0xc4]
push eax
call fcn.00411ee4
add esp, 0x14
mov byte [ebp - 4], 0xe
push ebx
push esi
lea ecx, [ebp - 0x188]
call fcn.004039a0
cmp dword [ebp - 0xac], 0x10
mov eax, dword [ebp - 0xc0]
jae 0x410bfb
lea eax, [ebp - 0xc0]
push ebx
push eax
call fcn.00509007
pop ecx
pop ecx
test eax, eax
jne 0x410c24
cmp dword [ebp - 0xac], 0x10
mov eax, dword [ebp - 0xc0]
jae 0x410c1d
lea eax, [ebp - 0xc0]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov byte [ebp - 4], 0xb
push ebx
push esi
lea ecx, [ebp - 0xc4]
call fcn.004039a0
mov byte [ebp - 4], 8
push ebx
push esi
lea ecx, [ebp - 0x40]
call fcn.004039a0
jmp 0x410c48
xor esi, esi
inc esi
mov eax, dword [ebp + 8]
push dword [eax + 0x28]
mov edx, dword [edi]
push eax
mov ecx, edi
call dword [edx + 8]
mov byte [ebp - 4], 7
push ebx
push esi
lea ecx, [ebp - 0xfc]
call fcn.004039a0
mov byte [ebp - 4], 6
push ebx
push esi
lea ecx, [ebp - 0xe0]
call fcn.004039a0
mov byte [ebp - 4], 3
push ebx
push esi
lea ecx, [ebp - 0xa8]
call fcn.00403580
mov byte [ebp - 4], bl
push ebx
push esi
lea ecx, [ebp - 0x8c]
call fcn.00403580
lea esi, [ebp - 0x18]
call fcn.00404853
jmp 0x4109d8
cmp dword [ebp + 0x18], ebx
je 0x410cf0
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x10]
test al, al
je 0x410cf0
mov eax, dword [ebp - 0xa4]
cmp dword [ebp - 0x90], esi
jae 0x410cca
lea eax, [ebp - 0xa4]
push eax
push str.FAILED_DOWNLOAD_FILE
call fcn.004032e1
mov esi, eax
call fcn.0040582a
mov ecx, dword [ebp + 0x18]
push eax
push str._s____s
push 2
pop esi
call fcn.00420490
add esp, 0xc
mov byte [ebp - 4], 3
push ebx
push 1
lea ecx, [ebp - 0xa8]
call fcn.00403580
mov byte [ebp - 4], bl
push ebx
push 1
lea ecx, [ebp - 0x8c]
jmp 0x410943
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0xc]
xor ebx, ebx
inc ebx
jmp 0x410948