Function at 0x4013d0
Capabilities:
Check os version
Create directory
Create process on windows
Delete file
Get common file path
Read file on windows
Set current directory
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
mov eax, 0x2cb0
call fcn.00402500
mov eax, dword [ebp + 0xc]
mov byte [ebp - 9], al
lea eax, [ebp - 0x2838]
mov dword [esp + 4], eax
mov dword [esp], 0x800
call sub.KERNEL32.dll_GetTempPathA
sub esp, 8
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jle 0x401412
cmp dword [ebp - 0x1c], 0x7ff
ja 0x401412
jmp 0x401428
mov dword [esp + 4], 0x404010
lea eax, [ebp - 0x2838]
mov dword [esp], eax
call sub.msvcrt.dll_strcpy
mov dword [esp + 4], 0x404011
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x401466
mov eax, dword [ebp + 8]
mov dword [esp + 4], eax
mov dword [esp], str.Failed_to_open__s
call fcn.00401f8a
mov dword [ebp - 0x2c9c], 0xffffffff
jmp 0x401f7d
mov dword [ebp - 0x283c], 0
mov eax, dword [ebp - 0x10]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 1
lea eax, [ebp - 0x1028]
mov dword [esp], eax
call sub.msvcrt.dll_fread
test eax, eax
je 0x40162c
mov dword [ebp - 0x2840], 0
cmp dword [ebp - 0x283c], 7
ja 0x4015ee
mov eax, dword [ebp - 0x283c]
shl eax, 2
mov eax, dword [eax + 0x404138]
jmp eax
mov dword [ebp - 0x283c], 0
cmp dword [ebp - 0x283c], 8
jne 0x401603
jmp 0x40162c
cmp dword [ebp - 0x2840], 0
je 0x401470
cmp dword [ebp - 0x283c], 0
jle 0x401470
mov dword [ebp - 0x283c], 0
jmp 0x40149d
cmp dword [ebp - 0x283c], 8
je 0x40165b
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
mov dword [esp], str.Error:_Data_marker_not_found
call fcn.00401f8a
mov dword [ebp - 0x2c9c], 0xfffffffe
jmp 0x401f7d
mov byte [ebp - 0x1828], 0
mov byte [ebp - 0x2028], 0
mov eax, dword [ebp - 0x10]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 1
lea eax, [ebp - 0x11]
mov dword [esp], eax
call sub.msvcrt.dll_fread
test eax, eax
je 0x401f68
mov byte [ebp - 0x12], 0
movsx eax, byte [ebp - 0x11]
mov dword [esp], eax
call sub.msvcrt.dll_toupper
mov dword [ebp - 0x2ca8], eax
cmp dword [ebp - 0x2ca8], 0x44
je 0x401bad
cmp dword [ebp - 0x2ca8], 0x44
jg 0x4016cd
cmp dword [ebp - 0x2ca8], 0x41
je 0x4016e8
jmp 0x401dbf
cmp dword [ebp - 0x2ca8], 0x45
je 0x4019d3
cmp dword [ebp - 0x2ca8], 0x46
je 0x40170f
jmp 0x401dbf
mov eax, dword [ebp - 0x10]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 1
lea eax, [ebp - 0x12]
mov dword [esp], eax
call sub.msvcrt.dll_fread
jmp 0x401dbf
mov dword [ebp - 0x18], 0
cmp dword [ebp - 0x18], 0x7ff
ja 0x401783
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_fgetc
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0xffffffff
jne 0x401759
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
mov dword [esp], str.Read_failed
call fcn.00401f8a
mov dword [ebp - 0x2c9c], 0xfffffffd
jmp 0x401f7d
lea eax, [ebp - 8]
add eax, dword [ebp - 0x18]
lea edx, [eax - 0x1820]
mov eax, dword [ebp - 0x20]
mov byte [edx], al
lea eax, [ebp - 8]
add eax, dword [ebp - 0x18]
sub eax, 0x1820
cmp byte [eax], 0
jne 0x40177c
jmp 0x401783
lea eax, [ebp - 0x18]
inc dword [eax]
jmp 0x401716
cmp dword [ebp - 0x18], 0x7fe
jbe 0x4017b2
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
mov dword [esp], str.Read_failed
call fcn.00401f8a
mov dword [ebp - 0x2c9c], 0xfffffffc
jmp 0x401f7d
mov dword [ebp - 0x18], 0
lea eax, [ebp - 0x1828]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
cmp dword [ebp - 0x18], eax
jae 0x4018ce
mov dword [esp + 8], 6
mov dword [esp + 4], str._TEMP_
lea eax, [ebp - 0x1828]
add eax, dword [ebp - 0x18]
mov dword [esp], eax
call fcn.00402540
test eax, eax
jne 0x4018c4
lea eax, [ebp - 0x2838]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
mov ebx, eax
lea eax, [ebp - 0x1828]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
lea eax, [ebx + eax]
add eax, dword [ebp - 0x18]
sub eax, 6
cmp eax, 0x7fe
jbe 0x40184d
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
mov dword [esp], str.Read_failed
call fcn.00401f8a
mov dword [ebp - 0x2c9c], 0xfffffffb
jmp 0x401f7d
lea eax, [ebp - 0x1828]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
sub eax, dword [ebp - 0x18]
lea ebx, [eax - 5]
lea esi, [ebp - 0x1828]
lea eax, [ebp - 0x2838]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
add eax, dword [ebp - 0x18]
lea edx, [esi + eax]
mov dword [esp + 8], ebx
lea eax, [ebp - 0x1828]
add eax, dword [ebp - 0x18]
add eax, 6
mov dword [esp + 4], eax
mov dword [esp], edx
call sub.msvcrt.dll_memmove
lea eax, [ebp - 0x2838]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
mov dword [esp + 8], eax
lea eax, [ebp - 0x2838]
mov dword [esp + 4], eax
lea eax, [ebp - 0x1828]
add eax, dword [ebp - 0x18]
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
lea eax, [ebp - 0x18]
inc dword [eax]
jmp 0x4017b9
mov byte [ebp - 0x2028], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x202c], 0
lea eax, [ebp - 0x1828]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
cmp dword [ebp - 0x18], eax
jae 0x401961
lea eax, [ebp - 8]
add eax, dword [ebp - 0x18]
sub eax, 0x1820
cmp byte [eax], 0x22
jne 0x40191e
cmp dword [ebp - 0x202c], 0
sete al
movzx eax, al
mov dword [ebp - 0x202c], eax
jmp 0x40195a
lea eax, [ebp - 8]
add eax, dword [ebp - 0x18]
sub eax, 0x1820
cmp byte [eax], 0x20
jne 0x40195a
lea eax, [ebp - 8]
add eax, dword [ebp - 0x18]
sub eax, 0x1820
mov byte [eax], 0
lea eax, [ebp - 0x1828]
add eax, dword [ebp - 0x18]
inc eax
mov dword [esp + 4], eax
lea eax, [ebp - 0x2028]
mov dword [esp], eax
call sub.msvcrt.dll_strcpy
jmp 0x401961
lea eax, [ebp - 0x18]
inc dword [eax]
jmp 0x4018e6
lea eax, [ebp - 0x1828]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jle 0x401dbf
cmp byte [ebp - 0x1828], 0x22
jne 0x401dbf
lea eax, [ebp - 8]
add eax, dword [ebp - 0x18]
sub eax, 0x1821
cmp byte [eax], 0x22
jne 0x401dbf
mov eax, dword [ebp - 0x18]
sub eax, 2
mov dword [esp + 8], eax
lea eax, [ebp - 0x1828]
inc eax
mov dword [esp + 4], eax
lea eax, [ebp - 0x1828]
mov dword [esp], eax
call sub.msvcrt.dll_memmove
lea eax, [ebp - 8]
add eax, dword [ebp - 0x18]
sub eax, 0x1822
mov byte [eax], 0
jmp 0x401dbf
movzx eax, byte [ebp - 9]
and eax, 1
test eax, eax
jne 0x4019e3
jmp 0x401dbf
cmp byte [ebp - 0x1828], 0
jne 0x401a12
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
mov dword [esp], str.Read_failed_with_embedded_file:_No_target_file_name.
call fcn.00401f8a
mov dword [ebp - 0x2c9c], 0xfffffffa
jmp 0x401f7d
mov eax, dword [ebp - 0x10]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 4
lea eax, [ebp - 0x2c50]
mov dword [esp], eax
call sub.msvcrt.dll_fread
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 1
je 0x401a66
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
mov dword [esp], str.Read_failed_with_embedded_file
call fcn.00401f8a
mov dword [ebp - 0x2c9c], 0xfffffff9
jmp 0x401f7d
mov dword [esp + 4], 0x4040af
lea eax, [ebp - 0x1828]
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov dword [ebp - 0x2c58], eax
cmp dword [ebp - 0x2c58], 0
jne 0x401abb
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
lea eax, [ebp - 0x1828]
mov dword [esp + 4], eax
mov dword [esp], str.Error_creating__s
call fcn.00401f8a
mov dword [ebp - 0x2c9c], 0xfffffff8
jmp 0x401f7d
mov dword [ebp - 0x18], 0
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x2c50]
jae 0x401b9a
mov eax, dword [ebp - 0x10]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 1
lea eax, [ebp - 0x2c51]
mov dword [esp], eax
call sub.msvcrt.dll_fread
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 1
je 0x401b2f
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
lea eax, [ebp - 0x1828]
mov dword [esp + 4], eax
mov dword [esp], str.Error:_Premature_end_of_data_when_extracting__s
call fcn.00401f8a
mov dword [ebp - 0x2c9c], 0xfffffff7
jmp 0x401f7d
mov eax, dword [ebp - 0x2c58]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 1
lea eax, [ebp - 0x2c51]
mov dword [esp], eax
call sub.msvcrt.dll_fwrite
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 1
je 0x401b90
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
lea eax, [ebp - 0x1828]
mov dword [esp + 4], eax
mov dword [esp], str.Error_writing__s
call fcn.00401f8a
mov dword [ebp - 0x2c9c], 0xfffffff6
jmp 0x401f7d
lea eax, [ebp - 0x18]
inc dword [eax]
jmp 0x401ac2
mov eax, dword [ebp - 0x2c58]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
jmp 0x401dbf
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_fgetc
mov byte [ebp - 0x2c49], al
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x2c58], 0
cmp dword [ebp - 0x18], 0x3ff
ja 0x401cf1
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_fgetc
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0xffffffff
jne 0x401c16
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
mov dword [esp], str.Read_failed
call fcn.00401f8a
mov dword [ebp - 0x2c9c], 0xfffffff5
jmp 0x401f7d
cmp dword [ebp - 0x20], 0x5c
jne 0x401c43
cmp dword [ebp - 0x2c58], 0
jne 0x401c39
mov dword [ebp - 0x2c58], 1
lea eax, [ebp - 0x18]
dec dword [eax]
jmp 0x401ce7
mov dword [ebp - 0x2c58], 0
cmp dword [ebp - 0x2c58], 0
je 0x401cc4
cmp dword [ebp - 0x20], 0
je 0x401cc4
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x2ca0], eax
cmp dword [ebp - 0x2ca0], 0x72
je 0x401c93
cmp dword [ebp - 0x2ca0], 0x72
jg 0x401c78
cmp dword [ebp - 0x2ca0], 0x6e
je 0x401c83
jmp 0x401cb3
cmp dword [ebp - 0x2ca0], 0x74
je 0x401ca3
jmp 0x401cb3
lea eax, [ebp - 8]
add eax, dword [ebp - 0x18]
sub eax, 0x2c40
mov byte [eax], 0xa
jmp 0x401cb8
lea eax, [ebp - 8]
add eax, dword [ebp - 0x18]
sub eax, 0x2c40
mov byte [eax], 0xd
jmp 0x401cb8
lea eax, [ebp - 8]
add eax, dword [ebp - 0x18]
sub eax, 0x2c40
mov byte [eax], 9
jmp 0x401cb8
lea eax, [ebp - 0x18]
dec dword [eax]
mov dword [ebp - 0x2c58], 0
jmp 0x401ce7
lea eax, [ebp - 8]
add eax, dword [ebp - 0x18]
lea edx, [eax - 0x2c40]
mov eax, dword [ebp - 0x20]
mov byte [edx], al
lea eax, [ebp - 8]
add eax, dword [ebp - 0x18]
sub eax, 0x2c40
cmp byte [eax], 0
jne 0x401ce7
jmp 0x401cf1
lea eax, [ebp - 0x18]
inc dword [eax]
jmp 0x401bcf
cmp dword [ebp - 0x18], 0x3fe
jbe 0x401d20
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
mov dword [esp], str.Read_failed
call fcn.00401f8a
mov dword [ebp - 0x2c9c], 0xfffffff4
jmp 0x401f7d
movsx eax, byte [ebp - 0x2c49]
mov dword [esp], eax
call sub.msvcrt.dll_toupper
sub eax, 0x32
cmp eax, 1
ja 0x401d40
mov dword [ebp - 0x20], 0x24
jmp 0x401d47
mov dword [ebp - 0x20], 0x40
mov eax, dword [ebp - 0x20]
mov dword [esp + 0xc], eax
mov dword [esp + 8], str.RaceRender_Self_Extractor
lea eax, [ebp - 0x2c48]
mov dword [esp + 4], eax
mov dword [esp], 0
call sub.USER32.dll_MessageBoxA
sub esp, 0x10
mov dword [ebp - 0x1c], eax
movsx eax, byte [ebp - 0x2c49]
mov dword [esp], eax
call sub.msvcrt.dll_toupper
mov dword [ebp - 0x2ca4], eax
cmp dword [ebp - 0x2ca4], 0x32
je 0x401dae
cmp dword [ebp - 0x2ca4], 0x33
je 0x401d9b
jmp 0x401dbf
cmp dword [ebp - 0x1c], 6
jne 0x401dbf
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
jmp 0x401dbf
cmp dword [ebp - 0x1c], 7
jne 0x401dbf
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
cmp byte [ebp - 0x12], 0
je 0x401669
movzx eax, byte [ebp - 9]
and al, byte [ebp - 0x12]
movzx eax, al
and eax, 0x10
test eax, eax
je 0x401df3
mov dword [esp + 4], 0
lea eax, [ebp - 0x1828]
mov dword [esp], eax
call sub.KERNEL32.dll_CreateDirectoryA
sub esp, 8
movzx eax, byte [ebp - 9]
and al, byte [ebp - 0x12]
movzx eax, al
and eax, 8
test eax, eax
je 0x401e2f
lea eax, [ebp - 0x1828]
mov dword [esp], eax
call sub.KERNEL32.dll_SetCurrentDirectoryA
sub esp, 4
test eax, eax
jne 0x401e2f
lea eax, [ebp - 0x1828]
mov dword [esp + 4], eax
mov dword [esp], str.Unable_to_set_directory_to__s
call fcn.00401f8a
movzx eax, byte [ebp - 9]
and al, byte [ebp - 0x12]
movzx eax, al
and eax, 2
test eax, eax
jne 0x401e56
movzx eax, byte [ebp - 9]
and al, byte [ebp - 0x12]
movzx eax, al
and eax, 4
test eax, eax
jne 0x401e56
jmp 0x401f3c
mov dword [esp + 8], 0x3c
mov dword [esp + 4], 0
lea eax, [ebp - 0x2c98]
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov dword [ebp - 0x2c98], 0x3c
mov dword [ebp - 0x2c94], 0x140
mov dword [ebp - 0x2c90], 0
movzx eax, byte [ebp - 9]
and al, byte [ebp - 0x12]
movzx eax, al
and eax, 4
test eax, eax
je 0x401eb8
call sub.KERNEL32.dll_GetVersion
cmp al, 5
jbe 0x401eb8
mov dword [ebp - 0x2c8c], str.runas
jmp 0x401ec2
mov dword [ebp - 0x2c8c], 0
lea eax, [ebp - 0x1828]
mov dword [ebp - 0x2c88], eax
lea eax, [ebp - 0x2028]
mov dword [ebp - 0x2c84], eax
mov dword [ebp - 0x2c80], 0
mov dword [ebp - 0x2c7c], 3
mov dword [ebp - 0x2c78], 0
lea eax, [ebp - 0x2c98]
mov dword [esp], eax
call sub.SHELL32.DLL_ShellExecuteExA
sub esp, 4
cmp dword [ebp - 0x2c60], 0
je 0x401f3c
mov dword [esp + 4], 0xffffffff
mov eax, dword [ebp - 0x2c60]
mov dword [esp], eax
call sub.KERNEL32.dll_WaitForSingleObject
sub esp, 8
mov eax, dword [ebp - 0x2c60]
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
sub esp, 4
movzx eax, byte [ebp - 9]
and al, byte [ebp - 0x12]
test al, al
jns 0x401f55
lea eax, [ebp - 0x1828]
mov dword [esp], eax
call sub.msvcrt.dll_remove
mov byte [ebp - 0x1828], 0
mov byte [ebp - 0x2028], 0
jmp 0x401669
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
mov dword [ebp - 0x2c9c], 0
mov eax, dword [ebp - 0x2c9c]
lea esp, [ebp - 8]
pop ebx
pop esi
pop ebp
ret