Function at 0x402f77
Capabilities:
Check for time delay via gettickcount
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xcc4
push ebx
push esi
mov esi, dword [ebp + 0x14]
push edi
mov edi, dword [ebp + 0x10]
xor ebx, ebx
mov dword [ebp - 0xc], esi
cmp edi, ebx
jne 0x402f99
mov dword [ebp - 0xc], 0x8000
push 0xc28
lea eax, [ebp - 0xcc4]
push ebx
push eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0x10], ebx
call fcn.00407a10
or dword [ebp - 0xc0], 0xffffffff
add esp, 0xc
mov dword [ebp - 0xc4], ebx
mov dword [ebp - 8], edi
cmp edi, ebx
jne 0x402fcf
mov dword [ebp - 8], 0x411928
mov eax, dword [ebp + 8]
cmp eax, ebx
jl 0x402fe4
mov ecx, dword [0x42b898]
add ecx, eax
push ecx
call fcn.00402f5a
push 4
lea eax, [ebp + 0x14]
push eax
call fcn.00402f21
test eax, eax
jne 0x402ffb
push 0xfffffffffffffffd
pop eax
jmp 0x403221
test dword [ebp + 0x14], 0x80000000
je 0x403181
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, 0x421930
mov dword [ebp - 0x14], eax
call fcn.00406f77
and dword [ebp + 0x14], 0x7fffffff
mov eax, dword [ebp + 0x14]
mov dword [ebp + 8], eax
jle 0x403207
mov ebx, 0x40d928
mov esi, 0x4000
cmp dword [ebp + 0x14], esi
jge 0x403040
mov esi, dword [ebp + 0x14]
push esi
push ebx
call fcn.00402f21
test eax, eax
je 0x402ff3
sub dword [ebp + 0x14], esi
mov dword [0x421948], ebx
mov dword [0x42194c], esi
mov eax, dword [ebp - 0xc]
mov edi, dword [ebp - 8]
mov ecx, 0x421930
mov dword [0x421950], edi
mov dword [0x421954], eax
call fcn.00406f97
mov dword [ebp - 0x18], eax
test eax, eax
jl 0x403173
mov esi, dword [0x421950]
sub esi, edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
test byte [0x42b934], 1
mov edi, eax
je 0x4030e2
sub eax, dword [ebp - 0x14]
cmp eax, 0xc8
ja 0x4030a9
cmp dword [ebp + 0x14], 0
jne 0x4030e2
push dword [ebp + 8]
mov eax, dword [ebp + 8]
sub eax, dword [ebp + 0x14]
push 0x64
push eax
call dword [sym.imp.KERNEL32.dll_MulDiv]
push eax
lea eax, [ebp - 0x9c]
push str....__d__
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea eax, [ebp - 0x9c]
push eax
push 0
call fcn.00404b98
mov dword [ebp - 0x14], edi
xor eax, eax
cmp esi, eax
je 0x403165
cmp dword [ebp + 0x10], eax
jne 0x403148
xor edi, edi
inc edi
cmp dword [ebp - 0x10], edi
je 0x4030fa
cmp dword [ebp - 4], eax
jne 0x403121
push esi
push dword [ebp - 8]
lea eax, [ebp - 0xcc4]
push dword [ebp - 4]
push dword [ebp + 0xc]
push eax
call fcn.00405f8a
add esp, 0x14
cmp eax, 0xffffffff
je 0x40311d
mov dword [ebp - 0x10], edi
jmp 0x403143
and dword [ebp - 0x10], 0
cmp dword [ebp - 0x10], 0
jne 0x403143
push 0
lea eax, [ebp - 0x1c]
push eax
push esi
push dword [ebp - 8]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40317a
cmp dword [ebp - 0x1c], esi
jne 0x40317a
add dword [ebp - 4], esi
jmp 0x403156
mov eax, dword [0x421950]
add dword [ebp - 4], esi
sub dword [ebp - 0xc], esi
mov dword [ebp - 8], eax
cmp dword [ebp - 0x18], 1
jne 0x40305a
jmp 0x403207
cmp dword [ebp + 0x14], eax
jg 0x403033
jmp 0x403207
push 0xfffffffffffffffc
jmp 0x402ff5
push 0xfffffffffffffffe
jmp 0x402ff5
cmp edi, ebx
jne 0x4031ed
cmp dword [ebp + 0x14], ebx
jle 0x403207
mov ebx, 0x40d928
mov esi, dword [ebp - 0xc]
cmp dword [ebp + 0x14], esi
jge 0x40319a
mov esi, dword [ebp + 0x14]
push esi
push ebx
call fcn.00402f21
test eax, eax
je 0x402ff3
push esi
push ebx
push dword [ebp - 4]
lea eax, [ebp - 0xcc4]
push dword [ebp + 0xc]
push eax
call fcn.00405f8a
add esp, 0x14
cmp eax, 0xffffffff
jne 0x4031df
push 0
lea eax, [ebp + 0x10]
push eax
push esi
push ebx
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40317a
cmp esi, dword [ebp + 0x10]
jne 0x40317a
add dword [ebp - 4], esi
sub dword [ebp + 0x14], esi
cmp dword [ebp + 0x14], 0
jg 0x40318f
jmp 0x403207
cmp dword [ebp + 0x14], esi
jge 0x4031f5
mov esi, dword [ebp + 0x14]
push esi
push edi
call fcn.00402f21
test eax, eax
je 0x402ff3
mov dword [ebp - 4], esi
cmp dword [ebp + 0xc], 0
je 0x40321e
push dword [ebp + 0xc]
lea eax, [ebp - 0xcc4]
push eax
call fcn.00405f0e
pop ecx
pop ecx
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 0x10