Function at 0x1005c460
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 8
push ebx
push ebp
mov ebp, dword [esp + 0x18]
xor ebx, ebx
push esi
push edi
cmp dword [0x100d4184], ebx
jne 0x1005c4c3
push 0x24
call dword [sym.imp.MSVCR90.dll_malloc]
mov esi, eax
add esp, 4
cmp esi, ebx
jne 0x1005c495
push 0x24
push str.unable_to_alloc__u_bytes
call sym.tcl85.dll_Tcl_Panic
add esp, 8
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], eax
mov dword [esi + 0x20], eax
mov ebx, 0x100d4184
mov dword [0x100d4184], esi
call fcn.100909f0
xor ebx, ebx
mov eax, dword [0x100d4184]
mov dword [esp + 0x10], eax
cmp ebp, ebx
jne 0x1005c4da
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
mov edi, dword [ebp]
mov eax, dword [edi + 0x4c]
mov dword [edi + 0x4c], ebx
mov dword [edi + 0x50], ebx
cmp eax, ebx
je 0x1005c508
lea ebx, [ebx]
add dword [eax], 0xffffffff
mov esi, dword [eax + 0x10]
jne 0x1005c502
push eax
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
mov eax, esi
cmp esi, ebx
jne 0x1005c4f0
mov eax, dword [edi + 0x48]
cmp eax, ebx
je 0x1005c521
add dword [eax], 0xffffffff
jne 0x1005c51e
push eax
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
mov dword [edi + 0x48], ebx
mov eax, dword [edi + 0x3c]
cmp eax, ebx
je 0x1005c53a
add dword [eax], 0xffffffff
jne 0x1005c537
push eax
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
mov dword [edi + 0x3c], ebx
cmp dword [edi + 0x40], ebx
je 0x1005c54c
push str.TclFlush__closed_channel:_queued_output_left
call sym.tcl85.dll_Tcl_Panic
add esp, 4
cmp dword [edi + 0x28], ebx
je 0x1005c579
test byte [edi + 4], 4
je 0x1005c579
mov cl, byte [edi + 0x28]
mov edx, dword [ebp + 8]
lea eax, [esp + 0x14]
push eax
mov eax, dword [ebp + 4]
mov byte [esp + 0x24], cl
push 1
lea ecx, [esp + 0x28]
push ecx
mov ecx, dword [edx + 0x10]
push eax
call ecx
add esp, 0x10
mov eax, dword [edi + 0x80]
mov esi, dword [esp + 0x1c]
cmp eax, ebx
je 0x1005c605
cmp esi, ebx
je 0x1005c595
push eax
push esi
call sym.tcl85.dll_Tcl_SetChannelErrorInterp
add esp, 8
mov eax, dword [edi + 0x80]
dec dword [eax]
mov eax, dword [edi + 0x80]
cmp dword [eax], ebx
jg 0x1005c5ff
mov ecx, dword [eax + 0xc]
cmp ecx, ebx
je 0x1005c5be
cmp dword [ecx + 4], ebx
je 0x1005c5be
push eax
call sym.tcl85.dll_TclFreeObj
add esp, 4
jmp 0x1005c5ff
mov eax, dword [eax + 4]
cmp eax, ebx
je 0x1005c5d7
cmp eax, dword [0x100d25c4]
je 0x1005c5d7
push eax
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
mov edx, dword [edi + 0x80]
mov ecx, dword [0x100d45d8]
mov dword [edx + 8], 0xffffffff
mov eax, dword [edi + 0x80]
mov dword [eax + 0x10], ecx
mov edx, dword [edi + 0x80]
mov dword [0x100d45d8], edx
mov dword [edi + 0x80], ebx
push ebp
call fcn.1005c7a0
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
add esp, 4
cmp ecx, 1
je 0x1005c625
mov eax, dword [ebp + 4]
push esi
push eax
call ecx
add esp, 8
jmp 0x1005c633
mov ecx, dword [ebp + 4]
mov edx, dword [eax + 0x28]
push ebx
push esi
push ecx
call edx
add esp, 0xc
mov ebx, eax
cmp ebp, dword [edi + 0x74]
jne 0x1005c65c
mov eax, dword [edi]
test eax, eax
je 0x1005c650
push eax
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
mov dword [edi], 0
mov esi, dword [edi + 8]
call fcn.10041b90
mov esi, dword [esp + 0x1c]
mov eax, dword [edi + 0x2c]
test eax, eax
je 0x1005c6f8
mov dword [esp + 0x24], eax
mov eax, dword [edi + 0x80]
test eax, eax
je 0x1005c6e4
dec dword [eax]
mov eax, dword [edi + 0x80]
cmp dword [eax], 0
jg 0x1005c6da
mov ecx, dword [eax + 0xc]
test ecx, ecx
je 0x1005c69a
cmp dword [ecx + 4], 0
je 0x1005c69a
push eax
call sym.tcl85.dll_TclFreeObj
add esp, 4
jmp 0x1005c6da
mov eax, dword [eax + 4]
test eax, eax
je 0x1005c6b3
cmp eax, dword [0x100d25c4]
je 0x1005c6b3
push eax
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
mov eax, dword [edi + 0x80]
mov edx, dword [0x100d45d8]
mov dword [eax + 8], 0xffffffff
mov ecx, dword [edi + 0x80]
mov dword [ecx + 0x10], edx
mov eax, dword [edi + 0x80]
mov dword [0x100d45d8], eax
mov dword [edi + 0x80], 0
test esi, esi
je 0x1005c6f8
mov ecx, dword [edi + 0x84]
push ecx
push esi
call sym.tcl85.dll_Tcl_SetChannelErrorInterp
add esp, 8
cmp dword [esp + 0x24], 0
jne 0x1005c70f
mov dword [esp + 0x24], ebx
test ebx, ebx
je 0x1005c70f
call dword [sym.imp.MSVCR90.dll__errno]
mov dword [eax], ebx
mov edx, dword [edi + 0x64]
push edx
call sym.tcl85.dll_Tcl_DeleteTimerHandler
mov esi, dword [ebp + 0xc]
xor ecx, ecx
add esp, 4
cmp esi, ecx
je 0x1005c775
mov eax, dword [esp + 0x10]
mov edx, dword [eax + 4]
mov dword [edi + 0x78], edx
mov dword [eax + 4], edi
mov dword [edi + 0x70], esi
mov dword [esi + 0x10], ecx
cmp dword [ebp + 0x1c], ecx
jne 0x1005c75c
push ebp
call dword [sym.imp.MSVCR90.dll_free]
mov eax, dword [esp + 0x20]
add esp, 4
push esi
push eax
call sym.tcl85.dll_Tcl_Close
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
mov eax, dword [esp + 0x1c]
push esi
push eax
mov dword [ebp + 8], ecx
call sym.tcl85.dll_Tcl_Close
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
cmp dword [ebp + 0x1c], ecx
jne 0x1005c786
push ebp
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
jmp 0x1005c789
mov dword [ebp + 8], ecx
push 3
push edi
call sym.tcl85.dll_Tcl_EventuallyFree
mov eax, dword [esp + 0x2c]
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret