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

Disassembly:
push ecx
push ebx
push ebp
mov ebp, dword [sym.imp.MSVCR90.dll_malloc]
xor ebx, ebx
push esi
push edi
cmp dword [0x100d4184], ebx
jne 0x1005b7dd
push 0x24
call ebp
mov esi, eax
add esp, 4
cmp esi, ebx
jne 0x1005b7b1
push 0x24
push str.unable_to_alloc__u_bytes
call sym.tcl85.dll_Tcl_Panic
add esp, 8
mov dword [esi], ebx
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], ebx
mov dword [esi + 0x18], ebx
mov dword [esi + 0x1c], ebx
mov dword [esi + 0x20], ebx
mov ebx, 0x100d4184
mov dword [0x100d4184], esi
call fcn.100909f0
xor ebx, ebx
mov eax, dword [0x100d4184]
push 0x20
mov dword [esp + 0x14], eax
call ebp
mov edi, eax
add esp, 4
cmp edi, ebx
jne 0x1005b802
push 0x20
push str.unable_to_alloc__u_bytes
call sym.tcl85.dll_Tcl_Panic
add esp, 8
push 0x88
call ebp
mov esi, eax
add esp, 4
cmp esi, ebx
jne 0x1005b824
push 0x88
push str.unable_to_alloc__u_bytes
call sym.tcl85.dll_Tcl_Panic
add esp, 8
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x18]
mov dword [edi], esi
mov dword [edi + 4], ecx
mov dword [edi + 8], edx
cmp eax, ebx
je 0x1005b884
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x1005b840
sub eax, edx
inc eax
push eax
mov dword [esp + 0x24], eax
call ebp
mov ebp, eax
add esp, 4
cmp ebp, ebx
jne 0x1005b870
mov eax, dword [esp + 0x20]
cmp eax, ebx
je 0x1005b870
push eax
push str.unable_to_alloc__u_bytes
call sym.tcl85.dll_Tcl_Panic
add esp, 8
mov eax, dword [esp + 0x1c]
mov dword [esi], ebp
sub ebp, eax
mov cl, byte [eax]
mov byte [eax + ebp], cl
inc eax
cmp cl, bl
jne 0x1005b878
jmp 0x1005b891
push str.Tcl_CreateChannel:_NULL_channel_name
call sym.tcl85.dll_Tcl_Panic
add esp, 4
mov eax, dword [esp + 0x24]
mov ecx, dword [0x100d3f3c]
mov dword [esi + 4], eax
mov dword [esi + 8], ebx
mov edx, dword [ecx]
mov ebp, str.binary
mov eax, edx
lea ebx, [ebx]
mov cl, byte [eax]
cmp cl, byte [ebp]
jne 0x1005b8d1
cmp cl, bl
je 0x1005b8cd
mov cl, byte [eax + 1]
cmp cl, byte [ebp + 1]
jne 0x1005b8d1
add eax, 2
add ebp, 2
cmp cl, bl
jne 0x1005b8b0
xor eax, eax
jmp 0x1005b8d6
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x1005b8e7
push edx
push ebx
call sym.tcl85.dll_Tcl_GetEncoding
add esp, 8
mov dword [esi + 8], eax
mov dword [esi + 0xc], ebx
mov dword [esi + 0x14], ebx
mov dword [esi + 0x1c], ebx
mov dword [esi + 0x20], 3
mov dword [esi + 0x24], ebx
mov dword [esi + 0x28], ebx
mov dword [esi + 0x2c], ebx
mov dword [esi + 0x30], ebx
mov dword [esi + 0x34], ebx
mov dword [esi + 0x3c], ebx
mov dword [esi + 0x40], ebx
mov dword [esi + 0x44], ebx
mov dword [esi + 0x48], ebx
mov dword [esi + 0x4c], ebx
mov dword [esi + 0x50], ebx
mov dword [esi + 0x54], ebx
mov dword [esi + 0x58], ebx
mov dword [esi + 0x5c], ebx
mov dword [esi + 0x60], 0x1000
mov dword [esi + 0x64], ebx
mov dword [esi + 0x68], ebx
mov dword [esi + 0x6c], ebx
mov dword [esi + 0x38], ebx
mov dword [esi + 0x70], edi
mov dword [esi + 0x74], edi
mov ebp, 1
mov dword [esi + 0x10], ebp
mov dword [esi + 0x18], ebp
mov dword [edi + 0xc], ebx
mov dword [edi + 0x10], ebx
mov dword [edi + 0x14], ebx
mov dword [edi + 0x18], ebx
mov dword [edi + 0x1c], ebx
push edi
mov dword [esi + 0x80], ebx
mov dword [esi + 0x84], ebx
mov dword [esi + 0x78], ebx
call fcn.1005c970
mov eax, dword [esp + 0x14]
add esp, 4
cmp dword [eax + 8], ebx
jne 0x1005b991
cmp dword [eax + 0xc], ebp
jne 0x1005b991
push 2
push edi
call sym.tcl85.dll_Tcl_SetStdChannel
mov edx, dword [edi]
mov eax, dword [edx + 0x74]
mov esi, dword [eax]
add esp, 8
jmp 0x1005ba24
cmp dword [eax + 0x10], ebx
jne 0x1005b9af
cmp dword [eax + 0x14], ebp
jne 0x1005b9af
push 4
push edi
call sym.tcl85.dll_Tcl_SetStdChannel
mov ecx, dword [edi]
mov edx, dword [ecx + 0x74]
mov esi, dword [edx]
add esp, 8
jmp 0x1005ba24
cmp dword [eax + 0x18], ebx
jne 0x1005ba38
cmp dword [eax + 0x1c], ebp
jne 0x1005ba38
mov eax, dword [0x100d4184]
cmp eax, ebx
jne 0x1005ba17
push 0x24
call dword [sym.imp.MSVCR90.dll_malloc]
mov esi, eax
add esp, 4
cmp esi, ebx
jne 0x1005b9e6
push 0x24
push str.unable_to_alloc__u_bytes
call sym.tcl85.dll_Tcl_Panic
add esp, 8
mov dword [esi], ebx
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], ebx
mov dword [esi + 0x18], ebx
mov dword [esi + 0x1c], ebx
mov dword [esi + 0x20], ebx
mov ebx, 0x100d4184
mov dword [0x100d4184], esi
call fcn.100909f0
mov eax, dword [0x100d4184]
xor ebx, ebx
mov dword [eax + 0x1c], ebp
mov dword [eax + 0x18], edi
mov eax, dword [edi]
mov ecx, dword [eax + 0x74]
mov esi, dword [ecx]
cmp dword [esi], ebx
jne 0x1005ba35
push str.Tcl_RegisterChannel:_channel_without_name
call sym.tcl85.dll_Tcl_Panic
add esp, 4
add dword [esi + 0x30], ebp
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret