Function at 0x140015040
Capabilities:
Accept command line arguments
Create process on windows
Extract resource via kernel32 functions
Set environment variable
Write and execute a file
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0xe8
lea rcx, [0x1400330d0]
lea rdx, str.CACHE_DIRPID_Dlls
mov r8d, 0x1000
call fcn.140014570
test al, al
je 0x140015e88
lea rcx, [0x140014ef0]
mov edx, 1
call qword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
test eax, eax
je 0x140015ed5
mov edx, 0x1b
mov r8d, 0xa
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_FindResourceA]
mov rsi, rax
xor ecx, ecx
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov qword [0x140037900], rax
mov qword [0x1400350d0], rax
xor ecx, ecx
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
mov rdi, qword [0x1400350d0]
movzx edx, byte [rdi]
movzx ecx, byte [rdi + 1]
movzx eax, byte [rdi + 2]
add rdi, 3
mov qword [0x1400350d0], rdi
cmp dl, 0x4b
jne 0x140015ebf
cmp cl, 0x41
jne 0x140015ebf
cmp al, 0x59
jne 0x140015ebf
mov qword [0x1400350d8], 0
mov ecx, 0x20000
call sub.msvcrt.dll_malloc
mov qword [0x140037908], rax
test rax, rax
je 0x140015eeb
mov ecx, 0x274b8
call sub.msvcrt.dll_malloc
test rax, rax
je 0x140015f01
mov r8, rax
mov r10d, esi
mov qword [rax + 0x73c8], 0
mov qword [rax + 0x72d8], 0
mov qword [rax + 0x7420], 0
mov qword [rax + 0x7440], 0
mov dword [rax + 0x7448], 0
mov dword [rax + 0x7454], 0
mov qword [rax + 0x274b0], 0
xor r9d, r9d
xor eax, eax
cpuid
xorps xmm0, xmm0
movups xmmword [r8 + 0x73d8], xmm0
movups xmmword [r8 + 0x73ec], xmm0
movups xmmword [r8 + 0x73f8], xmm0
movups xmmword [r8 + 0x73a0], xmm0
mov qword [r8 + 0x73b0], 0
test eax, eax
je 0x1400151e5
cmp eax, 7
jb 0x1400151e5
mov eax, 7
xor ecx, ecx
cpuid
mov r9d, ebx
shr r9d, 8
and r9d, 1
mov dword [r8 + 0x73d0], r9d
mov dword [r8 + 0x7388], 0
mov qword [r8 + 0x7410], 0x8000001
mov dword [r8 + 0x7458], 0
movabs rax, 0x100000000
mov qword [r8 + 0x738c], rax
mov qword [0x140037920], r8
mov qword [0x1400350d8], rdi
mov qword [0x1400350e8], 0
mov qword [0x1400350e0], r10
mov byte [0x1400358f0], 1
lea rdi, [0x140037930]
lea rbx, [0x140037908]
lea r14, [0x1400350d8]
jmp 0x140015272
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rdi, [0x140037930]
mov rax, qword [0x140037910]
mov rcx, qword [0x140037918]
mov rsi, rdi
jmp 0x1400152a8
movzx edx, word [rsp + 0x80]
mov word [rsi], dx
add rsi, 2
test dx, dx
je 0x140015390
mov r12d, 2
xor ebp, ebp
mov rdx, rcx
mov r15, rax
lea r13, [rsp + 0x80]
jmp 0x140015302
cmp r12, r15
cmovb r15, r12
add rdx, qword [0x140037908]
mov rcx, r13
mov r8, r15
call sub.msvcrt.dll_memcpy
add r13, r15
sub r12, r15
add r15, qword [0x140037918]
mov qword [0x140037918], r15
mov rax, qword [0x140037910]
mov rcx, r15
mov rdx, r15
mov r15, rax
test r12, r12
je 0x140015290
sub r15, rdx
jne 0x1400152c0
mov r8, qword [0x1400350e8]
mov r9, qword [0x1400350e0]
cmp r8, r9
jb 0x140015330
mov r10d, ebp
and r10b, 1
jne 0x140015330
mov r15, rdx
cmp r9, r8
je 0x1400152fd
jmp 0x140015e4f
mov qword [0x140037918], 0
mov qword [0x140037910], 0x20000
mov rcx, qword [0x140037920]
mov rdx, rbx
mov r8, r14
call fcn.140010660
cmp rax, 0xffffffffffffff89
jae 0x140015e4f
mov rax, qword [0x140037918]
cmp rax, qword [0x140037910]
sete bpl
mov qword [0x140037910], rax
mov qword [0x140037918], 0
xor ecx, ecx
xor edx, edx
jmp 0x1400152fa
cmp word [0x140037930], 0
je 0x1400157b7
mov word [0x140035900], 0
movzx ecx, word [0x1400330d0]
lea r15, [0x140035900]
mov rax, r15
test cx, cx
lea rdx, [0x1400330d0]
je 0x140015460
xor eax, eax
nop word [rax + rax]
cmp rax, 0x2000
je 0x140015e65
mov word [rax + r15], cx
movzx ecx, word [rax + rdx + 2]
test cx, cx
je 0x14001543a
mov word [rax + r15 + 2], cx
movzx ecx, word [rax + rdx + 4]
test cx, cx
je 0x140015455
mov word [rax + r15 + 4], cx
movzx ecx, word [rax + rdx + 6]
test cx, cx
je 0x1400155c4
mov word [rax + r15 + 6], cx
movzx ecx, word [rax + rdx + 8]
add rax, 8
test cx, cx
jne 0x1400153d0
add rax, r15
mov word [rax], 0
cmp word [0x140035900], 0
mov rax, r15
jne 0x140015472
jmp 0x140015497
add rax, r15
add rax, 2
mov word [rax], 0
cmp word [0x140035900], 0
mov rax, r15
jne 0x140015472
jmp 0x140015497
add rax, r15
add rax, 4
nop dword [rax]
mov word [rax], 0
cmp word [0x140035900], 0
mov rax, r15
je 0x140015497
mov rcx, 0xfffffffffffff000
mov rax, r15
nop dword [rax]
inc rcx
cmp word [rax + 2], 0
lea rax, [rax + 2]
jne 0x140015480
test rcx, rcx
je 0x140015e65
mov dword [rax], 0x5c
cmp word [0x140035900], 0
je 0x1400154f0
mov ecx, 0x1000
mov rdx, r15
nop
lea rax, [rdx + 2]
dec rcx
cmp word [rdx + 2], 0
mov rdx, rax
jne 0x1400154b0
movzx edx, word [0x140037930]
test dx, dx
jne 0x140015504
mov word [rax], 0
cmp word [0x1400350f0], 0
jne 0x140015605
jmp 0x140015546
mov ecx, 0x1000
mov rax, r15
movzx edx, word [0x140037930]
test dx, dx
je 0x1400154cd
xor r8d, r8d
xor r9d, r9d
nop word [rax + rax]
cmp rcx, r9
je 0x140015e65
mov word [rax + r9*2], dx
movzx edx, word [rdi + r9*2 + 2]
inc r9
add r8, 0xfffffffffffffffe
test dx, dx
jne 0x140015510
sub rax, r8
mov word [rax], 0
cmp word [0x1400350f0], 0
jne 0x140015605
movzx ecx, word [0x140035900]
lea rdx, [0x1400350f0]
mov rax, rdx
test cx, cx
je 0x140015600
xor eax, eax
nop word cs:[rax + rax]
cmp rax, 0x2000
je 0x140015e65
mov word [rax + rdx], cx
movzx ecx, word [rax + r15 + 2]
test cx, cx
je 0x1400155e6
mov word [rax + rdx + 2], cx
movzx ecx, word [rax + r15 + 4]
test cx, cx
je 0x1400155ef
mov word [rax + rdx + 4], cx
movzx ecx, word [rax + r15 + 6]
test cx, cx
je 0x1400155f8
mov word [rax + rdx + 6], cx
movzx ecx, word [rax + r15 + 8]
add rax, 8
test cx, cx
jne 0x140015570
add rax, rdx
jmp 0x140015600
add rax, r15
add rax, 6
mov word [rax], 0
cmp word [0x140035900], 0
mov rax, r15
jne 0x140015472
jmp 0x140015497
add rax, rdx
add rax, 2
jmp 0x140015600
add rax, rdx
add rax, 4
jmp 0x140015600
add rax, rdx
add rax, 6
nop
mov word [rax], 0
mov edx, 8
lea rcx, [rsp + 0x80]
call fcn.14001baa0
mov rsi, qword [rsp + 0x80]
mov rcx, r15
call fcn.140015f80
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 2
mov rcx, r15
mov edx, 0x40000000
mov r8d, 2
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0x60], rax
cmp rax, 0xffffffffffffffff
je 0x140015e94
test rsi, rsi
je 0x140015260
nop
cmp rsi, 0x8000
mov edi, 0x8000
cmovb rdi, rsi
mov r15, qword [0x140037910]
mov rdx, qword [0x140037918]
xor r13d, r13d
lea r12, [0x14003a130]
mov rbp, rdi
jmp 0x1400156e0
cmp rbp, r15
cmovb r15, rbp
add rdx, qword [0x140037908]
mov rcx, r12
mov r8, r15
call sub.msvcrt.dll_memcpy
add r12, r15
sub rbp, r15
add r15, qword [0x140037918]
mov qword [0x140037918], r15
mov rdx, r15
mov r15, qword [0x140037910]
test rbp, rbp
je 0x140015770
sub r15, rdx
jne 0x1400156a0
mov rax, qword [0x1400350e8]
mov rcx, qword [0x1400350e0]
cmp rax, rcx
jb 0x140015710
mov r8d, r13d
and r8b, 1
jne 0x140015710
mov r15, rdx
cmp rcx, rax
je 0x1400156d7
jmp 0x140015e4f
mov qword [0x140037918], 0
mov qword [0x140037910], 0x20000
mov rcx, qword [0x140037920]
mov rdx, rbx
mov r8, r14
call fcn.140010660
cmp rax, 0xffffffffffffff89
jae 0x140015e4f
mov r15, qword [0x140037918]
cmp r15, qword [0x140037910]
sete r13b
mov qword [0x140037910], r15
mov qword [0x140037918], 0
xor edx, edx
jmp 0x1400156d7
mov dword [rsp + 0x80], 0
mov qword [rsp + 0x20], 0
mov rcx, qword [rsp + 0x60]
lea rdx, [0x14003a130]
mov r8d, edi
lea r9, [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140015e6a
sub rsi, rdi
jne 0x140015670
jmp 0x140015260
mov rcx, qword [0x140037920]
call fcn.14000b720
mov rcx, qword [0x140037908]
call sub.msvcrt.dll_free
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea rcx, str.NUITKA_ONEFILE_PARENT
mov edx, eax
call fcn.140013c80
cmp word [0x1400310b0], 0
jne 0x140015865
lea rsi, [0x1400310b0]
xor ecx, ecx
mov rdx, rsi
mov r8d, 0x1001
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
movzx ecx, word [0x1400310b0]
test cx, cx
je 0x140015860
mov rax, 0xfffffffffffff001
lea rsi, [0x1400310b4]
nop
mov word [rsi - 4], cx
movzx ecx, word [rsi - 2]
test cx, cx
je 0x14001585c
mov word [rsi - 2], cx
movzx ecx, word [rsi]
test cx, cx
je 0x140015860
test rax, rax
je 0x140015e65
mov word [rsi], cx
movzx ecx, word [rsi + 2]
add rax, 3
add rsi, 6
test cx, cx
jne 0x140015820
add rsi, 0xfffffffffffffffc
jmp 0x140015860
add rsi, 0xfffffffffffffffe
mov word [rsi], 0
mov word [rsp + 0x80], 0
lea rbx, [rsp + 0x80]
lea r14, str.NUITKA_ONEFILE_BINARY
mov r15d, 0x28
mov al, 0x4e
lea rsi, [rsp + 0x68]
lea rdi, [rsp + 0x5c]
lea r12, [0x1400284c3]
nop word [rax + rax]
mov byte [rsp + 0x5c], al
mov byte [rsp + 0x5d], 0
mov r8d, 2
mov rcx, rsi
mov rdx, rdi
call sub.msvcrt.dll_mbstowcs
cmp rax, 1
jne 0x140015e65
cmp word [rbx], 0
mov rax, rbx
mov rcx, r15
je 0x1400158f1
mov rcx, r15
mov rdx, rbx
nop word cs:[rax + rax]
lea rax, [rdx + 2]
dec rcx
cmp word [rdx + 2], 0
mov rdx, rax
jne 0x1400158e0
test rcx, rcx
je 0x140015e65
movzx ecx, word [rsp + 0x68]
mov word [rax], cx
mov word [rax + 2], 0
add rbx, 2
dec r15
movzx eax, byte [r14 + 1]
inc r14
cmp r14, r12
jne 0x1400158a0
lea rdx, [0x1400310b0]
lea rsi, [rsp + 0x80]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
xorps xmm0, xmm0
movaps xmmword [rsp + 0xb0], xmm0
movaps xmmword [rsp + 0xc0], xmm0
movaps xmmword [rsp + 0xa0], xmm0
movaps xmmword [rsp + 0x90], xmm0
movaps xmmword [rsp + 0x80], xmm0
mov dword [rsp + 0xbc], 0x100
mov rdi, qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ecx, 0xfffffff6
call rdi
mov qword [rsp + 0xd0], rax
mov ecx, 0xfffffff5
call rdi
mov qword [rsp + 0xd8], rax
mov ecx, 0xfffffff4
call rdi
mov qword [rsp + 0xe0], rax
mov dword [rsp + 0x80], 0x68
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
lea rdi, [rsp + 0x68]
mov rcx, rax
mov rdx, rdi
call qword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov rbx, rax
mov word [0x140042130], 0
lea r14, [0x14002d0a0]
xor ecx, ecx
mov rdx, r14
mov r8d, 0x1000
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x140015e65
mov qword [rbx], r14
cmp dword [rsp + 0x68], 0
jle 0x140015d89
xor r15d, r15d
lea r12, [0x140042130]
nop word cs:[rax + rax]
test r15, r15
je 0x140015a4d
cmp word [0x140042130], 0
mov rax, r12
je 0x140015a47
mov rcx, 0xffffffffffff8000
mov rax, r12
nop dword [rax]
inc rcx
cmp word [rax + 2], 0
lea rax, [rax + 2]
jne 0x140015a30
test rcx, rcx
je 0x140015e65
mov dword [rax], 0x20
mov r14, qword [rbx + r15*8]
mov rcx, r14
mov dx, 0x20
call sub.msvcrt.dll_wcschr
test rax, rax
jne 0x140015ab0
mov rcx, r14
mov dx, 9
call sub.msvcrt.dll_wcschr
test rax, rax
jne 0x140015ab0
mov rcx, r14
mov dx, 0xa
call sub.msvcrt.dll_wcschr
test rax, rax
jne 0x140015ab0
mov rcx, r14
mov dx, 0xb
call sub.msvcrt.dll_wcschr
test rax, rax
jne 0x140015ab0
mov rcx, r14
mov dx, 0x22
call sub.msvcrt.dll_wcschr
test rax, rax
je 0x140015d0b
nop word [rax + rax]
cmp word [0x140042130], 0
mov rax, r12
je 0x140015ae7
mov rcx, 0xffffffffffff8000
mov rax, r12
nop word [rax + rax]
inc rcx
cmp word [rax + 2], 0
lea rax, [rax + 2]
jne 0x140015ad0
test rcx, rcx
je 0x140015e65
mov dword [rax], 0x22
mov rax, qword [rbx + r15*8]
mov r8d, 1
xor ecx, ecx
jmp 0x140015b15
mov word [rdx], cx
mov word [rdx + 2], 0
xor ecx, ecx
add rax, 2
mov r8d, 1
xor edx, edx
movzx r9d, word [rax]
cmp r9d, 0x22
je 0x140015b3e
cmp r9d, 0x5c
jne 0x140015ba0
inc edx
add r8d, 2
add ecx, 2
add rax, 2
movzx r9d, word [rax]
cmp r9d, 0x22
jne 0x140015b21
lea ecx, [rdx + rdx]
inc ecx
test ecx, ecx
jle 0x140015c10
xor ecx, ecx
jmp 0x140015b61
mov dword [rdx], 0x5c
inc ecx
cmp ecx, r8d
je 0x140015c10
cmp word [0x140042130], 0
mov rdx, r12
je 0x140015b50
mov r9, 0xffffffffffff8000
mov rdx, r12
nop dword [rax + rax]
inc r9
cmp word [rdx + 2], 0
lea rdx, [rdx + 2]
jne 0x140015b80
test r9, r9
jne 0x140015b50
jmp 0x140015e65
test r9d, r9d
je 0x140015c50
test edx, edx
jle 0x140015c10
xor ecx, ecx
jmp 0x140015bcd
mov dword [r8], 0x5c
inc ecx
cmp ecx, edx
je 0x140015c10
cmp word [0x140042130], 0
mov r8, r12
je 0x140015bc0
mov r9, 0xffffffffffff8000
mov r8, r12
nop word cs:[rax + rax]
inc r9
cmp word [r8 + 2], 0
lea r8, [r8 + 2]
jne 0x140015bf0
test r9, r9
jne 0x140015bc0
jmp 0x140015e65
movzx ecx, word [rax]
cmp word [0x140042130], 0
mov rdx, r12
je 0x140015b00
mov r8, 0xffffffffffff8000
mov rdx, r12
nop
inc r8
cmp word [rdx + 2], 0
lea rdx, [rdx + 2]
jne 0x140015c30
test r8, r8
jne 0x140015b00
jmp 0x140015e65
add edx, edx
test edx, edx
jle 0x140015cb0
xor eax, eax
jmp 0x140015c6c
mov dword [rdx], 0x5c
inc eax
cmp eax, ecx
je 0x140015cb0
cmp word [0x140042130], 0
mov rdx, r12
je 0x140015c60
mov r8, 0xffffffffffff8000
mov rdx, r12
nop word cs:[rax + rax]
inc r8
cmp word [rdx + 2], 0
lea rdx, [rdx + 2]
jne 0x140015c90
test r8, r8
jne 0x140015c60
jmp 0x140015e65
cmp word [0x140042130], 0
mov rax, r12
je 0x140015ce7
mov rcx, 0xffffffffffff8000
mov rax, r12
nop word [rax + rax]
inc rcx
cmp word [rax + 2], 0
lea rax, [rax + 2]
jne 0x140015cd0
test rcx, rcx
je 0x140015e65
mov word [rax], 0x22
add rax, 2
mov word [rax], 0
inc r15
movsxd rax, dword [rsp + 0x68]
cmp r15, rax
jl 0x140015a10
jmp 0x140015d89
cmp word [0x140042130], 0
je 0x140015d41
mov ecx, 0x8000
mov rdx, r12
nop dword [rax]
lea rax, [rdx + 2]
dec rcx
cmp word [rdx + 2], 0
mov rdx, rax
jne 0x140015d20
mov rdx, qword [rbx + r15*8]
movzx r8d, word [rdx]
test r8w, r8w
jne 0x140015d57
jmp 0x140015cf0
mov ecx, 0x8000
mov rax, r12
mov rdx, qword [rbx + r15*8]
movzx r8d, word [rdx]
test r8w, r8w
je 0x140015cf0
xor r9d, r9d
xor r10d, r10d
nop dword [rax]
cmp rcx, r10
je 0x140015e65
mov word [rax + r10*2], r8w
movzx r8d, word [rdx + r10*2 + 2]
inc r10
add r9, 0xfffffffffffffffe
test r8w, r8w
jne 0x140015d60
sub rax, r9
jmp 0x140015cf0
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x40], rsi
xorps xmm0, xmm0
movups xmmword [rsp + 0x30], xmm0
mov dword [rsp + 0x28], 0x20
mov dword [rsp + 0x20], 1
lea rcx, [0x1400350f0]
lea rdx, [0x140042130]
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x140015f22
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x68]
mov qword [0x1400330b8], rcx
mov dword [rsp + 0x5c], 0
test rcx, rcx
je 0x140015e32
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [0x1400330b8]
lea rdx, [rsp + 0x5c]
call qword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
jne 0x140015e1a
mov dword [rsp + 0x5c], 1
mov rcx, qword [0x1400330b8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [0x1400330b8], 0
call fcn.140014f10
mov eax, dword [rsp + 0x5c]
add rsp, 0xe8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
lea rcx, str.Error__couldnt_decode_attached_data.
call sub.msvcrt.dll_puts
mov ecx, 2
call sub.msvcrt.dll_exit
call sub.msvcrt.dll_abort
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Error__couldnt_unpack_file_to_target_path.
mov edx, eax
call fcn.140014e50
mov ecx, 2
call sub.msvcrt.dll_exit
lea rcx, str.CACHE_DIRPID_Dlls
call fcn.140015f50
mov ecx, 2
call qword [fcn.140022f80]
lea rdx, str.Error__failed_to_open__ls_for_writing._n
lea r8, [0x140035900]
mov rcx, rax
call fcn.140014ec0
mov ecx, 2
call sub.msvcrt.dll_exit
lea rcx, str.Error__couldnt_find_attached_data_header.
call sub.msvcrt.dll_puts
mov ecx, 2
call sub.msvcrt.dll_exit
lea rcx, str.Error__failed_to_register_signal_handler.
call sub.msvcrt.dll_puts
mov ecx, 2
call sub.msvcrt.dll_exit
lea rcx, str.Error__couldnt_allocate_memory.
call sub.msvcrt.dll_puts
mov ecx, 2
call sub.msvcrt.dll_exit
mov qword [0x140037920], 0
lea rcx, str.Error__couldnt_allocate_memory.
call sub.msvcrt.dll_puts
mov ecx, 2
call sub.msvcrt.dll_exit
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Error__couldnt_launch_child
mov edx, eax
call fcn.140014e50
mov ecx, 2
call sub.msvcrt.dll_exit
int3