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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x6c
mov eax, dword [ebp + 8]
mov ebx, dword [ebp + 0x14]
cmp dword [ebp + 0x10], 0
jne 0x40319e
mov dword [ebp - 0x6c], 0x410c60
mov dword [ebp - 0x68], 0x8000
jmp 0x4031a7
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0x68], ebx
mov dword [ebp - 0x6c], edx
test eax, eax
js 0x4031bd
sub esp, 0xc
add eax, dword [0x42f990]
push eax
call fcn.00403124
add esp, 0xc
lea eax, [ebp - 0x10]
push esi
push esi
push 4
push eax
call fcn.00403140
pop edx
test eax, eax
pop ecx
je 0x4033ce
mov eax, dword [ebp - 0x10]
test eax, eax
jns 0x40335e
call sub.KERNEL32.dll_GetTickCount
xor esi, esi
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 0x10]
and eax, 0x7fffffff
mov dword [0x420ca0], 8
mov dword [0x4211bc], 0
mov dword [0x4211b8], 0
mov dword [0x42a848], 0x422840
mov dword [0x42a844], 0x422840
mov dword [0x42a840], 0x42a840
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x10], eax
jmp 0x403351
mov ebx, eax
cmp eax, 0x4000
jle 0x403246
mov ebx, 0x4000
push edi
push edi
push ebx
push 0x40cc60
call fcn.00403140
pop edx
test eax, eax
pop ecx
je 0x4033ce
sub dword [ebp - 0x10], ebx
mov dword [0x420c90], 0x40cc60
mov dword [0x420c94], ebx
sub esp, 0xc
mov edx, dword [ebp - 0x6c]
mov eax, dword [ebp - 0x68]
mov dword [0x420c98], edx
mov dword [0x420c9c], eax
push 0x420c90
call fcn.00407463
add esp, 0xc
mov dword [ebp - 0x60], eax
test eax, eax
jns 0x4032a2
mov esi, 0xfffffffc
jmp 0x4033da
mov ebx, dword [0x420c98]
sub ebx, dword [ebp - 0x6c]
call sub.KERNEL32.dll_GetTickCount
test byte [0x42f91c], 1
mov edi, eax
je 0x4032fe
sub eax, dword [ebp - 0x64]
cmp eax, 0xc8
ja 0x4032cb
cmp dword [ebp - 0x10], 0
jne 0x4032fe
push eax
mov eax, dword [ebp - 0x70]
push dword [ebp - 0x70]
sub eax, dword [ebp - 0x10]
push 0x64
push eax
call sub.KERNEL32.dll_MulDiv
lea edx, [ebp - 0x54]
push eax
push str....__d__
push edx
call sub.USER32.dll_wsprintfA
pop ecx
pop eax
lea eax, [ebp - 0x54]
push eax
push 0
call fcn.00403dbb
mov dword [ebp - 0x64], edi
pop eax
pop edx
test ebx, ebx
je 0x403351
cmp dword [ebp + 0x10], 0
jne 0x403335
sub esp, 0xc
lea edx, [ebp - 0x14]
push 0
push edx
push ebx
push dword [ebp - 0x6c]
push dword [ebp + 0xc]
call sub.KERNEL32.dll_WriteFile
add esp, 0xc
test eax, eax
je 0x4033d5
cmp dword [ebp - 0x14], ebx
jne 0x4033d5
add esi, ebx
jmp 0x403342
sub dword [ebp - 0x68], ebx
mov eax, dword [0x420c98]
add esi, ebx
mov dword [ebp - 0x6c], eax
cmp dword [ebp - 0x60], 1
je 0x4033da
jmp 0x403270
mov eax, dword [ebp - 0x10]
test eax, eax
jg 0x403238
jmp 0x4033da
cmp dword [ebp + 0x10], 0
jne 0x4033b5
xor esi, esi
lea edi, [ebp - 0x14]
jmp 0x4033ac
mov ebx, dword [ebp - 0x68]
cmp ebx, eax
jle 0x403374
mov ebx, eax
push eax
push eax
push ebx
push 0x40cc60
call fcn.00403140
pop edx
test eax, eax
pop ecx
je 0x4033ce
sub esp, 0xc
push 0
push edi
push ebx
push 0x40cc60
push dword [ebp + 0xc]
call sub.KERNEL32.dll_WriteFile
add esp, 0xc
test eax, eax
je 0x4033d5
cmp ebx, dword [ebp - 0x14]
jne 0x4033d5
sub dword [ebp - 0x10], ebx
add esi, ebx
mov eax, dword [ebp - 0x10]
test eax, eax
jg 0x40336b
jmp 0x4033da
cmp ebx, eax
jle 0x4033bb
mov ebx, eax
push esi
push esi
push ebx
mov esi, ebx
push dword [ebp + 0x10]
call fcn.00403140
pop edx
test eax, eax
pop ecx
jne 0x4033da
mov esi, 0xfffffffd
jmp 0x4033da
mov esi, 0xfffffffe
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret 0x10