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

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x40792b
push eax
mov eax, 0x1d24
mov dword fs:[0], esp
call fcn.004071b0
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 0x404789
cmp dl, 0x2f
je 0x404789
push eax
lea ecx, [esp + 0x41c]
push 0x40bc3c
push ecx
jmp 0x40479a
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 0x404817
lea ecx, [esp + 0x418]
push ecx
call fcn.004022a0
add esp, 4
test eax, eax
jne 0x404817
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edx, [esp + 0x418]
push eax
push edx
lea eax, [esp + 0x20]
push 0x40bc1c
push eax
call ebx
add esp, 0x10
lea ecx, [esp + 0x18]
push ecx
lea ecx, [ebp + 0x80]
call fcn.00402900
push 0
lea edx, [esp + 0x1c]
push 0x40b398
push edx
mov ecx, ebp
call sub.MFC42.DLL_CWnd::MessageBoxA
xor eax, eax
jmp 0x404a5f
lea eax, [esp + 0x10]
push eax
push 0x40bc18
push 0x89
push 0
call fcn.00402370
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 0x404906
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x418]
push eax
push ecx
lea edx, [esp + 0x20]
push 0x40bbec
push edx
call ebx
add esp, 0x10
lea eax, [esp + 0x18]
lea ecx, [ebp + 0x80]
push eax
call fcn.00402900
push 0
lea ecx, [esp + 0x1c]
push 0x40b398
push ecx
mov ecx, ebp
call sub.MFC42.DLL_CWnd::MessageBoxA
xor eax, eax
jmp 0x404a5f
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 0x404962
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [esp + 0x1c]
push 0x40bbd4
push edx
call ebx
add esp, 0xc
lea eax, [esp + 0x18]
lea ecx, [ebp + 0x80]
push eax
call fcn.00402900
push 0
lea ecx, [esp + 0x1c]
push 0x40b398
push ecx
mov ecx, ebp
call sub.MFC42.DLL_CWnd::MessageBoxA
xor eax, eax
jmp 0x404a5f
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x112c]
call fcn.00402950
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.004029c0
test eax, eax
je 0x4049dc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [esp + 0x1c]
push 0x40ba28
push edx
call ebx
add esp, 0xc
lea eax, [esp + 0x18]
lea ecx, [ebp + 0x80]
push eax
call fcn.00402900
push 0
lea ecx, [esp + 0x1c]
push 0x40b398
push ecx
jmp 0x404a29
lea edx, [esp + 0x818]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x404a47
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [esp + 0xd30]
push 0x40bbb4
push eax
call ebx
add esp, 0xc
lea ecx, [esp + 0xd2c]
push ecx
lea ecx, [ebp + 0x80]
call fcn.00402900
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.004029b0
xor eax, eax
jmp 0x404a5f
lea ecx, [esp + 0x112c]
mov dword [esp + 0x1d3c], edi
call fcn.004029b0
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