Function at 0x4107e8
Capabilities:
Delete file
Get file size

Disassembly:
mov eax, 0x62e2e2
call fcn.0060aa10
sub esp, 0x26c
push ebx
push esi
push edi
mov edi, ecx
mov eax, dword [edi]
call dword [eax + 0x10]
test al, al
jne 0x410819
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 0x410860
mov edi, dword [ebp + 0x18]
cmp edi, ebx
je 0x410806
push str.INVALID_CRC_TABLE
push ecx
call fcn.004031f6
pop ecx
mov esi, eax
call fcn.004057ed
push 2
mov ecx, eax
pop esi
call fcn.00422710
jmp 0x410806
lea eax, [ebp - 0x14c]
push eax
call fcn.00403e8e
mov dword [ebp - 4], ebx
push str.TORRENT_STATE_CHECKING
push ecx
call fcn.004031f6
pop ecx
mov esi, eax
call fcn.004057ed
mov esi, dword [edi + 8]
push eax
call fcn.0041587d
mov esi, dword [edi + 8]
push ebx
push 0x6874ac
call fcn.00415899
mov eax, dword [edi + 8]
push 0x6874ac
lea ecx, [eax + 0x1fc]
call fcn.00403442
push dword [edi + 8]
call fcn.0041580a
mov eax, dword [ebp + 8]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x14]
mov dword [ebp - 0x28], ebx
call fcn.00420543
pop ecx
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x14]
call fcn.004175ae
pop ecx
mov eax, dword [ebp - 0x24]
cmp eax, ebx
je 0x4108e3
cmp eax, dword [ebp - 0x60]
je 0x4108e8
call fcn.005b331a
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x5c]
je 0x410aa7
lea esi, [ebp - 0x24]
call fcn.00448f0d
mov esi, eax
mov eax, dword [edi]
mov ecx, edi
mov dword [ebp - 0x14], esi
call dword [eax + 0x10]
test al, al
je 0x410a92
mov ecx, dword [edi + 8]
mov eax, dword [ecx]
call dword [eax + 0x14]
test eax, eax
jne 0x410ae2
push esi
push dword [ebp + 0x10]
lea eax, [ebp - 0x4c]
push eax
mov byte [ebp - 0xd], 1
call fcn.0040f6a8
add esp, 0xc
mov byte [ebp - 4], 1
cmp dword [ebp - 0x34], 8
mov eax, dword [ebp - 0x48]
jae 0x410944
lea eax, [ebp - 0x48]
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x18], eax
cmp eax, 0xffffffff
je 0x410a20
lea ecx, [ebp - 0x58]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x410a07
lea eax, [ebp - 0x30]
push eax
push ebx
push ebx
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_GetFileTime]
test eax, eax
je 0x410a07
mov eax, dword [esi + 0x28]
mov ecx, dword [ebp - 0x58]
cmp ecx, eax
jne 0x410a07
mov eax, dword [ebp - 0x54]
cmp eax, ebx
jne 0x410a07
mov eax, dword [ebp - 0x2c]
cmp eax, dword [esi + 0x20]
jne 0x4109ae
mov eax, dword [ebp - 0x30]
cmp eax, dword [esi + 0x24]
je 0x410a04
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebp - 0x18], 0xffffffff
cmp dword [ebp - 0x34], 8
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x1c], ebx
jae 0x4109ca
lea eax, [ebp - 0x48]
push eax
lea esi, [ebp - 0x1c]
call fcn.00414b05
pop ecx
cmp al, 1
jne 0x410a1d
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x14]
cmp eax, dword [ecx + 0x1c]
jne 0x410a1d
cmp dword [ebp - 0x34], 8
mov ecx, dword [ebp - 0x48]
jae 0x4109ef
lea ecx, [ebp - 0x48]
mov eax, dword [ebp - 0x14]
push dword [eax + 0x24]
push dword [eax + 0x20]
push ecx
call fcn.00407226
mov esi, dword [ebp - 0x14]
add esp, 0xc
mov byte [ebp - 0xd], bl
cmp dword [ebp - 0x18], 0xffffffff
je 0x410a16
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [ebp - 0xd], bl
je 0x410a39
jmp 0x410a20
mov esi, dword [ebp - 0x14]
push esi
lea eax, [ebp - 0x14c]
push eax
call fcn.00404235
inc dword [edi + 0xc]
mov eax, dword [esi + 0x28]
add dword [edi + 0x30], eax
adc dword [edi + 0x34], ebx
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x10]
sub eax, dword [ecx + 0xc]
push 0x2c
cdq
pop ecx
idiv ecx
inc dword [ebp - 0x28]
fild dword [ebp - 0x28]
mov dword [ebp - 0x1c], eax
fild dword [ebp - 0x1c]
test eax, eax
jge 0x410a5e
fadd dword [0x68d4a0]
fdivp st(1)
mov eax, dword [edi + 8]
fstp dword [ebp - 0x1c]
fld dword [ebp - 0x1c]
fstp dword [eax + 0x21c]
push dword [edi + 8]
call fcn.0041580a
mov byte [ebp - 4], bl
push ebx
push 1
lea ecx, [ebp - 0x4c]
call fcn.00403747
lea esi, [ebp - 0x24]
call fcn.00404932
jmp 0x4108d7
or dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x14c]
push eax
call fcn.00403f17
jmp 0x410806
cmp dword [edi + 0xc], ebx
jne 0x410af9
push 0x6874ac
lea ecx, [ebp - 0xd4]
call fcn.0040345f
mov byte [ebp - 4], 2
mov eax, dword [edi]
push ebx
lea ecx, [ebp - 0xd4]
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 - 0xd4]
call fcn.00403747
or dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x14c]
push eax
call fcn.00403f17
mov eax, ebx
jmp 0x410808
push str.TORRENT_TOTAL_PROGRESS
push ecx
call fcn.004031f6
pop ecx
mov esi, eax
call fcn.004057ed
mov esi, dword [edi + 8]
push eax
call fcn.0041587d
push ebx
push str.TORRENT_STATE_DOWNLOADING
call fcn.004031f6
mov esi, eax
call fcn.004057ed
mov esi, dword [edi + 8]
push eax
call fcn.00415899
mov eax, dword [edi + 8]
push 0x6874ac
lea ecx, [eax + 0x1fc]
call fcn.00403442
push dword [edi + 8]
call fcn.0041580a
lea eax, [ebp - 0x14c]
mov dword [ebp + 8], eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp + 8]
call fcn.00420543
pop ecx
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp + 8]
call fcn.004175ae
pop ecx
mov eax, dword [ebp - 0x24]
cmp eax, ebx
je 0x410b7a
cmp eax, dword [ebp - 0x30]
je 0x410b7f
call fcn.005b331a
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x2c]
je 0x410e28
lea esi, [ebp - 0x24]
call fcn.00448f0d
mov esi, eax
mov eax, dword [edi]
mov ecx, edi
mov dword [ebp + 8], esi
call dword [eax + 0x10]
test al, al
je 0x410ae2
push esi
push dword [ebp + 0x14]
lea eax, [ebp - 0x98]
push eax
call fcn.0040f6a8
add esp, 0xc
mov byte [ebp - 4], 3
push esi
push dword [ebp + 0xc]
lea eax, [ebp - 0xd4]
push eax
call fcn.0040f6a8
add esp, 0xc
mov byte [ebp - 4], 4
push 0x683168
push eax
lea eax, [ebp - 0x7c]
push eax
call fcn.0040f650
add esp, 0xc
mov byte [ebp - 4], 6
push ebx
push 1
lea ecx, [ebp - 0xd4]
call fcn.00403747
push 0xffffffffffffffff
push ebx
push esi
lea ecx, [edi + 0x40]
call fcn.0040384c
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.00411a46
mov ecx, dword [ebp - 0x94]
push 8
pop esi
cmp dword [ebp - 0x80], esi
jae 0x410c2f
lea ecx, [ebp - 0x94]
mov eax, dword [ebp - 0x78]
cmp dword [ebp - 0x64], esi
jae 0x410c3a
lea eax, [ebp - 0x78]
push dword [ebp + 0x18]
push ecx
push eax
push edi
call fcn.00411641
test al, al
je 0x410dc7
mov eax, dword [ebp - 0x94]
cmp dword [ebp - 0x80], esi
jae 0x410c5e
lea eax, [ebp - 0x94]
push 0x104
push eax
lea eax, [ebp - 0x278]
push eax
call fcn.005b7281
add esp, 0xc
lea eax, [ebp - 0x278]
push eax
lea ecx, [ebp - 0xf4]
call fcn.0041030e
mov byte [ebp - 4], 7
lea eax, [ebp - 0x114]
push eax
lea ecx, [ebp - 0xf4]
call fcn.004103e1
mov byte [ebp - 4], 8
mov esi, 0x6831ac
push esi
call fcn.005b3330
pop ecx
push eax
push esi
push dword [ebp - 0xfc]
lea ecx, [ebp - 0x110]
push ebx
call fcn.00412070
test eax, eax
jne 0x410d6e
lea eax, [ebp - 0x16c]
push eax
lea ecx, [ebp - 0xf4]
call fcn.004104be
mov byte [ebp - 4], 9
cmp eax, ebx
je 0x410ce6
add eax, 4
jmp 0x410ce8
xor eax, eax
sub esp, 0x1c
mov ecx, esp
mov dword [ebp + 0x10], esp
push str._texcache.epk
push eax
push ecx
call fcn.00411fda
add esp, 0xc
mov byte [ebp - 4], 0xa
mov byte [ebp - 4], 9
lea ecx, [ebp - 0xb8]
call fcn.00410349
mov byte [ebp - 4], 0xc
lea ecx, [ebp - 0x16c]
call fcn.00410395
cmp dword [ebp - 0x9c], 0x10
mov eax, dword [ebp - 0xb0]
jae 0x410d36
lea eax, [ebp - 0xb0]
push ebx
push eax
call fcn.005b73fe
pop ecx
pop ecx
test eax, eax
jne 0x410d5f
cmp dword [ebp - 0x9c], 0x10
mov eax, dword [ebp - 0xb0]
jae 0x410d58
lea eax, [ebp - 0xb0]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov byte [ebp - 4], 8
lea ecx, [ebp - 0xb8]
call fcn.00410395
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
lea ecx, [ebp - 0x114]
call fcn.00410395
mov byte [ebp - 4], 6
lea ecx, [ebp - 0xf4]
call fcn.00410395
mov byte [ebp - 4], 3
push ebx
push 1
lea ecx, [ebp - 0x7c]
call fcn.00403747
mov byte [ebp - 4], bl
push ebx
push 1
lea ecx, [ebp - 0x98]
call fcn.00403747
lea esi, [ebp - 0x24]
call fcn.00404932
jmp 0x410b6e
cmp dword [ebp + 0x18], ebx
je 0x410e08
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x10]
test al, al
je 0x410e08
mov eax, dword [ebp - 0x78]
cmp dword [ebp - 0x64], esi
jae 0x410de2
lea eax, [ebp - 0x78]
push eax
push str.FAILED_DOWNLOAD_FILE
call fcn.004031f6
mov esi, eax
call fcn.004057ed
mov ecx, dword [ebp + 0x18]
push eax
push str._s____s
push 2
pop esi
call fcn.00422740
add esp, 0xc
mov byte [ebp - 4], 3
push ebx
push 1
lea ecx, [ebp - 0x7c]
call fcn.00403747
mov byte [ebp - 4], bl
push ebx
push 1
lea ecx, [ebp - 0x98]
jmp 0x410add
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0xc]
xor ebx, ebx
inc ebx
jmp 0x410ae2