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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffca8
mov eax, 0x69d2ab
xor edx, edx
push ebx
push esi
push edi
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x30], 0x6f4e84
mov dword [ebp - 0x2c], esp
mov dword [ebp - 0x34], eax
mov word [ebp - 0x28], 0
mov dword [ebp - 0x1c], edx
mov ecx, dword fs:[0]
mov dword [ebp - 0x38], ecx
lea eax, [ebp - 0x38]
mov dword fs:[0], eax
mov edx, dword [ebx + 0x4c]
cmp edx, 0xffffffff
jne 0x66d0c0
mov ecx, dword [ebp - 0x38]
mov dword fs:[0], ecx
mov eax, ecx
jmp 0x66d6f9
mov edx, dword [ebx + 0xb8]
mov dword [ebp - 0x3c], edx
mov edi, dword [ebx + 0xb4]
lea esi, [ebx + 0xb0]
push edi
mov eax, dword [esi + 8]
push eax
mov edx, dword [ebp - 0x3c]
push edx
call fcn.0066d700
mov ecx, eax
mov eax, dword [esi + 8]
mov dword [ebp - 0x40], eax
add esp, 0xc
mov eax, dword [ebp - 0x3c]
sub eax, edi
push ecx
cdq
mov ecx, 0x30
idiv ecx
shl eax, 4
pop ecx
lea eax, [eax + eax*2]
sub dword [esi + 8], eax
mov edx, dword [ebp - 0x40]
push edx
push ecx
push esi
call fcn.004848d0
add esp, 0xc
xor ecx, ecx
mov byte [ebx + 0x4a], cl
mov byte [ebx + 0x49], cl
xor esi, esi
call sub.KERNEL32.DLL_GetTickCount
push eax
lea edx, [ebp - 0x2e8]
mov eax, dword [ebx + 0x68]
push eax
push str._s__08x
push edx
call fcn.006a0ad0
add esp, 0x10
lea ecx, [ebp - 0x2e8]
push ecx
lea eax, [ebx + 0x30]
push eax
call fcn.0069a464
add esp, 8
lea edx, [ebp - 0x284]
add edx, esi
push 4
push 0x6f55fc
push edx
call fcn.0069cc60
add esp, 0xc
add esi, 4
lea ecx, [ebp - 0x2e8]
push ecx
call fcn.0069ce0c
pop ecx
inc eax
push eax
lea eax, [ebp - 0x2e8]
push eax
lea edx, [ebp - 0x284]
add edx, esi
push edx
call fcn.0069cc60
add esp, 0xc
lea ecx, [ebp - 0x2e8]
push ecx
call fcn.0069ce0c
add eax, esi
pop ecx
inc eax
lea ecx, [ebp - 0x284]
mov esi, eax
mov eax, dword [ebx + 0x28]
mov edx, dword [eax - 4]
inc edx
add ecx, esi
push edx
push eax
push ecx
call fcn.0069cc60
mov eax, dword [ebx + 0x28]
add esp, 0xc
lea ecx, [ebp - 0x284]
mov edx, dword [eax - 4]
mov eax, dword [ebx + 0x68]
add edx, esi
inc edx
mov esi, edx
mov edx, dword [eax - 4]
inc edx
add ecx, esi
push edx
push eax
push ecx
call fcn.0069cc60
mov eax, dword [ebx + 0x68]
add esp, 0xc
lea ecx, [ebp - 0x48]
mov edx, dword [eax - 4]
mov word [ebp - 0x28], 0x14
push ecx
add edx, esi
inc edx
lea eax, [ebp - 0x10]
push 0x6f4cab
push eax
mov esi, edx
call fcn.0069a6ec
add esp, 0xc
inc dword [ebp - 0x1c]
mov word [ebp - 0x28], 8
mov edx, dword [ebp - 8]
mov edi, dword [edx - 4]
push 0x6f4cb9
call fcn.0069ce0c
pop ecx
push eax
push 0
push eax
push 0x6f4cb9
push 0
push edi
lea eax, [ebp - 0x10]
push eax
call fcn.0069ad68
add esp, 0x1c
push 0
push 0x80
push 3
push 0
push 1
push 0x40000000
mov edx, dword [ebp - 8]
push edx
call sub.KERNEL32.DLL_CreateFileA
mov edi, eax
cmp edi, 0xffffffff
je 0x66d66b
push 0
lea eax, [ebp - 0x4c]
push eax
push esi
lea edx, [ebp - 0x284]
push edx
push edi
call sub.KERNEL32.DLL_WriteFile
call sub.KERNEL32.DLL_GetTickCount
mov dword [ebx + 0x44], eax
lea ecx, [ebx + 0x60]
mov dword [ebp - 0x50], ecx
lea eax, [ebx + 0xb0]
mov dword [ebp - 0x54], eax
mov edx, dword [ebp - 0x54]
mov eax, dword [ebp - 0x54]
mov ecx, dword [edx + 8]
mov edx, dword [eax + 0x18]
cmp ecx, edx
je 0x66d64a
mov ecx, dword [ebp - 0x54]
mov eax, dword [ecx + 8]
mov dword [ebp - 0x58], eax
mov edx, dword [ebp - 0x58]
mov dword [ebp - 0x14], edx
test edx, edx
je 0x66d641
mov word [ebp - 0x28], 0x2c
xor eax, eax
mov dword [ebp - 0x5c], eax
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x5c]
mov dword [ecx + 8], eax
mov edx, dword [ebp - 0x50]
mov ecx, dword [edx + 8]
mov eax, dword [ecx - 0xc]
inc eax
test eax, eax
jle 0x66d323
mov edx, dword [ebp - 0x50]
mov ecx, dword [edx + 8]
mov dword [ebp - 0x60], ecx
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x60]
mov dword [eax + 8], edx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x64], ecx
mov eax, dword [ebp - 0x64]
mov edx, dword [eax + 8]
mov dword [ebp - 0x2f0], edx
mov ecx, dword [ebp - 0x14]
mov eax, dword [ecx + 8]
add eax, 0xfffffff4
mov dword [ebp - 0x68], eax
mov edx, 0x6ff36c
mov ecx, dword [ebp - 0x68]
cmp edx, ecx
je 0x66d39c
mov eax, dword [ebp - 0x68]
push eax
call sub.KERNEL32.DLL_InterlockedIncrement
jmp 0x66d39c
mov edx, dword [ebp - 0x50]
mov ecx, dword [edx + 8]
mov eax, dword [ecx - 4]
mov dword [ebp - 0x6c], eax
mov edx, dword [ebp - 0x6c]
push edx
mov ecx, dword [ebp - 0x6c]
push ecx
mov eax, dword [ebp - 0x14]
push eax
call fcn.0069a874
add esp, 0xc
mov dword [ebp - 0x74], eax
mov edx, dword [ebp - 0x74]
add edx, 0xc
mov dword [ebp - 0x70], edx
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x70]
mov dword [ecx + 8], eax
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x78], edx
mov ecx, dword [ebp - 0x78]
mov eax, dword [ecx + 8]
mov dword [ebp - 0x300], eax
mov edx, dword [ebp - 0x6c]
mov dword [ebp - 0x7c], edx
mov ecx, dword [ebp - 0x50]
mov eax, dword [ecx + 8]
mov dword [ebp - 0x80], eax
mov edx, dword [ebp - 0x14]
mov ecx, dword [edx + 8]
mov dword [ebp - 0x84], ecx
mov eax, dword [ebp - 0x7c]
push eax
mov edx, dword [ebp - 0x80]
push edx
mov ecx, dword [ebp - 0x84]
push ecx
call fcn.0069cc60
add esp, 0xc
inc dword [ebp - 0x1c]
mov eax, dword [ebp - 0x50]
add eax, 0x10
mov dword [ebp - 0x88], eax
xor eax, eax
mov esi, dword [ebp - 0x14]
mov dword [ebp - 0x8c], eax
add esi, 0x10
mov edx, dword [ebp - 0x8c]
mov dword [esi + 8], edx
mov ecx, dword [ebp - 0x88]
mov eax, dword [ecx + 8]
mov edx, dword [eax - 0xc]
inc edx
test edx, edx
jle 0x66d430
mov ecx, dword [ebp - 0x88]
mov eax, dword [ecx + 8]
mov dword [ebp - 0x90], eax
mov edx, dword [ebp - 0x90]
mov dword [esi + 8], edx
mov dword [ebp - 0x94], esi
mov ecx, dword [ebp - 0x94]
mov eax, dword [ecx + 8]
mov dword [ebp - 0x310], eax
mov edx, dword [esi + 8]
add edx, 0xfffffff4
mov dword [ebp - 0x98], edx
mov ecx, 0x6ff36c
mov eax, dword [ebp - 0x98]
cmp ecx, eax
je 0x66d4cd
mov edx, dword [ebp - 0x98]
push edx
call sub.KERNEL32.DLL_InterlockedIncrement
jmp 0x66d4cd
mov ecx, dword [ebp - 0x88]
mov eax, dword [ecx + 8]
mov edx, dword [eax - 4]
mov dword [ebp - 0x9c], edx
mov ecx, dword [ebp - 0x9c]
push ecx
mov eax, dword [ebp - 0x9c]
push eax
push esi
call fcn.0069a874
add esp, 0xc
mov dword [ebp - 0xa4], eax
mov edx, dword [ebp - 0xa4]
add edx, 0xc
mov dword [ebp - 0xa0], edx
mov ecx, dword [ebp - 0xa0]
mov dword [esi + 8], ecx
mov dword [ebp - 0xa8], esi
mov eax, dword [ebp - 0xa8]
mov edx, dword [eax + 8]
mov dword [ebp - 0x320], edx
mov ecx, dword [ebp - 0x9c]
mov dword [ebp - 0xac], ecx
mov eax, dword [ebp - 0x88]
mov edx, dword [eax + 8]
mov dword [ebp - 0xb0], edx
mov ecx, dword [esi + 8]
mov dword [ebp - 0xb4], ecx
mov eax, dword [ebp - 0xac]
push eax
mov edx, dword [ebp - 0xb0]
push edx
mov ecx, dword [ebp - 0xb4]
push ecx
call fcn.0069cc60
add esp, 0xc
inc dword [ebp - 0x1c]
xor ecx, ecx
mov eax, dword [ebp - 0x50]
add eax, 0x20
mov dword [ebp - 0xb8], eax
mov edx, dword [ebp - 0x14]
add edx, 0x20
mov dword [ebp - 0xbc], edx
mov dword [ebp - 0xc0], ecx
mov eax, dword [ebp - 0xbc]
mov edx, dword [ebp - 0xc0]
mov dword [eax + 8], edx
mov ecx, dword [ebp - 0xb8]
mov eax, dword [ecx + 8]
mov edx, dword [eax - 0xc]
inc edx
test edx, edx
jle 0x66d57f
mov ecx, dword [ebp - 0xb8]
mov eax, dword [ecx + 8]
mov dword [ebp - 0xc4], eax
mov edx, dword [ebp - 0xbc]
mov ecx, dword [ebp - 0xc4]
mov dword [edx + 8], ecx
mov eax, dword [ebp - 0xbc]
mov dword [ebp - 0xc8], eax
mov edx, dword [ebp - 0xc8]
mov ecx, dword [edx + 8]
mov dword [ebp - 0x330], ecx
mov eax, dword [ebp - 0xbc]
mov edx, dword [eax + 8]
add edx, 0xfffffff4
mov dword [ebp - 0xcc], edx
mov ecx, 0x6ff36c
mov eax, dword [ebp - 0xcc]
cmp ecx, eax
je 0x66d634
mov edx, dword [ebp - 0xcc]
push edx
call sub.KERNEL32.DLL_InterlockedIncrement
jmp 0x66d634
mov ecx, dword [ebp - 0xb8]
mov eax, dword [ecx + 8]
mov edx, dword [eax - 4]
mov dword [ebp - 0xd0], edx
mov ecx, dword [ebp - 0xd0]
push ecx
mov eax, dword [ebp - 0xd0]
push eax
mov edx, dword [ebp - 0xbc]
push edx
call fcn.0069a874
add esp, 0xc
mov dword [ebp - 0xd8], eax
mov ecx, dword [ebp - 0xd8]
add ecx, 0xc
mov dword [ebp - 0xd4], ecx
mov eax, dword [ebp - 0xbc]
mov edx, dword [ebp - 0xd4]
mov dword [eax + 8], edx
mov ecx, dword [ebp - 0xbc]
mov dword [ebp - 0xdc], ecx
mov eax, dword [ebp - 0xdc]
mov edx, dword [eax + 8]
mov dword [ebp - 0x340], edx
mov ecx, dword [ebp - 0xd0]
mov dword [ebp - 0xe0], ecx
mov eax, dword [ebp - 0xb8]
mov edx, dword [eax + 8]
mov dword [ebp - 0xe4], edx
mov ecx, dword [ebp - 0xbc]
mov eax, dword [ecx + 8]
mov dword [ebp - 0xe8], eax
mov edx, dword [ebp - 0xe0]
push edx
mov ecx, dword [ebp - 0xe4]
push ecx
mov eax, dword [ebp - 0xe8]
push eax
call fcn.0069cc60
add esp, 0xc
inc dword [ebp - 0x1c]
add dword [ebp - 0x1c], 0xfffffffd
mov word [ebp - 0x28], 0x20
mov edx, dword [ebp - 0x54]
add dword [edx + 8], 0x30
jmp 0x66d661
mov ecx, dword [ebp - 0x50]
push ecx
mov eax, dword [ebp - 0x54]
mov edx, dword [eax + 8]
push edx
mov ecx, dword [ebp - 0x54]
push ecx
call fcn.0066d758
add esp, 0xc
push edi
call sub.KERNEL32.DLL_CloseHandle
mov byte [ebx + 0x4a], 1
dec dword [ebp - 0x1c]
mov eax, dword [ebp - 8]
test eax, eax
je 0x66d6e9
mov edx, dword [ebp - 8]
mov ecx, dword [edx - 0xc]
inc ecx
test ecx, ecx
je 0x66d6b1
mov ebx, dword [ebp - 8]
add ebx, 0xfffffff4
cmp ebx, 0x6ff36c
je 0x66d6a8
cmp ebx, 0x6ff36c
je 0x66d6a1
push ebx
call sub.KERNEL32.DLL_InterlockedDecrement
mov eax, dword [ebx]
inc eax
jmp 0x66d6ad
mov eax, 1
jmp 0x66d6ad
mov eax, 1
test eax, eax
jne 0x66d6e9
mov edx, dword [ebp - 8]
add edx, 0xfffffff4
mov dword [ebp - 0xec], edx
mov esi, dword [ebp - 8]
add esi, 0xfffffff4
push esi
call fcn.0067ac7c
xor eax, eax
pop ecx
mov edi, eax
lea edx, [ebp - 0x10]
mov dword [ebp - 8], edi
mov dword [ebp - 0xf0], edx
mov ecx, dword [ebp - 0xf0]
mov eax, dword [ecx + 8]
mov dword [ebp - 0x350], eax
mov word [ebp - 0x28], 8
mov edx, dword [ebp - 0x38]
mov dword fs:[0], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret