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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2f8
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 [0x410f2c], 5
je 0x40245e
cmp dword [0x410f2c], 6
je 0x40245e
mov dword [0x410f28], 0x9c
push 0x410f28
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [0x410f2c], 5
jne 0x402470
mov dword [ebp - 4], 0x40c500
jmp 0x402477
mov dword [ebp - 4], 0x40c51c
push 0x104
push 0
lea eax, [ebp - 0x110]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0x40c528
push dword [ebp - 4]
push 0x40c534
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
cmp dword [ebp + 8], 0
je 0x4024bc
mov dword [ebp - 0x118], 2
jmp 0x4024c6
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 0x40254d
cmp dword [ebp + 0xc], 4
jne 0x402539
push 0x1c8
push 0
push 0x410f28
call sub.MSVCRT.dll_memset
add esp, 0xc
and dword [0x410fc8], 0
push 1
push 0
push 0
call fcn.004029ac
mov dword [0x410f28], 0x9c
push 0x410f28
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov dword [ebp - 0x11c], 2
jmp 0x4026fc
cmp dword [ebp + 8], 0
je 0x402634
and dword [ebp - 0x120], 0
push 0x5c
push dword [ebp + 8]
call dword [sym.imp.MSVCRT.dll_strrchr]
pop ecx
pop ecx
inc eax
mov dword [ebp - 0x120], eax
push 0x40c53c
push dword [ebp - 0x120]
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x4025b1
push 0x40c544
push dword [ebp - 0x120]
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x4025b1
push 0x40c550
push dword [ebp - 0x120]
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x4025b8
mov dword [ebp + 0xc], 3
mov eax, dword [ebp + 0xc]
mov dword [0x410fc8], eax
push dword [ebp + 8]
push 0x410fcc
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
call fcn.004023c0
push eax
push 0x40c560
push 0x4110d0
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push 1
push 0
push 0
call fcn.004029ac
mov dword [0x410f28], 0x9c
push 0x410f28
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
push 0
lea eax, [ebp - 8]
push eax
push 0x1c8
push 0x410f28
push dword [ebp - 0x114]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x114]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4026fc
and dword [ebp - 0x124], 0
mov eax, dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
mov dword [ebp - 0x2f4], eax
cmp dword [ebp + 0xc], 5
jne 0x40265a
lea eax, [ebp - 0x2f0]
mov dword [ebp - 0x124], eax
jmp 0x402664
mov dword [ebp - 0x124], 0x410f28
push 0
lea eax, [ebp - 8]
push eax
push 0x1c8
push dword [ebp - 0x124]
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 - 0x124]
add eax, 0xa4
push eax
call dword [ebp - 0x2f4]
cmp eax, 1
jne 0x4026e9
and dword [ebp - 0x2f8], 0
jmp 0x4026ba
mov eax, dword [ebp - 0x2f8]
inc eax
mov dword [ebp - 0x2f8], eax
cmp dword [ebp - 0x2f8], 0xc8
jge 0x4026e9
mov eax, dword [ebp - 0x124]
add eax, 0xa4
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp eax, 1
jne 0x4026df
jmp 0x4026e9
push 0x1e
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4026ad
cmp dword [ebp + 0x10], 1
jne 0x4026fc
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [ebp + 0xc], 5
jne 0x40270d
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 0x11c]
leave
ret 0xc