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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
push ebx
push esi
mov esi, dword [ebp + 0x14]
push edi
mov edi, dword [ebp + 0x10]
xor ebx, ebx
cmp edi, ebx
mov dword [ebp - 8], esi
jne 0x403596
mov dword [ebp - 8], 0x8000
cmp edi, ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], edi
jne 0x4035a7
mov dword [ebp - 0xc], 0x797cd0
mov eax, dword [ebp + 8]
cmp eax, ebx
jl 0x4035bc
mov ecx, dword [0x7d1398]
add ecx, eax
push ecx
call fcn.004037b8
lea eax, [ebp + 0x14]
push 4
push eax
call fcn.00403786
test eax, eax
je 0x403774
test byte [ebp + 0x17], 0x80
je 0x403715
call dword [sym.imp.KERNEL32.dll_GetTickCount]
and dword [ebp + 0x14], 0x7fffffff
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x14]
mov byte [0x4153d8], 0xb
mov dword [0x4153f0], ebx
mov dword [ebp + 8], eax
jle 0x40377c
mov ebx, 0x793cd0
mov esi, 0x4000
cmp dword [ebp + 0x14], esi
jge 0x403614
mov esi, dword [ebp + 0x14]
push esi
push ebx
call fcn.00403786
test eax, eax
je 0x403774
sub dword [ebp + 0x14], esi
mov dword [0x4153c8], ebx
mov dword [0x4153cc], esi
mov edi, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
push 0x4153c8
mov dword [0x4153d0], edi
mov dword [0x4153d4], eax
call fcn.004068d0
test eax, eax
mov dword [ebp - 0x18], eax
jl 0x40370d
mov esi, dword [0x4153d0]
sub esi, edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
test byte [0x40a848], 1
mov edi, eax
je 0x4036b4
sub eax, dword [ebp - 0x10]
cmp eax, 0xc8
ja 0x403681
cmp dword [ebp + 0x14], 0
jne 0x4036b4
mov eax, dword [ebp + 8]
push dword [ebp + 8]
sub eax, dword [ebp + 0x14]
push 0x64
push eax
call dword [sym.imp.KERNEL32.dll_MulDiv]
push eax
lea eax, [ebp - 0x58]
push 0x40a740
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x58]
push eax
push 0
call fcn.00405606
mov dword [ebp - 0x10], edi
xor eax, eax
cmp esi, eax
je 0x403702
cmp dword [ebp + 0x10], eax
jne 0x4036df
push eax
lea eax, [ebp - 0x14]
push eax
push esi
push dword [ebp - 0xc]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x403711
cmp dword [ebp - 0x14], esi
jne 0x403711
add dword [ebp - 4], esi
jmp 0x4036f7
sub dword [ebp - 8], esi
add dword [ebp - 4], esi
mov eax, dword [0x4153d0]
cmp dword [ebp - 8], 1
mov dword [ebp - 0xc], eax
jl 0x40377c
cmp dword [ebp - 0x18], 4
je 0x40377c
jmp 0x403632
cmp dword [ebp + 0x14], eax
jg 0x403607
jmp 0x40377c
push 0xfffffffffffffffc
jmp 0x403776
push 0xfffffffffffffffe
jmp 0x403776
cmp edi, ebx
jne 0x403761
cmp dword [ebp + 0x14], ebx
jle 0x40377c
mov ebx, 0x793cd0
mov esi, dword [ebp - 8]
cmp dword [ebp + 0x14], esi
jge 0x40372e
mov esi, dword [ebp + 0x14]
push esi
push ebx
call fcn.00403786
test eax, eax
je 0x403774
lea eax, [ebp + 0x10]
push 0
push eax
push esi
push ebx
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x403711
cmp esi, dword [ebp + 0x10]
jne 0x403711
add dword [ebp - 4], esi
sub dword [ebp + 0x14], esi
cmp dword [ebp + 0x14], 0
jg 0x403723
jmp 0x40377c
cmp dword [ebp + 0x14], esi
jge 0x403769
mov esi, dword [ebp + 0x14]
push esi
push edi
call fcn.00403786
test eax, eax
jne 0x403779
push 0xfffffffffffffffd
pop eax
jmp 0x40377f
mov dword [ebp - 4], esi
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 0x10