Function at 0x10068540
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
push edi
call sym.tcl85.dll_Tcl_FSGetFileSystemForPath
xor esi, esi
add esp, 4
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], esi
mov dword [esp + 0x18], esi
mov dword [esp + 0x10], esi
cmp eax, esi
jne 0x10068584
call dword [sym.imp.MSVCR90.dll__errno]
mov dword [eax], 2
lea eax, [esi + 1]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [eax + 0x70]
mov ebx, dword [ebp + 8]
cmp eax, esi
je 0x10068614
mov ecx, dword [ebp + 0x24]
mov edx, dword [ebp + 0x1c]
push esi
push ecx
push edx
push edi
push ebx
call eax
mov esi, eax
add esp, 0x14
test esi, esi
jne 0x100685fe
mov eax, dword [ebp + 0x1c]
mov eax, dword [eax]
test eax, eax
je 0x10068887
mov ecx, dword [ebp + 0x20]
push ebx
mov dword [ecx], eax
call sym.tcl85.dll_Tcl_ResetResult
mov eax, dword [ebp + 0x10]
add esp, 4
test eax, eax
jle 0x100685f5
mov esi, dword [ebp + 0x14]
mov ebx, dword [ebp + 0x18]
sub ebx, esi
mov dword [esp + 0x14], eax
mov edi, dword [esi]
test edi, edi
je 0x100685eb
mov edx, dword [ebp + 0x1c]
mov ecx, dword [edx]
call fcn.100a9290
mov ecx, dword [ebx + esi]
mov dword [ecx], eax
add esi, 4
sub dword [esp + 0x14], 1
jne 0x100685d6
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.MSVCR90.dll__errno]
cmp dword [eax], 0x12
je 0x10068612
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor esi, esi
push edi
call sym.tcl85.dll_Tcl_FSGetFileSystemForPath
add esp, 4
cmp eax, esi
je 0x10068669
mov eax, dword [eax + 0x30]
cmp eax, esi
je 0x10068669
push 4
push edi
call eax
add esp, 8
cmp eax, esi
je 0x10068677
push esi
push ecx
push ebx
call sym.tcl85.dll_Tcl_PosixError
add esp, 8
push eax
push 0x100be318
push edi
call sym.tcl85.dll_Tcl_GetString
add esp, 4
push eax
push str.couldnt_load_library__
push ebx
call sym.tcl85.dll_Tcl_AppendResult
add esp, 0x18
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.MSVCR90.dll__errno]
mov dword [eax], 2
jmp 0x10068634
call fcn.100aa100
mov esi, eax
test esi, esi
jne 0x100686a6
push eax
push ecx
push ebx
call sym.tcl85.dll_Tcl_PosixError
add esp, 8
push eax
push str.couldnt_create_temporary_file:
push ebx
call sym.tcl85.dll_Tcl_AppendResult
add esp, 0x10
lea eax, [esi + 1]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
inc dword [esi]
push esi
call sym.tcl85.dll_Tcl_FSGetFileSystemForPath
add esp, 4
mov dword [esp + 0x1c], eax
test eax, eax
je 0x1006885e
cmp eax, dword [esp + 0x14]
je 0x1006885e
push esi
push edi
mov eax, ebx
call fcn.10068f40
add esp, 8
test eax, eax
je 0x10068700
push esi
call sym.tcl85.dll_Tcl_FSDeleteFile
dec dword [esi]
add esp, 4
cmp dword [esi], 0
jg 0x10068887
push esi
call sym.tcl85.dll_TclFreeObj
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
call sym.tcl85.dll_Tcl_ResetResult
add esp, 4
lea edx, [esp + 0x10]
push edx
mov edx, dword [ebp + 0x18]
lea eax, [esp + 0x1c]
push eax
mov eax, dword [ebp + 0x14]
lea ecx, [esp + 0x14]
push ecx
mov ecx, dword [ebp + 0x10]
push edx
push eax
push ecx
push esi
push ebx
call fcn.10068540
mov edi, eax
add esp, 0x20
test edi, edi
je 0x10068756
push esi
call sym.tcl85.dll_Tcl_FSDeleteFile
dec dword [esi]
add esp, 4
cmp dword [esi], 0
jg 0x1006874d
push esi
call sym.tcl85.dll_TclFreeObj
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.TCL_TEMPLOAD_NO_UNLINK
call dword [sym.imp.MSVCR90.dll_getenv]
add esp, 4
test eax, eax
je 0x1006877b
cmp byte [eax], 0
je 0x1006877b
push eax
call dword [sym.imp.MSVCR90.dll_atoi]
add esp, 4
test eax, eax
jne 0x100687c4
push esi
call sym.tcl85.dll_Tcl_FSDeleteFile
add esp, 4
test eax, eax
jne 0x100687c4
dec dword [esi]
cmp dword [esi], eax
jg 0x10068797
push esi
call sym.tcl85.dll_TclFreeObj
add esp, 4
mov edx, dword [esp + 0xc]
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0x20]
mov dword [eax], edx
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
mov dword [ecx], edx
mov ecx, dword [ebp + 0x24]
push ebx
mov dword [ecx], eax
call sym.tcl85.dll_Tcl_ResetResult
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x14
call dword [sym.imp.MSVCR90.dll_malloc]
mov edi, eax
add esp, 4
test edi, edi
jne 0x100687e4
push 0x14
push str.unable_to_alloc__u_bytes
call sym.tcl85.dll_Tcl_Panic
add esp, 8
mov edx, dword [esp + 0xc]
mov dword [edi], edx
mov eax, dword [esp + 0x10]
mov dword [edi + 4], eax
mov eax, dword [esp + 0x1c]
cmp eax, 0x100d27e8
je 0x1006880b
mov dword [edi + 8], esi
mov dword [edi + 0xc], eax
mov dword [edi + 0x10], 0
jmp 0x10068835
push eax
push esi
call sym.tcl85.dll_Tcl_FSGetInternalRep
push eax
call fcn.100a81f0
mov dword [edi + 0x10], eax
xor eax, eax
mov dword [edi + 8], eax
mov dword [edi + 0xc], eax
dec dword [esi]
add esp, 0xc
cmp dword [esi], eax
jg 0x10068835
push esi
call sym.tcl85.dll_TclFreeObj
add esp, 4
mov ecx, dword [esp + 0xc]
mov edx, dword [ebp + 0x1c]
mov eax, dword [ebp + 0x20]
mov dword [edx], ecx
mov ecx, dword [ebp + 0x24]
push ebx
mov dword [eax], edi
mov dword [ecx], 0x100688a0
call sym.tcl85.dll_Tcl_ResetResult
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
call sym.tcl85.dll_Tcl_FSDeleteFile
dec dword [esi]
add esp, 4
cmp dword [esi], 0
jg 0x10068877
push esi
call sym.tcl85.dll_TclFreeObj
add esp, 4
push 0
push str.couldnt_load_from_current_filesystem
push ebx
call sym.tcl85.dll_Tcl_AppendResult
add esp, 0xc
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret