Function at 0x47ff40
Capabilities:
Check if file exists
Check internet connectivity via wininet
Check mutex on windows
Get disk size
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d809b
mov eax, dword fs:[0]
push eax
sub esp, 0x88
mov eax, dword [0x508068]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov edi, eax
cmp byte [eax + 0xc], 0
jne 0x480448
mov ecx, dword [eax + 0x20]
lea esi, [eax + 0x20]
mov dword [ebp - 0x34], esi
cmp ecx, 1
jne 0x47ff9d
push eax
call fcn.00482f30
add esp, 4
test al, al
jne 0x480448
jmp 0x47ffe4
cmp ecx, 2
jne 0x47ffe7
add eax, 0xf8
cmp dword [eax + 0x14], 8
jb 0x47ffaf
mov eax, dword [eax]
lea ecx, [ebp - 0x18]
push ecx
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
mov eax, dword [edi + 0x11c]
cmp eax, dword [ebp - 0x14]
ja 0x480448
jb 0x47ffde
mov eax, dword [edi + 0x118]
cmp eax, dword [ebp - 0x18]
ja 0x480448
mov dword [esi], 0
mov eax, dword [ebp + 8]
mov ecx, dword [edi + 0x4e0]
cmp ecx, dword [edi + 0x110]
jne 0x480007
mov ecx, dword [edi + 0x4e4]
cmp ecx, dword [edi + 0x114]
je 0x4801ca
xor ecx, ecx
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 7
mov word [ebp - 0x30], cx
mov dword [ebp - 4], ecx
mov esi, dword [edi + 0x3d8]
cmp esi, dword [edi + 0x3dc]
je 0x480182
mov eax, dword [esi + 0x28]
or eax, dword [esi + 0x2c]
je 0x48016d
cmp byte [edi + 0x12], 0
lea eax, [edi + 0xf8]
push eax
je 0x4800ed
mov edx, 0x4faaac
lea ecx, [ebp - 0x64]
call fcn.00450750
lea ecx, [edi + 0xe0]
mov byte [ebp - 4], 1
push ecx
mov edx, eax
lea ecx, [ebp - 0x4c]
call fcn.00450640
push 0x4faa74
mov edx, eax
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x94]
call fcn.00408c90
push esi
mov edx, eax
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x7c]
call fcn.00450640
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x14], eax
add esp, 0x10
cmp ecx, eax
je 0x4800cd
call fcn.00407cb0
mov eax, dword [ebp - 0x14]
xor ecx, ecx
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x30], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x20], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
mov word [eax], cx
lea ecx, [ebp - 0x7c]
call fcn.00407cb0
lea ecx, [ebp - 0x94]
call fcn.00407cb0
lea ecx, [ebp - 0x4c]
call fcn.00407cb0
lea ecx, [ebp - 0x64]
jmp 0x48014d
mov edx, 0x4faaa0
lea ecx, [ebp - 0x4c]
call fcn.00450750
push esi
mov edx, eax
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x64]
call fcn.00450640
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x14], eax
add esp, 8
cmp ecx, eax
je 0x480142
call fcn.00407cb0
mov eax, dword [ebp - 0x14]
xor ecx, ecx
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x30], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x20], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
mov word [eax], cx
lea ecx, [ebp - 0x64]
call fcn.00407cb0
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], 0
call fcn.00407cb0
cmp dword [ebp - 0x1c], 8
lea eax, [ebp - 0x30]
cmovae eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4801aa
add esi, 0x148
cmp esi, dword [edi + 0x3dc]
jne 0x480030
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x34]
cmp dword [ecx], 1
jne 0x4801b8
mov byte [eax + 0x10], 1
mov eax, dword [0x5108a4]
cmp eax, dword [ebp + 8]
jne 0x48019d
call fcn.00479530
lea ecx, [ebp - 0x30]
call fcn.00407cb0
jmp 0x480448
mov ecx, dword [ebp - 0x34]
mov dword [ecx], 1
mov eax, dword [ebp + 8]
jmp 0x480185
lea ecx, [ebp - 0x30]
mov dword [ebp - 4], 0xffffffff
call fcn.00407cb0
mov eax, dword [ebp + 8]
push 0
push 0
push 0
mov byte [eax + 0xc], 1
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [edi + 0x464], eax
mov esi, dword [ebp + 8]
mov edi, dword [sym.imp.USER32.dll_MessageBoxA]
cmp dword [esi + 0x464], 0
jne 0x48020e
cmp byte [0x5102e0], 0
je 0x48020e
push 0
push str.CreateMutex___error
push str.it_torrent__mutex_Peers_Connect
push 0
call edi
mov esi, dword [ebp + 8]
cmp dword [esi + 0x128], 0
jle 0x480237
push esi
call fcn.0047d110
mov eax, dword [ebp + 8]
add esp, 4
mov dword [eax + 0x128], 0xffffffff
mov eax, dword [ebp + 8]
mov byte [eax + 0x10], 1
mov esi, dword [ebp + 8]
cmp byte [esi + 0x11], 0
jne 0x480244
mov byte [esi + 0xd], 1
mov esi, dword [ebp + 8]
cmp dword [esi + 0x12c], 0xffffffff
je 0x480256
mov byte [esi + 0xd], 1
jmp 0x480448
cmp byte [esi + 0x11], 0
jne 0x48033b
cmp dword [esi + 0x124], 0
je 0x48033b
mov eax, dword [esi + 0x120]
mov edx, dword [esi + 0x3b4]
dec eax
mov edi, eax
mov dword [ebp - 0x14], eax
mov ecx, eax
shr edi, 5
and ecx, 0x1f
mov eax, 1
shl eax, cl
mov ecx, dword [esi + 0x124]
test dword [edx + edi*4], eax
mov eax, dword [esi + 0x11c]
je 0x48030b
mul dword [ebp - 0x14]
mov edi, eax
mov eax, dword [esi + 0x118]
mul dword [ebp - 0x14]
add edi, edx
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x34], edi
cmp ecx, 1
jne 0x4802c8
mov dword [esi + 0x4e0], eax
mov dword [esi + 0x4e4], edi
jmp 0x480335
mov eax, dword [esi + 0x11c]
dec ecx
mul ecx
mov edi, eax
mov eax, dword [esi + 0x118]
mul ecx
add edi, edx
mov edx, dword [esi + 0x110]
mov ecx, edx
sub ecx, eax
mov eax, dword [esi + 0x114]
sbb eax, edi
sub ecx, dword [ebp - 0x14]
sbb eax, dword [ebp - 0x34]
add ecx, edx
adc eax, dword [esi + 0x114]
mov dword [esi + 0x4e0], ecx
mov dword [esi + 0x4e4], eax
jmp 0x480335
mul ecx
mov edi, eax
mov eax, dword [esi + 0x118]
mul ecx
mov ecx, dword [esi + 0x114]
add edi, edx
mov edx, dword [esi + 0x110]
sub edx, eax
mov dword [esi + 0x4e0], edx
sbb ecx, edi
mov dword [esi + 0x4e4], ecx
mov edi, dword [sym.imp.USER32.dll_MessageBoxA]
push 0
call fcn.004b59da
mov ecx, dword [ebp + 8]
add esp, 4
mov dword [ecx + 0x30], eax
mov dword [ecx + 0x34], edx
mov eax, dword [ebp + 8]
push 0
mov dword [eax + 0x4c8], 0
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x3f8]
mov dword [ecx + 0x404], eax
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.WININET.dll_InternetGetConnectedState]
test eax, eax
mov eax, dword [ebp + 8]
setne byte [0x50aeb0]
mov ecx, dword [eax + 0x3f0]
mov eax, dword [ecx]
cmp eax, ecx
je 0x4803e7
nop
mov dword [eax + 0x28], 0
mov ecx, dword [eax + 8]
cmp byte [ecx + 0xd], 0
je 0x4803c4
mov ecx, dword [eax + 4]
cmp byte [ecx + 0xd], 0
jne 0x4803c0
nop dword [eax]
cmp eax, dword [ecx + 8]
jne 0x4803c0
mov eax, ecx
mov ecx, dword [ecx + 4]
cmp byte [ecx + 0xd], 0
je 0x4803b0
mov eax, ecx
jmp 0x4803dc
mov eax, ecx
mov edx, dword [eax]
cmp byte [edx + 0xd], 0
jne 0x4803dc
nop
mov ecx, dword [edx]
mov eax, edx
mov edx, ecx
cmp byte [ecx + 0xd], 0
je 0x4803d0
mov ecx, dword [ebp + 8]
cmp eax, dword [ecx + 0x3f0]
jne 0x480390
push 0x3e8
push dword [0x50e600]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x48042f
push dword [ebp + 8]
lea ecx, [eax + 2]
call fcn.00480710
add esp, 4
push dword [0x50e600]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
test eax, eax
jne 0x480448
cmp byte [0x5102e0], al
je 0x480448
push eax
push 0x4fab04
push 0x4faaec
jmp 0x480444
cmp byte [0x5102e0], 0
je 0x480448
push 0
push str.start_torrent__
push 0x4fab1c
push 0
call edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004ad19c
mov esp, ebp
pop ebp
ret