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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x23c
mov eax, dword [0x420088]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push eax
push 0x104
mov ecx, dword [ebp + 0x10]
push ecx
call fcn.004012ab
add esp, 0xc
mov edx, dword [ebp + 0x14]
movzx eax, byte [edx + 0x14]
test eax, eax
jne 0x4152ae
mov ecx, dword [ebp + 0xc]
movzx edx, byte [ecx]
cmp edx, 2
jne 0x4152ae
mov eax, dword [ebp + 0x14]
add eax, 0x1c
push eax
push 0x104
mov ecx, dword [ebp + 0x10]
push ecx
call fcn.0040131a
add esp, 0xc
push str..exe
push 0x104
mov edx, dword [ebp + 0x10]
push edx
call fcn.0040131a
add esp, 0xc
jmp 0x4152c6
mov eax, dword [ebp + 0xc]
add eax, 0xc
push eax
push 0x104
mov ecx, dword [ebp + 0x10]
push ecx
call fcn.0040131a
add esp, 0xc
mov edx, dword [ebp + 0xc]
add edx, 0x228
mov dword [ebp - 0x214], edx
push 8
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 4]
add ecx, 0x228
push ecx
call fcn.00412910
add esp, 8
mov dword [ebp - 0x220], eax
mov edx, dword [ebp - 0x220]
sub edx, 0x228
push edx
mov eax, dword [ebp - 0x214]
push eax
mov ecx, 0x422348
call fcn.00413ce0
lea ecx, [ebp - 0x238]
push ecx
mov ecx, 0x422348
call fcn.00413ea0
push 0x10
mov edx, dword [ebp + 0xc]
add edx, 0x214
push edx
lea eax, [ebp - 0x238]
push eax
call fcn.00401397
add esp, 0xc
test eax, eax
je 0x41534f
push 0x17
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x4154b1
push 0x41dd80
mov ecx, dword [ebp + 0x10]
push ecx
call fcn.00401000
add esp, 8
test eax, eax
je 0x4153fc
mov edx, dword [ebp + 0x10]
push edx
call fcn.0040112a
add esp, 4
mov dword [ebp - 0x21c], eax
mov eax, dword [ebp + 0x10]
push eax
push 0x104
lea ecx, [ebp - 0x210]
push ecx
call fcn.004012ab
add esp, 0xc
mov edx, dword [ebp - 0x21c]
sub edx, 1
mov dword [ebp - 0x218], edx
jmp 0x4153b2
mov eax, dword [ebp - 0x218]
sub eax, 1
mov dword [ebp - 0x218], eax
cmp dword [ebp - 0x218], 0
jb 0x4153e2
mov ecx, dword [ebp - 0x218]
movzx edx, word [ebp + ecx*2 - 0x210]
cmp edx, 0x5c
jne 0x4153e0
xor eax, eax
mov ecx, dword [ebp - 0x218]
mov word [ebp + ecx*2 - 0x210], ax
jmp 0x4153e2
jmp 0x4153a3
lea edx, [ebp - 0x210]
push edx
call fcn.00414c10
add esp, 4
test eax, eax
jne 0x4153fc
xor eax, eax
jmp 0x4154b1
push 0
push 0x80
push 2
push 0
push 1
push 0x120116
mov eax, dword [ebp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x224], eax
cmp dword [ebp - 0x224], 0xffffffff
jne 0x41542e
xor eax, eax
jmp 0x4154b1
push 0
lea ecx, [ebp - 0x23c]
push ecx
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 4]
push eax
mov ecx, dword [ebp - 0x214]
push ecx
mov edx, dword [ebp - 0x224]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x415492
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x228], eax
mov eax, dword [ebp - 0x224]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov edx, dword [ebp - 0x228]
push edx
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
mov ecx, dword [ebp + 0x10]
mov word [ecx], ax
xor eax, eax
jmp 0x4154b1
mov edx, dword [ebp + 0x10]
mov dword [edx + 0x208], 0
mov eax, dword [ebp - 0x224]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040109c
mov esp, ebp
pop ebp
ret