Function at 0x40e8f1
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
push esi
mov esi, ecx
call fcn.0040c478
cmp dword [esi + 0x250], 0
mov ecx, esi
jne 0x40e916
push 0
call fcn.0040c7e7
jmp 0x40eb52
push ebx
push str.C:DOCUME1TommyLOCALS1TempJustin_Timberlake___Mirrors_2013_Pop__M4A_MP3___P2PDL_.8130409.TPB.torrent
mov ebx, str.http:__piratebaydownload.co_8130409_Justin_Timberlake___Mirrors_2013_Pop__M4A_MP3___P2PDL_.8130409.TPB.torrent
push ebx
call fcn.0040bfe4
test eax, eax
je 0x40eb51
push edi
lea edi, [esi + 0x230]
mov ecx, edi
call fcn.0040cf52
push 0x430958
push edi
push str.C:DOCUME1TommyLOCALS1TempJustin_Timberlake___Mirrors_2013_Pop__M4A_MP3___P2PDL_.8130409.TPB.torrent
push ebx
call fcn.0040e441
xor ebx, ebx
add esp, 0x10
cmp eax, ebx
jne 0x40eb57
push 0x430524
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov eax, dword [esi + 0x248]
xor ecx, ecx
push 4
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004144df
pop ecx
mov dword [0x43095c], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push ebx
push 2
push 0x113
mov dword [0x430540], eax
push dword [esi + 8]
call dword [sym.imp.USER32.dll_PostMessageW]
push ebx
push 0x3e8
push 2
push dword [esi + 8]
call dword [sym.imp.USER32.dll_SetTimer]
mov dword [0x430520], 2
mov eax, dword [edi + 0x14]
push edi
push dword [eax]
lea ecx, [ebp - 0x30]
mov dword [ebp - 8], ebx
call fcn.0040cd6b
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x2c]
push edi
push dword [edi + 0x14]
mov dword [ebp - 0x14], eax
jmp 0x40ea43
lea ecx, [ebp - 0x18]
call fcn.0040cd02
lea ecx, [ebp - 0x18]
mov dword [ebp - 0xc], eax
call fcn.0040cd02
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + 4]
cmp ecx, dword [eax + 8]
jae 0x40ea37
push str.Starting_download_thread
call fcn.0041723e
pop ecx
lea ecx, [ebp - 0x18]
call fcn.0040cd02
lea ecx, [ebp - 0x10]
push ecx
push ebx
push eax
push 0x40c0cd
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp eax, ebx
je 0x40ea37
mov edx, dword [ebp - 8]
mov ecx, dword [0x43095c]
inc dword [ebp - 8]
mov dword [ecx + edx*4], eax
lea ecx, [ebp - 0x18]
call fcn.0040c4fb
push edi
push dword [edi + 0x14]
lea ecx, [ebp - 0x20]
call fcn.0040cd6b
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x18]
call fcn.0040c4a5
test al, al
je 0x40e9e0
push 0xffffffffffffffff
push 1
push dword [0x43095c]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov eax, dword [edi + 0x14]
cmp dword [0x430520], 3
push edi
push dword [eax]
lea ecx, [ebp - 0x38]
mov dword [ebp - 8], ebx
setne byte [ebp - 1]
call fcn.0040cd6b
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x34]
push edi
push dword [edi + 0x14]
mov dword [ebp - 0x14], eax
jmp 0x40eac9
lea ecx, [ebp - 0x18]
call fcn.0040cd02
lea ecx, [ebp - 0x18]
mov dword [ebp - 0xc], eax
call fcn.0040cd02
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + 4]
cmp ecx, dword [eax + 8]
jae 0x40eabd
inc dword [ebp - 8]
lea ecx, [ebp - 0x18]
call fcn.0040c4fb
push edi
push dword [edi + 0x14]
lea ecx, [ebp - 0x28]
call fcn.0040cd6b
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x18]
call fcn.0040c4a5
test al, al
je 0x40ea9c
cmp byte [ebp - 1], bl
je 0x40eaef
cmp dword [ebp - 8], ebx
jg 0x40e9bd
push 2
push dword [esi + 8]
call dword [sym.imp.USER32.dll_KillTimer]
push dword [0x43095c]
call fcn.004144d4
pop ecx
mov dword [0x43095c], ebx
cmp dword [ebp - 8], ebx
jne 0x40eb1e
mov ecx, esi
call fcn.0040d7bb
mov dword [0x430520], ebx
push 0x430524
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov eax, dword [esi + 0x24c]
push str.C:DOCUME1TommyLOCALS1TempJustin_Timberlake___Mirrors_2013_Pop__M4A_MP3___P2PDL_.8130409.TPB.torrent
add eax, 4
push eax
call dword [sym.imp.SHLWAPI.dll_StrCpyW]
push ebx
push ebx
push 0x402
push dword [esi + 8]
call dword [sym.imp.USER32.dll_PostMessageW]
xor eax, eax
pop edi
pop ebx
pop esi
leave
ret 4
cmp eax, 2
jne 0x40eb4e
push ebx
mov ecx, esi
call fcn.0040c7e7
jmp 0x40eb50