Function at 0x1800b9430
Capabilities:
Query environment variable

Disassembly:
push rsi
push rdi
push r12
push r13
push r15
sub rsp, 0x40
mov rdi, rcx
mov r12d, r9d
mov rcx, rdx
mov r15, r8
mov rsi, rdx
call sym.tcl86t.dll_hcl_FSGetFileSystemForPath
mov qword [rsp + 0x30], 0
mov r13, rax
test rax, rax
jne 0x1800b947f
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 2
lea eax, [r13 + 1]
add rsp, 0x40
pop r15
pop r13
pop r12
pop rdi
pop rsi
ret
mov rax, qword [rax + 0xe0]
mov qword [rsp + 0x70], rbx
mov qword [rsp + 0x78], rbp
mov qword [rsp + 0x80], r14
mov r14, qword [rsp + 0x98]
test rax, rax
je 0x1800b9559
lea r9, [rsp + 0x38]
mov dword [rsp + 0x20], r12d
mov r8, r14
mov rdx, rsi
mov rcx, rdi
call rax
mov ebx, eax
test eax, eax
jne 0x1800b9547
cmp qword [r14], 0
je 0x1800b9825
test rdi, rdi
je 0x1800b94df
mov rcx, rdi
call sym.tcl86t.dll_hcl_ResetResult
test r15, r15
je 0x1800b9751
mov rcx, qword [r15]
test rcx, rcx
je 0x1800b9751
mov rbp, qword [rsp + 0x90]
xor ebx, ebx
xor esi, esi
mov rax, qword [r14]
mov r8, rcx
mov rdx, rax
mov rcx, rdi
call qword [rax + ioctlsocket]
mov qword [rsi + rbp], rax
test rax, rax
je 0x1800b9533
inc rbx
lea rsi, [rbx*8]
mov rcx, qword [rsi + r15]
test rcx, rcx
jne 0x1800b9500
xor eax, eax
jmp 0x1800b982a
mov rax, qword [r14]
mov rcx, rax
call qword [rax + reloc.WS2_32.dll_recv]
xor r15d, r15d
mov qword [r14], r15
jmp 0x1800b9825
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
cmp dword [rax], 0x12
je 0x1800b9559
mov eax, ebx
jmp 0x1800b982a
mov rcx, rsi
call sym.tcl86t.dll_hcl_FSGetFileSystemForPath
test rax, rax
je 0x1800b97e4
mov r8, qword [rax + 0x60]
test r8, r8
je 0x1800b97e4
mov edx, 4
mov rcx, rsi
call r8
test eax, eax
jne 0x1800b97f0
mov rdx, rsi
mov rcx, rdi
call fcn.18013ac50
mov rbx, rax
test rax, rax
je 0x1800b9825
inc dword [rax]
mov rcx, rax
call sym.tcl86t.dll_hcl_FSGetFileSystemForPath
mov rbp, rax
test rax, rax
je 0x1800b9758
cmp rax, r13
je 0x1800b9758
mov r8, rbx
mov rdx, rsi
mov rcx, rdi
call fcn.1800ba210
test eax, eax
je 0x1800b95f7
mov rcx, rbx
call sym.tcl86t.dll_hcl_FSDeleteFile
mov ecx, dword [rbx]
lea eax, [rcx - 1]
mov dword [rbx], eax
cmp ecx, 1
jg 0x1800b9825
mov rcx, rbx
call sym.tcl86t.dll_hclFreeObj
jmp 0x1800b9825
test rdi, rdi
je 0x1800b9604
mov rcx, rdi
call sym.tcl86t.dll_hcl_ResetResult
lea rax, [rsp + 0x30]
mov r9d, r12d
mov qword [rsp + 0x28], rax
mov r8, r15
mov rax, qword [rsp + 0x90]
mov rdx, rbx
mov rcx, rdi
mov qword [rsp + 0x20], rax
call sym.tcl86t.dll_hcl_LoadFile
mov esi, eax
test eax, eax
je 0x1800b9655
mov rcx, rbx
call sym.tcl86t.dll_hcl_FSDeleteFile
mov edx, dword [rbx]
lea ecx, [rdx - 1]
mov dword [rbx], ecx
cmp edx, 1
jg 0x1800b964e
mov rcx, rbx
call sym.tcl86t.dll_hclFreeObj
mov eax, esi
jmp 0x1800b982a
lea rcx, str.TCL_TEMPLOAD_NO_UNLINK
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x1800b9679
cmp byte [rax], 0
je 0x1800b9679
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
test eax, eax
jne 0x1800b96a3
mov rcx, rbx
call sym.tcl86t.dll_hcl_FSDeleteFile
test eax, eax
jne 0x1800b96a3
mov ecx, dword [rbx]
lea eax, [rcx - 1]
mov dword [rbx], eax
cmp ecx, 1
jg 0x1800b9699
mov rcx, rbx
call sym.tcl86t.dll_hclFreeObj
mov rax, qword [rsp + 0x30]
jmp 0x1800b9741
mov ecx, 0x28
call sym.tcl86t.dll_hclpAlloc
mov rsi, rax
test rax, rax
je 0x1800b9849
mov rax, qword [rsp + 0x30]
xor r15d, r15d
mov qword [rsi], rax
lea rax, str.native
mov qword [rsi + 8], r15
cmp rbp, rax
je 0x1800b96e2
mov qword [rsi + 0x10], rbx
mov qword [rsi + 0x18], rbp
mov qword [rsi + 0x20], r15
jmp 0x1800b9715
mov rdx, rbp
mov rcx, rbx
call sym.tcl86t.dll_hcl_FSGetInternalRep
mov rcx, rax
call fcn.180138c40
mov qword [rsi + 0x20], rax
mov qword [rsi + 0x10], r15
mov qword [rsi + 0x18], r15
mov ecx, dword [rbx]
lea eax, [rcx - 1]
mov dword [rbx], eax
cmp ecx, 1
jg 0x1800b9715
mov rcx, rbx
call sym.tcl86t.dll_hclFreeObj
mov ecx, 0x18
call sym.tcl86t.dll_hclpAlloc
test rax, rax
je 0x1800b985b
lea rcx, [0x1800b9880]
mov qword [rax], rsi
mov qword [rax + 8], rcx
lea rcx, [0x1800b9890]
mov qword [rax + 0x10], rcx
mov qword [r14], rax
test rdi, rdi
je 0x1800b9751
mov rcx, rdi
call sym.tcl86t.dll_hcl_ResetResult
xor eax, eax
jmp 0x1800b982a
mov rcx, rbx
call sym.tcl86t.dll_hcl_FSDeleteFile
mov ecx, dword [rbx]
lea eax, [rcx - 1]
mov dword [rbx], eax
cmp ecx, 1
jg 0x1800b9774
mov rcx, rbx
call sym.tcl86t.dll_hclFreeObj
test rdi, rdi
je 0x1800b9825
call fcn.180106220
xor r15d, r15d
mov rbx, rax
mov dword [rax], r15d
lea ecx, [r15 + 0x26]
call sym.tcl86t.dll_hclpAlloc
mov rcx, rax
test rax, rax
je 0x1800b986d
mov qword [rbx + 8], rax
mov rdx, rbx
movups xmm0, xmmword [str.couldnt_load_from_current_filesystem]
movups xmmword [rax], xmm0
movups xmm1, xmmword [0x18016aff0]
movups xmmword [rax + 0x10], xmm1
mov eax, dword [0x18016b000]
mov dword [rcx + 0x20], eax
movzx eax, byte [0x18016b004]
mov byte [rcx + 0x24], al
mov rax, qword [rbx + 8]
mov byte [rax + 0x25], r15b
mov dword [rbx + 0x10], 0x25
mov qword [rbx + 0x18], r15
jmp 0x1800b981d
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 2
test rdi, rdi
je 0x1800b9825
mov rcx, rdi
call sym.tcl86t.dll_hcl_PosixError
mov rcx, rsi
mov rbx, rax
call sym.tcl86t.dll_hcl_GetString
mov rdx, rax
lea rcx, str.couldnt_load_library___s_:__s
mov r8, rbx
call sym.tcl86t.dll_hcl_ObjPrintf
mov rdx, rax
mov rcx, rdi
call sym.tcl86t.dll_hcl_SetObjResult
mov eax, 1
mov rbp, qword [rsp + 0x78]
mov rbx, qword [rsp + 0x70]
mov r14, qword [rsp + 0x80]
add rsp, 0x40
pop r15
pop r13
pop r12
pop rdi
pop rsi
ret
mov edx, 0x28
lea rcx, str.unable_to_alloc__u_bytes
call sym.tcl86t.dll_hcl_Panic
int3
mov edx, 0x18
lea rcx, str.unable_to_alloc__u_bytes
call sym.tcl86t.dll_hcl_Panic
int3
mov edx, 0x26
lea rcx, str.unable_to_alloc__u_bytes
call sym.tcl86t.dll_hcl_Panic
int3