Function at 0x404690
Capabilities:
Delete file
Write file on windows

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x40786b
push eax
mov eax, 0x1d24
mov dword fs:[0], esp
call fcn.004070f0
push ebx
push ebp
mov ebp, ecx
push esi
push edi
mov eax, dword [ebp + 0x7c]
mov ecx, dword [eax - 8]
mov dl, byte [eax + ecx - 1]
cmp dl, 0x5c
je 0x4046d9
cmp dl, 0x2f
je 0x4046d9
push eax
lea ecx, [esp + 0x41c]
push 0x40bc28
push ecx
jmp 0x4046ea
mov edx, dword [ebp + 0x7c]
lea eax, [esp + 0x418]
push edx
push 0x40b3c4
push eax
mov ebx, dword [sym.imp.MSVCRT.dll_sprintf]
call ebx
lea edi, [esp + 0x424]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 3
jbe 0x404767
lea ecx, [esp + 0x418]
push ecx
call fcn.004022d0
add esp, 4
test eax, eax
jne 0x404767
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edx, [esp + 0x418]
push eax
push edx
lea eax, [esp + 0x20]
push 0x40bc08
push eax
call ebx
add esp, 0x10
lea ecx, [esp + 0x18]
push ecx
lea ecx, [ebp + 0x80]
call fcn.00402930
push 0
lea edx, [esp + 0x1c]
push 0x40b398
push edx
mov ecx, ebp
call sub.MFC42.DLL_CWnd::MessageBoxA
xor eax, eax
jmp 0x4049af
lea eax, [esp + 0x10]
push eax
push 0x40bc04
push 0x89
push 0
call fcn.004023a0
mov dword [esp + 0x24], eax
lea edi, [esp + 0x428]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
lea edx, [esp + 0x818]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov byte [esp + 0x818], 0
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x818]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov edi, str.setup.tmp
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x80
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 2
mov ecx, edx
push eax
push eax
and ecx, 3
lea eax, [esp + 0x82c]
push 0xc0000000
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
or edi, 0xffffffff
cmp esi, edi
jne 0x404856
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x418]
push eax
push ecx
lea edx, [esp + 0x20]
push 0x40bbd8
push edx
call ebx
add esp, 0x10
lea eax, [esp + 0x18]
lea ecx, [ebp + 0x80]
push eax
call fcn.00402930
push 0
lea ecx, [esp + 0x1c]
push 0x40b398
push ecx
mov ecx, ebp
call sub.MFC42.DLL_CWnd::MessageBoxA
xor eax, eax
jmp 0x4049af
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x10]
push 0
push edx
push eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4048b2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [esp + 0x1c]
push 0x40bbc0
push edx
call ebx
add esp, 0xc
lea eax, [esp + 0x18]
lea ecx, [ebp + 0x80]
push eax
call fcn.00402930
push 0
lea ecx, [esp + 0x1c]
push 0x40b398
push ecx
mov ecx, ebp
call sub.MFC42.DLL_CWnd::MessageBoxA
xor eax, eax
jmp 0x4049af
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x112c]
call fcn.00402980
mov edx, dword [esp + 0x1d44]
lea eax, [esp + 0x418]
push edx
lea ecx, [esp + 0x81c]
push eax
push ecx
lea ecx, [esp + 0x1138]
mov dword [esp + 0x1d48], 0
call fcn.004029f0
test eax, eax
je 0x40492c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [esp + 0x1c]
push 0x40ba14
push edx
call ebx
add esp, 0xc
lea eax, [esp + 0x18]
lea ecx, [ebp + 0x80]
push eax
call fcn.00402930
push 0
lea ecx, [esp + 0x1c]
push 0x40b398
push ecx
jmp 0x404979
lea edx, [esp + 0x818]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x404997
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [esp + 0xd30]
push 0x40bba0
push eax
call ebx
add esp, 0xc
lea ecx, [esp + 0xd2c]
push ecx
lea ecx, [ebp + 0x80]
call fcn.00402930
push 0
lea edx, [esp + 0xd30]
push 0x40b398
push edx
mov ecx, ebp
call sub.MFC42.DLL_CWnd::MessageBoxA
lea ecx, [esp + 0x112c]
mov dword [esp + 0x1d3c], edi
call fcn.004029e0
xor eax, eax
jmp 0x4049af
lea ecx, [esp + 0x112c]
mov dword [esp + 0x1d3c], edi
call fcn.004029e0
mov eax, 1
mov ecx, dword [esp + 0x1d34]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x1d30
ret 4