Function at 0x403590
Capabilities:
Check for time delay via gettickcount
Check if file exists
Get file attributes
Set file attributes
Write file on windows

Disassembly:
sub esp, 0x610
push ebx
push ebp
mov ebp, dword [esp + 0x620]
push esi
push edi
push ebp
mov dword [esp + 0x14], 0
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, 0x46
push ebp
jle 0x403677
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
cmp byte [esp + 0x20], 0
lea ebx, [esp + 0x20]
mov esi, ebx
je 0x4035f4
movzx ecx, byte [esi]
push ecx
call dword [sym.imp.KERNEL32.dll_IsDBCSLeadByte]
test eax, eax
je 0x4035e5
add esi, 2
jmp 0x4035ef
cmp byte [esi], 0x5c
jne 0x4035ec
mov ebx, esi
add esi, 1
cmp byte [esi], 0
jne 0x4035d2
mov edi, ebp
lea esi, [esp + 0x120]
xor ebp, ebp
nop
movzx edx, byte [edi]
push edx
call dword [sym.imp.KERNEL32.dll_IsDBCSLeadByte]
add ebp, 1
test eax, eax
je 0x403625
mov al, byte [edi]
mov cl, byte [edi + 1]
add edi, 1
mov byte [esi], al
add esi, 1
mov byte [esi], cl
add ebp, 1
jmp 0x403629
mov dl, byte [edi]
mov byte [esi], dl
add esi, 1
add edi, 1
cmp ebp, 0x3a
jl 0x403600
mov byte [esi], 0x2e
add esi, 1
mov byte [esi], 0x2e
add esi, 1
mov byte [esi], 0x2e
add esi, 1
mov al, byte [ebx]
mov byte [esi], al
add esi, 1
add ebx, 1
test al, al
jne 0x403646
mov ecx, dword [0x41b97c]
lea eax, [esp + 0x120]
push eax
push 0x3ee
push ecx
call dword [sym.imp.USER32.dll_SetDlgItemTextA]
mov ebp, dword [esp + 0x628]
jmp 0x403689
mov edx, dword [0x41b97c]
push 0x3ee
push edx
call dword [sym.imp.USER32.dll_SetDlgItemTextA]
mov ecx, dword [esp + 0x624]
cmp byte [ecx], 0x3a
jne 0x4036c1
add ecx, 1
push ecx
lea eax, [esp + 0x224]
push str._s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea ecx, [esp + 0x22c]
push ecx
call fcn.00406470
add esp, 0x10
jmp 0x403769
mov eax, dword [0x41b9a8]
test eax, eax
je 0x403760
mov edx, dword [0x41abc0]
push 0
push 0
push edx
push 0x403560
push ebp
push ecx
call eax
mov edi, eax
test edi, edi
je 0x403734
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
and eax, 0xfffffffe
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push 0
push 0x80
push 3
push 0
push 0
push 0x40000000
push ebp
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x403734
push 0x41a9b0
push 0
push 0x41a9b0
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [esp + 0x62c]
neg al
mov ecx, ebp
sbb eax, eax
and eax, 2
call fcn.00404500
mov eax, edi
neg eax
pop edi
sbb eax, eax
pop esi
and eax, 0xffffff9d
pop ebp
add eax, 0x63
pop ebx
add esp, 0x610
ret
push ecx
call fcn.00406470
add esp, 4
mov esi, eax
test esi, esi
mov dword [esp + 0x18], eax
je 0x403955
mov eax, dword [esp + 0x628]
mov ebp, dword [esi + 8]
push 0
push 0x8000080
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x403925
call fcn.004025c0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
test ebp, ebp
mov dword [esp + 0x1c], eax
jbe 0x4038e4
lea esp, [esp]
cmp dword [esp + 0x10], 0
jne 0x4038e4
test ebp, ebp
mov esi, dword [0x41b980]
mov edi, 0x10000
jbe 0x403830
lea ebx, [ebx]
test edi, edi
jbe 0x403830
cmp ebp, edi
mov eax, edi
ja 0x4037ec
mov eax, ebp
mov edx, dword [esp + 0x18]
mov ecx, esi
mov dword [esp + 0x14], eax
call fcn.004067f0
test eax, eax
mov dword [esp + 0x14], eax
je 0x403828
cmp eax, ebp
jbe 0x40380d
mov eax, ebp
mov dword [esp + 0x14], eax
lea ecx, [eax + 0x200]
shr ecx, 0xa
add dword [0x41abc0], ecx
sub ebp, eax
sub edi, eax
add esi, eax
test ebp, ebp
ja 0x4037e0
jmp 0x403830
mov dword [esp + 0x10], 6
call fcn.004046f0
test al, al
je 0x4038dc
cmp dword [esp + 0x10], 0
jne 0x4038d2
mov esi, 0x10000
sub esi, edi
mov edi, dword [0x41b980]
je 0x4038a8
jmp 0x403860
cmp esi, 0x10000
mov eax, 0x10000
ja 0x40386f
mov eax, esi
push 0
lea edx, [esp + 0x18]
push edx
push eax
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x403891
mov eax, dword [esp + 0x14]
sub esi, eax
add edi, eax
test esi, esi
ja 0x403860
jmp 0x4038a8
call dword [sym.imp.KERNEL32.dll_GetLastError]
sub eax, 0x70
neg eax
sbb eax, eax
and eax, 0xfffffffd
add eax, 0xa
mov dword [esp + 0x10], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [esp + 0x1c]
mov esi, eax
cmp ecx, esi
ja 0x4038bc
sub eax, ecx
jmp 0x4038c2
not ecx
lea eax, [ecx + esi + 1]
cmp eax, 0x7d0
jbe 0x4038d2
call fcn.004025c0
mov dword [esp + 0x1c], esi
test ebp, ebp
ja 0x4037c0
jmp 0x4038e4
mov dword [esp + 0x10], 0x63
push ebx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push 0x41a9b0
push 0
push 0x41a9b0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [esp + 0x62c]
mov ecx, dword [esp + 0x628]
neg al
sbb eax, eax
and eax, 2
call fcn.00404500
mov esi, dword [esp + 0x18]
jmp 0x40392d
mov dword [esp + 0x10], 4
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [0x41b9ac]
push esi
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x610
ret
pop edi
pop esi
mov dword [esp + 8], 2
mov eax, dword [esp + 8]
pop ebp
pop ebx
add esp, 0x610
ret