Function at 0x40365c
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, 0x9c
mov eax, dword [ebp + 8]
mov ebx, dword [ebp + 0x14]
cmp dword [ebp + 0x10], 0
je 0x40367f
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0x6c], ebx
mov dword [ebp - 0x70], edx
jmp 0x40368d
mov dword [ebp - 0x6c], 0x8000
mov dword [ebp - 0x70], 0x411c44
test eax, eax
js 0x4036a0
add eax, dword [0x43086c]
mov dword [esp], eax
call fcn.004035e0
push edi
lea eax, [ebp - 0x1c]
mov dword [esp + 4], 4
mov dword [esp], eax
call fcn.00403611
test eax, eax
push esi
push esi
je 0x4038f9
mov eax, dword [ebp - 0x1c]
test eax, eax
jns 0x403875
call sub.KERNEL32.dll_GetTickCount
mov edi, dword [ebp - 0x1c]
and edi, 0x7fffffff
mov dword [ebp - 0x74], eax
mov dword [0x421c60], 8
mov dword [0x42217c], 0
mov dword [0x422178], 0
mov dword [0x42b808], 0x423800
mov dword [0x42b804], 0x423800
mov dword [0x42b800], 0x42b800
mov dword [ebp - 0x1c], edi
xor ebx, ebx
mov dword [ebp - 0x78], edi
jmp 0x403865
cmp esi, 0x4000
jle 0x40372f
mov esi, 0x4000
mov dword [esp + 4], esi
mov dword [esp], 0x40dc44
call fcn.00403611
test eax, eax
push ecx
push ecx
je 0x4038f9
sub dword [ebp - 0x1c], esi
mov dword [0x421c50], 0x40dc44
mov dword [0x421c54], esi
mov edx, dword [ebp - 0x6c]
mov eax, dword [ebp - 0x70]
mov dword [0x421c5c], edx
mov dword [0x421c58], eax
mov dword [esp], 0x421c50
call fcn.004086b4
mov edi, eax
test eax, eax
push edx
jns 0x40378a
mov ebx, 0xfffffffc
jmp 0x403905
mov esi, dword [0x421c58]
sub esi, dword [ebp - 0x70]
call sub.KERNEL32.dll_GetTickCount
test byte [0x4307f8], 1
mov edx, eax
je 0x403805
sub eax, dword [ebp - 0x74]
cmp eax, 0xc8
ja 0x4037b3
cmp dword [ebp - 0x1c], 0
jne 0x403805
mov eax, dword [ebp - 0x78]
mov dword [ebp - 0x7c], edx
mov dword [esp + 8], eax
sub eax, dword [ebp - 0x1c]
mov dword [esp + 4], 0x64
mov dword [esp], eax
call sub.KERNEL32.dll_MulDiv
sub esp, 0xc
mov dword [esp + 8], eax
lea eax, [ebp - 0x60]
mov dword [esp + 4], str....__d__
mov dword [esp], eax
call sub.USER32.dll_wsprintfA
lea eax, [ebp - 0x60]
mov dword [esp + 4], eax
mov dword [esp], 0
call fcn.0040448c
mov edx, dword [ebp - 0x7c]
mov dword [ebp - 0x74], edx
push eax
push eax
test esi, esi
je 0x403865
cmp dword [ebp + 0x10], 0
jne 0x40384c
lea edx, [ebp - 0x20]
mov eax, dword [ebp - 0x70]
mov dword [esp + 0xc], edx
mov edx, dword [ebp + 0xc]
mov dword [esp + 0x10], 0
mov dword [esp + 8], esi
mov dword [esp + 4], eax
mov dword [esp], edx
call sub.KERNEL32.dll_WriteFile
sub esp, 0x14
test eax, eax
je 0x403900
cmp dword [ebp - 0x20], esi
jne 0x403900
add ebx, esi
jmp 0x403859
sub dword [ebp - 0x6c], esi
mov eax, dword [0x421c58]
add ebx, esi
mov dword [ebp - 0x70], eax
dec edi
jne 0x40375c
jmp 0x403905
mov esi, dword [ebp - 0x1c]
test esi, esi
jg 0x403722
jmp 0x403905
cmp dword [ebp + 0x10], 0
jne 0x4038de
xor ebx, ebx
lea edi, [ebp - 0x20]
jmp 0x4038d5
mov esi, dword [ebp - 0x6c]
cmp esi, eax
jle 0x40388b
mov esi, eax
mov dword [esp + 4], esi
mov dword [esp], 0x40dc44
call fcn.00403611
test eax, eax
push ecx
push ecx
je 0x4038f9
mov edx, dword [ebp + 0xc]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edi
mov dword [esp + 8], esi
mov dword [esp + 4], 0x40dc44
mov dword [esp], edx
call sub.KERNEL32.dll_WriteFile
sub esp, 0x14
test eax, eax
je 0x403900
cmp esi, dword [ebp - 0x20]
jne 0x403900
sub dword [ebp - 0x1c], esi
add ebx, esi
mov eax, dword [ebp - 0x1c]
test eax, eax
jg 0x403882
jmp 0x403905
cmp ebx, eax
jle 0x4038e4
mov ebx, eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.00403611
test eax, eax
push edx
push edx
jne 0x403905
mov ebx, 0xfffffffd
jmp 0x403905
mov ebx, 0xfffffffe
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret 0x10