Function at 0x410024
Capabilities:
Get file size

Disassembly:
mov eax, 0x5e5151
call fcn.005c3f5c
sub esp, 0xdc
push ebx
push esi
push edi
mov edi, ecx
mov eax, dword [edi]
call dword [eax + 0x10]
test al, al
jne 0x410055
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 0x41009d
cmp dword [ebp + 0x18], ebx
je 0x410042
push str.INVALID_CRC_TABLE
push ecx
call fcn.00403080
add esp, 4
call fcn.00405670
push 2
mov ecx, eax
mov eax, dword [ebp + 0x18]
pop esi
call fcn.004203d0
jmp 0x410042
lea eax, [ebp - 0xe4]
push eax
call fcn.00403c74
mov dword [ebp - 4], ebx
push str.TORRENT_STATE_CHECKING
push ecx
call fcn.00403080
add esp, 4
call fcn.00405670
mov esi, dword [edi + 8]
push eax
call fcn.0041422a
mov esi, dword [edi + 8]
push ebx
mov ebx, 0x63141c
push ebx
call fcn.00414246
mov eax, dword [edi + 8]
push ebx
lea ecx, [eax + 0x1e0]
call fcn.00402481
mov ebx, dword [edi + 8]
call fcn.004141be
mov eax, dword [ebp + 8]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x20]
push eax
xor ebx, ebx
lea eax, [ebp - 0x14]
mov dword [ebp - 0x24], ebx
call fcn.00414bef
pop ecx
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x14]
call fcn.004115b9
pop ecx
mov eax, dword [ebp - 0x20]
cmp eax, ebx
je 0x41011f
cmp eax, dword [ebp - 0x58]
je 0x410124
call fcn.005749cd
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x54]
je 0x4102f8
lea esi, [ebp - 0x20]
call fcn.00438751
mov ebx, eax
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x10]
test al, al
je 0x4102ca
mov ecx, dword [edi + 8]
mov eax, dword [ecx]
call dword [eax + 0x14]
test eax, eax
jne 0x4102df
push ebx
push dword [ebp + 0x10]
lea eax, [ebp - 0x48]
push eax
mov byte [ebp - 0xd], 1
call fcn.0040f30e
add esp, 0xc
mov byte [ebp - 4], 1
cmp dword [ebp - 0x30], 8
mov eax, dword [ebp - 0x44]
jae 0x41017d
lea eax, [ebp - 0x44]
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x410254
lea eax, [ebp - 0x50]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x410242
lea eax, [ebp - 0x2c]
push eax
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileTime]
test eax, eax
je 0x410242
mov eax, dword [ebx + 0x28]
mov edx, dword [ebp - 0x50]
xor ecx, ecx
cmp edx, eax
jne 0x410242
mov eax, dword [ebp - 0x4c]
cmp eax, ecx
jne 0x410242
mov eax, dword [ebp - 0x28]
cmp eax, dword [ebx + 0x20]
jne 0x4101ef
mov eax, dword [ebp - 0x2c]
cmp eax, dword [ebx + 0x24]
jne 0x4101ef
mov byte [ebp - 0xd], cl
jmp 0x410242
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebp - 0x18], 0xffffffff
and dword [ebp - 0x14], 0
cmp dword [ebp - 0x30], 8
mov eax, dword [ebp - 0x44]
jae 0x41020a
lea eax, [ebp - 0x44]
push eax
lea esi, [ebp - 0x14]
call fcn.004135b7
pop ecx
cmp al, 1
jne 0x410254
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebx + 0x1c]
jne 0x410254
cmp dword [ebp - 0x30], 8
mov eax, dword [ebp - 0x44]
jae 0x41022c
lea eax, [ebp - 0x44]
push dword [ebx + 0x24]
push dword [ebx + 0x20]
push eax
call fcn.0040717f
mov esi, dword [ebp - 0x18]
add esp, 0xc
mov byte [ebp - 0xd], 0
cmp esi, 0xffffffff
je 0x41024e
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [ebp - 0xd], 0
je 0x41026d
push ebx
lea ecx, [ebp - 0xe4]
call fcn.0040401d
inc dword [edi + 0xc]
mov eax, dword [ebx + 0x28]
add dword [edi + 0x30], eax
adc dword [edi + 0x34], 0
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 - 0x24]
fild dword [ebp - 0x24]
mov dword [ebp - 0x18], eax
fild dword [ebp - 0x18]
test eax, eax
jge 0x410292
fadd dword [0x635c20]
fdivp st(1)
mov eax, dword [edi + 8]
fstp dword [ebp - 0x18]
fld dword [ebp - 0x18]
fstp dword [eax + 0x200]
mov ebx, dword [edi + 8]
call fcn.004141be
mov byte [ebp - 4], 0
push 0
push 1
lea ecx, [ebp - 0x48]
call fcn.00403955
lea esi, [ebp - 0x20]
call fcn.0040473c
xor ebx, ebx
jmp 0x410113
or dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0xe4]
push eax
call fcn.00403cfd
jmp 0x410042
xor esi, esi
or dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0xe4]
push eax
call fcn.00403cfd
mov eax, esi
jmp 0x410044
cmp dword [edi + 0xc], ebx
jne 0x410336
push 0x63141c
lea ecx, [ebp - 0xac]
call fcn.00406054
mov byte [ebp - 4], 2
mov eax, dword [edi]
push ebx
lea ecx, [ebp - 0xac]
push ecx
mov ecx, edi
call dword [eax + 8]
mov byte [ebp - 4], 0
xor esi, esi
push ebx
inc esi
push esi
lea ecx, [ebp - 0xac]
call fcn.00403955
jmp 0x4102e1
push str.TORRENT_TOTAL_PROGRESS
push ecx
call fcn.00403080
add esp, 4
call fcn.00405670
mov esi, dword [edi + 8]
push eax
call fcn.0041422a
push ebx
push str.TORRENT_STATE_DOWNLOADING
call fcn.00403080
call fcn.00405670
mov esi, dword [edi + 8]
push eax
call fcn.00414246
mov eax, dword [edi + 8]
push 0x63141c
lea ecx, [eax + 0x1e0]
call fcn.00402481
mov ebx, dword [edi + 8]
call fcn.004141be
lea eax, [ebp - 0xe4]
mov dword [ebp + 8], eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp + 8]
call fcn.00414bef
pop ecx
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp + 8]
call fcn.004115b9
pop ecx
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x4103b5
cmp eax, dword [ebp - 0x2c]
je 0x4103ba
call fcn.005749cd
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x28]
je 0x410526
lea esi, [ebp - 0x20]
call fcn.00438751
mov ebx, eax
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x10]
test al, al
je 0x4102df
push ebx
push dword [ebp + 0x14]
lea eax, [ebp - 0x90]
push eax
call fcn.0040f30e
add esp, 0xc
mov byte [ebp - 4], 3
push ebx
push dword [ebp + 0xc]
lea eax, [ebp - 0xac]
push eax
call fcn.0040f30e
add esp, 0xc
mov byte [ebp - 4], 4
push 0x62d290
push eax
lea eax, [ebp - 0x74]
push eax
call fcn.0040f2b6
add esp, 0xc
mov byte [ebp - 4], 6
xor esi, esi
push esi
push 1
lea ecx, [ebp - 0xac]
call fcn.00403955
push 0xffffffffffffffff
push esi
push ebx
lea ecx, [edi + 0x40]
call fcn.00403a5a
mov eax, dword [ebx + 0x28]
mov dword [edi + 0x24], esi
mov dword [edi + 0x18], esi
mov dword [edi + 0x1c], esi
mov esi, edi
mov dword [edi + 0x20], eax
call fcn.00411135
cmp dword [ebp - 0x78], 8
mov ecx, dword [ebp - 0x8c]
jae 0x410467
lea ecx, [ebp - 0x8c]
cmp dword [ebp - 0x5c], 8
mov eax, dword [ebp - 0x70]
jae 0x410473
lea eax, [ebp - 0x70]
push dword [ebp + 0x18]
push ecx
push eax
mov ecx, edi
call fcn.00410d35
test al, al
je 0x4104be
push dword [ebx + 0x28]
mov eax, dword [edi]
push ebx
mov ecx, edi
call dword [eax + 8]
mov byte [ebp - 4], 3
push 0
push 1
lea ecx, [ebp - 0x74]
call fcn.00403955
mov byte [ebp - 4], 0
push 0
push 1
lea ecx, [ebp - 0x90]
call fcn.00403955
lea esi, [ebp - 0x20]
call fcn.0040473c
jmp 0x4103a9
xor ebx, ebx
cmp dword [ebp + 0x18], ebx
je 0x410500
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x10]
test al, al
je 0x410500
cmp dword [ebp - 0x5c], 8
mov eax, dword [ebp - 0x70]
jae 0x4104dc
lea eax, [ebp - 0x70]
push eax
push str.FAILED_DOWNLOAD_FILE
call fcn.00403080
call fcn.00405670
mov edi, dword [ebp + 0x18]
push eax
push str._s____s
push 2
pop esi
call fcn.00420400
add esp, 0xc
mov byte [ebp - 4], 3
push ebx
push 1
lea ecx, [ebp - 0x74]
call fcn.00403955
mov byte [ebp - 4], 0
push ebx
push 1
lea ecx, [ebp - 0x90]
call fcn.00403955
jmp 0x4102df
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0xc]
xor esi, esi
inc esi
jmp 0x4102e1