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 - 0x6c], edx
mov dword [ebp - 0x68], ebx
test eax, eax
js 0x4031bd
sub esp, 0xc
add eax, dword [0x42f990]
push eax
call fcn.00403124
add esp, 0xc
push esi
push esi
push 4
lea eax, [ebp - 0x10]
push eax
call fcn.00403140
pop edx
pop ecx
test eax, eax
je 0x4033ce
mov eax, dword [ebp - 0x10]
test eax, eax
jns 0x40335e
call sub.KERNEL32.dll_GetTickCount
mov dword [ebp - 0x64], eax
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 eax, dword [ebp - 0x10]
and eax, 0x7fffffff
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x10], eax
xor esi, esi
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
pop ecx
test eax, eax
je 0x4033ce
mov dword [0x420c90], 0x40cc60
mov dword [0x420c94], ebx
sub dword [ebp - 0x10], ebx
mov edx, dword [ebp - 0x6c]
mov dword [0x420c98], edx
mov eax, dword [ebp - 0x68]
mov dword [0x420c9c], eax
sub esp, 0xc
push 0x420c90
call fcn.00407463
mov dword [ebp - 0x60], eax
add esp, 0xc
test eax, eax
jns 0x4032a2
mov esi, 0xfffffffc
jmp 0x4033da
mov ebx, dword [0x420c98]
sub ebx, dword [ebp - 0x6c]
call sub.KERNEL32.dll_GetTickCount
mov edi, eax
test byte [0x42f91c], 1
je 0x4032fe
sub eax, dword [ebp - 0x64]
cmp eax, 0xc8
ja 0x4032cb
cmp dword [ebp - 0x10], 0
jne 0x4032fe
push eax
push dword [ebp - 0x70]
push 0x64
mov eax, dword [ebp - 0x70]
sub eax, dword [ebp - 0x10]
push eax
call sub.KERNEL32.dll_MulDiv
push eax
push str....__d__
lea edx, [ebp - 0x54]
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
push 0
lea edx, [ebp - 0x14]
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
add esi, ebx
sub dword [ebp - 0x68], ebx
mov eax, dword [0x420c98]
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
pop ecx
test eax, eax
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
add esi, ebx
sub dword [ebp - 0x10], 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
push dword [ebp + 0x10]
call fcn.00403140
pop edx
pop ecx
mov esi, ebx
test eax, eax
jne 0x4033da
mov esi, 0xfffffffd
jmp 0x4033da
mov esi, 0xfffffffe
mov eax, esi
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
leave
ret 0x10