Function at 0x402466
Capabilities:
Check os version
Delete file
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2f0
and dword [ebp - 4], 0
and dword [ebp - 0x118], 0
and dword [ebp - 8], 0
and dword [ebp - 0x11c], 0
or dword [ebp - 0x114], 0xffffffff
cmp dword [0x4131dc], 5
je 0x4024b3
cmp dword [0x4131dc], 6
je 0x4024b3
mov dword [0x4131d8], 0x9c
push 0x4131d8
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [0x4131dc], 5
jne 0x4024c5
mov dword [ebp - 4], 0x40d500
jmp 0x4024cc
mov dword [ebp - 4], 0x40d51c
push 0x104
push 0
lea eax, [ebp - 0x110]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0x40d528
push dword [ebp - 4]
push 0x40d534
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
cmp dword [ebp + 8], 0
je 0x402511
mov dword [ebp - 0x118], 2
jmp 0x40251b
mov dword [ebp - 0x118], 3
push 0
push 0x80
push dword [ebp - 0x118]
push 0
push 3
push 0xc0000000
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x114], eax
cmp dword [ebp - 0x114], 0xffffffff
jne 0x4025a2
cmp dword [ebp + 0xc], 4
jne 0x40258e
push 0x1c8
push 0
push 0x4131d8
call sub.MSVCRT.dll_memset
add esp, 0xc
and dword [0x413278], 0
push 1
push 0
push 0
call fcn.004029c2
mov dword [0x4131d8], 0x9c
push 0x4131d8
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov dword [ebp - 0x11c], 2
jmp 0x402712
cmp dword [ebp + 8], 0
je 0x40264a
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, 0xf
jne 0x4025ce
mov eax, dword [ebp + 8]
movzx eax, word [eax]
cmp eax, 0x3a43
jne 0x4025ce
mov dword [ebp + 0xc], 3
mov eax, dword [ebp + 0xc]
mov dword [0x413278], eax
push dword [ebp + 8]
push 0x41327c
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
call fcn.00402415
push eax
push 0x40d53c
push 0x413380
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push 1
push 0
push 0
call fcn.004029c2
mov dword [0x4131d8], 0x9c
push 0x4131d8
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
push 0
lea eax, [ebp - 8]
push eax
push 0x1c8
push 0x4131d8
push dword [ebp - 0x114]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x114]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x402712
and dword [ebp - 0x120], 0
mov eax, dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
mov dword [ebp - 0x2ec], eax
cmp dword [ebp + 0xc], 5
jne 0x402670
lea eax, [ebp - 0x2e8]
mov dword [ebp - 0x120], eax
jmp 0x40267a
mov dword [ebp - 0x120], 0x4131d8
push 0
lea eax, [ebp - 8]
push eax
push 0x1c8
push dword [ebp - 0x120]
push dword [ebp - 0x114]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x114]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x120]
add eax, 0xa4
push eax
call dword [ebp - 0x2ec]
cmp eax, 1
jne 0x4026ff
and dword [ebp - 0x2f0], 0
jmp 0x4026d0
mov eax, dword [ebp - 0x2f0]
inc eax
mov dword [ebp - 0x2f0], eax
cmp dword [ebp - 0x2f0], 0xc8
jge 0x4026ff
mov eax, dword [ebp - 0x120]
add eax, 0xa4
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp eax, 1
jne 0x4026f5
jmp 0x4026ff
push 0x1e
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4026c3
cmp dword [ebp + 0x10], 1
jne 0x402712
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [ebp + 0xc], 5
jne 0x402723
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 0x11c]
leave
ret 0xc