Function at 0x140002870
Capabilities:
Accept command line arguments
Query environment variable
Terminate process

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x58
lea rbp, [rsp + 0x50]
mov rsi, rcx
mov rcx, rdx
mov qword [rbp + 0x58], rdx
call sym.strdup_unixcp
mov qword [rbp - 0x18], rax
test rax, rax
je 0x140002a6f
lea rcx, str.ORIG_LD_LIBRARY_PATH
call qword [sym.imp.ucrtbase.dll_getenv]
mov rdx, rax
test rax, rax
je 0x1400028d0
lea rcx, str.LD_LIBRARY_PATH
call sym.__wine_set_unix_env
xor edx, edx
lea rcx, str.ORIG_LD_LIBRARY_PATH
call sym.__wine_set_unix_env
cmp word [rsi], 0
je 0x140002b76
lea rax, [rbp - 4]
mov rbx, qword [sym.imp.ucrtbase.dll_free]
mov qword [rbp - 0x20], rax
nop dword [rax]
mov rdx, qword [rbp - 0x20]
mov rcx, rsi
call qword [sym.imp.shell32.dll_CommandLineToArgvW]
mov r14d, dword [rbp - 4]
mov r13, rax
lea ecx, [r14 + 2]
movsxd rcx, ecx
shl rcx, 3
call qword [sym.imp.ucrtbase.dll_malloc]
mov r12, rax
test rax, rax
je 0x140002b76
test r14d, r14d
jle 0x14000294f
xor edi, edi
nop dword [rax + rax]
movsxd rax, edi
inc edi
mov rcx, qword [r13 + rax*8]
lea r14, [r12 + rax*8]
call sym.strdup_unixcp
mov qword [r14], rax
mov r14d, dword [rbp - 4]
cmp r14d, edi
jg 0x140002930
mov rdi, qword [rbp - 0x18]
movsxd rax, r14d
inc r14d
movsxd r14, r14d
mov qword [r12 + rax*8], rdi
movzx eax, byte [0x140004030]
lea rdi, [0x140004030]
mov qword [r12 + r14*8], 0
test al, 8
jne 0x140002ab0
mov r8d, dword [rbp - 4]
test r8d, r8d
js 0x1400029f1
xor r15d, r15d
lea r14, str.launch_app
lea r13, [0x140004030]
jmp 0x1400029a9
inc r15d
cmp dword [rbp - 4], r15d
jl 0x1400029e9
mov edx, eax
and edx, 8
je 0x1400029a0
movsxd rax, r15d
inc r15d
mov rcx, qword [r12 + rax*8]
call sym.wine_dbgstr_an.constprop.0
mov rdx, r13
mov r8, r14
mov ecx, 3
mov qword [rsp + 0x20], rax
lea r9, [0x140005149]
call sym.wine_dbg_log.constprop.0
movzx eax, byte [rdi]
mov edx, eax
and edx, 8
cmp dword [rbp - 4], r15d
jge 0x1400029a9
test dl, dl
jne 0x140002a88
xor edx, edx
mov rcx, r12
call sym.__wine_unix_spawnvp
test eax, eax
je 0x140002b82
mov eax, dword [rbp - 4]
xor r13d, r13d
mov rdi, rbx
test eax, eax
jle 0x140002a22
movsxd rax, r13d
inc r13d
mov rcx, qword [r12 + rax*8]
call rbx
cmp dword [rbp - 4], r13d
jg 0x140002a10
mov rcx, r12
call rdi
cmp word [rsi], 0
mov rax, rsi
je 0x140002af0
nop dword [rax]
add rax, 2
cmp word [rax], 0
jne 0x140002a38
sub rax, rsi
sar rax, 1
inc eax
cdqe
add rax, rax
add rsi, rax
cmp word [rsi], 0
jne 0x1400028f0
test byte [0x140004030], 2
jne 0x140002afa
mov rcx, qword [rbp - 0x18]
call rdi
mov eax, 1
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
lea r9, [0x14000514d]
lea r8, str.launch_app
mov ecx, 3
lea rdx, [0x140004030]
call sym.wine_dbg_log.constprop.0
jmp 0x1400029f1
mov rdx, rdi
mov ecx, 3
lea r9, str.Trying
lea r8, str.launch_app
call sym.wine_dbg_log.constprop.0
movzx eax, byte [0x140004030]
mov ecx, dword [rbp - 4]
mov edx, eax
and edx, 8
test ecx, ecx
jns 0x140002987
test dl, dl
je 0x1400029f1
jmp 0x140002a88
mov eax, 2
jmp 0x140002a4f
cmp qword [rbp + 0x58], 0
lea rax, str._null_
je 0x140002b3b
mov rax, qword [rbp + 0x58]
shr rax, 0x10
je 0x140002b64
mov rcx, qword [rbp + 0x58]
mov rdx, 0xffffffffffffffff
call qword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov r8d, eax
lea rax, str._invalid_
test r8d, r8d
jne 0x140002b3b
mov rcx, qword [rbp + 0x58]
call sym.wine_dbgstr_wn.part.0.constprop.0
mov qword [rsp + 0x20], rax
lea r9, str.could_not_find_a_suitable_app_to_open__s_n
lea r8, str.launch_app
mov ecx, 1
lea rdx, [0x140004030]
call sym.wine_dbg_log.constprop.0
jmp 0x140002a69
movzx edx, word [rbp + 0x58]
lea rcx, str._04x
call sym.wine_dbg_sprintf.constprop.0
jmp 0x140002b3b
mov rdi, qword [sym.imp.ucrtbase.dll_free]
jmp 0x140002a5c
xor ecx, ecx
call qword [sym.imp.kernel32.dll_ExitProcess]