Function at 0x406080
Capabilities:
Check for time delay via gettickcount
Resolve function by parsing pe exports
Write file on windows

Disassembly:
sub esp, 0x1b8
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x1cc]
push 0x419430
mov esi, edi
call fcn.00405210
add esp, 4
cmp dword [edi + 4], 0
je 0x406405
mov esi, dword [edi + 0xc]
add esi, esi
push esi
push 0
call dword [sym.imp.kernel32.dll_LocalAlloc]
mov ebx, eax
test ebx, ebx
mov dword [esp + 0x24], ebx
je 0x4063ee
mov ecx, dword [edi + 4]
push esi
mov edx, ebx
call fcn.00406e00
cmp byte [ebx], 0
mov eax, ebx
je 0x4060e0
add eax, 1
cmp byte [eax], 0
jne 0x4060d8
sub eax, ebx
mov dword [esp + 0x18], eax
call dword [sym.imp.kernel32.dll_GetTickCount]
mov ebp, dword [sym.imp.kernel32.dll_WideCharToMultiByte]
add eax, 0x2bf20
mov dword [esp + 0x1c], eax
add edi, 0x10
mov edi, edi
mov eax, dword [0x42dedc]
test eax, eax
push 0
push 0
je 0x40611d
push 4
push 0
push 0
push 0x40000000
push edi
call eax
jmp 0x406155
mov ecx, dword [0x42deec]
push 0x104
lea eax, [esp + 0xcc]
push eax
push 0xffffffffffffffff
push edi
push 0
push ecx
call ebp
push 0
push 0
push 4
push 0
push 0
push 0x40000000
lea edx, [esp + 0xd8]
push edx
call dword [sym.imp.kernel32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x406198
call dword [sym.imp.kernel32.dll_GetLastError]
cmp eax, 3
je 0x4061d9
mov esi, dword [sym.imp.kernel32.dll_GetTickCount]
call esi
mov ecx, dword [esp + 0x1c]
sub ecx, eax
test ecx, ecx
jle 0x4061d9
call esi
xor edx, edx
xor eax, 0x3039
mov ecx, 0x64
div ecx
add edx, 0x32
push edx
call dword [sym.imp.kernel32.dll_Sleep]
jmp 0x406100
push 2
push 0
push 0
push esi
call dword [sym.imp.kernel32.dll_SetFilePointer]
test eax, eax
mov edi, dword [sym.imp.kernel32.dll_WriteFile]
jne 0x4061c0
push 0
lea edx, [esp + 0x20]
push edx
push 3
push 0x419438
push esi
call edi
mov ebp, dword [esp + 0x18]
push 0
lea eax, [esp + 0x20]
push eax
push ebp
push ebx
push esi
call edi
push esi
call dword [sym.imp.kernel32.dll_CloseHandle]
jmp 0x4061dd
mov ebp, dword [esp + 0x18]
push 4
push 0x41943c
push 0x419448
call dword [sym.imp.USER32.dll_GetActiveWindow]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 6
jne 0x4063e0
mov esi, 0x4194c0
xor ecx, ecx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x68], 0xffffffff
mov dword [esp + 0x40], esi
mov eax, esi
add eax, 1
cmp byte [eax], 0
jne 0x406218
sub eax, esi
push ebp
mov dword [esp + 0x38], eax
mov dword [esp + 0x60], 0x4194cc
mov dword [esp + 0x50], ecx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x18], ebp
call fcn.0040a1a9
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x406278
mov ecx, dword [esp + 0x18]
push ebp
push ecx
push ebx
lea ebx, [esp + 0x20]
call fcn.00401000
mov eax, dword [esp + 0x14]
cmp eax, 0xffffffff
je 0x406274
mov dword [esp + 0x44], ebp
mov dword [esp + 0x38], eax
mov dword [esp + 0x60], 0x4194d0
jmp 0x406288
mov ebx, dword [esp + 0x24]
mov edx, dword [esp + 0x18]
mov dword [esp + 0x44], ebx
mov dword [esp + 0x38], edx
mov dword [esp + 0x60], esi
mov ecx, dword [esp + 0x1cc]
xor eax, eax
add ecx, 0x218
lea esi, [esp + 0x68]
lea edi, [eax + 2]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x50], eax
call fcn.00404820
test eax, eax
jne 0x406314
mov esi, dword [esp + 0x70]
push esi
mov dword [esp + 0x18], esi
call fcn.0040a1a9
mov edi, dword [esp + 0x78]
add esp, 4
test eax, eax
mov dword [esp + 0x20], eax
je 0x4062f7
push eax
push esi
push edi
lea ebx, [esp + 0x20]
call fcn.00401000
mov eax, dword [esp + 0x14]
cmp eax, 0xffffffff
je 0x4062f7
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x48], ecx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x64], 0x4194dc
jmp 0x406307
mov dword [esp + 0x48], edi
mov dword [esp + 0x3c], esi
mov dword [esp + 0x64], 0x4194e8
xor eax, eax
lea edi, [eax + 3]
mov dword [esp + 0x30], eax
mov dword [esp + 0x54], eax
lea edx, [esp + 0x80]
push edx
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x5c]
push eax
lea ecx, [esp + 0x70]
push ecx
lea edx, [esp + 0x4c]
push edx
lea eax, [esp + 0x5c]
xor ebx, ebx
push eax
push edi
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x7c], ebx
call fcn.00404ef0
test al, al
je 0x40639c
lea ecx, [esp + 0x80]
push ecx
push 0x4194f4
mov esi, 0x100
lea edi, [esp + 0xc8]
call fcn.004011f0
add esp, 8
lea edx, [esp + 0x58]
push edx
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x20]
push eax
mov eax, dword [esp + 0x20]
mov ecx, edi
push ecx
push edx
push eax
call fcn.004049a0
mov ebx, dword [esp + 0x1c]
lea esi, [esp + 0x68]
call fcn.00404950
test ebx, ebx
je 0x4063b9
push ebx
push 0
call dword [sym.imp.kernel32.dll_GetProcessHeap]
push eax
call dword [sym.imp.kernel32.dll_HeapFree]
mov ecx, dword [esp + 0x18]
push ecx
call fcn.00409f6f
add esp, 4
push ebp
call fcn.00409f6f
mov edx, dword [esp + 0x24]
add esp, 4
push edx
call fcn.00409f6f
mov ebx, dword [esp + 0x28]
add esp, 4
push ebx
call dword [sym.imp.kernel32.dll_LocalFree]
mov edi, dword [esp + 0x1cc]
mov eax, dword [edi + 4]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1b8
mov dword [esp + 4], eax
jmp dword [sym.imp.kernel32.dll_LocalFree]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1b8
ret 4