Function at 0x4083f0
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 0x408d1d
cmp dword [esp + 0xd04], ebp
je 0x408d1d
call fcn.004090a0
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 0x408471
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.00409de0
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 0x408496
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 4
jmp 0x408448
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 [0x41fbcc]
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.00409100
mov ecx, dword [esp + 0x4c]
lea edx, [esp + 0x100]
push ecx
push edx
mov ecx, ebx
mov dword [esp + 0x2c], ebp
call fcn.00408e60
test eax, eax
jne 0x40857d
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 0x408458
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.00409370
test eax, eax
jne 0x4085c7
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 0x408458
mov eax, dword [esp + 0x24]
mov dword [esp + 0x34], 0x20
cmp eax, 0x1a0
jne 0x408674
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 0x408668
lea eax, [esp + 0x7c]
push 0x2f
push eax
call dword [sym.imp.MSVCRT.dll_strchr]
add esp, 8
cmp eax, ebp
je 0x408668
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 0x408668
mov eax, edx
cmp edi, eax
jne 0x408668
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.00409dc0
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 0x4086a4
cmp eax, 0xce
je 0x4086a4
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 0x408458
lea ecx, [esp + 0xc0]
push 0x41ee54
push ecx
call dword [sym.imp.MSVCRT.dll__mbsicmp]
add esp, 8
test eax, eax
jne 0x4086f4
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.00409de0
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 0x408753
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 0x380], ebp
mov dword [ebx + 0x384], ebp
cmp dword [esp + 0x24], 0xce
jne 0x40876f
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 0x4087d4
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 0x408728
cmp edi, ebp
ja 0x40877b
cmp esi, ebp
jbe 0x408817
mov eax, dword [ebx + 0x380]
cmp eax, esi
jne 0x4087ce
mov ecx, dword [ebx + 0x384]
cmp ecx, edi
jne 0x4087ce
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, ebx
call fcn.00408de0
mov ecx, ebx
call fcn.00409040
mov eax, dword [esp + 0xd04]
mov ecx, dword [esp + 0xd14]
push eax
push ecx
mov ecx, ebx
call fcn.00409dc0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xcf0
ret 0x14
xor esi, esi
xor edi, edi
jmp 0x408817
cmp edi, ebp
ja 0x4087dc
cmp esi, ebp
jbe 0x408817
mov edi, dword [esp + 0x10]
push ebp
push ebp
push esi
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x408813
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 0x408458
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.00409d70
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 0x408881
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 0x4088c4
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.00409680
mov esi, eax
test esi, esi
je 0x408c45
mov eax, dword [esp + 0x1c]
test eax, eax
ja 0x408926
mov eax, dword [esp + 0x18]
test eax, eax
jbe 0x408c25
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 0x408a19
mov edx, dword [ebx + 0x38]
test edx, edx
jbe 0x408a91
mov eax, edx
xor ecx, ecx
shl eax, 0xa
cmp ebp, ecx
jb 0x4089c6
ja 0x408990
cmp dword [esp + 0x3c], eax
jbe 0x4089c6
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 0x408a8d
sub eax, dword [esp + 0x3c]
sbb ecx, ebp
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], ecx
jne 0x4089dd
cmp eax, 0x4000
jbe 0x4089f2
mov dword [esp + 0x2c], 0x4000
mov dword [esp + 0x30], 0
jmp 0x408a91
test ecx, ecx
ja 0x408a91
jb 0x408a07
cmp eax, 0x400
jae 0x408a91
mov dword [esp + 0x2c], 0x400
mov dword [esp + 0x30], 0
jmp 0x408a91
mov eax, dword [esp + 0x3c]
push 0
push 0x3e8
push ebp
push eax
call fcn.00416080
push 0
push esi
push edx
push eax
call fcn.00416010
push 0
push 0x400
push edx
push eax
call fcn.00415f60
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 0x408a87
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 0x408a85
fstp qword [ebx + 0x398]
jmp 0x408a87
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 [0x418c88]
fst qword [ebx + 0x398]
fstp qword [esp + 0x5c]
fld qword [ebx + 0x398]
fcomp qword [0x418c80]
fnstsw ax
test ah, 0x40
je 0x408ac6
fld qword [0x418c80]
jmp 0x408afc
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 [0x418c78]
fdivp st(1)
mov eax, dword [esp + 0x14]
fstp qword [ebx + 0x3a0]
test eax, eax
je 0x408ba9
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 0x408b5c
jb 0x408b31
cmp ecx, edi
ja 0x408b5c
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 0x408bcd
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 0x408ce8
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 0x408bcd
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 0x408d2f
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.00409d90
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.00409680
mov esi, eax
test esi, esi
jne 0x408912
mov eax, dword [esp + 0x28]
test eax, eax
jbe 0x408c45
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.00408de0
mov eax, dword [ebx + 0x3c]
test eax, eax
je 0x408c77
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebx + 0x3c]
test eax, eax
jne 0x408c65
mov ecx, ebx
call fcn.00409040
push edi
call sub.MFC42.DLL_operatordelete
mov eax, dword [esp + 0x18]
add esp, 4
test eax, eax
je 0x408c9a
mov edx, eax
push edx
call sub.MFC42.DLL_operatordelete
add esp, 4
test esi, esi
je 0x408db4
push 0x41ee48
push ebp
call dword [sym.imp.MSVCRT.dll__mbsstr]
add esp, 8
test eax, eax
jbe 0x408d4c
cmp dword [esp + 0x24], 0xce
jne 0x408d4c
lea eax, [esp + 0x7c]
push eax
call dword [sym.imp.MSVCRT.dll__atoi64]
add esp, 4
cmp eax, 0x100000
jne 0x408d4c
test edx, edx
jne 0x408d4c
push 0xb
push ebp
jmp 0x408450
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, ebx
call fcn.00408de0
mov ecx, ebx
call fcn.00409040
mov eax, dword [esp + 0x20]
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
test esi, esi
je 0x408d1d
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.00408de0
mov ecx, ebx
call fcn.00409040
jmp 0x408d14
mov eax, dword [esp + 0x58]
test eax, eax
je 0x408d8c
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 0x408d8c
jb 0x408d7d
cmp ecx, dword [ebx + 0x380]
ja 0x408d8c
mov edx, dword [esp + 0xd14]
push 0xa
push ebp
xor esi, esi
push edx
jmp 0x408dbf
mov eax, dword [esp + 0xd14]
push ebp
push eax
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
mov ecx, dword [esp + 0xd14]
push 0xc
push ebp
push ecx
mov ecx, ebx
call fcn.00409de0
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