Function at 0x140006600
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 r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x150
lea rsi, [0x14000b160]
call fcn.140003fa0
xor ecx, ecx
mov r8d, 0x104
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x140004af8
lea rbp, [0x14000b040]
mov rcx, rbp
call fcn.140003a50
mov rdx, rsi
lea rcx, str.AIBIKA_EXECUTABLE
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
mov edx, 1
lea rcx, [0x140003570]
call qword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
xor r9d, r9d
mov edx, 0x80000000
mov rcx, rsi
mov qword [rsp + 0x30], 0
mov r8d, 3
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140004b60
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
xor r9d, r9d
mov r8d, 2
xor edx, edx
mov qword [rsp + 0x28], 0
mov edi, eax
mov rcx, rbx
mov dword [rsp + 0x20], eax
call qword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x140004ba3
mov rsi, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov ecx, 2
call rsi
mov r8d, 0xd
mov edx, 1
lea rcx, str.FATAL_ERROR:
mov r9, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 2
mov edi, eax
call rsi
mov r8d, edi
lea rdx, str.Failed_to_create_file_mapping__error__lu_
mov rcx, rax
call fcn.1400060c0
mov ecx, 2
call rsi
mov ecx, 0xa
mov rdx, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fputc
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xffffffff
add rsp, 0x150
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rbx, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov ecx, 2
call rbx
mov r8d, 0xd
mov edx, 1
lea rcx, str.FATAL_ERROR:
mov r9, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 2
mov esi, eax
call rbx
mov r8d, esi
lea rdx, str.Failed_to_get_executable_name__error__lu_.
mov rcx, rax
call fcn.1400060c0
mov ecx, 2
call rbx
mov ecx, 0xa
mov rdx, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fputc
jmp 0x140004ae1
mov rbx, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov ecx, 2
call rbx
mov r8d, 0xd
mov edx, 1
lea rcx, str.FATAL_ERROR:
mov r9, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
mov ecx, 2
call rbx
mov r8, rsi
lea rdx, str.Failed_to_open_executable___s_
mov rcx, rax
call fcn.1400060c0
jmp 0x140004b41
xor eax, eax
xor r9d, r9d
xor r8d, r8d
mov edx, 4
mov qword [rsp + 0x20], rax
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov r12, rax
test rax, rax
je 0x140004d23
mov edx, edi
mov rcx, rax
call fcn.140004170
test eax, eax
jne 0x140004be2
mov dword [0x14000b270], 0xffffffff
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
test eax, eax
je 0x140004ef7
mov rdi, qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rsi
call rdi
test eax, eax
je 0x140004cc1
mov rcx, rbx
call rdi
test eax, eax
je 0x140004d86
cmp dword [0x140007068], 0
je 0x140004c3f
cmp dword [0x14000b268], 0
jne 0x140004f45
mov rcx, rbp
mov rbx, qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
call rbx
lea rcx, str.._src
call rbx
cmp qword [0x14000b280], 0
je 0x140004c73
cmp qword [0x14000b278], 0
je 0x140004c73
cmp dword [0x14000b268], 0
jne 0x140004dfa
mov rdx, qword [0x14000b278]
mov rcx, qword [0x14000b280]
call fcn.1400047f0
cmp dword [0x14000b264], 0
je 0x140004cb5
cmp dword [0x14000b268], 0
jne 0x140004eba
lea rbx, [rsp + 0x40]
mov edx, 0x104
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x140004de8
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov rcx, rbp
call fcn.140003f20
mov ecx, dword [0x14000b270]
call qword [sym.imp.KERNEL32.dll_ExitProcess]
mov rsi, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov ecx, 2
call rsi
mov r8d, 0xd
mov edx, 1
lea rcx, str.FATAL_ERROR:
mov r9, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
mov ecx, 2
call rsi
mov r8d, 0x1d
mov edx, 1
lea rcx, str.Failed_to_close_file_mapping.
mov r9, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
mov ecx, 2
call rsi
mov ecx, 0xa
mov rdx, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fputc
jmp 0x140004c07
mov rdi, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov ecx, 2
call rdi
mov r8d, 0xd
mov edx, 1
lea rcx, str.FATAL_ERROR:
mov r9, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 2
mov r12d, eax
call rdi
mov r8d, r12d
lea rdx, str.Failed_to_map_view_of_executable_into_memory__error__lu_.
mov rcx, rax
call fcn.1400060c0
mov ecx, 2
call rdi
mov ecx, 0xa
mov rdx, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fputc
jmp 0x140004bf3
mov rbx, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov ecx, 2
call rbx
mov r8d, 0xd
mov edx, 1
lea rcx, str.FATAL_ERROR:
mov r9, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
mov ecx, 2
call rbx
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Failed_to_close_executable.
mov r9, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
mov ecx, 2
call rbx
mov ecx, 0xa
mov rdx, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fputc
jmp 0x140004c14
lea rcx, [0x1400084cd]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
jmp 0x140004cad
mov rbx, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov ecx, 2
lea rsi, [0x140008480]
call rbx
mov r8d, 0xa
mov edx, 1
mov rcx, rsi
mov r9, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
mov ecx, 2
call rbx
mov ecx, 0xa
mov rdx, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fputc
cmp dword [0x14000b268], 0
je 0x140004c60
mov ecx, 2
call rbx
lea r8, [0x14000b040]
lea rdx, str.Starting_app_in:__s
mov rcx, rax
call fcn.1400060c0
mov ecx, 2
call rbx
mov ecx, 0xa
mov rdx, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fputc
cmp dword [0x14000b268], 0
je 0x140004c60
mov ecx, 2
call rbx
mov r8d, 0xa
mov edx, 1
mov rcx, rsi
mov r9, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
mov ecx, 2
call rbx
mov ecx, 0xa
mov rdx, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fputc
jmp 0x140004c60
mov rbx, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov ecx, 2
call rbx
lea r8, [0x14000b040]
lea rdx, str.Deleting_temporary_installation_directory__s
mov rcx, rax
call fcn.1400060c0
mov ecx, 2
call rbx
mov ecx, 0xa
mov rdx, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fputc
jmp 0x140004c89
mov rdi, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov ecx, 2
call rdi
mov r8d, 0xd
mov edx, 1
lea rcx, str.FATAL_ERROR:
mov r9, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
mov ecx, 2
call rdi
mov r8d, 0x23
mov edx, 1
lea rcx, str.Failed_to_unmap_view_of_executable.
mov r9, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
jmp 0x140004d6d
mov rbx, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov ecx, 2
call rbx
lea r8, [0x14000b040]
lea rdx, str.Changing_CWD_to_unpacked_directory__s_src
mov rcx, rax
call fcn.1400060c0
mov ecx, 2
call rbx
mov ecx, 0xa
mov rdx, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fputc
jmp 0x140004c2a
push rdi
push rsi
push rbx
sub rsp, 0x90
xor esi, esi
call fcn.140005090
call sub.api_ms_win_crt_runtime_l1_1_0.dll___p__acmdln
mov rbx, qword [rax]
test rbx, rbx
jne 0x14000664b
jmp 0x1400066c1
test cl, cl
je 0x140006678
and esi, 1
je 0x140006660
mov esi, 1
call sub.api_ms_win_crt_multibyte_l1_1_0.dll__ismbblead
test eax, eax
je 0x140006647
cmp byte [rbx + 1], 1
sbb rbx, 0xffffffffffffffff
add rbx, 1
movsx ecx, byte [rbx]
cmp cl, 0x20
jle 0x140006628
mov eax, esi
xor eax, 1
cmp cl, 0x22
cmove esi, eax
jmp 0x140006636
test cl, cl
je 0x140006678
nop dword [rax]
movzx eax, byte [rbx + 1]
add rbx, 1
test al, al
je 0x140006678
cmp al, 0x20
jle 0x140006668
lea rdx, [rsp + 0x20]
xor eax, eax
mov ecx, 0xd
mov rdi, rdx
rep stosq qword [rdi], rax
mov rcx, rdx
call qword [sym.imp.KERNEL32.dll_GetStartupInfoA]
mov r9d, 0xa
test byte [rsp + 0x5c], 1
je 0x1400066a6
movzx r9d, word [rsp + 0x60]
mov rcx, qword [0x140008880]
mov r8, rbx
xor edx, edx
add rsp, 0x90
pop rbx
pop rsi
pop rdi
jmp 0x1400049a0
lea rbx, [0x1400084e0]
jmp 0x140006678