Function at 0x4083e0
Capabilities:
Check for time delay via gettickcount
Resolve function by parsing pe exports
Write file on windows

Disassembly:
sub esp, 0xcf0
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0xd08]
xor ebp, ebp
cmp edi, ebp
mov ebx, ecx
je 0x408d0d
cmp dword [esp + 0xd04], ebp
je 0x408d0d
call fcn.00409090
push ebp
push 0x80
push 4
push ebp
push ebp
push 0xc0000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
mov dword [esp + 0x10], esi
jne 0x408461
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 3
mov eax, dword [esp + 0xd08]
push eax
mov ecx, dword [esp + 0xd1c]
push ecx
mov ecx, ebx
call fcn.00409dc0
pop edi
pop esi
pop ebp
mov eax, 5
pop ebx
add esp, 0xcf0
ret 0x14
lea edx, [esp + 0x9c]
push edx
push ebp
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExA]
test eax, eax
jne 0x408486
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 4
jmp 0x408438
mov edx, dword [esp + 0xd04]
mov esi, dword [esp + 0xbc]
mov eax, dword [esp + 0xb8]
push edx
lea ecx, [ebx + 0x358]
sub esi, eax
call sub.MFC42.DLL_CString::operator_1
mov dl, byte [0x420b8c]
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0x901]
mov byte [esp + 0x900], dl
mov byte [esp + 0x100], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0x101]
mov byte [esp + 0x500], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0x501]
lea edx, [esp + 0x100]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x500]
lea ecx, [esp + 0x4c]
push eax
push ecx
lea eax, [esp + 0x908]
push edx
push eax
mov ecx, ebx
mov dword [esp + 0x5c], 0x50
call fcn.004090f0
mov ecx, dword [esp + 0x4c]
lea edx, [esp + 0x100]
push ecx
push edx
mov ecx, ebx
mov dword [esp + 0x2c], ebp
call fcn.00408e50
test eax, eax
jne 0x40856d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0xd04]
mov edx, dword [esp + 0xd14]
push 5
push ecx
push edx
jmp 0x408448
lea eax, [esp + 0xc0]
xor edi, edi
push eax
push edi
lea ecx, [esp + 0x2c]
push esi
lea edx, [esp + 0x50c]
push ecx
push edx
mov ecx, ebx
mov dword [esp + 0x68], edi
call fcn.00409360
test eax, eax
jne 0x4085b7
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0xd04]
mov edx, dword [esp + 0xd14]
push 6
push ecx
push edx
jmp 0x408448
mov eax, dword [esp + 0x24]
mov dword [esp + 0x34], 0x20
cmp eax, 0x1a0
jne 0x408664
mov edx, dword [ebx + 0x44]
lea eax, [esp + 0x34]
push ebp
lea ecx, [esp + 0x80]
push eax
push ecx
push 0x35
push edx
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
je 0x408658
lea eax, [esp + 0x7c]
push 0x2f
push eax
call dword [sym.imp.MSVCRT.dll_strchr]
add esp, 8
cmp eax, ebp
je 0x408658
inc eax
push eax
call dword [sym.imp.MSVCRT.dll__atoi64]
mov dword [ebx + 0x380], eax
mov dword [ebx + 0x384], edx
mov eax, dword [ebx + 0x380]
add esp, 4
cmp esi, eax
jne 0x408658
mov eax, edx
cmp edi, eax
jne 0x408658
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esp + 0xd04]
mov eax, dword [esp + 0xd14]
push edx
push eax
mov ecx, ebx
call fcn.00409da0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xcf0
ret 0x14
mov eax, dword [esp + 0x24]
mov dword [esp + 0x34], 0x20
cmp eax, 0xc8
je 0x408694
cmp eax, 0xce
je 0x408694
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esp + 0xd04]
mov eax, dword [esp + 0xd14]
push 7
push edx
push eax
jmp 0x408448
lea ecx, [esp + 0xc0]
push str.text_html
push ecx
call dword [sym.imp.MSVCRT.dll__mbsicmp]
add esp, 8
test eax, eax
jne 0x4086e4
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0xd04]
mov ecx, dword [esp + 0xd14]
push 8
push eax
push ecx
mov ecx, ebx
call fcn.00409dc0
pop edi
pop esi
pop ebp
mov eax, 0xa
pop ebx
add esp, 0xcf0
ret 0x14
mov ecx, dword [ebx + 0x44]
lea edx, [esp + 0x34]
push ebp
lea eax, [esp + 0x80]
push edx
push eax
push 5
push ecx
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
cmp eax, ebp
mov dword [esp + 0x58], eax
jne 0x408743
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 0x380], ebp
mov dword [ebx + 0x384], ebp
cmp dword [esp + 0x24], 0xce
jne 0x40875f
mov ecx, dword [ebx + 0x380]
add ecx, esi
mov dword [ebx + 0x380], ecx
mov eax, dword [ebx + 0x384]
adc eax, edi
mov dword [ebx + 0x384], eax
jmp 0x4087c4
lea edx, [esp + 0x7c]
push edx
call dword [sym.imp.MSVCRT.dll__atoi64]
mov dword [ebx + 0x380], eax
add esp, 4
mov dword [ebx + 0x384], edx
jmp 0x408718
cmp edi, ebp
ja 0x40876b
cmp esi, ebp
jbe 0x408807
mov eax, dword [ebx + 0x380]
cmp eax, esi
jne 0x4087be
mov ecx, dword [ebx + 0x384]
cmp ecx, edi
jne 0x4087be
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, ebx
call fcn.00408dd0
mov ecx, ebx
call fcn.00409030
mov eax, dword [esp + 0xd04]
mov ecx, dword [esp + 0xd14]
push eax
push ecx
mov ecx, ebx
call fcn.00409da0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xcf0
ret 0x14
xor esi, esi
xor edi, edi
jmp 0x408807
cmp edi, ebp
ja 0x4087cc
cmp esi, ebp
jbe 0x408807
mov edi, dword [esp + 0x10]
push ebp
push ebp
push esi
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x408803
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esp + 0xd04]
mov eax, dword [esp + 0xd14]
push 9
push edx
push eax
jmp 0x408448
mov edi, dword [esp + 0x54]
mov ecx, dword [ebx + 0x384]
mov edx, dword [ebx + 0x380]
mov eax, dword [esp + 0xd04]
push ecx
mov ecx, dword [esp + 0xd18]
push edx
push eax
push ecx
mov dword [ebx + 0x388], esi
mov ecx, ebx
mov dword [ebx + 0x38c], edi
call fcn.00409d50
push 0x4000
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], ebp
mov dword [esp + 0x3c], ebp
call sub.MFC42.DLL_operatornew
mov dword [esp + 0x24], eax
mov eax, dword [ebx + 0x34]
add esp, 4
cmp eax, ebp
mov dword [esp + 0x14], ebp
mov dword [esp + 0x28], ebp
jbe 0x408871
push eax
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [esp + 0x14], eax
mov eax, dword [ebx + 0x39c]
mov edi, dword [esp + 0xd0c]
mov edx, dword [ebx + 0x398]
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0xd10]
mov ecx, edi
mov dword [esp + 0x5c], edx
mov dword [ebx + 0x398], ebp
mov dword [ebx + 0x3a0], ebp
mov dword [ebx + 0x39c], ebp
mov dword [ebx + 0x3a4], ebp
sub ecx, eax
mov edx, 8
mov dword [ecx + eax], ebp
mov dword [eax], ebp
add eax, 4
dec edx
jne 0x4088b4
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
xor ebp, ebp
mov dword [esp + 0x2c], 0x4000
mov dword [esp + 0x30], ebp
mov dword [esp + 0x3c], ebp
call esi
mov dword [esp + 0x44], eax
call esi
lea ecx, [esp + 0x18]
mov dword [edi], eax
mov edi, dword [esp + 0x20]
push ecx
push ebp
push 0x4000
push edi
mov ecx, ebx
call fcn.00409670
mov esi, eax
test esi, esi
je 0x408c35
mov eax, dword [esp + 0x1c]
test eax, eax
ja 0x408916
mov eax, dword [esp + 0x18]
test eax, eax
jbe 0x408c15
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [esp + 0x18]
mov esi, dword [esp + 0x3c]
add esi, ecx
mov edi, eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x3c], esi
mov esi, dword [ebx + 0x388]
adc ebp, eax
add esi, ecx
mov ecx, dword [esp + 0x44]
mov dword [ebx + 0x388], esi
mov edx, dword [ebx + 0x38c]
mov esi, edi
adc edx, eax
sub esi, ecx
cmp esi, 0x3e8
mov dword [ebx + 0x38c], edx
jae 0x408a09
mov edx, dword [ebx + 0x38]
test edx, edx
jbe 0x408a81
mov eax, edx
xor ecx, ecx
shl eax, 0xa
cmp ebp, ecx
jb 0x4089b6
ja 0x408980
cmp dword [esp + 0x3c], eax
jbe 0x4089b6
mov dword [esp + 0x6c], edx
mov edx, dword [esp + 0x44]
xor ebp, ebp
sub edx, edi
mov dword [esp + 0x70], ebp
add edx, 0x3e8
fild qword [esp + 0x6c]
push edx
fstp qword [ebx + 0x398]
call dword [sym.imp.KERNEL32.dll_Sleep]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esp + 0x44], eax
jmp 0x408a7d
sub eax, dword [esp + 0x3c]
sbb ecx, ebp
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], ecx
jne 0x4089cd
cmp eax, 0x4000
jbe 0x4089e2
mov dword [esp + 0x2c], 0x4000
mov dword [esp + 0x30], 0
jmp 0x408a81
test ecx, ecx
ja 0x408a81
jb 0x4089f7
cmp eax, 0x400
jae 0x408a81
mov dword [esp + 0x2c], 0x400
mov dword [esp + 0x30], 0
jmp 0x408a81
mov eax, dword [esp + 0x3c]
push 0
push 0x3e8
push ebp
push eax
call fcn.00416400
push 0
push esi
push edx
push eax
call fcn.00416390
push 0
push 0x400
push edx
push eax
call fcn.004162e0
mov dword [esp + 0x64], eax
mov eax, dword [ebx + 0x38]
mov dword [esp + 0x68], edx
fild qword [esp + 0x64]
test eax, eax
fst qword [esp + 0x44]
fstp qword [ebx + 0x398]
jbe 0x408a77
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], 0
fild qword [esp + 0x74]
fld qword [esp + 0x44]
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x408a75
fstp qword [ebx + 0x398]
jmp 0x408a77
fstp st(0)
mov dword [esp + 0x44], edi
xor ebp, ebp
mov dword [esp + 0x3c], ebp
fld qword [esp + 0x5c]
fadd qword [ebx + 0x398]
fmul qword [0x419c88]
fst qword [ebx + 0x398]
fstp qword [esp + 0x5c]
fld qword [ebx + 0x398]
fcomp qword [0x419c80]
fnstsw ax
test ah, 0x40
je 0x408ab6
fld qword [0x419c80]
jmp 0x408aec
mov ecx, dword [ebx + 0x380]
mov edx, dword [ebx + 0x388]
mov eax, dword [ebx + 0x38c]
sub ecx, edx
mov edx, dword [ebx + 0x384]
mov dword [esp + 0x50], ecx
sbb edx, eax
mov dword [esp + 0x54], edx
fild qword [esp + 0x50]
fld qword [ebx + 0x398]
fmul qword [0x419c78]
fdivp st(1)
mov eax, dword [esp + 0x14]
fstp qword [ebx + 0x3a0]
test eax, eax
je 0x408b99
mov esi, dword [esp + 0x28]
mov edi, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov ecx, esi
xor eax, eax
add ecx, edi
mov edi, dword [ebx + 0x34]
adc eax, edx
xor edx, edx
cmp eax, edx
ja 0x408b4c
jb 0x408b21
cmp ecx, edi
ja 0x408b4c
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov esi, dword [esp + 0x20]
lea edi, [eax + edx]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
add eax, dword [esp + 0x18]
mov dword [esp + 0x28], eax
jmp 0x408bbd
mov edi, dword [esp + 0x10]
lea eax, [esp + 0x38]
push 0
push eax
push esi
mov esi, dword [esp + 0x20]
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x408cd8
mov ecx, edi
push ecx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov ecx, dword [esp + 0x18]
mov esi, dword [esp + 0x20]
mov edi, dword [esp + 0x14]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x18]
mov dword [esp + 0x28], eax
jmp 0x408bbd
mov edx, dword [esp + 0x18]
mov esi, dword [esp + 0x20]
mov edi, dword [esp + 0x10]
lea ecx, [esp + 0x38]
push 0
push ecx
push edx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x408d1f
mov eax, dword [ebx + 0x39c]
mov ecx, dword [ebx + 0x398]
mov edx, dword [ebx + 0x38c]
push eax
mov eax, dword [ebx + 0x388]
push ecx
mov ecx, dword [esp + 0xd0c]
push edx
mov edx, dword [esp + 0xd20]
push eax
push ecx
push edx
mov ecx, ebx
call fcn.00409d70
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x2c]
mov edi, dword [esp + 0x20]
lea eax, [esp + 0x18]
push eax
push ecx
push edx
push edi
mov ecx, ebx
call fcn.00409670
mov esi, eax
test esi, esi
jne 0x408902
mov eax, dword [esp + 0x28]
test eax, eax
jbe 0x408c35
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x38]
push 0
push ecx
push eax
mov eax, dword [esp + 0x1c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [esp + 0x10]
mov ebp, dword [esp + 0xd04]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, ebx
call fcn.00408dd0
mov eax, dword [ebx + 0x3c]
test eax, eax
je 0x408c67
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebx + 0x3c]
test eax, eax
jne 0x408c55
mov ecx, ebx
call fcn.00409030
push edi
call sub.MFC42.DLL_operatordelete
mov eax, dword [esp + 0x18]
add esp, 4
test eax, eax
je 0x408c8a
mov edx, eax
push edx
call sub.MFC42.DLL_operatordelete
add esp, 4
test esi, esi
je 0x408da4
push str.youtube.com
push ebp
call dword [sym.imp.MSVCRT.dll__mbsstr]
add esp, 8
test eax, eax
jbe 0x408d3c
cmp dword [esp + 0x24], 0xce
jne 0x408d3c
lea eax, [esp + 0x7c]
push eax
call dword [sym.imp.MSVCRT.dll__atoi64]
add esp, 4
cmp eax, 0x100000
jne 0x408d3c
test edx, edx
jne 0x408d3c
push 0xb
push ebp
jmp 0x408440
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, ebx
call fcn.00408dd0
mov ecx, ebx
call fcn.00409030
mov eax, dword [esp + 0x20]
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
test esi, esi
je 0x408d0d
push esi
call sub.MFC42.DLL_operatordelete
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 5
pop ebx
add esp, 0xcf0
ret 0x14
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, ebx
call fcn.00408dd0
mov ecx, ebx
call fcn.00409030
jmp 0x408d04
mov eax, dword [esp + 0x58]
test eax, eax
je 0x408d7c
mov ecx, dword [ebx + 0x388]
mov eax, dword [ebx + 0x38c]
mov edx, dword [ebx + 0x384]
add ecx, 0x2800
adc eax, 0
cmp eax, edx
ja 0x408d7c
jb 0x408d6d
cmp ecx, dword [ebx + 0x380]
ja 0x408d7c
mov edx, dword [esp + 0xd14]
push 0xa
push ebp
xor esi, esi
push edx
jmp 0x408daf
mov eax, dword [esp + 0xd14]
push ebp
push eax
mov ecx, ebx
call fcn.00409da0
mov eax, esi
pop edi
neg eax
sbb eax, eax
pop esi
and al, 0xfb
pop ebp
add eax, 5
pop ebx
add esp, 0xcf0
ret 0x14
mov ecx, dword [esp + 0xd14]
push 0xc
push ebp
push ecx
mov ecx, ebx
call fcn.00409dc0
mov eax, esi
pop edi
neg eax
sbb eax, eax
pop esi
and al, 0xfb
pop ebp
add eax, 5
pop ebx
add esp, 0xcf0
ret 0x14