Function at 0x404b60
Capabilities:
Get common file path
Get file size
Read file via mapping
Set current directory
Set environment variable
Terminate process
Write file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x13c
call fcn.004040f0
mov dword [esp + 8], 0x104
mov dword [esp + 4], 0x40b540
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
sub esp, 0xc
test eax, eax
je 0x404cf0
mov dword [esp], 0x40b420
call fcn.00403b70
mov dword [esp + 4], 0x40b540
mov dword [esp], str.OCRA_EXECUTABLE
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
sub esp, 8
mov dword [esp + 4], 1
mov dword [esp], 0x403630
call dword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
sub esp, 8
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 3
mov dword [esp + 4], 0x80000000
mov dword [esp], 0x40b540
call dword [sym.imp.KERNEL32.dll_CreateFileA]
sub esp, 0x1c
cmp eax, 0xffffffff
mov ebx, eax
je 0x404d54
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
sub esp, 8
mov edi, eax
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 2
mov dword [esp + 4], 0
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
sub esp, 0x18
cmp eax, 0xffffffff
mov esi, eax
jne 0x404d8e
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0xd
mov dword [esp + 4], 1
mov dword [esp], str.FATAL_ERROR:
add eax, 0x40
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 4], str.Failed_to_create_file_mapping__error__lu_
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], 0xa
add eax, 0x40
mov dword [esp + 4], eax
call sub.msvcrt.dll_fputc
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
add esp, 0x13c
mov eax, 0xffffffff
pop ebx
pop esi
pop edi
pop ebp
ret 0x10
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0xd
mov dword [esp + 4], 1
mov dword [esp], str.FATAL_ERROR:
add eax, 0x40
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 4], str.Failed_to_get_executable_name__error__lu_.
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], 0xa
add eax, 0x40
mov dword [esp + 4], eax
call sub.msvcrt.dll_fputc
jmp 0x404cdd
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0xd
mov dword [esp + 4], 1
mov dword [esp], str.FATAL_ERROR:
add eax, 0x40
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
mov dword [esp + 8], 0x40b540
mov dword [esp + 4], str.Failed_to_open_executable___s_
jmp 0x404d2a
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 4
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
sub esp, 0x14
test eax, eax
mov ebp, eax
je 0x40504a
mov dword [esp + 4], edi
mov dword [esp], eax
call fcn.004042d0
test eax, eax
jne 0x404dde
mov dword [0x40b040], 0xffffffff
mov dword [esp], ebp
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
test eax, eax
push ecx
je 0x404fdd
mov dword [esp], esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
test eax, eax
push edx
jne 0x404e68
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0xd
mov dword [esp + 4], 1
mov dword [esp], str.FATAL_ERROR:
add eax, 0x40
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x1d
mov dword [esp + 4], 1
mov dword [esp], str.Failed_to_close_file_mapping.
add eax, 0x40
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], 0xa
add eax, 0x40
mov dword [esp + 4], eax
call sub.msvcrt.dll_fputc
mov dword [esp], ebx
call esi
test eax, eax
push ebp
jne 0x404eda
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0xd
mov dword [esp + 4], 1
mov dword [esp], str.FATAL_ERROR:
add eax, 0x40
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x1b
mov dword [esp + 4], 1
mov dword [esp], str.Failed_to_close_executable.
add eax, 0x40
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], 0xa
add eax, 0x40
mov dword [esp + 4], eax
call sub.msvcrt.dll_fputc
cmp dword [0x407064], 0
je 0x404f0a
cmp dword [0x40b038], 0
jne 0x405096
mov ebx, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov dword [esp], 0x40b420
call ebx
push esi
mov dword [esp], str.._src
call ebx
push edi
cmp dword [0x40b048], 0
je 0x404f3f
cmp dword [0x40b044], 0
je 0x404f3f
cmp dword [0x40b038], 0
jne 0x4050d3
mov eax, dword [0x40b044]
mov dword [esp + 4], eax
mov eax, dword [0x40b048]
mov dword [esp], eax
call fcn.004049a0
cmp dword [0x40b034], 0
je 0x404f82
cmp dword [0x40b038], 0
jne 0x404fa0
lea ebx, [esp + 0x2c]
mov dword [esp + 4], 0x104
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
push ecx
push ecx
je 0x404f90
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push edx
mov dword [esp], 0x40b420
call fcn.004040c0
mov eax, dword [0x40b040]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov dword [esp], 0x4084b5
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push eax
jmp 0x404f76
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x40b420
mov dword [esp + 4], str.Deleting_temporary_installation_directory__s
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], 0xa
add eax, 0x40
mov dword [esp + 4], eax
call sub.msvcrt.dll_fputc
jmp 0x404f51
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0xd
mov dword [esp + 4], 1
mov dword [esp], str.FATAL_ERROR:
add eax, 0x40
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x23
mov dword [esp + 4], 1
mov dword [esp], str.Failed_to_unmap_view_of_executable.
add eax, 0x40
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], 0xa
add eax, 0x40
mov dword [esp + 4], eax
call sub.msvcrt.dll_fputc
jmp 0x404df0
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0xd
mov dword [esp + 4], 1
mov dword [esp], str.FATAL_ERROR:
add eax, 0x40
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 4], str.Failed_to_map_view_of_executable_into_memory__error__lu_.
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
jmp 0x40502d
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x40b420
mov dword [esp + 4], str.Changing_CWD_to_unpacked_directory__s_src
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], 0xa
add eax, 0x40
mov dword [esp + 4], eax
call sub.msvcrt.dll_fputc
jmp 0x404ef0
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0xa
mov dword [esp + 4], 1
mov dword [esp], 0x408468
add eax, 0x40
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], 0xa
add eax, 0x40
mov dword [esp + 4], eax
call sub.msvcrt.dll_fputc
cmp dword [0x40b038], 0
je 0x404f29
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x40b420
mov dword [esp + 4], str.Starting_app_in:__s
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], 0xa
add eax, 0x40
mov dword [esp + 4], eax
call sub.msvcrt.dll_fputc
cmp dword [0x40b038], 0
je 0x404f29
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0xa
mov dword [esp + 4], 1
mov dword [esp], 0x408468
add eax, 0x40
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], 0xa
add eax, 0x40
mov dword [esp + 4], eax
call sub.msvcrt.dll_fputc
jmp 0x404f29