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

Disassembly:
sub esp, 0x58
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x54], eax
push ebx
mov ebx, dword [esp + 0x64]
push ebp
push esi
mov esi, dword [esp + 0x68]
mov eax, dword [esi + 8]
push edi
mov edi, dword [esp + 0x78]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x48], edi
test eax, eax
jne 0x1005e952
call fcn.1005e170
mov ecx, dword [esi + 0x4c]
mov edx, dword [esi + 0x10]
mov dword [esp + 0x3c], eax
mov eax, dword [esi + 0xc]
lea ebp, [esi + 0xc]
mov dword [esp + 0x30], eax
mov eax, dword [esi + 4]
mov dword [esp + 0x34], eax
mov eax, dword [ecx + 8]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x2c], edx
lea edx, [eax + ecx + 0x14]
mov ecx, dword [ecx + 4]
sub ecx, eax
mov eax, dword [esp + 0x74]
mov dword [esp + 0x40], edx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x20], ecx
cmp eax, ecx
ja 0x1005e999
mov dword [esp + 0x20], eax
mov eax, dword [edi]
imul eax, dword [esp + 0x20]
cdq
and edx, 0x3ff
add eax, edx
mov edi, eax
sar edi, 0xa
add edi, 2
cmp dword [ebx + 4], 0
mov dword [esp + 0x10], edi
je 0x1005e9c4
mov eax, dword [ebx + 8]
mov dword [esp + 0x14], eax
jmp 0x1005e9f0
mov eax, dword [ebx + 0xc]
cmp dword [eax + 0xc], 0
jne 0x1005e9dd
mov ecx, dword [eax]
push ecx
push str.UpdateStringProc_should_not_be_invoked_for_type__s
call sym.tcl85.dll_Tcl_Panic
add esp, 8
mov edx, dword [ebx + 0xc]
mov eax, dword [edx + 0xc]
push ebx
call eax
mov ecx, dword [ebx + 8]
add esp, 4
mov dword [esp + 0x14], ecx
cmp dword [ebx], 1
mov dword [esp + 0x1c], 0
jle 0x1005ea0f
push 0x100c790c
push str._s_called_with_shared_object
call sym.tcl85.dll_Tcl_Panic
add esp, 8
push ebx
push 0
call fcn.1008b8e0
add esp, 8
test edi, edi
jl 0x1005ea91
je 0x1005ea91
cmp edi, 0x7fffffff
jg 0x1005ea2c
mov ecx, edi
jmp 0x1005ea39
mov dword [esp + 0x1c], 0x100bf690
mov ecx, accept
mov edx, dword [ebx + 0x10]
cmp dword [edx + 0xc], 0
je 0x1005ea50
push ebx
xor edi, edi
call fcn.10089a10
mov edi, dword [esp + 0x14]
jmp 0x1005ea58
push ecx
xor eax, eax
call fcn.10089ac0
add esp, 4
cmp edi, 0x7fffffff
jle 0x1005ea91
mov eax, dword [ebx + 0x10]
cmp dword [eax + 0xc], 0
je 0x1005ea83
mov edi, dword [esp + 0x1c]
push ebx
or ecx, 0xffffffff
call fcn.10089a10
mov edi, dword [esp + 0x14]
mov ebx, dword [esp + 0x1c]
jmp 0x1005ea8e
mov eax, dword [esp + 0x1c]
push 0xffffffffffffffff
call fcn.10089ac0
add esp, 4
mov ecx, dword [esp + 0x28]
cmp dword [esp + 0x20], ecx
jne 0x1005eb00
cmp dword [ebx + 0xc], 0x100d1a5c
jne 0x1005eac2
mov eax, dword [ebx + 4]
test eax, eax
je 0x1005eac2
mov edx, dword [ebx + 0x10]
mov ecx, dword [edx + 4]
mov edx, dword [esp + 0x14]
sub ecx, edx
lea ebx, [eax + edx]
mov dword [esp + 0x10], ecx
mov edi, ecx
jmp 0x1005eb17
mov eax, dword [ebx + 4]
test eax, eax
je 0x1005eadd
mov ecx, dword [ebx + 8]
mov edx, dword [esp + 0x14]
sub ecx, edx
lea ebx, [eax + edx]
mov dword [esp + 0x10], ecx
mov edi, ecx
jmp 0x1005eb17
lea eax, [esp + 0x38]
push eax
push ebx
call sym.tcl85.dll_Tcl_GetStringFromObj
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x40]
add esp, 8
sub ecx, edx
lea ebx, [eax + edx]
mov dword [esp + 0x10], ecx
mov edi, ecx
jmp 0x1005eb17
mov eax, dword [ebx + 4]
test eax, eax
jne 0x1005eb10
push ebx
call sym.tcl85.dll_Tcl_GetString
add esp, 4
mov ecx, dword [esp + 0x14]
lea ebx, [eax + ecx]
inc edi
lea edx, [esp + 0x1c]
push edx
mov edx, dword [esi + 0x10]
lea eax, [esp + 0x48]
push eax
mov eax, dword [esp + 0x30]
lea ecx, [esp + 0x40]
push ecx
mov ecx, dword [esp + 0x4c]
push edi
push ebx
push ebp
push edx
mov edx, dword [esp + 0x58]
push eax
push ecx
push edx
push 0
call sym.tcl85.dll_Tcl_ExternalToUtf
lea ecx, [esp + 0x4c]
push ecx
lea edx, [esp + 0x40]
push edx
push ebx
mov dword [esp + 0x8c], eax
mov eax, dword [esp + 0x7c]
push ebx
push esi
mov dword [esp + 0x50], edi
mov dword [esp + 0x60], eax
call fcn.1005edc0
mov edi, dword [esp + 0x60]
add esp, 0x40
cmp edi, dword [esp + 0x44]
jge 0x1005ec31
mov eax, dword [esi + 0x24]
test eax, eax
je 0x1005ebae
movsx ecx, byte [edi + ebx]
cmp ecx, eax
jne 0x1005ebae
test edi, edi
je 0x1005eccd
add edi, 3
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x30]
mov dword [esi + 4], edx
mov dword [esi + 0x10], eax
mov dword [ebp], ecx
jmp 0x1005eb18
cmp dword [esp + 0x10], 0
jg 0x1005eb91
cmp dword [esp + 0x54], 0
je 0x1005ec20
mov edx, dword [esp + 0x34]
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x2c]
mov dword [esi + 4], edx
mov dword [ebp], ecx
lea edx, [esp + 0x4c]
push edx
lea ecx, [esp + 0x5c]
push ecx
lea edx, [esp + 0x58]
push edx
mov edx, dword [esp + 0x34]
push 5
lea ecx, [esp + 0x6c]
push ecx
mov ecx, dword [esp + 0x50]
push ebp
push eax
push edx
mov dword [esi + 0x10], eax
mov eax, dword [esp + 0x60]
push eax
push ecx
push 0
call sym.tcl85.dll_Tcl_ExternalToUtf
add esp, 0x2c
cmp dword [esp + 0x4c], 2
jne 0x1005ec29
cmp byte [esp + 0x5d], 0xa
mov eax, dword [esp + 0x24]
jne 0x1005ec69
mov ecx, dword [esp + 0x50]
mov byte [ebx], 0xa
add dword [eax + 8], ecx
jmp 0x1005ec73
test dword [esi + 4], 0x200
jne 0x1005ec95
mov ecx, dword [esp + 0x1c]
mov edi, ecx
jmp 0x1005ec35
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
mov eax, edx
sub eax, edi
add ecx, eax
mov eax, dword [esp + 0x74]
mov dword [esp + 0x1c], ecx
test eax, eax
jle 0x1005eca4
cmp ecx, eax
jle 0x1005eca4
push eax
push ebx
call sym.tcl85.dll_Tcl_UtfAtIndex
mov ecx, 3
mov edi, eax
sub ecx, ebx
add esp, 8
add edi, ecx
jmp 0x1005eb94
mov edx, dword [esp + 0x38]
mov byte [ebx], 0xd
add dword [eax + 8], edx
mov byte [ebx + 1], 0
and dword [esi + 0x10], 0xfffffffe
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
inc eax
push eax
push ecx
call sym.tcl85.dll_Tcl_SetObjLength
mov eax, 1
jmp 0x1005eda6
mov eax, dword [esp + 0x24]
mov byte [ebx], 0xd
mov edx, dword [eax + 4]
mov dword [eax + 8], edx
jmp 0x1005ec7b
test edx, edx
jne 0x1005ed6a
cmp byte [ebx], 0xa
je 0x1005ed6e
mov ebp, dword [esp + 0x24]
mov edi, dword [ebp + 0x10]
test edi, edi
jne 0x1005ecf5
cmp dword [esp + 0x28], edi
jle 0x1005eccd
or dword [esi + 4], 0x4000
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
push edx
push eax
call sym.tcl85.dll_Tcl_SetObjLength
add esp, 8
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
mov ecx, dword [esp + 0x54]
xor ecx, esp
call fcn.100b30c8
add esp, 0x58
ret
mov ecx, dword [edi + 8]
mov ebx, dword [esp + 0x28]
sub ecx, ebx
jns 0x1005ed0d
push str.Buffer_Underflow__BUFFER_PADDING_not_enough
call sym.tcl85.dll_Tcl_Panic
add esp, 4
sub dword [edi + 8], ebx
mov eax, dword [edi + 8]
mov edx, dword [esp + 0x40]
push ebx
push edx
lea eax, [eax + edi + 0x14]
push eax
call sub.MSVCR90.dll_memcpy
push 0
mov eax, ebp
mov ecx, esi
call fcn.1005c020
mov ecx, dword [esp + 0x24]
mov dword [esi + 0x4c], edi
mov edi, dword [esp + 0x28]
push ecx
push edi
call sym.tcl85.dll_Tcl_SetObjLength
mov edx, dword [esp + 0x60]
mov eax, dword [esp + 0x8c]
push edx
push eax
push edi
push esi
call fcn.1005e920
add esp, 0x28
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x54]
xor ecx, esp
call fcn.100b30c8
add esp, 0x58
ret
and dword [esi + 0x10], 0xfffffffe
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x24]
add dword [edx + 8], eax
test ecx, ecx
je 0x1005ed8d
cmp ecx, eax
jge 0x1005ed8d
shl eax, 0xa
cdq
idiv ecx
mov ecx, dword [esp + 0x48]
mov dword [ecx], eax
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
add eax, edx
push eax
push ecx
call sym.tcl85.dll_Tcl_SetObjLength
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x6c]
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.100b30c8
add esp, 0x58
ret