Function at 0x403658
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]
cmp dword [ebp + 0x10], 0
mov ebx, dword [ebp + 0x14]
je 0x40367b
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0x6c], ebx
mov dword [ebp - 0x70], edx
jmp 0x403689
mov dword [ebp - 0x6c], 0x8000
mov dword [ebp - 0x70], 0x411c44
test eax, eax
js 0x40369c
add eax, dword [0x43086c]
mov dword [esp], eax
call fcn.004035dc
push edi
lea eax, [ebp - 0x1c]
mov dword [esp + 4], 4
mov dword [esp], eax
call fcn.0040360d
test eax, eax
push esi
push esi
je 0x4038f5
mov eax, dword [ebp - 0x1c]
test eax, eax
jns 0x403871
call sub.KERNEL32.dll_GetTickCount
mov edi, dword [ebp - 0x1c]
xor ebx, ebx
mov dword [0x421c60], 8
mov dword [0x42217c], 0
mov dword [0x422178], 0
and edi, 0x7fffffff
mov dword [0x42b808], 0x423800
mov dword [ebp - 0x74], eax
mov dword [0x42b804], 0x423800
mov dword [0x42b800], 0x42b800
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x78], edi
jmp 0x403861
cmp esi, 0x4000
jle 0x40372b
mov esi, 0x4000
mov dword [esp + 4], esi
mov dword [esp], 0x40dc44
call fcn.0040360d
test eax, eax
push ecx
push ecx
je 0x4038f5
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 [esp], 0x421c50
mov dword [0x421c5c], edx
mov dword [0x421c58], eax
call fcn.004085da
test eax, eax
mov edi, eax
push edx
jns 0x403786
mov ebx, 0xfffffffc
jmp 0x403901
mov esi, dword [0x421c58]
sub esi, dword [ebp - 0x70]
call sub.KERNEL32.dll_GetTickCount
test byte [0x4307f8], 1
mov edx, eax
je 0x403801
sub eax, dword [ebp - 0x74]
cmp eax, 0xc8
ja 0x4037af
cmp dword [ebp - 0x1c], 0
jne 0x403801
mov eax, dword [ebp - 0x78]
mov dword [ebp - 0x7c], edx
mov dword [esp + 4], 0x64
mov dword [esp + 8], eax
sub eax, dword [ebp - 0x1c]
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.00404488
mov edx, dword [ebp - 0x7c]
mov dword [ebp - 0x74], edx
push eax
push eax
test esi, esi
je 0x403861
cmp dword [ebp + 0x10], 0
jne 0x403848
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 0x4038fc
cmp dword [ebp - 0x20], esi
jne 0x4038fc
add ebx, esi
jmp 0x403855
mov eax, dword [0x421c58]
add ebx, esi
sub dword [ebp - 0x6c], esi
mov dword [ebp - 0x70], eax
dec edi
jne 0x403758
jmp 0x403901
mov esi, dword [ebp - 0x1c]
test esi, esi
jg 0x40371e
jmp 0x403901
cmp dword [ebp + 0x10], 0
jne 0x4038da
xor ebx, ebx
lea edi, [ebp - 0x20]
jmp 0x4038d1
mov esi, dword [ebp - 0x6c]
cmp esi, eax
jle 0x403887
mov esi, eax
mov dword [esp + 4], esi
mov dword [esp], 0x40dc44
call fcn.0040360d
test eax, eax
push ecx
push ecx
je 0x4038f5
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 0x4038fc
cmp esi, dword [ebp - 0x20]
jne 0x4038fc
sub dword [ebp - 0x1c], esi
add ebx, esi
mov eax, dword [ebp - 0x1c]
test eax, eax
jg 0x40387e
jmp 0x403901
cmp ebx, eax
jle 0x4038e0
mov ebx, eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.0040360d
test eax, eax
push edx
push edx
jne 0x403901
mov ebx, 0xfffffffd
jmp 0x403901
mov ebx, 0xfffffffe
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret 0x10