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

Disassembly:
sub esp, 0x50
mov ecx, dword [esp + 0x54]
mov eax, 0x4210f8
push ebp
push esi
push edi
mov edi, dword [esp + 0x68]
mov ebp, 0x8000
test edi, edi
cmovne ebp, dword [esp + 0x6c]
xor esi, esi
test edi, edi
cmovne eax, edi
mov dword [esp + 0xc], eax
test ecx, ecx
js 0x402d9e
mov eax, dword [0x42f118]
add eax, ecx
push eax
call fcn.00402d4c
push 4
lea eax, [esp + 0x6c]
push eax
push dword [0x40a010]
call fcn.00405f05
test eax, eax
jne 0x402dbc
push 0xfffffffffffffffd
pop eax
jmp 0x402f26
mov eax, dword [esp + 0x68]
push ebx
test eax, eax
jns 0x402f41
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [esp + 0x6c]
and dword [0x40ba64], esi
and dword [0x40ba60], esi
and ecx, 0x7fffffff
mov dword [esp + 0x70], eax
mov eax, 0x40d0e8
mov dword [0x40b548], 8
mov dword [0x4150f0], eax
mov dword [0x4150ec], eax
mov dword [0x4150e8], 0x4150e8
mov dword [esp + 0x6c], ecx
mov dword [esp + 0x64], ecx
jle 0x402f23
mov ebx, 0x4000
cmp ecx, ebx
cmovl ebx, ecx
push ebx
push 0x41d0f8
call fcn.00402d36
test eax, eax
je 0x402fa3
sub dword [esp + 0x6c], ebx
mov eax, dword [esp + 0x10]
mov dword [0x40b538], 0x41d0f8
mov dword [0x40b53c], ebx
push 0x40b538
mov dword [0x40b540], eax
mov dword [0x40b544], ebp
call fcn.00406725
mov dword [esp + 0x1c], eax
test eax, eax
js 0x402f3d
mov ebx, dword [0x40b540]
sub ebx, dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
test byte [0x42f1b4], 1
mov ecx, dword [esp + 0x6c]
mov dword [esp + 0x14], eax
je 0x402edc
sub eax, dword [esp + 0x70]
cmp eax, 0xc8
ja 0x402ea0
test ecx, ecx
jne 0x402edc
mov eax, dword [esp + 0x64]
push eax
push 0x64
sub eax, ecx
push eax
call dword [sym.imp.KERNEL32.dll_MulDiv]
push eax
lea eax, [esp + 0x24]
push str....__d__
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [esp + 0x20]
push eax
push 0
call fcn.004055c6
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x6c]
mov dword [esp + 0x70], eax
test ebx, ebx
je 0x402f2f
test edi, edi
jne 0x402f0b
push edi
lea eax, [esp + 0x1c]
push eax
push ebx
push dword [esp + 0x1c]
push dword [esp + 0x78]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x402f39
cmp dword [esp + 0x18], ebx
jne 0x402f39
mov eax, dword [esp + 0x10]
add esi, ebx
jmp 0x402f18
mov eax, dword [0x40b540]
add esi, ebx
sub ebp, ebx
mov dword [esp + 0x10], eax
cmp dword [esp + 0x1c], 1
jne 0x402e4f
mov eax, esi
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x50
ret 0x10
test ecx, ecx
jg 0x402e1a
jmp 0x402f23
push 0xfffffffffffffffe
jmp 0x402fa5
push 0xfffffffffffffffc
jmp 0x402fa5
test edi, edi
jne 0x402f8f
test eax, eax
jle 0x402f23
mov ebx, 0x41d0f8
cmp eax, ebp
mov edi, ebp
cmovl edi, eax
push edi
push ebx
call fcn.00402d36
test eax, eax
je 0x402fa3
push 0
lea eax, [esp + 0x74]
push eax
push edi
push ebx
push dword [esp + 0x78]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x402f39
cmp edi, dword [esp + 0x70]
jne 0x402f39
mov eax, dword [esp + 0x6c]
add esi, edi
sub eax, edi
mov dword [esp + 0x6c], eax
test eax, eax
jg 0x402f4e
jmp 0x402f23
mov esi, dword [esp + 0x70]
cmp eax, esi
cmovl esi, eax
push esi
push edi
call fcn.00402d36
test eax, eax
jne 0x402f23
push 0xfffffffffffffffd
pop eax
jmp 0x402f25