Function at 0x1400148d0
Capabilities:
Query environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
mov qword [rsp + 0x20], r9
mov rsi, rcx
mov r13, r8
test rcx, rcx
je 0x140014bc0
cmp qword [rcx], 0
je 0x140014bc0
mov rdi, qword [0x140021680]
xor ebx, ebx
test r9, r9
jle 0x140014956
nop dword [rax]
mov rcx, rsi
mov r14, qword [r13 + rbx*8]
call sym.searchExtPos__pureZos_323
test rax, rax
js 0x140014ba8
mov rcx, rsi
call sym.copyString
mov r14, rax
mov rcx, r14
call sym.newWideCString__systemZwidestrs_257
mov rcx, rax
call qword [rdi]
cmp eax, 0xffffffff
je 0x14001494b
test al, 0x10
je 0x140014bc3
add rbx, 1
cmp qword [rsp + 0x20], rbx
jg 0x140014910
lea rcx, [0x140020b60]
call sym.getenv
mov rcx, rax
test rax, rax
je 0x140014c57
call sym.cstrToNimstr
mov rbx, rax
lea rax, [rsp + 0x48]
mov rbp, 0xffffffffffffffff
xor r14d, r14d
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x30], rax
test rbx, rbx
je 0x140014a54
cmp r14, qword [rbx]
jg 0x140014bc0
mov r12, r14
nop dword [rax]
mov rdx, qword [rbx]
cmp r12, rdx
jge 0x1400149ee
test r12, r12
jns 0x1400149c9
sub rdx, 1
mov rcx, r12
call sym.raiseIndexError2
cmp byte [rbx + r12 + 0x10], 0x3b
je 0x140014bd7
mov r9, r12
add r9, 1
mov r12, r9
jno 0x1400149b0
call sym.raiseOverflow
mov rdx, qword [rbx]
cmp r12, rdx
jl 0x1400149b8
test rbp, rbp
je 0x140014be8
mov r8, r12
sub r8, 1
jo 0x140014cc2
mov rdx, r14
mov rcx, rbx
call sym.substr__system_7781
mov r14, rax
test rax, rax
je 0x140014a23
mov rax, qword [rax]
test rax, rax
jne 0x140014abe
test rbp, rbp
je 0x140014bc0
sub rbp, 1
jo 0x140014bf0
mov r9, r12
add r9, 1
mov r14, r9
jno 0x140014994
call sym.raiseOverflow
test rbx, rbx
jne 0x14001499d
test r14, r14
jg 0x140014bc0
mov r12, r14
jmp 0x140014a87
mov rdx, 0xffffffffffffffff
mov rcx, r12
call sym.raiseIndexError2
cmp byte [r12 + 0x10], 0x3b
je 0x140014bd7
add r12, 1
test r12, r12
jne 0x140014a68
test rbp, rbp
jne 0x1400149f7
mov rdx, r14
mov r8, 0xffffffffffffffff
xor ecx, ecx
call sym.substr__system_7781
mov r14, rax
test rax, rax
je 0x140014bc0
mov rax, qword [rax]
test rax, rax
je 0x140014bc0
test rax, rax
jle 0x140014cb2
cmp byte [r14 + 0x10], 0x22
je 0x140014c64
mov rcx, r14
call sym.copyString
mov rdi, rax
mov qword [rsp + 0x40], 0
mov r14, qword [rsi]
test rdi, rdi
je 0x140014af7
add r14, qword [rdi]
jo 0x140014c30
test r14, r14
js 0x140014c3e
mov rcx, r14
call sym.rawNewString
mov r15, qword [rsp + 0x28]
mov r8, rdi
mov rdi, qword [rsp + 0x30]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], 0
mov rdx, r15
mov rcx, rdi
call sym.joinPathImpl__pureZos_79
mov r8, rsi
mov rdx, r15
mov rcx, rdi
call sym.joinPathImpl__pureZos_79
cmp qword [rsp + 0x20], 0
mov r14, qword [rsp + 0x40]
jle 0x140014a23
xor edi, edi
nop
mov rcx, r14
mov r15, qword [r13 + rdi*8]
call sym.searchExtPos__pureZos_323
test rax, rax
js 0x140014c00
mov rcx, r14
call sym.copyString
mov r15, rax
mov rcx, r15
call sym.newWideCString__systemZwidestrs_257
mov rcx, rax
mov rax, qword [0x140021680]
call qword [rax]
cmp eax, 0xffffffff
je 0x140014b92
test al, 0x10
je 0x140014c18
add rdi, 1
cmp qword [rsp + 0x20], rdi
jg 0x140014b50
jmp 0x140014a23
mov rdx, r14
mov rcx, rsi
call sym.nosaddFileExt.part.0
mov r14, rax
jmp 0x140014931
xor r14d, r14d
mov rax, r14
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
test rbp, rbp
jne 0x1400149f7
mov rdx, qword [rbx]
nop dword [rax + rax]
mov r12, rdx
jmp 0x1400149f7
call sym.raiseOverflow
jmp 0x140014a36
mov rdx, r15
mov rcx, r14
call sym.nosaddFileExt.part.0
mov r15, rax
jmp 0x140014b71
mov rcx, r15
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp sym.copyString
call sym.raiseOverflow
test r14, r14
jns 0x140014b00
movabs r8, 0x7fffffffffffffff
xor edx, edx
mov rcx, r14
call sym.raiseRangeErrorI
jmp 0x140014b00
call sym.copyString
mov rbx, rax
jmp 0x140014976
mov rax, qword [r14]
mov rdi, rax
sub rdi, 1
jo 0x140014ce7
test rdi, rdi
js 0x140014ca4
cmp rdi, rax
jge 0x140014ca4
cmp byte [r14 + rdi + 0x10], 0x22
jne 0x140014ad2
mov r8, qword [r14]
sub r8, 2
jo 0x140014cd6
mov edx, 1
mov rcx, r14
call sym.substr__system_7781
mov rdi, rax
jmp 0x140014add
lea rdx, [rax - 1]
mov rcx, rdi
call sym.raiseIndexError2
jmp 0x140014c7a
lea rdx, [rax - 1]
xor ecx, ecx
call sym.raiseIndexError2
jmp 0x140014ac7
mov qword [rsp + 0x38], r8
call sym.raiseOverflow
mov r8, qword [rsp + 0x38]
jmp 0x140014a04
mov qword [rsp + 0x38], r8
call sym.raiseOverflow
mov r8, qword [rsp + 0x38]
jmp 0x140014c8f
call sym.raiseOverflow
mov rax, qword [r14]
jmp 0x140014c70