Function at 0x140009940
Capabilities:
Accept command line arguments
Create directory
Create process on windows
Read file on windows
Set environment variable
Write and execute a file
Write file on windows

Disassembly:
call sub.msvcrt.dll_abort
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x118
lea r12, [0x14001c0c0]
call fcn.140002137
xor ecx, ecx
mov r8d, 0x1000
mov rdx, r12
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x140009f2a
lea r13, str._TEMP_onefile__PID___TIME_
mov r8d, 0x1000
lea rcx, [0x14001e0e0]
mov rdx, r13
call fcn.140001d70
test al, al
je 0x14000a38e
mov edx, 1
lea rcx, [0x140001a40]
call qword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
test eax, eax
je 0x140009f05
mov rax, qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
xor edx, edx
lea rcx, [0x14001e0e0]
mov qword [rsp + 0x58], rax
call rax
mov rax, qword [sym.imp.KERNEL32.dll_CreateFileW]
xor r9d, r9d
mov rcx, r12
mov byte [0x14001e0c0], 1
mov r8d, 1
mov edx, 0x80000000
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 3
mov qword [rsp + 0x50], rax
call rax
mov qword [0x1400200e0], rax
add rax, 1
je 0x14000a301
xor r8d, r8d
xor edx, edx
mov rcx, r12
mov rsi, qword [sym.imp.KERNEL32.dll_GetShortPathNameW]
call rsi
lea ecx, [rax + 1]
mov ebx, eax
add rcx, rcx
call sub.msvcrt.dll_malloc
mov r13, rax
test rax, rax
je 0x14000a3a8
mov r8d, ebx
mov rdx, r13
mov rcx, r12
call rsi
lea r15, [rsp + 0x90]
test eax, eax
je 0x14000a2f4
xor r8d, r8d
xor edx, edx
mov rsi, qword [sym.imp.msvcrt.dll_wcstombs_s]
mov r9, r13
mov qword [rsp + 0x20], 0xffffffffffffffff
mov rcx, r15
call rsi
test eax, eax
jne 0x14000a2f4
mov rbx, qword [rsp + 0x90]
mov rcx, rbx
call sub.msvcrt.dll_malloc
mov r12, rax
test rax, rax
je 0x14000a2af
mov r9, r13
mov r8, rbx
mov rdx, rax
mov rcx, r15
mov qword [rsp + 0x20], 0xffffffffffffffff
call rsi
test eax, eax
jne 0x14000a2ec
xor r9d, r9d
mov r8, r15
lea rdx, str.dont_search_path
mov rcx, r12
mov dword [rsp + 0x20], 1
call qword [sym.imp.imagehlp.dll_MapAndLoad]
test eax, eax
jne 0x140009f3d
mov rcx, r12
call sub.msvcrt.dll_free
mov rcx, qword [0x1400200e0]
mov rbx, qword [sym.imp.KERNEL32.dll_SetFilePointer]
xor r8d, r8d
mov edx, 0xfffffff8
mov r9d, 2
call rbx
add eax, 1
je 0x14000a317
xor r8d, r8d
mov r9d, 1
xor edx, edx
mov rcx, qword [0x1400200e0]
call rbx
mov edx, 8
mov rcx, r15
call fcn.140001860
xor r9d, r9d
xor r8d, r8d
mov edx, dword [rsp + 0x90]
mov rcx, qword [0x1400200e0]
call rbx
add eax, 1
je 0x14000a336
lea rcx, [rsp + 0x69]
mov edx, 3
call fcn.140001860
cmp byte [rsp + 0x69], 0x4b
je 0x140009b87
mov r8d, 0x2df
lea rdx, str.static_srcOnefileBootstrap.c
lea rcx, str.header_0___K
call qword [sym.imp.msvcrt.dll__assert]
cmp byte [rsp + 0x6a], 0x41
je 0x140009ba8
mov r8d, 0x2e0
lea rdx, str.static_srcOnefileBootstrap.c
lea rcx, str.header_1___A
call qword [sym.imp.msvcrt.dll__assert]
cmp byte [rsp + 0x6b], 0x58
je 0x140009bc9
mov r8d, 0x2e7
lea rdx, str.static_srcOnefileBootstrap.c
lea rcx, str.header_2___X
call qword [sym.imp.msvcrt.dll__assert]
mov r13, qword [sym.imp.KERNEL32.dll_ReadFile]
lea r14, [rsp + 0x70]
nop dword [rax]
mov rdi, qword [sym.imp.msvcrt.dll__assert]
lea rbx, [0x1400110c0]
lea rsi, str.static_srcOnefileBootstrap.c
lea rbp, str.bool_res
jmp 0x140009c27
mov r8d, 0xeb
mov rdx, rsi
lea rcx, str.read_size__size
call qword [sym.imp.msvcrt.dll__assert]
movzx eax, word [rsp + 0x70]
mov word [rbx], ax
test ax, ax
je 0x140009c65
add rbx, 2
mov qword [rsp + 0x20], 0
mov rcx, qword [0x1400200e0]
mov r9, r15
mov rdx, r14
mov r8d, 2
call r13
test eax, eax
je 0x140009fa0
cmp dword [rsp + 0x90], 2
jne 0x140009c00
movzx eax, word [rsp + 0x70]
mov word [rbx], ax
test ax, ax
jne 0x140009c23
lea rax, [0x1400110c0]
movzx eax, word [rax]
test ax, ax
je 0x14000a14a
lea rbx, [0x1400110c0]
lea r12, [0x14001a0c0]
nop word cs:[rax + rax]
lea rdi, [0x14001e0e0]
movzx edx, word [rdi]
cmp ax, 0x5c
je 0x140009fe8
movzx eax, word [rbx + 2]
add rbx, 2
test ax, ax
jne 0x140009c90
lea rax, [0x14001e0e0]
xor r8d, r8d
lea rdx, [0x14001a0c0]
movzx ecx, word [rax]
mov word [0x14001a0c0], r8w
test cx, cx
jne 0x140009ce8
jmp 0x140009cfb
lea rdi, [0x1400200e0]
cmp rax, rdi
je 0x140009930
add rax, 2
mov word [rdx], cx
add rdx, 2
movzx ecx, word [rax]
test cx, cx
jne 0x140009cd8
xor ecx, ecx
mov word [rdx], cx
cmp word [0x14001a0c0], 0
je 0x14000a25e
mov edx, 0x1000
lea rax, [0x14001a0c0]
nop word [rax + rax]
add rax, 2
sub rdx, 1
cmp word [rax], 0
jne 0x140009d20
test rdx, rdx
je 0x14000a3e0
mov dword [rax], 0x5c
lea rax, [0x1400110c0]
mov edx, 0x1000
cmp word [0x14001a0c0], 0
movzx ecx, word [rax]
lea rax, [0x14001a0c0]
je 0x14000a250
nop dword [rax]
add rax, 2
sub rdx, 1
cmp word [rax], 0
jne 0x140009d68
test cx, cx
je 0x140009db1
test rdx, rdx
je 0x14000a3db
lea r8, [0x1400110c0]
jmp 0x140009d99
test rdx, rdx
je 0x14000a3d6
add r8, 2
mov word [rax], cx
add rax, 2
sub rdx, 1
movzx ecx, word [r8]
test cx, cx
jne 0x140009d90
xor edx, edx
cmp word [0x1400198c0], 0
mov word [rax], dx
je 0x14000a130
mov rcx, r12
mov rax, qword [rsp + 0x50]
xor r9d, r9d
mov edx, 0x40000000
mov qword [rsp + 0x30], 0
mov r8d, 2
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 2
call rax
mov r12, rax
cmp rax, 0xffffffffffffffff
je 0x14000a363
mov qword [rsp + 0x20], 0
mov rcx, qword [0x1400200e0]
mov r9, r14
mov rdx, r15
mov r8d, 8
call r13
test eax, eax
je 0x14000a110
cmp dword [rsp + 0x70], 8
je 0x140009e4a
mov r8d, 0xeb
lea rdx, str.static_srcOnefileBootstrap.c
lea rcx, str.read_size__size
call qword [sym.imp.msvcrt.dll__assert]
mov rsi, qword [rsp + 0x90]
lea rdi, [0x1400118c0]
lea rbp, str.static_srcOnefileBootstrap.c
test rsi, rsi
jne 0x140009ebe
jmp 0x140009fd7
mov eax, dword [rsp + 0x90]
cmp rbx, rax
je 0x140009e92
mov r8d, 0xeb
mov rdx, rbp
lea rcx, str.read_size__size
call qword [sym.imp.msvcrt.dll__assert]
xor r9d, r9d
mov r8d, ebx
mov rdx, rdi
mov rcx, r12
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140009fb8
sub rsi, rbx
je 0x140009fd7
mov ebx, 0x8000
mov rcx, qword [0x1400200e0]
mov r9, r15
mov rdx, rdi
mov qword [rsp + 0x20], 0
cmp rsi, rbx
cmovbe rbx, rsi
mov r8d, ebx
call r13
test eax, eax
jne 0x140009e70
mov r8d, 0xea
mov rdx, rbp
lea rcx, str.bool_res
call qword [sym.imp.msvcrt.dll__assert]
jmp 0x140009e70
lea rcx, str.Error__failed_to_register_signal_handler.
call fcn.140001800
mov eax, 1
add rsp, 0x118
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea rcx, str.Error__failed_to_locate_onefile_filename.
call fcn.140001800
mov eax, 1
jmp 0x140009f16
mov rax, qword [rsp + 0xa8]
test rax, rax
je 0x14000a355
cmp dword [rax + 0x84], 4
jbe 0x14000a355
mov ebx, dword [rax + 0xa8]
mov rcx, r15
call qword [sym.imp.imagehlp.dll_UnMapAndLoad]
mov rcx, r12
call sub.msvcrt.dll_free
test ebx, ebx
je 0x140009af0
lea edx, [rbx - 8]
mov rcx, qword [0x1400200e0]
xor r9d, r9d
xor r8d, r8d
mov rbx, qword [sym.imp.KERNEL32.dll_SetFilePointer]
call rbx
jmp 0x140009b0e
mov r8d, 0xea
mov rdx, rsi
mov rcx, rbp
call rdi
jmp 0x140009c4e
mov r8d, 0xa2
mov rdx, rbp
lea rcx, str.bool_res
call qword [sym.imp.msvcrt.dll__assert]
sub rsi, rbx
jne 0x140009ebe
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140009bd8
xor esi, esi
xor ebp, ebp
lea rcx, [0x14001a0c0]
mov rax, rdi
mov word [rbx], si
mov word [0x14001a0c0], bp
test dx, dx
jne 0x14000a020
jmp 0x14000a033
lea rsi, [0x1400200e0]
cmp rax, rsi
je 0x140009930
add rax, 2
mov word [rcx], dx
add rcx, 2
movzx edx, word [rax]
test dx, dx
jne 0x14000a010
xor r11d, r11d
mov word [rcx], r11w
cmp word [r12], 0
je 0x14000a284
mov edx, 0x1000
lea rax, [0x14001a0c0]
nop word [rax + rax]
add rax, 2
sub rdx, 1
cmp word [rax], 0
jne 0x14000a058
test rdx, rdx
je 0x14000a3d1
mov dword [rax], 0x5c
lea rax, [0x1400110c0]
cmp word [r12], 0
movzx ecx, word [rax]
je 0x14000a26a
mov edx, 0x1000
lea rax, [0x14001a0c0]
nop word [rax + rax]
add rax, 2
sub rdx, 1
cmp word [rax], 0
jne 0x14000a0a0
test cx, cx
je 0x14000a0e9
test rdx, rdx
je 0x14000a3cc
lea r8, [0x1400110c0]
jmp 0x14000a0d1
test rdx, rdx
je 0x14000a3c7
add r8, 2
mov word [rax], cx
add rax, 2
sub rdx, 1
movzx ecx, word [r8]
test cx, cx
jne 0x14000a0c8
xor r9d, r9d
mov r10d, 0x5c
xor edx, edx
mov rcx, r12
mov word [rax], r9w
mov rax, qword [rsp + 0x58]
mov word [rbx], r10w
call rax
jmp 0x140009ca4
mov r8d, 0xea
lea rdx, str.static_srcOnefileBootstrap.c
lea rcx, str.bool_res
call qword [sym.imp.msvcrt.dll__assert]
jmp 0x140009e29
mov r8d, 0x1000
mov rdx, r12
lea rcx, [0x1400198c0]
call fcn.140001b90
jmp 0x140009dc4
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov edx, pe_nt_image_headers64
mov rcx, r15
mov rdi, r15
mov r9d, eax
lea r8, [0x14000c184]
call fcn.1400017e0
mov rdx, r15
lea rcx, str.NUITKA_ONEFILE_PARENT
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
xor eax, eax
mov ecx, 0x1a
rep stosd dword [rdi], eax
mov dword [rsp + 0x90], 0x68
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x48], r14
mov qword [rsp + 0x40], r15
mov rdx, rax
lea rcx, [0x1400198c0]
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x200
mov dword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x14000a290
mov rcx, qword [rsp + 0x78]
mov rbx, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rbx
mov rcx, qword [rsp + 0x70]
mov dword [rsp + 0x6c], 0
mov qword [0x1400110a0], rcx
test rcx, rcx
je 0x14000a242
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [0x1400110a0]
lea rdx, [rsp + 0x6c]
call qword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
jne 0x14000a22e
mov dword [rsp + 0x6c], 1
mov rcx, qword [0x1400110a0]
call rbx
mov qword [0x1400110a0], 0
call fcn.140001910
mov eax, dword [rsp + 0x6c]
jmp 0x140009f16
test cx, cx
jne 0x140009d84
jmp 0x140009db1
lea rax, [0x14001a0c0]
jmp 0x140009d37
lea rax, [0x14001a0c0]
mov edx, 0x1000
test cx, cx
jne 0x14000a0bc
jmp 0x14000a0e9
lea rax, [0x14001a0c0]
jmp 0x14000a06f
mov r8d, 0x357
lea rdx, str.static_srcOnefileBootstrap.c
lea rcx, str.bool_res
call qword [sym.imp.msvcrt.dll__assert]
jmp 0x14000a1de
mov r8d, 0x1f5
lea rdx, str.static_srcOnefileBootstrap.c
lea rcx, str.ansiPath
call qword [sym.imp.msvcrt.dll__assert]
xor edx, edx
mov r9, r13
mov rcx, r15
mov qword [rsp + 0x20], 0xffffffffffffffff
mov r8, qword [rsp + 0x90]
call rsi
test eax, eax
je 0x140009af0
mov rcx, r12
call sub.msvcrt.dll_free
mov rcx, r13
call sub.msvcrt.dll_free
jmp 0x140009af0
lea rcx, str.Error__failed_to_access_unpacked_executable.
call fcn.140001800
mov eax, 1
jmp 0x140009f16
mov r8d, 0x2c8
lea rdx, str.static_srcOnefileBootstrap.c
lea rcx, str.res___INVALID_SET_FILE_POINTER
call qword [sym.imp.msvcrt.dll__assert]
jmp 0x140009b17
mov r8d, 0x2d7
lea rdx, str.static_srcOnefileBootstrap.c
lea rcx, str.res___INVALID_SET_FILE_POINTER
call qword [sym.imp.msvcrt.dll__assert]
jmp 0x140009b57
mov rcx, r15
call qword [sym.imp.imagehlp.dll_UnMapAndLoad]
jmp 0x140009ae8
mov ecx, 2
call qword [fcn.1400095d0]
lea r8, [0x14001a0c0]
lea rdx, str.Error__failed_to_open__ls_for_writing.
mov rcx, rax
call fcn.1400018e0
mov ecx, 2
call sub.msvcrt.dll_exit
lea rcx, str.Error__couldnt_runtime_expand_temporary_directory_pattern:
call sub.msvcrt.dll_puts
mov rcx, r13
call qword [sym.imp.msvcrt.dll__putws]
call sub.msvcrt.dll_abort
mov r8d, 0x1e9
lea rdx, str.static_srcOnefileBootstrap.c
lea rcx, str.shortPath
call qword [sym.imp.msvcrt.dll__assert]
jmp 0x140009a47
jmp 0x140009930
jmp 0x140009930
jmp 0x140009930
jmp 0x140009930
jmp 0x140009930
jmp 0x140009930